From 71b0e5fa4c9b991ff83834c36670d7f4635fb461 Mon Sep 17 00:00:00 2001 From: Jon Wood Date: Wed, 21 Apr 2021 13:13:33 -0400 Subject: [PATCH] Merge from main repository (#1) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * update tensorflow.net to 0.20.0 (#5404) * upgrade to 3.1 * write inline data using invariantCulture * upodate tensorflow * update Microsoft.ML.Vision * fix test && comment * udpate tensorflow.net to 0.20.1 * update tf major version * downgrade tf runtime to 1.14.1 * Update Dependencies.props * Update Dependencies.props * update tffact to stop running test on linux with glibc < 2.3) * fix TensorFlowTransformInputShapeTest * use tf.v1 api * fix comment: * fix building error * fix test * fix nit * remove linq Co-authored-by: BigBigMiao * ProduceWordBags Onnx Export Fix (#5435) * fix for issue * fix documentation * aligning test * adding back line * aligning fix Co-authored-by: Keren Fuentes * [SrCnnEntireAnomalyDetector] Upgrade boundary calculation and expected value calculation (#5436) * adjust expected value * update boundary calculation * fix boundary * adjust default values * fix percent case * fix error in anomaly score calculation Co-authored-by: yuyi@microsoft.com * Update OnnxRuntime to 1.5.2 (#5439) * Added prerelease feed and updated to 1.5.2 * Remove prerelease feed * Updated docs * Update doc * Fixed MacOS CI Pipeline builds (#5457) * Added MacOS Homebrew bug fix * nit fix * Improving error message (#5444) * better error fix * revisions Co-authored-by: Keren Fuentes * Fixed MacOS daily & nightly builds due to Homebrew bug (#5467) * Fixed MacOS nightly builds due to Homebrew bug * Edit workaround * Remove untapping of python2 * Nit edit * Remove installation of mono-libgdiplus * try installing mono-libgdiplus * unlink python 3.8 * Auto.ML: Fix issue when parsing float string fails on pl-PL culture set using Regression Experiment (#5163) * Fix issue when parsing float string fails on pl-PL culture set * Added InvariantCulture float parsing as per CodeReview request * Update src/Microsoft.ML.AutoML/Sweepers/SweeperProbabilityUtils.cs Co-authored-by: Justin Ormont * Update Parameters.cs * Added PL test * Added multiple cultures * debugging CI failure * Debug runSpecific * Revert "Debug runSpecific" This reverts commit 95b728099415cacbe8cf3819ec51ce50cec94eb2. * Removed LightGBM and addressed comments * Increased time * Increase time * Increased time Co-authored-by: Justin Ormont Co-authored-by: Antonio Velazquez * handle exception during GetNextPipeline for AutoML (#5455) * handle exception during GetNextPipeline for AutoML * take comments * Changing LoadRawImages Sample (#5460) replacing example Co-authored-by: Keren Fuentes * Use Timer and ctx.CancelExecution() to fix AutoML max-time experiment bug (#5445) * Use ctx.CalncelExecution() to fix AutoML max-time experiment bug * Added unit test for checking canceled experiment * Nit fix * Different run time on Linux * Review * Testing four ouput * Used reflection to test for contexts being canceled * Reviews * Reviews * Added main MLContext listener-timer * Added PRNG on _context, held onto timers for avoiding GC * Addressed reviews * Unit test edits * Increase run time of experiment to guarantee probabilities * Edited unit test to check produced schema of next run model's predictions * Remove scheme check as different CI builds result in varying schemas * Decrease max experiment time unit test time * Added Timers * Increase second timer time, edit unit test * Added try catch for OperationCanceledException in Execute() * Add AggregateException try catch to slow unit tests for parallel testing * Reviews * Final reviews * Added LightGBMFact to binary classification test * Removed extra Operation Stopped exception try catch * Add back OperationCanceledException to Experiment.cs * fix issue 5020, allow ML.NET to load tf model with primitive input and output column (#5468) * handle exception during GetNextPipeline for AutoML * take comments * Enable TesnflowTransformer take primitive type as input column * undo unnecessary changes * add test * update on test * remove unnecessary line * take comments * maxModels instead of time for AutoML unit test (#5471) Uses the internal `maxModels` parameter instead of `MaxExperimentTimeInSeconds` for the exit criteria of AutoML. This is to increase the test stability in case the test is run on a slower machine. * Disabling AutoFitMaxExperimentTimeTest Disabling AutoFitMaxExperimentTimeTest * Fix AutoFitMaxExperimentTimeTest (#5506) *Fixed test Co-authored-by: Antonio Velazquez * Fix SR anomaly score calculation at beginning (#5502) * adjust expected value * update boundary calculation * fix boundary * adjust default values * fix percent case * fix error in anomaly score calculation * adjust score calculation for first & second points * fix sr do not report anomaly at beginning * fix a issue in batch process * remove a unused parameter Co-authored-by: yuyi@microsoft.com * Merge arcade to master (#5525) * Initial commit for Arcade migration * Added omitted files * Changed strong name signing to use the same key for shipping and test assemblies * arcade linux build (#5423) * arcade linux build * put file execution permission change into source control * The `-test` command for windows. Nuget packages (#5464) * working on testing * testing updates * tests almost working * build changes * all tests should be working * changes from PR comments * fixes for .net 3.1 * Fixed extension check. Removed where not needed * Removed pkg folder and updated paths. * Added test key. (#5475) * Added test key. * Update PublicKey.cs Removed extra newline. * Update ComponentCatalog.cs Fixed 3 spaces to 4. * Windows CI working (#5477) * ci testing changes * comments from pr * Added Linux & Mac changes for Arcade (#5479) * Initial Windows, Linux, Macos builds test * Add Linux/MacOS specific CI requirements * Run Arcade CI tests on MacOS/Linux * Fix final package building * Add benchmark download to benchmars .csporj file * Print detailed status of each unit test * Install CentOS & Ubuntu build dependencies * Use container names to differenciate between Ubuntu & CentOS * Remove sudo usage in CentOS * Fix Linux build dependencies * Add -y param to apt install * Remove installation of Linux dependencies * Minor additions * Rename Benchmarks to PerformanceTests for Arcade * Changes * Added benchmark doc changes * Pre-merge changes * Fixing failing Arcade Windows Builds (#5482) * Try Windows build single quote fix * Remove %20 * Added variable space value * Using variables for spacing * Added space values as job parameters * Try conditional variables again * fix official builds * Revert "fix official builds" This reverts commit 7dbbdc7b946f4f48db5452887ad9bf53616a37e8. * fixing tensorflow rebase issue * Fixes for many of the CI builds. (#5496) * yml log changes * Fix NetFX builds by ensuring assembly version is set correctly and not to Arcade default of 42.42.42.42 (#5503) * Fixed official builds for Arcade SDK (#5512) * Added fixes for official builds * Make .sh files executable * fix mkl nuget issue Co-authored-by: Frank Dong * fix code generator tests failure (#5520) * Added fixes for official builds * Make .sh files executable * fix mkl nuget issue * fix code generate test fails * only add necessary dependency Co-authored-by: Mustafa Bal <5262061+mstfbl@users.noreply.github.com> * Fixed memory leaks from OnnxTransformer (#5518) * Fixed memory leak from OnnxTransformer and related x86 build fixes * Reverting x86 build related fixes to focus only on the memory leaks * Updated docs * Reverted OnnxRuntimeOutputCatcher to private class * Addressed code review comments * Refactored OnnxTransform back to using MapperBase based on code review comments * Handle integration tests and nightly build testing (#5509) * Make -integrationTests work * Update .yml file * Added the TargetArchitecture properties * Try out -integrationTest * Missed -integrationTest flag * Renamed FunctionalTestBaseClass to IntegrationTestBaseClass * Missed rename * Modified tests to make them more stable * Fixed leak in object pool (#5521) Co-authored-by: frank-dong-ms <55860649+frank-dong-ms@users.noreply.github.com> Co-authored-by: Michael Sharp <51342856+michaelgsharp@users.noreply.github.com> Co-authored-by: Mustafa Bal <5262061+mstfbl@users.noreply.github.com> Co-authored-by: Frank Dong Co-authored-by: Michael Sharp Co-authored-by: Antonio Velázquez <38739674+antoniovs1029@users.noreply.github.com> * fix benchmark test timeout issue (#5530) * removed old build stuff (#5531) * Fixes Code Coverage in Arcade (#5528) * arcade code coverage changes * adding Michael's changes * updating path Co-authored-by: Keren Fuentes * Removed CODEOWNERS file to unify review process (#5535) * Fix publishing problems (#5538) * Removed our dependency to BuildTools by using the NugetCommand Azure Task. * We should publish a nuget named "SampleUtils", but we were publishing it with the name "SamplesUtils" * The naming conventions of our published nugets didn't match the ones described on arcade's docs: Versioning.md. I've also added the option so that when queuing the publishing build, we can pass the VERSIONKIND variable with value "release", so that it produces the nugets with arcade's conventions for "Release official build" nugets (as opposed to the "Daily official build" naming convention that's going to be used now by our CI that publishes nightly nugets). * Updated prerelease label (#5540) * Fix warnings from CI Build (#5541) * fix warnings * also add conditional copy asset to native.proj * test fix warnings * supress nuget warning 5118 * supress other warning * remove unnecessary change * put skip warning at Directory.Buil.props * Updated build instructions (#5534) * Updated build instructions * Adressed reviews * Reviews * removed the rest of the old pkg references: (#5537) * Perf improvement for TopK Accuracy and return all topK in Classification Evaluator (#5395) * Fix for issue 744 * cleanup * fixing report output * fixedTestReferenceOutputs * Fixed test reference outputs for NetCore31 * change top k acc output string format * Ranking algorithm now uses first appearance in dataset rather than worstCase * fixed benchmark * various minor changes from code review * limit TopK to OutputTopKAcc parameter * top k output name changes * make old TopK readOnly * restored old baselineOutputs since respecting outputTopK param means no topK in most test output * fix test fails, re-add names parameter * Clean up commented code * that'll teach me to edit from the github webpage * use existing method, fix nits * Slight comment change * Comment change / Touch to kick off build pipeline * fix whitespace * Added new test * Code formatting nits * Code formatting nit * Fixed undefined rankofCorrectLabel and trailing whitespace warning * Removed _numUnknownClassInstances and added test for unknown labels * Add weight to seenRanks * Nits * Removed FastTree import Co-authored-by: Antonio Velazquez Co-authored-by: Justin Ormont * Fixed Spelling on stopwords (#5524) * Changes to onnx export. (#5544) * Add back missing test project from running on arcade (#5545) * add back test result upload and add missing test project from running * fix identification * filter out performance test result files to avoid warnings * [CodeGenerator] Fix MLNet.CLI build error. (#5546) * upgrade to 3.1 * write inline data using invariantCulture * fix mlnet build error * Fixed AutoML CrossValSummaryRunner for TopKAccuracyForAllK (#5548) * Fixed bug * Tensorflow fix (#5547) * fix tensorflow issue on sample repo * add comments * Update to OnnxRuntime 1.6.0 and fixed bug with sequences outputs (#5529) * Use onnx prerelease * Upgrade to onnx 1.6.0 * Updated docs * Fixed problem with sequences * added in DcgTruncationLevel to AutoML api (#5433) * added in DcgTruncationLevel to automl api * changed default to 10 * updated basline output * fixed failing tests and baselines * Changes from PR comments. * Update src/Microsoft.ML.AutoML/Experiment/MetricsAgents/RankingMetricsAgent.cs Co-authored-by: Justin Ormont * Changes based on PR comments. * Fix ranking test. Co-authored-by: Justin Ormont * Created release notes for v1.5.3 (#5543) * Created release notes for v1.5.3 * Updated with review comments * Updated with review comments * Updated release notes with latest PRs * Fixed typo * Forward logs of Experiment's sub MLContexts to main MLContext (#5554) * Forward logs of Experiment's sub MLContexts to main MLContext * Adressed reviews * Update Stale docs (#5550) * Updated OnnxMl.md * Updated MlNetMklDeps docs * Typo * typo * continueOnError on Brew Workaround (#5555) * continueOnError:true * Fix publishing symbols (#5556) * Disable Portable PDB conversion * Push packages to artifacts * Fix symbols issues * Added note about Microsoft.ML.dll * try out just packing * Return Build=false, but actually use configuration * Added missing TargetArchitecture * add back tests * Added missing flags * Updated version to 1.5.4 (#5557) * Fixed version numbers in the right place (#5558) * Updated version to 1.5.4 * Updated version to 1.5.4 * eng (#5560) * Renamed release notes file (#5561) * Renamed release notes file * Updated version number in release notes * Add SymSgdNative reference to AutoML.Tests.csproj (#5559) * runSpecific in YAML * RunSpecific in test * Add SymSgdNative reference * Revert "RunSpecific in test" This reverts commit fed12b26ae71e7a95d2dd1f4703541138a780d75. * Revert "runSpecific in YAML" This reverts commit f9f328d52cd5b4281ad38b7a6af20c219dd0fd44. * Nuget.config url fix for roslyn compilers (#5584) * fixed nuget url, versions, and failing tests * changes from pr comments and MacOS changes * MacOS homebrew bug workaround * removed unnused nuget url * added in note that PredictionEngine is not thread safe (#5583) * Onnx Export for ValueMapping estimator (#5577) * Fixed Averaged Perceptron default value (#5586) * fixed missed averaged perceptron default value * fixed extension api * fixed test baselines * fixing official build (#5596) * Release/1.5.4 fix (#5599) * Nuget.config url fix for roslyn compilers (#5584) * fixed nuget url, versions, and failing tests * changes from pr comments and MacOS changes * MacOS homebrew bug workaround * removed unnused nuget url * fixing official build (#5596) * Remove references to Microsoft.ML.Scoring (#5602) This was the very first ONNX .NET bindings, it was replaced with Microsoft.ML.OnnxRuntime then Microsoft.ML.OnnxRuntime.Managed. * Make ColumnInference serializable (#5611) * upgrade to 3.1 * write inline data using invariantCulture * make column inference serializable * add test json * add approvaltests * fixerd nuget.config (#5614) * Fix issue in SRCnnEntireAnomalyDetector (#5579) * update * refine codes * update comments * update for nit Co-authored-by: yuyi@microsoft.com * Offer suggestions for possibly mistyped label column names in AutoML (#5574) (#5624) * Offer suggestions for possibly mistyped label column names * review changes * TimeSeries - fix confidence parameter type for some detectors (#4058) (#5623) * TimeSeries - fix confidence parameter type for some detectors. - The public API exposed confidence parameters as int even though it's internally implemented as double - There was no workaround since all classes where double is used are internal - This caused major issues for software requiring high precision predictions - This change to API should be backwards compatible since int can be passed to parameter of type double * TimeSeries - reintroduce original methods with confidence parameter of type int (to not break the API). * TimeSeries - make catalog API methods with int confidence parameter deprecated. - Tests adjusted to not use the deprecated methods * Update Conversion.cs (#5627) * Documentation updates (#5635) * documentation updates * fixed spelling error * Update docs/building/unix-instructions.md Co-authored-by: Santiago Fernandez Madero Co-authored-by: Santiago Fernandez Madero * AutoML aggregate exception (#5631) * added check for aggregate exception * Update src/Microsoft.ML.AutoML/Experiment/Experiment.cs Co-authored-by: Eric Erhardt * Update src/Microsoft.ML.AutoML/Experiment/Experiment.cs Co-authored-by: Eric Erhardt * pulled message out to private variable so its not duplicated * Update src/Microsoft.ML.AutoML/Experiment/Experiment.cs Co-authored-by: Justin Ormont Co-authored-by: Eric Erhardt Co-authored-by: Justin Ormont * Treat TensorFlow output as non-batched. (#5634) * Can now not treat output as batched. * updated comments based on PR comments. * Fixing saving/loading with new parameter. * Updates based on PR comments * Update src/Microsoft.ML.TensorFlow/TensorflowUtils.cs Co-authored-by: Eric Erhardt * reverted accidental test changes * fixes based on PR comments Co-authored-by: Eric Erhardt * Added in release notes for 1.5.5 (#5639) * added in release notes * Update release-1.5.5.md Removed incorrect PR. * Update docs/release-notes/1.5.5/release-1.5.5.md Co-authored-by: Eric StJohn * Update docs/release-notes/1.5.5/release-1.5.5.md Co-authored-by: Eric StJohn * Update release-1.5.5.md Co-authored-by: Eric StJohn * updating version after release (#5642) * Move DataFrame to machinelearning (#5641) * Change namespace to Microsoft.Data.Analysis (#2773) * Update namespace to Microsoft.Data.Analysis * Remove "DataFrame" from the test project name * APIs for reversed binary operators (#2769) * Support reverse binary operators * Fix file left behind in a rebase * Fix whitespace * Throw for incompatible inPlace (#2778) * Throw if inPlace is set and types mismatch * Unit test * Better error message * Remove empty lines * Version, Tags and Description for Nuget (#2779) * Version, Tags and Description for Nuget * sq * Flags for release (#2781) * Publish packages to artifacts * Flags for release * Fix the Description method to not throw (#2786) * Fix the Description method to not crash Adds an Info method * sq * Address feddback * Last round of feedback * Use dataTypes if it passed in to LoadCsv (#2791) * Fix LoadCsv to use dataType if it passed in * sq * Don't read the full file after guessRows lines have been read * Address feedback * Last round of feedback * Creating a `Rows` property, similar to `Columns` (#2794) * Rows collection, similar to Columns * Doc * Some minor clean up * Make DataFrameRow a view into the DataFrame * sq * Address feedback * Remove DataFrame.RowCount * More row count changes * sq * Address feedback * Merge upstream * DataFrame.LoadCsv throws an exception on projects targeting < netcore3.0 (#2797) Fixing by passing in an encoding and a default buffer size. Also, get our tests running on .NET Framework. Fix #2783 * Params constructor on DataFrame (#2800) * Params constructor on DataFrame * Delete redundant constructors * Remove `T : unmanaged` constraint from DataFrameColumn.BinaryOperations (#2801) * Remove T : unmanaged constraint from DataFrameColumn.BinaryOperations * Address feedback * Rename the value version of the APIs * sq * Fix build * Address feedback * Remove Value from the APIs * sq * Address feedback * Bump version to 0.2.0 (#2803) * Add Applymethod to PrimitiveDataFrameColumn (#2807) * Add Apply method to PrimitiveDataFrameColumn and its container * Add TestApply test * Remove unused df variable in DataFrameTests * Add xml doc comments to Apply method * Add additional tests for ReadCsv (#2811) * Add additional tests for ReadCsv * Update asserts * Add empty row and skip test pending another fix * Remove test for another issue * Added static factory methods to DataFrameColumn (#2808) * Added static factory methods to DataFrameColumn where they make sense (for the overloads where its possible to infer the column's type). * Remove regions * Update some parts of the unit tests to use static factory methods to create DataFrameColumns. * Remove errant {T} on StringDataFrameColumn. * PR feedback Co-authored-by: Eric Erhardt * Append rows to a DataFrame (#2823) * Append rows to a DataFrame * Unit test * Update unit tests and doc * Need to perfrom a type check every time * sq * Update unit test * Address comments * Move corefxlab to arcade (#2795) * Add eng folder * First cut of moving corefxlab to arcade * Move arcade symbol validation inside official buil * Move base yml file to root * Arcade will build, publish packages and symbols * UpdateXlf. Review this * Arcade Update to version 5.0.0-beta.19575.4 to include Experimental Channel * Remove property that was causing the build to fail * Moving global properties to the main Yaml instead of step in order to unblock publishing * Committing xlfs and changing the build script to not update Xlf on build * clean up corefxlab-base.yml * sq * Delete unused files and scripts * Get rid of all the xlf stuff * Remove UpdateXlfOnBuild for non-NT builds * Minor cleanup * More cleanup * update eng\build.sh permission * Rename to Nuget.config * sq * Remove the runtime spec from global.json * Don't publish test projs * Typo * Move version prefix to versions.props Change prereleaselabel to alpha * Increment version number to list as the latest package Increment version number of Microsoft.Experimental.Collections to list as the latest package Turn off graph generation * Update the Readme * Test removing the scripts folder * Touch readme to force a change * Address Jose's comments * Typo * Move versions to eng/versions.props * Benchmark.proj needs to refer to xunit * Clean up dependencies.props * Remove dependencies.props Co-authored-by: Jose Perez Rodriguez * Rename Sort to OrderBy (#2814) * Rename sort to orderby and add orderbydescending method * Add doc strings * Update bench mark test * Update tests * Update DataFrameColumn to use orderby * Update doc comment * Additions to sortby * Revert "Additions to sortby" This reverts commit 3931d4e2a72ce44a539be7c27b2592395f3efd35. * Revert "Update doc comment" This reverts commit 192f7797fe2b77625486637badf77046162fedbf. * Revert "Update DataFrameColumn to use orderby" This reverts commit 8f94664c5fd18570cd2b601535e816ca5dd5e3c4. * Explode column types and generate converters (#2857) * Explode column types and generate converters * Clean this * sq * sq * Cherry pick for next commit * sq * Undo unnecessary change * Address remaining concerns from the 2nd DataFrame API Review (#2861) * Move string indexer to Columns * API changes from the 2nd API review * Unit tests * Address comments * Add binary operations and operators on the exploded columns (#2867) * Generate combinations of binary operations and Add * Numeric Converters and CloneAsNumericColumns * Binary, Comparison and Shift operations * Clean up and bug fix * Fix the binary op apis to not be overridden * Internal constructors for exploded types * Proper return types for exploded types * Update unit tests * Update csproj * Revert "Fix the binary op apis to not be overridden" This reverts commit 2dc2240c9449930139c1492d1388d5e1f8ba5fa1. * Bug fix and unit test * Constructor that takes in a container * Unit tests * Call the implementation where possible * Review sq * sq * Cherry pick for next commit * sq * Undo unnecessary change * Rename to the system namespace column types * Address comments * Push to pull locally * Mimic C#'s arithmetic grammar in DataFrame * Address feedback * Reduce the number of partial column definitions * Address feedback * Add APIs to get the strongly typed columns from a DataFrame (#2878) * CP * sq * sq * Improve docs * Enable xml docs for Data.Analysis (#2882) * Enable xml docs for Data.Analysis * Fix /// summary around inheritdoc * Minor doc changes * sq * sq * Address feedback * Add Apply to ArrowStringDataFrameColumn (#2889) * Support for Exploded columns types in Arrow and IO scenarios (#2885) * Support for Exploded columns types in Arrow and IO scenarios * Unit tests * Address feedback * Bump version (#2890) * Fix versioning to allow for individual stable packages (#2891) * Fix versioning to allow for individual stable packages * sq * Bump Microsoft.Data.Analysis version to 0.4.0 (#2892) * Bump Microsoft.Data.Analysis version to 0.4.0 * Fix https://github.com/dotnet/corefxlab/issues/2906 (#2907) * Fix https://github.com/dotnet/corefxlab/issues/2906 * Improvements and unit tests * sq * Better fix * sq * Improve LoadCsv to handle null values when deducing the column types (#2916) * Unit test to repro * Fix https://github.com/dotnet/corefxlab/issues/2915 Append a null value to a column when encountering it instead of changing the column type to a StringDataFrameColumn * Update src/Microsoft.Data.Analysis/DataFrame.IO.cs Co-authored-by: Günther Foidl * Update src/Microsoft.Data.Analysis/DataFrame.cs Co-authored-by: Günther Foidl * Feedback Co-authored-by: Günther Foidl * Create a 0.4.0 package (#2918) * Revert "Create a 0.4.0 package (#2918)" (#2919) This reverts commit 0bef531289744274ab97e8bbb9e5694b0d855689. * Produce a 0.4.0 build (#2920) * Default Length for StringDataFrameColumn (#2921) (#2923) * Increment version and stop producing stable packages (#2922) * Increment version and stop producing stable packages * Add DataFrame object formatter. (#2931) * Add DataFrame object formatter. * Update nuget dependencies. * Apply CR fixes. * Fix a bug in InsertColumn * Add Microsoft.Data.Analysis.nuget project (#2933) * Add DataFrame object formatter. * Update nuget dependencies. * Apply CR fixes. * Remove ReferenceOutputAssembly added to from Microsoft.Data.Analysys.csproj. * Add Microsoft.Data.Analysis.nuget project. * Move project to src. Fix nuget project settings. * Remove NoBuild property from project. * Remove IncludeBuildOutput and IncludeSymbols from project. * Add VersionPrefix to project. * Add IncludeBuildOutput property. * Add unit tests. * Downgrade from netcoreapp3.1 to netcoreapp3.0 * Upgrade from netcoreapp3.0 to netcoreapp3.1 (dotnet interactive is not compatible with 3.0) * Add netcoreapp3.1 to global settings * Add dotnet 3.1.5 runtime to global settings * Build fixes * Moving MDAI into interactive-extensions folder of the package * Minor refactoring * Respond to PR feedback Co-authored-by: Prashanth Govindarajan Co-authored-by: Jose Perez Rodriguez Co-authored-by: Eric Erhardt * ColumnName indexer on DataFrame (#2959) * ColumnName indexer on DataFrame Fixes https://github.com/dotnet/corefxlab/issues/2934 * Unit tests * Null column name * Implement FillNulls() for ArrowStringDataFrameColumn with inPlace: false (#2956) * implement FillNulls method for ArrowStringDataFrameColumn * additional asserts for testcase * Prevent DataFrame.Sample() method from returning duplicated rows (#2939) * resolves #2806 * replace forloop with ArraySegment * reduce shuffle loop operations from O(Rows.Count) to O(numberOfRows) * Add WriteCsv plus unit tests. (#2947) * Add WriteCsv plus unit tests. * Add CultureInfo to WriteCsv. Remove index column param. Update unit tests. * Add CR changes. CultureInfo. Separator. * Format decimal types individually. Fix culture info. Fix unit tests. * Format decimal types individually. Fix culture info. Fix unit tests. * Missing values default to a `StringDataFrameColumn` (#2982) * Make LoadCsv more robust * Test empty string column * Retain prev guess where possible * Update FromArrowRecordBatches for dotnet-spark (#2978) * Support for RecordBatches with StructArrays * Sq * Address comments * Nits * Nits * Implement DataFrame.LoadCsvFromString (#2988) * Implement DataFrame.LoadCsvFromString * Address comments * Part 1 of porting the csv reader (#2997) * Move to the test folder * Suppress warnings * Move extensions reference out of props Make MDA.test use the props defined TFM Comment out 2 unit tests * Address feedback * Address feedback * Default to preview version * Update nuget.config Co-authored-by: Eric Erhardt Co-authored-by: Haytam Zanid <34218324+zHaytam@users.noreply.github.com> Co-authored-by: Jon Wood Co-authored-by: Sam <1965570+MgSam@users.noreply.github.com> Co-authored-by: Jose Perez Rodriguez Co-authored-by: Günther Foidl Co-authored-by: Rhys Parry Co-authored-by: daniel costea Co-authored-by: Ramon <56896136+RamonWill@users.noreply.github.com> * Update to the latest Microsoft.DotNet.Interactive (#5710) * Update to the latest Microsoft.DotNet.Interactive * Add System.CommandLine nuget feed * Fix Data.Analysis.Interactive test * added main branch to yml files (#5715) * Renamed master to main (#5717) * renamed master to main * Update vsts-ci.yml * updated urls * renamed master to main (#5719) * IDataView to DataFrame (#5712) * IDataView -> DataFrame Implement the virtual function * More APIs and unit tests * ANother unit test * Address feedback * Last bit of feedback * Fix some stuff and unit tests * sq * Move RowCursor back * Remove unused param Docs maxRows More unit tests Fixed ArrowStringDataFrameColumn construction in the unit test * Improve csv parsing (#5711) * Part 2 of TextFieldParser. Next up is hooking up ReadCsv to use TextFieldParser * Make LoadCsv use TextFieldParser * More unit tests * cleanup * Address feedback * Last bit of feedback * Remove extra var * Remove duplicate file * Rename strings.resx to Strings.resx * rename the designer.cs file too * Fix doc markdown (#5732) Fixed documentation markdown remarks for * MulticlassClassificationMetrics.LogLoss * MulticlassClassificationMetrics.LogLossReduction Signed-off-by: Robin Windey * Use Official package for SharpZipLib (#5735) Co-authored-by: Xiaoyun Zhang Co-authored-by: BigBigMiao Co-authored-by: Keren Fuentes Co-authored-by: Keren Fuentes Co-authored-by: Yuanxiang Ying Co-authored-by: yuyi@microsoft.com Co-authored-by: Antonio Velázquez <38739674+antoniovs1029@users.noreply.github.com> Co-authored-by: Mustafa Bal <5262061+mstfbl@users.noreply.github.com> Co-authored-by: Piotr Telman Co-authored-by: Justin Ormont Co-authored-by: Antonio Velazquez Co-authored-by: frank-dong-ms <55860649+frank-dong-ms@users.noreply.github.com> Co-authored-by: Harish Kulkarni Co-authored-by: Michael Sharp <51342856+michaelgsharp@users.noreply.github.com> Co-authored-by: Frank Dong Co-authored-by: Michael Sharp Co-authored-by: Jason DeBoever Co-authored-by: Leo Gaunt <36968548+LeoGaunt@users.noreply.github.com> Co-authored-by: Keren Fuentes Co-authored-by: Eric StJohn Co-authored-by: Ivan Agarský Co-authored-by: Andrej Kmetík Co-authored-by: Phan Tấn Tài <37982283+4201104140@users.noreply.github.com> Co-authored-by: Santiago Fernandez Madero Co-authored-by: Eric Erhardt Co-authored-by: Prashanth Govindarajan Co-authored-by: Haytam Zanid <34218324+zHaytam@users.noreply.github.com> Co-authored-by: Jon Wood Co-authored-by: Sam <1965570+MgSam@users.noreply.github.com> Co-authored-by: Jose Perez Rodriguez Co-authored-by: Günther Foidl Co-authored-by: Rhys Parry Co-authored-by: daniel costea Co-authored-by: Ramon <56896136+RamonWill@users.noreply.github.com> Co-authored-by: Robin Windey --- .editorconfig | 5 + .github/CODEOWNERS | 14 - .gitignore | 7 +- .vsts-dotnet-ci.yml | 6 +- BuildToolsVersion.txt | 1 - Directory.Build.props | 142 +- Directory.Build.targets | 114 +- DotnetCLIVersion.txt | 1 - DotnetExtraRuntimeVersion.txt | 1 - Microsoft.ML.sln | 412 +- NuGet.config | 20 + README.md | 26 +- build.cmd | 5 +- build.proj | 159 - build.sh | 2 +- build/.night-build.yml | 6 +- build/.outer-loop-build.yml | 8 +- build/Codecoverage.proj | 8 +- build/Dependencies.props | 65 - build/ci/job-template.yml | 84 +- build/publish.proj | 44 +- build/sign.proj | 50 - build/vsts-ci.yml | 123 +- config.json | 250 - docs/README.md | 8 +- docs/api-reference/tensorflow-usage.md | 14 +- docs/building/MlNetMklDeps/README.md | 115 +- .../process_architecture_run_tests_vs.png | Bin 0 -> 39747 bytes docs/building/netcoreapp3.1-instructions.md | 4 +- docs/building/unix-instructions.md | 6 +- docs/building/windows-instructions.md | 18 +- docs/code/EntryPoints.md | 28 +- docs/project-docs/contributing.md | 2 +- docs/project-docs/developer-guide.md | 37 +- docs/project-docs/release-process.md | 4 +- docs/release-notes/0.10/release-0.10.md | 16 +- docs/release-notes/1.1.0/release-1.1.0.md | 30 +- docs/release-notes/1.2.0/release-1.2.0.md | 26 +- docs/release-notes/1.3.1/release-1.3.1.md | 22 +- .../1.4.0-preview/release-1.4.0-preview.md | 22 +- .../1.4.0-preview2/release-1.4.0-preview2.md | 10 +- docs/release-notes/1.4.0/release-1.4.0.md | 34 +- .../1.5.0-preview/release-1.5.0-preview.md | 16 +- docs/release-notes/1.5.4/release-1.5.4.md | 45 + docs/release-notes/1.5.5/release-1.5.5.md | 39 + .../Microsoft.ML.AutoML.Samples.csproj | 8 + .../Microsoft.ML.Samples.GPU.csproj | 8 +- .../Dynamic/ModelOperations/OnnxConversion.cs | 5 +- .../ApplyONNXModelWithInMemoryImages.cs | 8 +- .../Conversion/MapKeyToBinaryVector.cs | 6 +- .../Conversion/MapKeyToValueMultiColumn.cs | 8 +- .../Transforms/Conversion/MapKeyToVector.cs | 6 +- .../Conversion/MapKeyToVectorMultiColumn.cs | 4 +- .../Conversion/MapValueToKeyMultiColumn.cs | 4 +- .../TimeSeries/DetectChangePointBySsa.cs | 2 +- .../DetectChangePointBySsaBatchPrediction.cs | 2 +- .../DetectChangePointBySsaStream.cs | 2 +- .../TimeSeries/DetectIidChangePoint.cs | 2 +- .../DetectIidChangePointBatchPrediction.cs | 2 +- .../Transforms/TimeSeries/DetectIidSpike.cs | 2 +- .../DetectIidSpikeBatchPrediction.cs | 2 +- .../Transforms/TimeSeries/DetectSpikeBySsa.cs | 2 +- .../DetectSpikeBySsaBatchPrediction.cs | 2 +- .../Microsoft.ML.Samples.csproj | 7 +- docs/specs/mlnet-cli/MLNET-CLI-Specs.md | 102 +- .../mlnet-database-loader-specs.md | 66 +- {build => eng}/BranchInfo.props | 4 +- eng/Build.props | 17 + .../ExternalBenchmarkDataFiles.props | 0 eng/Signing.props | 14 + {build => eng}/TensorflowMetaFiles.props | 0 eng/Tools.props | 9 + eng/Version.Details.xml | 67 + eng/Versions.props | 141 + eng/common/CIBuild.cmd | 2 + eng/common/PSScriptAnalyzerSettings.psd1 | 11 + eng/common/README.md | 28 + eng/common/SetupNugetSources.ps1 | 160 + eng/common/SetupNugetSources.sh | 167 + eng/common/build.ps1 | 161 + eng/common/build.sh | 239 + eng/common/cibuild.sh | 16 + eng/common/cross/arm/sources.list.bionic | 11 + eng/common/cross/arm/sources.list.jessie | 3 + eng/common/cross/arm/sources.list.trusty | 11 + eng/common/cross/arm/sources.list.xenial | 11 + eng/common/cross/arm/sources.list.zesty | 11 + eng/common/cross/arm/trusty-lttng-2.4.patch | 71 + eng/common/cross/arm/trusty.patch | 97 + eng/common/cross/arm64/sources.list.bionic | 11 + eng/common/cross/arm64/sources.list.buster | 11 + eng/common/cross/arm64/sources.list.stretch | 12 + eng/common/cross/arm64/sources.list.trusty | 11 + eng/common/cross/arm64/sources.list.xenial | 11 + eng/common/cross/arm64/sources.list.zesty | 11 + eng/common/cross/arm64/tizen-build-rootfs.sh | 35 + eng/common/cross/arm64/tizen-fetch.sh | 170 + eng/common/cross/arm64/tizen/tizen.patch | 9 + eng/common/cross/armel/sources.list.jessie | 3 + eng/common/cross/armel/tizen-build-rootfs.sh | 35 + eng/common/cross/armel/tizen-fetch.sh | 170 + eng/common/cross/armel/tizen/tizen-dotnet.ks | 50 + eng/common/cross/armel/tizen/tizen.patch | 9 + eng/common/cross/build-android-rootfs.sh | 131 + eng/common/cross/build-rootfs.sh | 349 + eng/common/cross/toolchain.cmake | 235 + eng/common/darc-init.ps1 | 47 + eng/common/darc-init.sh | 82 + .../dotnet-install-scripts/dotnet-install.ps1 | 774 + .../dotnet-install-scripts/dotnet-install.sh | 1133 ++ eng/common/dotnet-install.cmd | 2 + eng/common/dotnet-install.ps1 | 28 + eng/common/dotnet-install.sh | 89 + eng/common/enable-cross-org-publishing.ps1 | 13 + eng/common/generate-graph-files.ps1 | 86 + eng/common/helixpublish.proj | 26 + eng/common/init-tools-native.cmd | 3 + eng/common/init-tools-native.ps1 | 152 + eng/common/init-tools-native.sh | 173 + eng/common/internal-feed-operations.ps1 | 134 + eng/common/internal-feed-operations.sh | 143 + eng/common/internal/Directory.Build.props | 4 + eng/common/internal/Tools.csproj | 28 + eng/common/msbuild.ps1 | 26 + eng/common/msbuild.sh | 58 + eng/common/native/CommonLibrary.psm1 | 399 + eng/common/native/common-library.sh | 168 + eng/common/native/find-native-compiler.sh | 121 + eng/common/native/install-cmake-test.sh | 117 + eng/common/native/install-cmake.sh | 117 + eng/common/native/install-tool.ps1 | 132 + eng/common/performance/blazor_perf.proj | 30 + eng/common/performance/crossgen_perf.proj | 69 + eng/common/performance/microbenchmarks.proj | 144 + eng/common/performance/performance-setup.ps1 | 147 + eng/common/performance/performance-setup.sh | 289 + eng/common/pipeline-logging-functions.ps1 | 242 + eng/common/pipeline-logging-functions.sh | 182 + .../post-build/add-build-to-channel.ps1 | 48 + .../post-build/check-channel-consistency.ps1 | 40 + eng/common/post-build/nuget-validation.ps1 | 24 + eng/common/post-build/post-build-utils.ps1 | 91 + eng/common/post-build/publish-using-darc.ps1 | 74 + .../post-build/sourcelink-validation.ps1 | 276 + eng/common/post-build/symbols-validation.ps1 | 268 + .../post-build/trigger-subscriptions.ps1 | 64 + eng/common/sdk-task.ps1 | 97 + eng/common/sdl/NuGet.config | 13 + eng/common/sdl/execute-all-sdl-tools.ps1 | 120 + eng/common/sdl/extract-artifact-packages.ps1 | 80 + eng/common/sdl/init-sdl.ps1 | 67 + eng/common/sdl/packages.config | 4 + eng/common/sdl/push-gdn.ps1 | 69 + eng/common/sdl/run-sdl.ps1 | 73 + eng/common/templates/job/execute-sdl.yml | 91 + .../templates/job/generate-graph-files.yml | 48 + eng/common/templates/job/job.yml | 242 + eng/common/templates/job/performance.yml | 95 + .../templates/job/publish-build-assets.yml | 93 + eng/common/templates/jobs/jobs.yml | 72 + eng/common/templates/phases/base.yml | 130 + .../templates/phases/publish-build-assets.yml | 51 + .../channels/generic-internal-channel.yml | 182 + .../channels/generic-public-channel.yml | 184 + .../templates/post-build/common-variables.yml | 99 + .../templates/post-build/post-build.yml | 605 + .../post-build/setup-maestro-vars.yml | 77 + .../post-build/trigger-subscription.yml | 13 + .../templates/steps/add-build-to-channel.yml | 13 + eng/common/templates/steps/build-reason.yml | 12 + .../templates/steps/perf-send-to-helix.yml | 68 + eng/common/templates/steps/publish-logs.yml | 23 + eng/common/templates/steps/run-on-unix.yml | 7 + eng/common/templates/steps/run-on-windows.yml | 7 + .../steps/run-script-ifequalelse.yml | 33 + eng/common/templates/steps/send-to-helix.yml | 94 + eng/common/templates/steps/telemetry-end.yml | 102 + .../templates/steps/telemetry-start.yml | 241 + eng/common/tools.ps1 | 767 + eng/common/tools.sh | 507 + {pkg/common => eng/pkg}/CommonPackage.props | 0 .../pkg}/DnnImageFeaturizer.props | 0 eng/pkg/Pack.props | 78 + {pkg => eng/pkg}/_._ | 0 {pkg => eng/pkg}/mlnetlogo.png | Bin eng/snk/Test.snk | Bin 0 -> 596 bytes global.json | 16 + init-tools.cmd | 128 - init-tools.msbuild | 13 - init-tools.sh | 207 - pkg/Directory.Build.props | 59 - .../Microsoft.Extensions.ML.nupkgproj | 16 - .../Microsoft.Extensions.ML.symbols.nupkgproj | 5 - .../Microsoft.ML.AutoML.nupkgproj | 17 - .../Microsoft.ML.AutoML.symbols.nupkgproj | 3 - .../Microsoft.ML.CodeGenerator.nupkgproj | 17 - ...crosoft.ML.CodeGenerator.symbols.nupkgproj | 3 - .../Microsoft.ML.CpuMath.nupkgproj | 16 - .../Microsoft.ML.CpuMath.symbols.nupkgproj | 13 - .../Microsoft.ML.DataView.nupkgproj | 13 - .../Microsoft.ML.DataView.symbols.nupkgproj | 5 - ...ft.ML.DnnImageFeaturizer.AlexNet.nupkgproj | 17 - ...nImageFeaturizer.AlexNet.symbols.nupkgproj | 5 - ....ML.DnnImageFeaturizer.ResNet101.nupkgproj | 16 - ...mageFeaturizer.ResNet101.symbols.nupkgproj | 5 - ...t.ML.DnnImageFeaturizer.ResNet18.nupkgproj | 16 - ...ImageFeaturizer.ResNet18.symbols.nupkgproj | 5 - ...t.ML.DnnImageFeaturizer.ResNet50.nupkgproj | 16 - ...ImageFeaturizer.ResNet50.symbols.nupkgproj | 5 - .../Microsoft.ML.Ensemble.nupkgproj | 12 - .../Microsoft.ML.Ensemble.symbols.nupkgproj | 3 - .../Microsoft.ML.EntryPoints.nupkgproj | 12 - ...Microsoft.ML.EntryPoints.symbols.nupkgproj | 5 - .../Microsoft.ML.Experimental.nupkgproj | 12 - ...icrosoft.ML.Experimental.symbols.nupkgproj | 5 - .../Microsoft.ML.FastTree.nupkgproj | 16 - .../Microsoft.ML.FastTree.symbols.nupkgproj | 5 - .../Microsoft.ML.Featurizers.nupkgproj | 14 - ...Microsoft.ML.Featurizers.symbols.nupkgproj | 5 - .../Microsoft.ML.ImageAnalytics.nupkgproj | 13 - ...rosoft.ML.ImageAnalytics.symbols.nupkgproj | 5 - .../Microsoft.ML.LightGbm.nupkgproj | 14 - .../Microsoft.ML.LightGbm.symbols.nupkgproj | 5 - .../Microsoft.ML.Mkl.Components.nupkgproj | 17 - ...rosoft.ML.Mkl.Components.symbols.nupkgproj | 5 - .../Microsoft.ML.Mkl.Redist.nupkgproj | 20 - .../Microsoft.ML.OnnxConverter.nupkgproj | 13 - ...crosoft.ML.OnnxConverter.symbols.nupkgproj | 5 - .../Microsoft.ML.OnnxTransformer.nupkgproj | 14 - ...osoft.ML.OnnxTransformer.symbols.nupkgproj | 5 - .../Microsoft.ML.Parquet.nupkgproj | 13 - .../Microsoft.ML.Parquet.symbols.nupkgproj | 5 - .../Microsoft.ML.Recommender.nupkgproj | 14 - ...Microsoft.ML.Recommender.symbols.nupkgproj | 5 - .../Microsoft.ML.SampleUtils.nupkgproj | 12 - ...Microsoft.ML.SampleUtils.symbols.nupkgproj | 5 - .../Microsoft.ML.TensorFlow.nupkgproj | 15 - .../Microsoft.ML.TensorFlow.symbols.nupkgproj | 5 - .../Microsoft.ML.TimeSeries.nupkgproj | 13 - .../Microsoft.ML.TimeSeries.symbols.nupkgproj | 5 - .../Microsoft.ML.Vision.nupkgproj | 12 - .../Microsoft.ML.Vision.symbols.nupkgproj | 5 - pkg/Microsoft.ML/Microsoft.ML.nupkgproj | 24 - .../Microsoft.ML.symbols.nupkgproj | 13 - restore.cmd | 3 + restore.sh | 13 + run.cmd | 28 - run.sh | 21 - sign.cmd | 3 + src/Directory.Build.props | 5 +- src/Directory.Build.targets | 2 +- .../DataFrameKernelExtension.cs | 155 + ...Microsoft.Data.Analysis.Interactive.csproj | 17 + .../ArrowStringDataFrameColumn.cs | 656 + .../BooleanDataFrameColumn.cs | 23 + .../ByteDataFrameColumn.cs | 23 + .../CharDataFrameColumn.cs | 23 + .../ColumnArithmeticTemplate.ttinclude | 458 + src/Microsoft.Data.Analysis/Converters.cs | 948 + src/Microsoft.Data.Analysis/Converters.tt | 84 + .../DataFrame.Arrow.cs | 188 + .../DataFrame.BinaryOperations.cs | 698 + .../DataFrame.BinaryOperations.tt | 136 + .../DataFrame.BinaryOperators.cs | 577 + .../DataFrame.BinaryOperators.tt | 52 + .../DataFrame.IDataView.cs | 141 + src/Microsoft.Data.Analysis/DataFrame.IO.cs | 489 + src/Microsoft.Data.Analysis/DataFrame.Join.cs | 369 + src/Microsoft.Data.Analysis/DataFrame.cs | 668 + .../DataFrameBuffer.cs | 97 + .../DataFrameColumn.BinaryOperations.cs | 320 + .../DataFrameColumn.BinaryOperations.tt | 82 + .../DataFrameColumn.BinaryOperators.cs | 652 + .../DataFrameColumn.BinaryOperators.tt | 67 + .../DataFrameColumn.Computations.cs | 176 + .../DataFrameColumn.Computations.tt | 44 + .../DataFrameColumn.cs | 614 + .../DataFrameColumnCollection.cs | 458 + src/Microsoft.Data.Analysis/DataFrameRow.cs | 70 + .../DataFrameRowCollection.cs | 56 + .../DecimalDataFrameColumn.cs | 23 + .../DoubleDataFrameColumn.cs | 23 + src/Microsoft.Data.Analysis/GroupBy.cs | 468 + .../IDataView.Extension.cs | 144 + .../Int16DataFrameColumn.cs | 23 + .../Int32DataFrameColumn.cs | 23 + .../Int64DataFrameColumn.cs | 23 + .../Microsoft.Data.Analysis.csproj | 250 + ...imitiveColumnContainer.BinaryOperations.cs | 234 + ...imitiveColumnContainer.BinaryOperations.tt | 56 + .../PrimitiveColumnContainer.cs | 850 + ...umn.BinaryOperationAPIs.ExplodedColumns.cs | 15832 ++++++++++++++++ ...umn.BinaryOperationAPIs.ExplodedColumns.tt | 606 + ...BinaryOperationImplementations.Exploded.cs | 2395 +++ ...BinaryOperationImplementations.Exploded.tt | 235 + ...ameColumn.BinaryOperations.Combinations.tt | 116 + ...mn.BinaryOperations.Combinations.ttinclude | 271 + ...imitiveDataFrameColumn.BinaryOperations.cs | 2624 +++ ...imitiveDataFrameColumn.BinaryOperations.tt | 388 + ...rimitiveDataFrameColumn.BinaryOperators.cs | 7397 ++++++++ ...rimitiveDataFrameColumn.BinaryOperators.tt | 236 + .../PrimitiveDataFrameColumn.Computations.cs | 149 + .../PrimitiveDataFrameColumn.Computations.tt | 69 + ...ataFrameColumn.ReversedBinaryOperations.cs | 433 + ...ataFrameColumn.ReversedBinaryOperations.tt | 119 + .../PrimitiveDataFrameColumn.Sort.cs | 100 + .../PrimitiveDataFrameColumn.cs | 805 + .../PrimitiveDataFrameColumnArithmetic.cs | 6770 +++++++ .../PrimitiveDataFrameColumnArithmetic.tt | 119 + .../PrimitiveDataFrameColumnComputations.cs | 5359 ++++++ .../PrimitiveDataFrameColumnComputations.tt | 268 + .../ReadOnlyDataFrameBuffer.cs | 88 + .../SByteDataFrameColumn.cs | 23 + .../SingleDataFrameColumn.cs | 23 + .../StringDataFrameColumn.BinaryOperations.cs | 157 + .../StringDataFrameColumn.cs | 498 + .../Strings.Designer.cs | 423 + src/Microsoft.Data.Analysis/Strings.resx | 240 + .../TextFieldParser.cs | 1154 ++ .../UInt16DataFrameColumn.cs | 23 + .../UInt32DataFrameColumn.cs | 23 + .../UInt64DataFrameColumn.cs | 23 + .../Microsoft.Extensions.ML.csproj | 14 +- .../Properties/AssemblyInfo.cs | 2 +- .../API/ColumnInference.cs | 18 +- .../API/RankingExperiment.cs | 22 +- src/Microsoft.ML.AutoML/Assembly.cs | 8 +- .../Experiment/Experiment.cs | 178 +- .../MetricsAgents/RankingMetricsAgent.cs | 28 +- .../Runners/CrossValSummaryRunner.cs | 19 +- .../Experiment/SuggestedPipeline.cs | 5 + .../Microsoft.ML.AutoML.csproj | 16 +- .../PipelineSuggesters/PipelineSuggester.cs | 56 +- .../Sweepers/Parameters.cs | 2 +- .../Sweepers/SweeperProbabilityUtils.cs | 11 +- .../Utils/BestResultUtil.cs | 4 +- .../Utils/StringEditDistance.cs | 60 + .../Utils/UserInputValidationUtil.cs | 28 +- src/Microsoft.ML.CodeGenerator/Assembly.cs | 6 +- .../Microsoft.ML.CodeGenerator.csproj | 12 +- .../Templates/Console/ConsumeModel.cs | 5 +- .../Templates/Console/ConsumeModel.tt | 4 +- .../Data/IHostEnvironment.cs | 2 +- .../Properties/AssemblyInfo.cs | 15 +- src/Microsoft.ML.CpuMath/AssemblyInfo.cs | 4 +- .../Microsoft.ML.CpuMath.csproj | 23 +- .../Properties/AssemblyInfo.cs | 2 +- .../netstandard2.0/Microsoft.ML.CpuMath.props | 0 src/Microsoft.ML.Data/Data/Conversion.cs | 6 +- src/Microsoft.ML.Data/Data/DataViewUtils.cs | 6 +- .../Evaluators/EvaluatorUtils.cs | 8 +- .../CalibratedBinaryClassificationMetrics.cs | 2 +- .../MulticlassClassificationMetrics.cs | 31 +- .../MulticlassClassificationEvaluator.cs | 136 +- .../Evaluators/RankingEvaluator.cs | 4 +- .../Prediction/PredictionEngine.cs | 2 + .../Properties/AssemblyInfo.cs | 17 +- .../ColumnConcatenatingEstimator.cs | 4 +- .../Transforms/RowToRowTransformerBase.cs | 10 +- .../Transforms/ValueMapping.cs | 237 +- .../Microsoft.ML.DataView.csproj | 4 +- .../Microsoft.ML.DnnAnalyzer.csproj | 1 + ...osoft.ML.DnnImageFeaturizer.AlexNet.csproj | 13 + ...oft.ML.DnnImageFeaturizer.ResNet101.csproj | 14 +- ...soft.ML.DnnImageFeaturizer.ResNet18.csproj | 13 + ...soft.ML.DnnImageFeaturizer.ResNet50.csproj | 13 + .../Microsoft.ML.Ensemble.csproj | 15 +- .../Properties/AssemblyInfo.cs | 2 +- .../Microsoft.ML.EntryPoints.csproj | 20 +- .../Properties/AssemblyInfo.cs | 4 +- .../Microsoft.ML.Experimental.csproj | 8 +- .../Microsoft.ML.FastTree.csproj | 32 +- .../Properties/AssemblyInfo.cs | 2 +- .../Microsoft.ML.Featurizers.csproj | 12 +- .../ExtensionsCatalog.cs | 2 +- .../ImageGrayscale.cs | 2 +- .../ImageLoader.cs | 2 +- .../ImagePixelExtractor.cs | 2 +- .../ImageResizer.cs | 2 +- .../Microsoft.ML.ImageAnalytics.csproj | 14 +- .../Microsoft.ML.LightGbm.csproj | 18 +- .../Properties/AssemblyInfo.cs | 2 +- .../Properties/AssemblyInfo.cs | 4 +- .../Microsoft.ML.Mkl.Components.csproj | 38 +- .../Microsoft.ML.Mkl.Redist.csproj | 28 + .../Microsoft.ML.OnnxConverter.csproj | 8 +- .../OnnxExportExtensions.cs | 36 +- src/Microsoft.ML.OnnxConverter/OnnxMl.md | 13 +- .../Microsoft.ML.OnnxTransformer.csproj | 12 +- .../OnnxTransform.cs | 87 +- .../OnnxTypeParser.cs | 8 +- src/Microsoft.ML.OnnxTransformer/OnnxUtils.cs | 74 +- .../Properties/AssemblyInfo.cs | 2 +- .../Microsoft.ML.Parquet.csproj | 12 +- .../Properties/AssemblyInfo.cs | 2 +- .../Microsoft.ML.Recommender.csproj | 29 +- .../Microsoft.ML.SamplesUtils.csproj | 23 +- .../Properties/AssemblyInfo.cs | 2 +- .../Standard/Online/AveragedPerceptron.cs | 16 +- .../StandardTrainersCatalog.cs | 9 +- .../Microsoft.ML.TensorFlow.csproj | 16 +- .../TensorFlowModel.cs | 9 +- .../TensorTypeExtensions.cs | 12 + .../TensorflowCatalog.cs | 26 + .../TensorflowTransform.cs | 171 +- .../TensorflowUtils.cs | 131 +- .../ExtensionsCatalog.cs | 107 + .../IidChangePointDetector.cs | 4 +- .../IidSpikeDetector.cs | 4 +- .../Microsoft.ML.TimeSeries.csproj | 17 +- .../Properties/AssemblyInfo.cs | 2 +- .../SrCnnEntireAnomalyDetector.cs | 202 +- .../SsaChangePointDetector.cs | 4 +- .../SsaSpikeDetector.cs | 4 +- .../PermutationFeatureImportanceExtensions.cs | 3 +- .../Properties/AssemblyInfo.cs | 2 +- .../Text/LdaTransform.cs | 2 +- .../Text/StopWordsRemovingTransformer.cs | 12 +- .../Text/TextCatalog.cs | 4 +- .../Text/WordTokenizing.cs | 8 +- .../DnnRetrainTransform.cs | 87 +- .../ImageClassificationTrainer.cs | 30 +- .../Microsoft.ML.Vision.csproj | 16 +- src/Microsoft.ML/Microsoft.ML.csproj | 69 + .../build/netstandard2.0/Microsoft.ML.targets | 0 src/Native/CMakeLists.txt | 4 +- src/Native/{build.proj => Native.proj} | 35 +- src/Native/build.cmd | 10 +- src/Native/build.sh | 10 +- src/Native/newbuild.proj | 16 + ...oft.ML.DnnImageFeaturizer.ModelRedist.proj | 28 +- src/Redist/build.proj | 3 +- ...lidationKeyLabelWithFloatKeyValues-out.txt | 46 +- .../Command/CommandTrainRanking-3-metrics.txt | 1002 +- .../Command/CommandTrainRanking-3-out.txt | 28 + .../Command/CommandTrainRanking-4-out.txt | 28 + .../Command/CommandTrainRanking-5-out.txt | 28 + .../Command/CommandTrainRanking-gsummary2.txt | 506 +- .../Command/CommandTrainRanking-summary1.txt | 8 +- .../Common/EntryPoints/core_manifest.json | 13 +- .../AveragePerceptronBinary.tsv | 8 +- test/Cert.props | 12 + test/Directory.Build.props | 12 - test/Directory.Build.targets | 4 +- .../DataFrameInteractiveTests.cs | 64 + ...oft.Data.Analysis.Interactive.Tests.csproj | 18 + .../ArrayComparer.cs | 200 + .../ArrowIntegrationTests.cs | 225 + .../BufferTests.cs | 281 + .../DataFrame.IOTests.cs | 898 + .../DataFrameColumn.BinaryOperationTests.cs | 2648 +++ .../DataFrameColumn.BinaryOperationTests.tt | 626 + .../DataFrameIDataViewTests.cs | 423 + .../DataFrameTests.cs | 2326 +++ .../Microsoft.Data.Analysis.Tests.csproj | 37 + .../TextFieldParserTests.cs | 419 + .../Microsoft.Extensions.ML.Tests.csproj | 8 + ...result_should_be_serializable.approved.txt | 66 + .../Microsoft.ML.AutoML.Tests/AutoFitTests.cs | 281 +- .../ColumnInferenceTests.cs | 18 + .../GetNextPipelineTests.cs | 6 +- .../MetricsAgentsTests.cs | 32 +- test/Microsoft.ML.AutoML.Tests/MetricsUtil.cs | 2 +- .../Microsoft.ML.AutoML.Tests.csproj | 22 +- .../TestData/wiki-column-inference.json | 66 + .../UserInputValidationTests.cs | 21 +- .../BenchmarksTest.cs | 4 +- .../Microsoft.ML.Benchmarks.Tests.csproj | 2 +- test/Microsoft.ML.Benchmarks/Program.cs | 27 - .../Code/ContractsCheckTest.cs | 16 +- ...GeneratorTest.ConsumeModel.cs.approved.txt | 2 +- ...GeneratorTest.ConsumeModel.cs.approved.txt | 4 +- ...GeneratorTest.ConsumeModel.cs.approved.txt | 4 +- ...Tests.ConsumeModelContentTest.approved.txt | 2 +- ...ctContents_VerifyConsumeModel.approved.txt | 2 +- ...t.TestConsumeModel_AzureImage.approved.txt | 4 +- ...umeModel_AzureObjectDetection.approved.txt | 4 +- ...AzureImage_NotObjectDetection.approved.txt | 2 +- .../Microsoft.ML.CodeGenerator.Tests.csproj | 5 + .../Microsoft.ML.Core.Tests.csproj | 6 +- .../UnitTests/TestEntryPoints.cs | 11 +- ...crosoft.ML.CpuMath.PerformanceTests.csproj | 2 + .../Common.cs | 4 +- .../DataIO.cs | 6 +- .../DataTransformation.cs | 6 +- .../Datasets/Adult.cs | 2 +- .../Datasets/CommonColumns.cs | 2 +- .../Datasets/HousingRegression.cs | 2 +- .../Datasets/Iris.cs | 2 +- .../Datasets/MnistOneClass.cs | 2 +- .../Datasets/Sentiment.cs | 2 +- .../Datasets/TrivialMatrixFactorization.cs | 2 +- .../Datasets/TypeTestData.cs | 2 +- .../Debugging.cs | 6 +- .../Evaluation.cs | 6 +- .../Explainability.cs | 12 +- .../IntegrationTestBaseClass.cs} | 12 +- .../IntrospectiveTraining.cs | 6 +- .../Microsoft.ML.IntegrationTests.csproj} | 6 + .../ModelFiles.cs | 16 +- .../ONNX.cs | 6 +- .../Prediction.cs | 6 +- .../SchemaDefinitionTests.cs | 4 +- .../Training.cs | 6 +- .../Validation.cs | 6 +- .../xunit.runner.json | 0 .../Microsoft.ML.NightlyBuild.Tests.csproj | 4 +- .../Microsoft.ML.OnnxTransformerTest.csproj | 8 +- .../BenchmarkBase.cs | 2 +- .../CacheDataViewBench.cs | 4 +- .../FeaturizeTextBench.cs | 2 +- .../Harness/Configs.cs | 19 +- .../Harness/Metrics.cs | 2 +- .../Harness/ProjectGenerator.cs | 2 +- .../HashBench.cs | 4 +- .../Helpers/CIBenchmark.cs | 2 +- .../Helpers/EmptyWriter.cs | 2 +- .../Helpers/EnvironmentFactory.cs | 2 +- .../Helpers/Errors.cs | 2 +- .../Helpers/ExecuteMaml.cs | 2 +- .../ImageClassificationBench.cs | 2 +- .../KMeansAndLogisticRegressionBench.cs | 4 +- .../Microsoft.ML.PerformanceTests.csproj} | 2 + .../Numeric/Ranking.cs | 2 +- .../PredictionEngineBench.cs | 4 +- test/Microsoft.ML.PerformanceTests/Program.cs | 53 + .../README.md | 49 +- .../RffTransform.cs | 4 +- .../ShuffleRowsBench.cs | 4 +- ...sticDualCoordinateAscentClassifierBench.cs | 17 +- .../Text/MultiClassClassification.cs | 2 +- .../TextLoaderBench.cs | 2 +- .../TextPredictionEngineCreation.cs | 2 +- .../Attributes/TensorflowFactAttribute.cs | 8 +- .../Attributes/TensorflowTheoryAttribute.cs | 9 +- .../BaseTestBaseline.cs | 2 - .../BaseTestClass.cs | 2 +- .../Microsoft.ML.TestFramework.csproj | 9 +- .../Properties/AssemblyInfo.cs | 4 +- test/Microsoft.ML.Tests/EvaluateTests.cs | 67 + .../Microsoft.ML.Tests.csproj | 4 + test/Microsoft.ML.Tests/OnnxConversionTest.cs | 224 +- .../PermutationFeatureImportanceTests.cs | 4 + .../TensorflowTests.cs | 45 +- .../TensorFlowEstimatorTests.cs | 46 + .../TrainerEstimators/LbfgsTests.cs | 2 +- .../TimeSeriesDirectApi.cs | 182 +- .../TimeSeriesSimpleApiTests.cs | 8 +- test/TestFrameworkDependency.props | 4 +- test/data/Timeseries/anomaly_at_beginning.csv | 39 + test/data/Timeseries/big_spike_data.csv | 136 + test/data/Timeseries/non_negative_case.csv | 70 + test/data/type-conversion-boolean.txt | 2 +- .../BaseTestClassAnalyzer.cs | 8 +- .../Properties/AssemblyInfo.cs | 2 +- .../Microsoft.ML.StableApi.csproj | 2 +- 556 files changed, 84000 insertions(+), 4120 deletions(-) delete mode 100644 .github/CODEOWNERS delete mode 100644 BuildToolsVersion.txt delete mode 100644 DotnetCLIVersion.txt delete mode 100644 DotnetExtraRuntimeVersion.txt create mode 100644 NuGet.config delete mode 100644 build.proj delete mode 100644 build/Dependencies.props delete mode 100644 build/sign.proj delete mode 100644 config.json create mode 100644 docs/building/assets/process_architecture_run_tests_vs.png create mode 100644 docs/release-notes/1.5.4/release-1.5.4.md create mode 100644 docs/release-notes/1.5.5/release-1.5.5.md rename {build => eng}/BranchInfo.props (95%) create mode 100644 eng/Build.props rename {build => eng}/ExternalBenchmarkDataFiles.props (100%) create mode 100644 eng/Signing.props rename {build => eng}/TensorflowMetaFiles.props (100%) create mode 100644 eng/Tools.props create mode 100644 eng/Version.Details.xml create mode 100644 eng/Versions.props create mode 100644 eng/common/CIBuild.cmd create mode 100644 eng/common/PSScriptAnalyzerSettings.psd1 create mode 100644 eng/common/README.md create mode 100644 eng/common/SetupNugetSources.ps1 create mode 100755 eng/common/SetupNugetSources.sh create mode 100644 eng/common/build.ps1 create mode 100755 eng/common/build.sh create mode 100755 eng/common/cibuild.sh create mode 100644 eng/common/cross/arm/sources.list.bionic create mode 100644 eng/common/cross/arm/sources.list.jessie create mode 100644 eng/common/cross/arm/sources.list.trusty create mode 100644 eng/common/cross/arm/sources.list.xenial create mode 100644 eng/common/cross/arm/sources.list.zesty create mode 100644 eng/common/cross/arm/trusty-lttng-2.4.patch create mode 100644 eng/common/cross/arm/trusty.patch create mode 100644 eng/common/cross/arm64/sources.list.bionic create mode 100644 eng/common/cross/arm64/sources.list.buster create mode 100644 eng/common/cross/arm64/sources.list.stretch create mode 100644 eng/common/cross/arm64/sources.list.trusty create mode 100644 eng/common/cross/arm64/sources.list.xenial create mode 100644 eng/common/cross/arm64/sources.list.zesty create mode 100755 eng/common/cross/arm64/tizen-build-rootfs.sh create mode 100755 eng/common/cross/arm64/tizen-fetch.sh create mode 100644 eng/common/cross/arm64/tizen/tizen.patch create mode 100644 eng/common/cross/armel/sources.list.jessie create mode 100755 eng/common/cross/armel/tizen-build-rootfs.sh create mode 100755 eng/common/cross/armel/tizen-fetch.sh create mode 100644 eng/common/cross/armel/tizen/tizen-dotnet.ks create mode 100644 eng/common/cross/armel/tizen/tizen.patch create mode 100755 eng/common/cross/build-android-rootfs.sh create mode 100755 eng/common/cross/build-rootfs.sh create mode 100644 eng/common/cross/toolchain.cmake create mode 100644 eng/common/darc-init.ps1 create mode 100755 eng/common/darc-init.sh create mode 100644 eng/common/dotnet-install-scripts/dotnet-install.ps1 create mode 100755 eng/common/dotnet-install-scripts/dotnet-install.sh create mode 100644 eng/common/dotnet-install.cmd create mode 100644 eng/common/dotnet-install.ps1 create mode 100755 eng/common/dotnet-install.sh create mode 100644 eng/common/enable-cross-org-publishing.ps1 create mode 100644 eng/common/generate-graph-files.ps1 create mode 100644 eng/common/helixpublish.proj create mode 100644 eng/common/init-tools-native.cmd create mode 100644 eng/common/init-tools-native.ps1 create mode 100755 eng/common/init-tools-native.sh create mode 100644 eng/common/internal-feed-operations.ps1 create mode 100755 eng/common/internal-feed-operations.sh create mode 100644 eng/common/internal/Directory.Build.props create mode 100644 eng/common/internal/Tools.csproj create mode 100644 eng/common/msbuild.ps1 create mode 100755 eng/common/msbuild.sh create mode 100644 eng/common/native/CommonLibrary.psm1 create mode 100755 eng/common/native/common-library.sh create mode 100755 eng/common/native/find-native-compiler.sh create mode 100755 eng/common/native/install-cmake-test.sh create mode 100755 eng/common/native/install-cmake.sh create mode 100644 eng/common/native/install-tool.ps1 create mode 100644 eng/common/performance/blazor_perf.proj create mode 100644 eng/common/performance/crossgen_perf.proj create mode 100644 eng/common/performance/microbenchmarks.proj create mode 100644 eng/common/performance/performance-setup.ps1 create mode 100755 eng/common/performance/performance-setup.sh create mode 100644 eng/common/pipeline-logging-functions.ps1 create mode 100755 eng/common/pipeline-logging-functions.sh create mode 100644 eng/common/post-build/add-build-to-channel.ps1 create mode 100644 eng/common/post-build/check-channel-consistency.ps1 create mode 100644 eng/common/post-build/nuget-validation.ps1 create mode 100644 eng/common/post-build/post-build-utils.ps1 create mode 100644 eng/common/post-build/publish-using-darc.ps1 create mode 100644 eng/common/post-build/sourcelink-validation.ps1 create mode 100644 eng/common/post-build/symbols-validation.ps1 create mode 100644 eng/common/post-build/trigger-subscriptions.ps1 create mode 100644 eng/common/sdk-task.ps1 create mode 100644 eng/common/sdl/NuGet.config create mode 100644 eng/common/sdl/execute-all-sdl-tools.ps1 create mode 100644 eng/common/sdl/extract-artifact-packages.ps1 create mode 100644 eng/common/sdl/init-sdl.ps1 create mode 100644 eng/common/sdl/packages.config create mode 100644 eng/common/sdl/push-gdn.ps1 create mode 100644 eng/common/sdl/run-sdl.ps1 create mode 100644 eng/common/templates/job/execute-sdl.yml create mode 100644 eng/common/templates/job/generate-graph-files.yml create mode 100644 eng/common/templates/job/job.yml create mode 100644 eng/common/templates/job/performance.yml create mode 100644 eng/common/templates/job/publish-build-assets.yml create mode 100644 eng/common/templates/jobs/jobs.yml create mode 100644 eng/common/templates/phases/base.yml create mode 100644 eng/common/templates/phases/publish-build-assets.yml create mode 100644 eng/common/templates/post-build/channels/generic-internal-channel.yml create mode 100644 eng/common/templates/post-build/channels/generic-public-channel.yml create mode 100644 eng/common/templates/post-build/common-variables.yml create mode 100644 eng/common/templates/post-build/post-build.yml create mode 100644 eng/common/templates/post-build/setup-maestro-vars.yml create mode 100644 eng/common/templates/post-build/trigger-subscription.yml create mode 100644 eng/common/templates/steps/add-build-to-channel.yml create mode 100644 eng/common/templates/steps/build-reason.yml create mode 100644 eng/common/templates/steps/perf-send-to-helix.yml create mode 100644 eng/common/templates/steps/publish-logs.yml create mode 100644 eng/common/templates/steps/run-on-unix.yml create mode 100644 eng/common/templates/steps/run-on-windows.yml create mode 100644 eng/common/templates/steps/run-script-ifequalelse.yml create mode 100644 eng/common/templates/steps/send-to-helix.yml create mode 100644 eng/common/templates/steps/telemetry-end.yml create mode 100644 eng/common/templates/steps/telemetry-start.yml create mode 100644 eng/common/tools.ps1 create mode 100755 eng/common/tools.sh rename {pkg/common => eng/pkg}/CommonPackage.props (100%) rename {pkg/common => eng/pkg}/DnnImageFeaturizer.props (100%) create mode 100644 eng/pkg/Pack.props rename {pkg => eng/pkg}/_._ (100%) rename {pkg => eng/pkg}/mlnetlogo.png (100%) create mode 100644 eng/snk/Test.snk create mode 100644 global.json delete mode 100644 init-tools.cmd delete mode 100644 init-tools.msbuild delete mode 100755 init-tools.sh delete mode 100644 pkg/Directory.Build.props delete mode 100644 pkg/Microsoft.Extensions.ML/Microsoft.Extensions.ML.nupkgproj delete mode 100644 pkg/Microsoft.Extensions.ML/Microsoft.Extensions.ML.symbols.nupkgproj delete mode 100644 pkg/Microsoft.ML.AutoML/Microsoft.ML.AutoML.nupkgproj delete mode 100644 pkg/Microsoft.ML.AutoML/Microsoft.ML.AutoML.symbols.nupkgproj delete mode 100644 pkg/Microsoft.ML.CodeGenerator/Microsoft.ML.CodeGenerator.nupkgproj delete mode 100644 pkg/Microsoft.ML.CodeGenerator/Microsoft.ML.CodeGenerator.symbols.nupkgproj delete mode 100644 pkg/Microsoft.ML.CpuMath/Microsoft.ML.CpuMath.nupkgproj delete mode 100644 pkg/Microsoft.ML.CpuMath/Microsoft.ML.CpuMath.symbols.nupkgproj delete mode 100644 pkg/Microsoft.ML.DataView/Microsoft.ML.DataView.nupkgproj delete mode 100644 pkg/Microsoft.ML.DataView/Microsoft.ML.DataView.symbols.nupkgproj delete mode 100644 pkg/Microsoft.ML.DnnImageFeaturizer.AlexNet/Microsoft.ML.DnnImageFeaturizer.AlexNet.nupkgproj delete mode 100644 pkg/Microsoft.ML.DnnImageFeaturizer.AlexNet/Microsoft.ML.DnnImageFeaturizer.AlexNet.symbols.nupkgproj delete mode 100644 pkg/Microsoft.ML.DnnImageFeaturizer.ResNet101/Microsoft.ML.DnnImageFeaturizer.ResNet101.nupkgproj delete mode 100644 pkg/Microsoft.ML.DnnImageFeaturizer.ResNet101/Microsoft.ML.DnnImageFeaturizer.ResNet101.symbols.nupkgproj delete mode 100644 pkg/Microsoft.ML.DnnImageFeaturizer.ResNet18/Microsoft.ML.DnnImageFeaturizer.ResNet18.nupkgproj delete mode 100644 pkg/Microsoft.ML.DnnImageFeaturizer.ResNet18/Microsoft.ML.DnnImageFeaturizer.ResNet18.symbols.nupkgproj delete mode 100644 pkg/Microsoft.ML.DnnImageFeaturizer.ResNet50/Microsoft.ML.DnnImageFeaturizer.ResNet50.nupkgproj delete mode 100644 pkg/Microsoft.ML.DnnImageFeaturizer.ResNet50/Microsoft.ML.DnnImageFeaturizer.ResNet50.symbols.nupkgproj delete mode 100644 pkg/Microsoft.ML.Ensemble/Microsoft.ML.Ensemble.nupkgproj delete mode 100644 pkg/Microsoft.ML.Ensemble/Microsoft.ML.Ensemble.symbols.nupkgproj delete mode 100644 pkg/Microsoft.ML.EntryPoints/Microsoft.ML.EntryPoints.nupkgproj delete mode 100644 pkg/Microsoft.ML.EntryPoints/Microsoft.ML.EntryPoints.symbols.nupkgproj delete mode 100644 pkg/Microsoft.ML.Experimental/Microsoft.ML.Experimental.nupkgproj delete mode 100644 pkg/Microsoft.ML.Experimental/Microsoft.ML.Experimental.symbols.nupkgproj delete mode 100644 pkg/Microsoft.ML.FastTree/Microsoft.ML.FastTree.nupkgproj delete mode 100644 pkg/Microsoft.ML.FastTree/Microsoft.ML.FastTree.symbols.nupkgproj delete mode 100644 pkg/Microsoft.ML.Featurizers/Microsoft.ML.Featurizers.nupkgproj delete mode 100644 pkg/Microsoft.ML.Featurizers/Microsoft.ML.Featurizers.symbols.nupkgproj delete mode 100644 pkg/Microsoft.ML.ImageAnalytics/Microsoft.ML.ImageAnalytics.nupkgproj delete mode 100644 pkg/Microsoft.ML.ImageAnalytics/Microsoft.ML.ImageAnalytics.symbols.nupkgproj delete mode 100644 pkg/Microsoft.ML.LightGbm/Microsoft.ML.LightGbm.nupkgproj delete mode 100644 pkg/Microsoft.ML.LightGbm/Microsoft.ML.LightGbm.symbols.nupkgproj delete mode 100644 pkg/Microsoft.ML.Mkl.Components/Microsoft.ML.Mkl.Components.nupkgproj delete mode 100644 pkg/Microsoft.ML.Mkl.Components/Microsoft.ML.Mkl.Components.symbols.nupkgproj delete mode 100644 pkg/Microsoft.ML.Mkl.Redist/Microsoft.ML.Mkl.Redist.nupkgproj delete mode 100644 pkg/Microsoft.ML.OnnxConverter/Microsoft.ML.OnnxConverter.nupkgproj delete mode 100644 pkg/Microsoft.ML.OnnxConverter/Microsoft.ML.OnnxConverter.symbols.nupkgproj delete mode 100644 pkg/Microsoft.ML.OnnxTransformer/Microsoft.ML.OnnxTransformer.nupkgproj delete mode 100644 pkg/Microsoft.ML.OnnxTransformer/Microsoft.ML.OnnxTransformer.symbols.nupkgproj delete mode 100644 pkg/Microsoft.ML.Parquet/Microsoft.ML.Parquet.nupkgproj delete mode 100644 pkg/Microsoft.ML.Parquet/Microsoft.ML.Parquet.symbols.nupkgproj delete mode 100644 pkg/Microsoft.ML.Recommender/Microsoft.ML.Recommender.nupkgproj delete mode 100644 pkg/Microsoft.ML.Recommender/Microsoft.ML.Recommender.symbols.nupkgproj delete mode 100644 pkg/Microsoft.ML.SampleUtils/Microsoft.ML.SampleUtils.nupkgproj delete mode 100644 pkg/Microsoft.ML.SampleUtils/Microsoft.ML.SampleUtils.symbols.nupkgproj delete mode 100644 pkg/Microsoft.ML.TensorFlow/Microsoft.ML.TensorFlow.nupkgproj delete mode 100644 pkg/Microsoft.ML.TensorFlow/Microsoft.ML.TensorFlow.symbols.nupkgproj delete mode 100644 pkg/Microsoft.ML.TimeSeries/Microsoft.ML.TimeSeries.nupkgproj delete mode 100644 pkg/Microsoft.ML.TimeSeries/Microsoft.ML.TimeSeries.symbols.nupkgproj delete mode 100644 pkg/Microsoft.ML.Vision/Microsoft.ML.Vision.nupkgproj delete mode 100644 pkg/Microsoft.ML.Vision/Microsoft.ML.Vision.symbols.nupkgproj delete mode 100644 pkg/Microsoft.ML/Microsoft.ML.nupkgproj delete mode 100644 pkg/Microsoft.ML/Microsoft.ML.symbols.nupkgproj create mode 100644 restore.cmd create mode 100755 restore.sh delete mode 100644 run.cmd delete mode 100755 run.sh create mode 100644 sign.cmd create mode 100644 src/Microsoft.Data.Analysis.Interactive/DataFrameKernelExtension.cs create mode 100644 src/Microsoft.Data.Analysis.Interactive/Microsoft.Data.Analysis.Interactive.csproj create mode 100644 src/Microsoft.Data.Analysis/ArrowStringDataFrameColumn.cs create mode 100644 src/Microsoft.Data.Analysis/BooleanDataFrameColumn.cs create mode 100644 src/Microsoft.Data.Analysis/ByteDataFrameColumn.cs create mode 100644 src/Microsoft.Data.Analysis/CharDataFrameColumn.cs create mode 100644 src/Microsoft.Data.Analysis/ColumnArithmeticTemplate.ttinclude create mode 100644 src/Microsoft.Data.Analysis/Converters.cs create mode 100644 src/Microsoft.Data.Analysis/Converters.tt create mode 100644 src/Microsoft.Data.Analysis/DataFrame.Arrow.cs create mode 100644 src/Microsoft.Data.Analysis/DataFrame.BinaryOperations.cs create mode 100644 src/Microsoft.Data.Analysis/DataFrame.BinaryOperations.tt create mode 100644 src/Microsoft.Data.Analysis/DataFrame.BinaryOperators.cs create mode 100644 src/Microsoft.Data.Analysis/DataFrame.BinaryOperators.tt create mode 100644 src/Microsoft.Data.Analysis/DataFrame.IDataView.cs create mode 100644 src/Microsoft.Data.Analysis/DataFrame.IO.cs create mode 100644 src/Microsoft.Data.Analysis/DataFrame.Join.cs create mode 100644 src/Microsoft.Data.Analysis/DataFrame.cs create mode 100644 src/Microsoft.Data.Analysis/DataFrameBuffer.cs create mode 100644 src/Microsoft.Data.Analysis/DataFrameColumn.BinaryOperations.cs create mode 100644 src/Microsoft.Data.Analysis/DataFrameColumn.BinaryOperations.tt create mode 100644 src/Microsoft.Data.Analysis/DataFrameColumn.BinaryOperators.cs create mode 100644 src/Microsoft.Data.Analysis/DataFrameColumn.BinaryOperators.tt create mode 100644 src/Microsoft.Data.Analysis/DataFrameColumn.Computations.cs create mode 100644 src/Microsoft.Data.Analysis/DataFrameColumn.Computations.tt create mode 100644 src/Microsoft.Data.Analysis/DataFrameColumn.cs create mode 100644 src/Microsoft.Data.Analysis/DataFrameColumnCollection.cs create mode 100644 src/Microsoft.Data.Analysis/DataFrameRow.cs create mode 100644 src/Microsoft.Data.Analysis/DataFrameRowCollection.cs create mode 100644 src/Microsoft.Data.Analysis/DecimalDataFrameColumn.cs create mode 100644 src/Microsoft.Data.Analysis/DoubleDataFrameColumn.cs create mode 100644 src/Microsoft.Data.Analysis/GroupBy.cs create mode 100644 src/Microsoft.Data.Analysis/IDataView.Extension.cs create mode 100644 src/Microsoft.Data.Analysis/Int16DataFrameColumn.cs create mode 100644 src/Microsoft.Data.Analysis/Int32DataFrameColumn.cs create mode 100644 src/Microsoft.Data.Analysis/Int64DataFrameColumn.cs create mode 100644 src/Microsoft.Data.Analysis/Microsoft.Data.Analysis.csproj create mode 100644 src/Microsoft.Data.Analysis/PrimitiveColumnContainer.BinaryOperations.cs create mode 100644 src/Microsoft.Data.Analysis/PrimitiveColumnContainer.BinaryOperations.tt create mode 100644 src/Microsoft.Data.Analysis/PrimitiveColumnContainer.cs create mode 100644 src/Microsoft.Data.Analysis/PrimitiveDataFrameColumn.BinaryOperationAPIs.ExplodedColumns.cs create mode 100644 src/Microsoft.Data.Analysis/PrimitiveDataFrameColumn.BinaryOperationAPIs.ExplodedColumns.tt create mode 100644 src/Microsoft.Data.Analysis/PrimitiveDataFrameColumn.BinaryOperationImplementations.Exploded.cs create mode 100644 src/Microsoft.Data.Analysis/PrimitiveDataFrameColumn.BinaryOperationImplementations.Exploded.tt create mode 100644 src/Microsoft.Data.Analysis/PrimitiveDataFrameColumn.BinaryOperations.Combinations.tt create mode 100644 src/Microsoft.Data.Analysis/PrimitiveDataFrameColumn.BinaryOperations.Combinations.ttinclude create mode 100644 src/Microsoft.Data.Analysis/PrimitiveDataFrameColumn.BinaryOperations.cs create mode 100644 src/Microsoft.Data.Analysis/PrimitiveDataFrameColumn.BinaryOperations.tt create mode 100644 src/Microsoft.Data.Analysis/PrimitiveDataFrameColumn.BinaryOperators.cs create mode 100644 src/Microsoft.Data.Analysis/PrimitiveDataFrameColumn.BinaryOperators.tt create mode 100644 src/Microsoft.Data.Analysis/PrimitiveDataFrameColumn.Computations.cs create mode 100644 src/Microsoft.Data.Analysis/PrimitiveDataFrameColumn.Computations.tt create mode 100644 src/Microsoft.Data.Analysis/PrimitiveDataFrameColumn.ReversedBinaryOperations.cs create mode 100644 src/Microsoft.Data.Analysis/PrimitiveDataFrameColumn.ReversedBinaryOperations.tt create mode 100644 src/Microsoft.Data.Analysis/PrimitiveDataFrameColumn.Sort.cs create mode 100644 src/Microsoft.Data.Analysis/PrimitiveDataFrameColumn.cs create mode 100644 src/Microsoft.Data.Analysis/PrimitiveDataFrameColumnArithmetic.cs create mode 100644 src/Microsoft.Data.Analysis/PrimitiveDataFrameColumnArithmetic.tt create mode 100644 src/Microsoft.Data.Analysis/PrimitiveDataFrameColumnComputations.cs create mode 100644 src/Microsoft.Data.Analysis/PrimitiveDataFrameColumnComputations.tt create mode 100644 src/Microsoft.Data.Analysis/ReadOnlyDataFrameBuffer.cs create mode 100644 src/Microsoft.Data.Analysis/SByteDataFrameColumn.cs create mode 100644 src/Microsoft.Data.Analysis/SingleDataFrameColumn.cs create mode 100644 src/Microsoft.Data.Analysis/StringDataFrameColumn.BinaryOperations.cs create mode 100644 src/Microsoft.Data.Analysis/StringDataFrameColumn.cs create mode 100644 src/Microsoft.Data.Analysis/Strings.Designer.cs create mode 100644 src/Microsoft.Data.Analysis/Strings.resx create mode 100644 src/Microsoft.Data.Analysis/TextFieldParser.cs create mode 100644 src/Microsoft.Data.Analysis/UInt16DataFrameColumn.cs create mode 100644 src/Microsoft.Data.Analysis/UInt32DataFrameColumn.cs create mode 100644 src/Microsoft.Data.Analysis/UInt64DataFrameColumn.cs create mode 100644 src/Microsoft.ML.AutoML/Utils/StringEditDistance.cs rename {pkg => src}/Microsoft.ML.CpuMath/build/netstandard2.0/Microsoft.ML.CpuMath.props (100%) create mode 100644 src/Microsoft.ML.Mkl.Redist/Microsoft.ML.Mkl.Redist.csproj create mode 100644 src/Microsoft.ML/Microsoft.ML.csproj rename {pkg => src}/Microsoft.ML/build/netstandard2.0/Microsoft.ML.targets (100%) rename src/Native/{build.proj => Native.proj} (78%) create mode 100644 src/Native/newbuild.proj create mode 100644 test/Cert.props create mode 100644 test/Microsoft.Data.Analysis.Interactive.Tests/DataFrameInteractiveTests.cs create mode 100644 test/Microsoft.Data.Analysis.Interactive.Tests/Microsoft.Data.Analysis.Interactive.Tests.csproj create mode 100644 test/Microsoft.Data.Analysis.Tests/ArrayComparer.cs create mode 100644 test/Microsoft.Data.Analysis.Tests/ArrowIntegrationTests.cs create mode 100644 test/Microsoft.Data.Analysis.Tests/BufferTests.cs create mode 100644 test/Microsoft.Data.Analysis.Tests/DataFrame.IOTests.cs create mode 100644 test/Microsoft.Data.Analysis.Tests/DataFrameColumn.BinaryOperationTests.cs create mode 100644 test/Microsoft.Data.Analysis.Tests/DataFrameColumn.BinaryOperationTests.tt create mode 100644 test/Microsoft.Data.Analysis.Tests/DataFrameIDataViewTests.cs create mode 100644 test/Microsoft.Data.Analysis.Tests/DataFrameTests.cs create mode 100644 test/Microsoft.Data.Analysis.Tests/Microsoft.Data.Analysis.Tests.csproj create mode 100644 test/Microsoft.Data.Analysis.Tests/TextFieldParserTests.cs create mode 100644 test/Microsoft.ML.AutoML.Tests/ApprovalTests/ColumnInferenceTests.Wiki_column_inference_result_should_be_serializable.approved.txt create mode 100644 test/Microsoft.ML.AutoML.Tests/TestData/wiki-column-inference.json delete mode 100644 test/Microsoft.ML.Benchmarks/Program.cs rename test/{Microsoft.ML.Functional.Tests => Microsoft.ML.IntegrationTests}/Common.cs (99%) rename test/{Microsoft.ML.Functional.Tests => Microsoft.ML.IntegrationTests}/DataIO.cs (97%) rename test/{Microsoft.ML.Functional.Tests => Microsoft.ML.IntegrationTests}/DataTransformation.cs (98%) rename test/{Microsoft.ML.Functional.Tests => Microsoft.ML.IntegrationTests}/Datasets/Adult.cs (97%) rename test/{Microsoft.ML.Functional.Tests => Microsoft.ML.IntegrationTests}/Datasets/CommonColumns.cs (95%) rename test/{Microsoft.ML.Functional.Tests => Microsoft.ML.IntegrationTests}/Datasets/HousingRegression.cs (97%) rename test/{Microsoft.ML.Functional.Tests => Microsoft.ML.IntegrationTests}/Datasets/Iris.cs (98%) rename test/{Microsoft.ML.Functional.Tests => Microsoft.ML.IntegrationTests}/Datasets/MnistOneClass.cs (95%) rename test/{Microsoft.ML.Functional.Tests => Microsoft.ML.IntegrationTests}/Datasets/Sentiment.cs (91%) rename test/{Microsoft.ML.Functional.Tests => Microsoft.ML.IntegrationTests}/Datasets/TrivialMatrixFactorization.cs (96%) rename test/{Microsoft.ML.Functional.Tests => Microsoft.ML.IntegrationTests}/Datasets/TypeTestData.cs (99%) rename test/{Microsoft.ML.Functional.Tests => Microsoft.ML.IntegrationTests}/Debugging.cs (98%) rename test/{Microsoft.ML.Functional.Tests => Microsoft.ML.IntegrationTests}/Evaluation.cs (98%) rename test/{Microsoft.ML.Functional.Tests => Microsoft.ML.IntegrationTests}/Explainability.cs (97%) rename test/{Microsoft.ML.Functional.Tests/FunctionalTestBaseClass.cs => Microsoft.ML.IntegrationTests/IntegrationTestBaseClass.cs} (88%) rename test/{Microsoft.ML.Functional.Tests => Microsoft.ML.IntegrationTests}/IntrospectiveTraining.cs (99%) rename test/{Microsoft.ML.Functional.Tests/Microsoft.ML.Functional.Tests.csproj => Microsoft.ML.IntegrationTests/Microsoft.ML.IntegrationTests.csproj} (91%) rename test/{Microsoft.ML.Functional.Tests => Microsoft.ML.IntegrationTests}/ModelFiles.cs (98%) rename test/{Microsoft.ML.Functional.Tests => Microsoft.ML.IntegrationTests}/ONNX.cs (98%) rename test/{Microsoft.ML.Functional.Tests => Microsoft.ML.IntegrationTests}/Prediction.cs (96%) rename test/{Microsoft.ML.Functional.Tests => Microsoft.ML.IntegrationTests}/SchemaDefinitionTests.cs (98%) rename test/{Microsoft.ML.Functional.Tests => Microsoft.ML.IntegrationTests}/Training.cs (99%) rename test/{Microsoft.ML.Functional.Tests => Microsoft.ML.IntegrationTests}/Validation.cs (98%) rename test/{Microsoft.ML.Functional.Tests => Microsoft.ML.IntegrationTests}/xunit.runner.json (100%) rename test/{Microsoft.ML.Benchmarks => Microsoft.ML.PerformanceTests}/BenchmarkBase.cs (99%) rename test/{Microsoft.ML.Benchmarks => Microsoft.ML.PerformanceTests}/CacheDataViewBench.cs (97%) rename test/{Microsoft.ML.Benchmarks => Microsoft.ML.PerformanceTests}/FeaturizeTextBench.cs (99%) rename test/{Microsoft.ML.Benchmarks => Microsoft.ML.PerformanceTests}/Harness/Configs.cs (82%) rename test/{Microsoft.ML.Benchmarks => Microsoft.ML.PerformanceTests}/Harness/Metrics.cs (98%) rename test/{Microsoft.ML.Benchmarks => Microsoft.ML.PerformanceTests}/Harness/ProjectGenerator.cs (98%) rename test/{Microsoft.ML.Benchmarks => Microsoft.ML.PerformanceTests}/HashBench.cs (99%) rename test/{Microsoft.ML.Benchmarks => Microsoft.ML.PerformanceTests}/Helpers/CIBenchmark.cs (91%) rename test/{Microsoft.ML.Benchmarks => Microsoft.ML.PerformanceTests}/Helpers/EmptyWriter.cs (93%) rename test/{Microsoft.ML.Benchmarks => Microsoft.ML.PerformanceTests}/Helpers/EnvironmentFactory.cs (98%) rename test/{Microsoft.ML.Benchmarks => Microsoft.ML.PerformanceTests}/Helpers/Errors.cs (91%) rename test/{Microsoft.ML.Benchmarks => Microsoft.ML.PerformanceTests}/Helpers/ExecuteMaml.cs (93%) rename test/{Microsoft.ML.Benchmarks => Microsoft.ML.PerformanceTests}/ImageClassificationBench.cs (99%) rename test/{Microsoft.ML.Benchmarks => Microsoft.ML.PerformanceTests}/KMeansAndLogisticRegressionBench.cs (96%) rename test/{Microsoft.ML.Benchmarks/Microsoft.ML.Benchmarks.csproj => Microsoft.ML.PerformanceTests/Microsoft.ML.PerformanceTests.csproj} (94%) rename test/{Microsoft.ML.Benchmarks => Microsoft.ML.PerformanceTests}/Numeric/Ranking.cs (99%) rename test/{Microsoft.ML.Benchmarks => Microsoft.ML.PerformanceTests}/PredictionEngineBench.cs (98%) create mode 100644 test/Microsoft.ML.PerformanceTests/Program.cs rename test/{Microsoft.ML.Benchmarks => Microsoft.ML.PerformanceTests}/README.md (63%) rename test/{Microsoft.ML.Benchmarks => Microsoft.ML.PerformanceTests}/RffTransform.cs (96%) rename test/{Microsoft.ML.Benchmarks => Microsoft.ML.PerformanceTests}/ShuffleRowsBench.cs (94%) rename test/{Microsoft.ML.Benchmarks => Microsoft.ML.PerformanceTests}/StochasticDualCoordinateAscentClassifierBench.cs (90%) rename test/{Microsoft.ML.Benchmarks => Microsoft.ML.PerformanceTests}/Text/MultiClassClassification.cs (99%) rename test/{Microsoft.ML.Benchmarks => Microsoft.ML.PerformanceTests}/TextLoaderBench.cs (99%) rename test/{Microsoft.ML.Benchmarks => Microsoft.ML.PerformanceTests}/TextPredictionEngineCreation.cs (98%) create mode 100644 test/Microsoft.ML.Tests/EvaluateTests.cs create mode 100644 test/data/Timeseries/anomaly_at_beginning.csv create mode 100644 test/data/Timeseries/big_spike_data.csv create mode 100644 test/data/Timeseries/non_negative_case.csv diff --git a/.editorconfig b/.editorconfig index a46e3e379f..b567338281 100644 --- a/.editorconfig +++ b/.editorconfig @@ -26,3 +26,8 @@ dotnet_diagnostic.MSML_ExtendBaseTestClass.severity = none # The MSML_RelaxTestNaming suppressor for VSTHRD200 is not active for CodeAnalyzer.Tests, so we disable it altogether. # VSTHRD200: Use "Async" suffix for async methods dotnet_diagnostic.VSTHRD200.severity = none + +# Xml project files +[*.{csproj}] +indent_size = 2 +charset = utf-8 diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS deleted file mode 100644 index 724f77e913..0000000000 --- a/.github/CODEOWNERS +++ /dev/null @@ -1,14 +0,0 @@ -# This file contains the default reviewers for ML .NET code -# For more information on CODEOWNERS file see : https://help.github.com/en/articles/about-code-owners - -# For the entire repository -* @dotnet/mlnet-core - -# Reviewers for files owned by AutoML team -src/Microsoft.ML.AutoML @dotnet/mlnet-automl -src/Microsoft.ML.CodeGenerator @dotnet/mlnet-automl -test/Microsoft.ML.AutoML.Tests @dotnet/mlnet-automl -test/Microsoft.ML.CodeGenerator.Tests @dotnet/mlnet-automl -pkg/Microsoft.ML.AutoML @dotnet/mlnet-automl -pkg/Microsoft.ML.CodeGenerator @dotnet/mlnet-automl -docs/samples/Microsoft.ML.AutoML.Samples @dotnet/mlnet-automl diff --git a/.gitignore b/.gitignore index 36b327cc99..654e29215f 100644 --- a/.gitignore +++ b/.gitignore @@ -4,7 +4,8 @@ ## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore # Tool Runtime Dir -/[Tt]ools/ +/.dotnet/ +/.packages/ # User-specific files *.suo @@ -226,7 +227,7 @@ ClientBin/ *.publishsettings orleans.codegen.cs -# Including strong name files can present a security risk +# Including strong name files can present a security risk # (https://github.com/github/gitignore/pull/2483#issue-259490424) #*.snk @@ -323,7 +324,7 @@ __pycache__/ # OpenCover UI analysis results OpenCover/ -# Azure Stream Analytics local run output +# Azure Stream Analytics local run output ASALocalRun/ # MSBuild Binary and Structured Log diff --git a/.vsts-dotnet-ci.yml b/.vsts-dotnet-ci.yml index 5c2dcf30cb..d3315c00c5 100644 --- a/.vsts-dotnet-ci.yml +++ b/.vsts-dotnet-ci.yml @@ -6,7 +6,7 @@ resources: containers: - container: CentosContainer image: mcr.microsoft.com/dotnet-buildtools/prereqs:centos-7-mlnet-8bba86b-20190314145033 - + - container: UbuntuContainer image: mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-16.04-mlnet-20200515184230-2c829e8 @@ -29,7 +29,7 @@ jobs: _targetFramework: netcoreapp3.1 innerLoop: true pool: - name: Hosted Ubuntu 1604 + name: Hosted Ubuntu 1604 - template: /build/ci/job-template.yml parameters: @@ -38,7 +38,7 @@ jobs: container: UbuntuContainer innerLoop: true pool: - name: Hosted Ubuntu 1604 + name: Hosted Ubuntu 1604 - template: /build/ci/job-template.yml parameters: diff --git a/BuildToolsVersion.txt b/BuildToolsVersion.txt deleted file mode 100644 index 61c8d2d4e3..0000000000 --- a/BuildToolsVersion.txt +++ /dev/null @@ -1 +0,0 @@ -3.0.0-preview4-04926-01 diff --git a/Directory.Build.props b/Directory.Build.props index 5ef129c098..dbe8844455 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -1,13 +1,24 @@ + - - - + + + + + true + + $(CopyrightNetFoundation) + True + portable + true + latest + + Debug Debug;Release;Debug-netcoreapp3_1;Release-netcoreapp3_1;Debug-netfx;Release-netfx @@ -15,103 +26,12 @@ x64 $(TargetArchitecture) $(Platform).$(Configuration) + Open - - https://api.nuget.org/v3/index.json; - https://dotnetfeed.blob.core.windows.net/dotnet-core/index.json; - https://dotnet.myget.org/F/dotnet-core/api/v3/index.json; - https://dotnet.myget.org/F/roslyn-analyzers/api/v3/index.json; - https://pkgs.dev.azure.com/dnceng/public/_packaging/MachineLearning/nuget/v3/index.json; - https://pkgs.dev.azure.com/dnceng/public/_packaging/machinelearning-testdata/nuget/v3/index.json; - - - - - - $(MSBuildThisFileDirectory) - $(RepoRoot)src/ + $(ArtifactsDir)pkgassets/ $(RepoRoot)pkg/ - - - $([MSBuild]::NormalizeDirectory('$(RepoRoot)', 'bin')) - $(BinDir) - $([MSBuild]::NormalizeDirectory('$(BinDir)', 'obj')) - $(ObjDir) - - $(RootIntermediateOutputPath)$(PlatformConfig)\ - $(IntermediateOutputRootPath)$(MSBuildProjectName)\ - $(IntermediateOutputPath) - - $(BaseOutputPath)$(PlatformConfig)\$(MSBuildProjectName)\ - - $(ObjDir)/packages/ - - $(BinDir)packages_noship/ - $(BinDir)packages/ - - $(BaseOutputPath)$(NativeTargetArchitecture).$(Configuration)\Native\ - - - $(DotNetRestorePackagesPath) - $(RepoRoot)packages/ - $(PackagesDir) - $(RepoRoot)Tools/ - - - - - - - $(MajorVersion).$(MinorVersion).$(PatchVersion) - 00001 - 0 - $(MajorVersion).$(MinorVersion).$(BuildNumberMajor).$(BuildNumberMinor) - - false - true - - $(BuildNumberMajor)-$(BuildNumberMinor) - true - - - - - true - machinelearning - - - - - https://github.com/dotnet/$(GitHubRepositoryName) - true - $(LatestCommit) - - - - - - - 8.0 - 4.7 - true - - - - true - - - - - $(ToolsDir)Open.snk - true - true @@ -125,4 +45,34 @@ true + + + true + + + true + + + true + snupkg + + + + + 9.0.1 + + + + + $(MicrosoftCodeAnalysisCSharpVersion) + diff --git a/Directory.Build.targets b/Directory.Build.targets index 985a15f00a..bbb9d56b9b 100644 --- a/Directory.Build.targets +++ b/Directory.Build.targets @@ -1,51 +1,83 @@ - + + + - - + + - - - + + + lib + .dll + .so + .dylib - + x64 + $(TargetArchitecture) + $([MSBuild]::NormalizeDirectory('$(RepoRoot)', 'artifacts', 'bin')) + $(BinDir)Native\$(NativeTargetArchitecture).$(Configuration)\ - - lib - .dll - .so - .dylib - - - - - $(NativeOutputPath)$(LibPrefix)%(NativeAssemblyReference.Identity)$(LibExtension) - - - - - - + AnyCPU + $(Platform).$(Configuration) + $(BinDir)$(MSBuildProjectName)\Debug + + + + $(NativeOutputPath)$(LibPrefix)%(NativeAssemblyReference.Identity)$(LibExtension) + + + + + + - - + + + false + + + true - - - - $([System.IO.Path]::Combine('$(IntermediateOutputPath)','$(TargetFrameworkMoniker).AssemblyAttributes$(DefaultLanguageSourceExtension)')) + true + true + true + opencover + $(BaseOutputPath)$(PlatformConfig)\coverage\coverage.opencover.xml + + + ExcludeFromCodeCoverage + - - - - \ No newline at end of file + + + + + + + + + + + + diff --git a/DotnetCLIVersion.txt b/DotnetCLIVersion.txt deleted file mode 100644 index 6b0555c8c7..0000000000 --- a/DotnetCLIVersion.txt +++ /dev/null @@ -1 +0,0 @@ -3.1.102 diff --git a/DotnetExtraRuntimeVersion.txt b/DotnetExtraRuntimeVersion.txt deleted file mode 100644 index 30b1cc8834..0000000000 --- a/DotnetExtraRuntimeVersion.txt +++ /dev/null @@ -1 +0,0 @@ -2.1.12 \ No newline at end of file diff --git a/Microsoft.ML.sln b/Microsoft.ML.sln index 8c6c84b14c..e52f9d2014 100644 --- a/Microsoft.ML.sln +++ b/Microsoft.ML.sln @@ -33,7 +33,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.ML.TestFramework" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.ML.Predictor.Tests", "test\Microsoft.ML.Predictor.Tests\Microsoft.ML.Predictor.Tests.csproj", "{6B047E09-39C9-4583-96F3-685D84CA4117}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.ML.Functional.Tests", "test\Microsoft.ML.Functional.Tests\Microsoft.ML.Functional.Tests.csproj", "{CFED9F0C-FF81-4C96-8D5E-0436264CA7B5}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.ML.IntegrationTests", "test\Microsoft.ML.IntegrationTests\Microsoft.ML.IntegrationTests.csproj", "{CFED9F0C-FF81-4C96-8D5E-0436264CA7B5}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.ML.ResultProcessor", "src\Microsoft.ML.ResultProcessor\Microsoft.ML.ResultProcessor.csproj", "{3769FCC3-9AFF-4C37-97E9-6854324681DF}" EndProject @@ -43,47 +43,18 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.ML.Parquet", "src EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.ML.Sweeper", "src\Microsoft.ML.Sweeper\Microsoft.ML.Sweeper.csproj", "{55C8122D-79EA-48AB-85D0-EB551FC1C427}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "pkg", "pkg", "{D3D38B03-B557-484D-8348-8BADEE4DF592}" - ProjectSection(SolutionItems) = preProject - pkg\Directory.Build.props = pkg\Directory.Build.props - EndProjectSection -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Microsoft.ML", "Microsoft.ML", "{DEC8F776-49F7-4D87-836C-FE4DC057D08C}" - ProjectSection(SolutionItems) = preProject - pkg\Microsoft.ML\Microsoft.ML.nupkgproj = pkg\Microsoft.ML\Microsoft.ML.nupkgproj - pkg\Microsoft.ML\Microsoft.ML.symbols.nupkgproj = pkg\Microsoft.ML\Microsoft.ML.symbols.nupkgproj - EndProjectSection -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Microsoft.ML.Parquet", "Microsoft.ML.Parquet", "{6C95FC87-F5F2-4EEF-BB97-567F2F5DD141}" - ProjectSection(SolutionItems) = preProject - pkg\Microsoft.ML.Parquet\Microsoft.ML.Parquet.nupkgproj = pkg\Microsoft.ML.Parquet\Microsoft.ML.Parquet.nupkgproj - EndProjectSection -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.ML.Benchmarks", "test\Microsoft.ML.Benchmarks\Microsoft.ML.Benchmarks.csproj", "{7A9DB75F-2CA5-4184-9EF5-1F17EB39483F}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.ML.PerformanceTests", "test\Microsoft.ML.PerformanceTests\Microsoft.ML.PerformanceTests.csproj", "{7A9DB75F-2CA5-4184-9EF5-1F17EB39483F}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.ML.Maml", "src\Microsoft.ML.Maml\Microsoft.ML.Maml.csproj", "{64F40A0D-D4C2-4AA7-8470-E9CC437827E4}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.ML.Console", "src\Microsoft.ML.Console\Microsoft.ML.Console.csproj", "{362A98CF-FBF7-4EBB-A11B-990BBF845B15}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "build", "build", "{487213C9-E8A9-4F94-85D7-28A05DBBFE3A}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "netstandard2.0", "netstandard2.0", "{9252A8EB-ABFB-440C-AB4D-1D562753CE0F}" - ProjectSection(SolutionItems) = preProject - pkg\Microsoft.ML\build\netstandard2.0\Microsoft.ML.targets = pkg\Microsoft.ML\build\netstandard2.0\Microsoft.ML.targets - EndProjectSection -EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.ML.Sweeper.Tests", "test\Microsoft.ML.Sweeper.Tests\Microsoft.ML.Sweeper.Tests.csproj", "{3DEB504D-7A07-48CE-91A2-8047461CB3D4}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.ML.LightGbm", "src\Microsoft.ML.LightGbm\Microsoft.ML.LightGbm.csproj", "{001F3B4E-FBE4-4001-AFD2-A6A989CD1C25}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.ML.Ensemble", "src\Microsoft.ML.Ensemble\Microsoft.ML.Ensemble.csproj", "{DCF46B79-1FDB-4DBA-A263-D3D64E3AAA27}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Microsoft.ML.CpuMath", "Microsoft.ML.CpuMath", "{BF66A305-DF10-47E4-8D81-42049B149D2B}" - ProjectSection(SolutionItems) = preProject - pkg\Microsoft.ML.CpuMath\Microsoft.ML.CpuMath.nupkgproj = pkg\Microsoft.ML.CpuMath\Microsoft.ML.CpuMath.nupkgproj - pkg\Microsoft.ML.CpuMath\Microsoft.ML.CpuMath.symbols.nupkgproj = pkg\Microsoft.ML.CpuMath\Microsoft.ML.CpuMath.symbols.nupkgproj - EndProjectSection -EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools-local", "tools-local", "{7F13E156-3EBA-4021-84A5-CD56BA72F99E}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.ML.InternalCodeAnalyzer", "tools-local\Microsoft.ML.InternalCodeAnalyzer\Microsoft.ML.InternalCodeAnalyzer.csproj", "{B4E55B2D-2A92-46E7-B72F-E76D6FD83440}" @@ -132,177 +103,51 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.ML.DnnImageFeatur EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.ML.EntryPoints", "src\Microsoft.ML.EntryPoints\Microsoft.ML.EntryPoints.csproj", "{7504D46F-E4B3-43CB-9B1C-82F3131F1C99}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Microsoft.ML.Mkl.Components", "Microsoft.ML.Mkl.Components", "{63006A14-B924-48C5-83C9-CFE9DA22B01F}" - ProjectSection(SolutionItems) = preProject - pkg\Microsoft.ML.Mkl.Components\Microsoft.ML.Mkl.Components.nupkgproj = pkg\Microsoft.ML.Mkl.Components\Microsoft.ML.Mkl.Components.nupkgproj - pkg\Microsoft.ML.Mkl.Components\Microsoft.ML.Mkl.Components.symbols.nupkgproj = pkg\Microsoft.ML.Mkl.Components\Microsoft.ML.Mkl.Components.symbols.nupkgproj - EndProjectSection -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Microsoft.ML.ImageAnalytics", "Microsoft.ML.ImageAnalytics", "{1229F799-37F0-4282-B9F0-74BFA97CC362}" - ProjectSection(SolutionItems) = preProject - pkg\Microsoft.ML.ImageAnalytics\Microsoft.ML.ImageAnalytics.nupkgproj = pkg\Microsoft.ML.ImageAnalytics\Microsoft.ML.ImageAnalytics.nupkgproj - pkg\Microsoft.ML.ImageAnalytics\Microsoft.ML.ImageAnalytics.symbols.nupkgproj = pkg\Microsoft.ML.ImageAnalytics\Microsoft.ML.ImageAnalytics.symbols.nupkgproj - EndProjectSection -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Microsoft.ML.LightGbm", "Microsoft.ML.LightGbm", "{DE95FE65-9FF7-4233-93DF-7A8F2805624A}" - ProjectSection(SolutionItems) = preProject - pkg\Microsoft.ML.LightGbm\Microsoft.ML.LightGbm.nupkgproj = pkg\Microsoft.ML.LightGbm\Microsoft.ML.LightGbm.nupkgproj - pkg\Microsoft.ML.LightGbm\Microsoft.ML.LightGbm.symbols.nupkgproj = pkg\Microsoft.ML.LightGbm\Microsoft.ML.LightGbm.symbols.nupkgproj - EndProjectSection -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Microsoft.ML.Mkl.Redist", "Microsoft.ML.Mkl.Redist", "{4CF8095E-B4A3-4326-A550-43098E447288}" - ProjectSection(SolutionItems) = preProject - pkg\Microsoft.ML.Mkl.Redist\Microsoft.ML.Mkl.Redist.nupkgproj = pkg\Microsoft.ML.Mkl.Redist\Microsoft.ML.Mkl.Redist.nupkgproj - EndProjectSection -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Microsoft.ML.OnnxConverter", "Microsoft.ML.OnnxConverter", "{19AC192B-75FE-45D5-B219-898E401D5904}" - ProjectSection(SolutionItems) = preProject - pkg\Microsoft.ML.OnnxConverter\Microsoft.ML.OnnxConverter.nupkgproj = pkg\Microsoft.ML.OnnxConverter\Microsoft.ML.OnnxConverter.nupkgproj - pkg\Microsoft.ML.OnnxConverter\Microsoft.ML.OnnxConverter.symbols.nupkgproj = pkg\Microsoft.ML.OnnxConverter\Microsoft.ML.OnnxConverter.symbols.nupkgproj - EndProjectSection -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Microsoft.ML.OnnxTransformer", "Microsoft.ML.OnnxTransformer", "{93FF16AA-635E-421D-96C1-008818C143A2}" - ProjectSection(SolutionItems) = preProject - pkg\Microsoft.ML.OnnxTransformer\Microsoft.ML.OnnxTransformer.nupkgproj = pkg\Microsoft.ML.OnnxTransformer\Microsoft.ML.OnnxTransformer.nupkgproj - pkg\Microsoft.ML.OnnxTransformer\Microsoft.ML.OnnxTransformer.symbols.nupkgproj = pkg\Microsoft.ML.OnnxTransformer\Microsoft.ML.OnnxTransformer.symbols.nupkgproj - EndProjectSection -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Microsoft.ML.Recommender", "Microsoft.ML.Recommender", "{320AF46A-4809-486E-8F9E-A00C8AE47751}" - ProjectSection(SolutionItems) = preProject - pkg\Microsoft.ML.Recommender\Microsoft.ML.Recommender.nupkgproj = pkg\Microsoft.ML.Recommender\Microsoft.ML.Recommender.nupkgproj - pkg\Microsoft.ML.Recommender\Microsoft.ML.Recommender.symbols.nupkgproj = pkg\Microsoft.ML.Recommender\Microsoft.ML.Recommender.symbols.nupkgproj - EndProjectSection -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Microsoft.ML.TensorFlow", "Microsoft.ML.TensorFlow", "{11894B4A-78B4-4523-A6DD-4495722E244F}" - ProjectSection(SolutionItems) = preProject - pkg\Microsoft.ML.TensorFlow\Microsoft.ML.TensorFlow.nupkgproj = pkg\Microsoft.ML.TensorFlow\Microsoft.ML.TensorFlow.nupkgproj - pkg\Microsoft.ML.TensorFlow\Microsoft.ML.TensorFlow.symbols.nupkgproj = pkg\Microsoft.ML.TensorFlow\Microsoft.ML.TensorFlow.symbols.nupkgproj - EndProjectSection -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Microsoft.ML.TimeSeries", "Microsoft.ML.TimeSeries", "{B836F712-7FB6-4B75-A3EB-FB05F8E0D15E}" - ProjectSection(SolutionItems) = preProject - pkg\Microsoft.ML.TimeSeries\Microsoft.ML.TimeSeries.nupkgproj = pkg\Microsoft.ML.TimeSeries\Microsoft.ML.TimeSeries.nupkgproj - pkg\Microsoft.ML.TimeSeries\Microsoft.ML.TimeSeries.symbols.nupkgproj = pkg\Microsoft.ML.TimeSeries\Microsoft.ML.TimeSeries.symbols.nupkgproj - EndProjectSection -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Microsoft.ML.DnnImageFeaturizer.AlexNet", "Microsoft.ML.DnnImageFeaturizer.AlexNet", "{B00098E4-771E-41DF-A3AA-A606AAB334B7}" - ProjectSection(SolutionItems) = preProject - pkg\Microsoft.ML.DnnImageFeaturizer.AlexNet\Microsoft.ML.DnnImageFeaturizer.AlexNet.nupkgproj = pkg\Microsoft.ML.DnnImageFeaturizer.AlexNet\Microsoft.ML.DnnImageFeaturizer.AlexNet.nupkgproj - pkg\Microsoft.ML.DnnImageFeaturizer.AlexNet\Microsoft.ML.DnnImageFeaturizer.AlexNet.symbols.nupkgproj = pkg\Microsoft.ML.DnnImageFeaturizer.AlexNet\Microsoft.ML.DnnImageFeaturizer.AlexNet.symbols.nupkgproj - EndProjectSection -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Microsoft.ML.DnnImageFeaturizer.ResNet18", "Microsoft.ML.DnnImageFeaturizer.ResNet18", "{BD93C0F3-3CED-4BE8-9389-4234250FBFB1}" - ProjectSection(SolutionItems) = preProject - pkg\Microsoft.ML.DnnImageFeaturizer.ResNet18\Microsoft.ML.DnnImageFeaturizer.ResNet18.nupkgproj = pkg\Microsoft.ML.DnnImageFeaturizer.ResNet18\Microsoft.ML.DnnImageFeaturizer.ResNet18.nupkgproj - pkg\Microsoft.ML.DnnImageFeaturizer.ResNet18\Microsoft.ML.DnnImageFeaturizer.ResNet18.symbols.nupkgproj = pkg\Microsoft.ML.DnnImageFeaturizer.ResNet18\Microsoft.ML.DnnImageFeaturizer.ResNet18.symbols.nupkgproj - EndProjectSection -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Microsoft.ML.DnnImageFeaturizer.ResNet50", "Microsoft.ML.DnnImageFeaturizer.ResNet50", "{8EDFB7E5-7E7E-411D-99C5-7A4895D0F9CB}" - ProjectSection(SolutionItems) = preProject - pkg\Microsoft.ML.DnnImageFeaturizer.ResNet50\Microsoft.ML.DnnImageFeaturizer.ResNet50.nupkgproj = pkg\Microsoft.ML.DnnImageFeaturizer.ResNet50\Microsoft.ML.DnnImageFeaturizer.ResNet50.nupkgproj - pkg\Microsoft.ML.DnnImageFeaturizer.ResNet50\Microsoft.ML.DnnImageFeaturizer.ResNet50.symbols.nupkgproj = pkg\Microsoft.ML.DnnImageFeaturizer.ResNet50\Microsoft.ML.DnnImageFeaturizer.ResNet50.symbols.nupkgproj - EndProjectSection -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Microsoft.ML.DnnImageFeaturizer.ResNet101", "Microsoft.ML.DnnImageFeaturizer.ResNet101", "{9E689AD4-F908-493C-B882-B1B33E8F7696}" - ProjectSection(SolutionItems) = preProject - pkg\Microsoft.ML.DnnImageFeaturizer.ResNet101\Microsoft.ML.DnnImageFeaturizer.ResNet101.nupkgproj = pkg\Microsoft.ML.DnnImageFeaturizer.ResNet101\Microsoft.ML.DnnImageFeaturizer.ResNet101.nupkgproj - pkg\Microsoft.ML.DnnImageFeaturizer.ResNet101\Microsoft.ML.DnnImageFeaturizer.ResNet101.symbols.nupkgproj = pkg\Microsoft.ML.DnnImageFeaturizer.ResNet101\Microsoft.ML.DnnImageFeaturizer.ResNet101.symbols.nupkgproj - EndProjectSection -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Microsoft.ML.EntryPoints", "Microsoft.ML.EntryPoints", "{8D8CC016-0020-40EC-BD8E-73F1CE0F9662}" - ProjectSection(SolutionItems) = preProject - pkg\Microsoft.ML.EntryPoints\Microsoft.ML.EntryPoints.nupkgproj = pkg\Microsoft.ML.EntryPoints\Microsoft.ML.EntryPoints.nupkgproj - pkg\Microsoft.ML.EntryPoints\Microsoft.ML.EntryPoints.symbols.nupkgproj = pkg\Microsoft.ML.EntryPoints\Microsoft.ML.EntryPoints.symbols.nupkgproj - EndProjectSection -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "common", "common", "{A84717CB-F11A-41C5-A74D-C0F1D47B7431}" - ProjectSection(SolutionItems) = preProject - pkg\common\CommonPackage.props = pkg\common\CommonPackage.props - pkg\common\DnnImageFeaturizer.props = pkg\common\DnnImageFeaturizer.props - EndProjectSection -EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.ML.DataView", "src\Microsoft.ML.DataView\Microsoft.ML.DataView.csproj", "{85D0CAFD-2FE8-496A-88C7-585D35B94243}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Microsoft.ML.DataView", "Microsoft.ML.DataView", "{31D38B21-102B-41C0-9E0A-2FE0BF68D123}" - ProjectSection(SolutionItems) = preProject - pkg\Microsoft.ML.DataView\Microsoft.ML.DataView.nupkgproj = pkg\Microsoft.ML.DataView\Microsoft.ML.DataView.nupkgproj - pkg\Microsoft.ML.DataView\Microsoft.ML.DataView.symbols.nupkgproj = pkg\Microsoft.ML.DataView\Microsoft.ML.DataView.symbols.nupkgproj - EndProjectSection -EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "RemoteExecutorConsoleApp", "test\RemoteExecutorConsoleApp\RemoteExecutorConsoleApp.csproj", "{5E920CAC-5A28-42FB-936E-49C472130953}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Microsoft.ML.Ensemble", "Microsoft.ML.Ensemble", "{AD7058C9-5608-49A8-BE23-58C33A74EE91}" - ProjectSection(SolutionItems) = preProject - pkg\Microsoft.ML.Ensemble\Microsoft.ML.Ensemble.nupkgproj = pkg\Microsoft.ML.Ensemble\Microsoft.ML.Ensemble.nupkgproj - pkg\Microsoft.ML.Ensemble\Microsoft.ML.Ensemble.symbols.nupkgproj = pkg\Microsoft.ML.Ensemble\Microsoft.ML.Ensemble.symbols.nupkgproj - EndProjectSection -EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.ML.Experimental", "src\Microsoft.ML.Experimental\Microsoft.ML.Experimental.csproj", "{E02DA82D-3FEE-4C60-BD80-9EC3C3448DFC}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Microsoft.ML.FastTree", "Microsoft.ML.FastTree", "{B1B3F284-FA3D-4D76-A712-FF04495D244B}" - ProjectSection(SolutionItems) = preProject - pkg\Microsoft.ML.FastTree\Microsoft.ML.FastTree.nupkgproj = pkg\Microsoft.ML.FastTree\Microsoft.ML.FastTree.nupkgproj - pkg\Microsoft.ML.FastTree\Microsoft.ML.FastTree.symbols.nupkgproj = pkg\Microsoft.ML.FastTree\Microsoft.ML.FastTree.symbols.nupkgproj - EndProjectSection -EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.ML", "src\Microsoft.Extensions.ML\Microsoft.Extensions.ML.csproj", "{D6741C37-B5E6-4050-BCBA-9715809EA15B}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.ML.Tests", "test\Microsoft.Extensions.ML.Tests\Microsoft.Extensions.ML.Tests.csproj", "{21CAD3A1-5E1F-42C1-BB73-46B6E67F4206}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Microsoft.Extensions.ML", "Microsoft.Extensions.ML", "{AE4F7569-26F3-4160-8A8B-7A57D0DA3350}" - ProjectSection(SolutionItems) = preProject - pkg\Microsoft.Extensions.ML\Microsoft.Extensions.ML.nupkgproj = pkg\Microsoft.Extensions.ML\Microsoft.Extensions.ML.nupkgproj - pkg\Microsoft.Extensions.ML\Microsoft.Extensions.ML.symbols.nupkgproj = pkg\Microsoft.Extensions.ML\Microsoft.Extensions.ML.symbols.nupkgproj - EndProjectSection -EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.ML.StableApi", "tools-local\Microsoft.ML.StableApi\Microsoft.ML.StableApi.csproj", "{F308DC6B-7E59-40D7-A581-834E8CD99CFE}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.ML.AutoML.Tests", "test\Microsoft.ML.AutoML.Tests\Microsoft.ML.AutoML.Tests.csproj", "{C2652287-CD6D-40FB-B042-95FB56D09DB8}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.ML.AutoML", "src\Microsoft.ML.AutoML\Microsoft.ML.AutoML.csproj", "{E48285BF-F49A-4EA3-AED0-1BDDBF77EB80}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Microsoft.ML.AutoML", "Microsoft.ML.AutoML", "{F5D11F71-2D61-4AE9-99D7-0F0B54649B15}" - ProjectSection(SolutionItems) = preProject - pkg\Microsoft.ML.AutoML\Microsoft.ML.AutoML.nupkgproj = pkg\Microsoft.ML.AutoML\Microsoft.ML.AutoML.nupkgproj - pkg\Microsoft.ML.AutoML\Microsoft.ML.AutoML.symbols.nupkgproj = pkg\Microsoft.ML.AutoML\Microsoft.ML.AutoML.symbols.nupkgproj - EndProjectSection -EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.ML.AutoML.Samples", "docs\samples\Microsoft.ML.AutoML.Samples\Microsoft.ML.AutoML.Samples.csproj", "{A6924919-9E37-4023-8B7F-E85C8E3CC9B3}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.ML.Samples.GPU", "docs\samples\Microsoft.ML.Samples.GPU\Microsoft.ML.Samples.GPU.csproj", "{3C8F910B-7F23-4D25-B521-6D5AC9570ADD}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.ML.Featurizers", "src\Microsoft.ML.Featurizers\Microsoft.ML.Featurizers.csproj", "{E2DD0721-5B0F-4606-8182-4C7EFB834518}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Microsoft.ML.Featurizers", "Microsoft.ML.Featurizers", "{1BA5C784-52E8-4A87-8525-26B2452F2882}" - ProjectSection(SolutionItems) = preProject - pkg\Microsoft.ML.Featurizers\Microsoft.ML.Featurizers.nupkgproj = pkg\Microsoft.ML.Featurizers\Microsoft.ML.Featurizers.nupkgproj - pkg\Microsoft.ML.Featurizers\Microsoft.ML.Featurizers.symbols.nupkgproj = pkg\Microsoft.ML.Featurizers\Microsoft.ML.Featurizers.symbols.nupkgproj - EndProjectSection -EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.ML.CodeGenerator", "src\Microsoft.ML.CodeGenerator\Microsoft.ML.CodeGenerator.csproj", "{56CB0850-7341-4D71-9AE4-9EFC472D93DD}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.ML.CodeGenerator.Tests", "test\Microsoft.ML.CodeGenerator.Tests\Microsoft.ML.CodeGenerator.Tests.csproj", "{46CC5637-3DDF-4100-93FC-44BB87B2DB81}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Microsoft.ML.CodeGenerator", "Microsoft.ML.CodeGenerator", "{3817A875-278C-4140-BF66-3C4A8CA55F0D}" - ProjectSection(SolutionItems) = preProject - pkg\Microsoft.ML.CodeGenerator\Microsoft.ML.CodeGenerator.nupkgproj = pkg\Microsoft.ML.CodeGenerator\Microsoft.ML.CodeGenerator.nupkgproj - pkg\Microsoft.ML.CodeGenerator\Microsoft.ML.CodeGenerator.symbols.nupkgproj = pkg\Microsoft.ML.CodeGenerator\Microsoft.ML.CodeGenerator.symbols.nupkgproj - EndProjectSection -EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.ML.Vision", "src\Microsoft.ML.Vision\Microsoft.ML.Vision.csproj", "{419F93D5-4135-4DA0-A76E-EFC23E04093D}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.ML.TestFrameworkCommon", "test\Microsoft.ML.TestFrameworkCommon\Microsoft.ML.TestFrameworkCommon.csproj", "{A22FAD27-77E8-4460-8B92-EC7090B7173A}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.ML.NightlyBuild.Tests", "test\Microsoft.ML.NightlyBuild.Tests\Microsoft.ML.NightlyBuild.Tests.csproj", "{A1CAC86F-F4BB-4B6D-9D18-E9AE15B3C66E}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.ML.NightlyBuild.Tests", "test\Microsoft.ML.NightlyBuild.Tests\Microsoft.ML.NightlyBuild.Tests.csproj", "{A1CAC86F-F4BB-4B6D-9D18-E9AE15B3C66E}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.ML.NugetPackageVersionUpdater", "test\Microsoft.ML.NugetPackageVersionUpdater\Microsoft.ML.NugetPackageVersionUpdater.csproj", "{C8DB58DC-6434-4431-A81F-263D86E2A5F3}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.ML.NugetPackageVersionUpdater", "test\Microsoft.ML.NugetPackageVersionUpdater\Microsoft.ML.NugetPackageVersionUpdater.csproj", "{C8DB58DC-6434-4431-A81F-263D86E2A5F3}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "build", "build", "{C91F81E3-B900-4968-A6DF-F53B515E97E1}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.ML", "src\Microsoft.ML\Microsoft.ML.csproj", "{6CF88209-69DB-4B36-9604-3ECD9F163E96}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "netstandard2.0", "netstandard2.0", "{027DBA48-85B6-46F1-9487-0B49B5057FC0}" - ProjectSection(SolutionItems) = preProject - pkg\Microsoft.ML.CpuMath\build\netstandard2.0\Microsoft.ML.CpuMath.props = pkg\Microsoft.ML.CpuMath\build\netstandard2.0\Microsoft.ML.CpuMath.props - EndProjectSection +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.ML.Mkl.Redist", "src\Microsoft.ML.Mkl.Redist\Microsoft.ML.Mkl.Redist.csproj", "{4584326B-C5B3-4CAE-B98A-34C5F5AA16F3}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Data.Analysis", "src\Microsoft.Data.Analysis\Microsoft.Data.Analysis.csproj", "{84150C22-0627-4A11-81C9-F214762855EA}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Data.Analysis.Interactive", "src\Microsoft.Data.Analysis.Interactive\Microsoft.Data.Analysis.Interactive.csproj", "{D9FDD2D5-BFFC-4A4D-8589-7F63AA3EA923}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Data.Analysis.Tests", "test\Microsoft.Data.Analysis.Tests\Microsoft.Data.Analysis.Tests.csproj", "{0B765344-11A4-4738-9759-5060599DC134}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Data.Analysis.Interactive.Tests", "test\Microsoft.Data.Analysis.Interactive.Tests\Microsoft.Data.Analysis.Interactive.Tests.csproj", "{8AFB8CC3-DA0B-4364-BFB3-296A7C54CC25}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -1639,6 +1484,30 @@ Global {3C8F910B-7F23-4D25-B521-6D5AC9570ADD}.Release-netfx|Any CPU.Build.0 = Release-netfx|Any CPU {3C8F910B-7F23-4D25-B521-6D5AC9570ADD}.Release-netfx|x64.ActiveCfg = Release-netfx|Any CPU {3C8F910B-7F23-4D25-B521-6D5AC9570ADD}.Release-netfx|x64.Build.0 = Release-netfx|Any CPU + {E2DD0721-5B0F-4606-8182-4C7EFB834518}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E2DD0721-5B0F-4606-8182-4C7EFB834518}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E2DD0721-5B0F-4606-8182-4C7EFB834518}.Debug|x64.ActiveCfg = Debug|Any CPU + {E2DD0721-5B0F-4606-8182-4C7EFB834518}.Debug|x64.Build.0 = Debug|Any CPU + {E2DD0721-5B0F-4606-8182-4C7EFB834518}.Debug-netcoreapp3_1|Any CPU.ActiveCfg = Debug-netcoreapp3_1|Any CPU + {E2DD0721-5B0F-4606-8182-4C7EFB834518}.Debug-netcoreapp3_1|Any CPU.Build.0 = Debug-netcoreapp3_1|Any CPU + {E2DD0721-5B0F-4606-8182-4C7EFB834518}.Debug-netcoreapp3_1|x64.ActiveCfg = Debug-netcoreapp3_1|Any CPU + {E2DD0721-5B0F-4606-8182-4C7EFB834518}.Debug-netcoreapp3_1|x64.Build.0 = Debug-netcoreapp3_1|Any CPU + {E2DD0721-5B0F-4606-8182-4C7EFB834518}.Debug-netfx|Any CPU.ActiveCfg = Debug-netfx|Any CPU + {E2DD0721-5B0F-4606-8182-4C7EFB834518}.Debug-netfx|Any CPU.Build.0 = Debug-netfx|Any CPU + {E2DD0721-5B0F-4606-8182-4C7EFB834518}.Debug-netfx|x64.ActiveCfg = Debug-netfx|Any CPU + {E2DD0721-5B0F-4606-8182-4C7EFB834518}.Debug-netfx|x64.Build.0 = Debug-netfx|Any CPU + {E2DD0721-5B0F-4606-8182-4C7EFB834518}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E2DD0721-5B0F-4606-8182-4C7EFB834518}.Release|Any CPU.Build.0 = Release|Any CPU + {E2DD0721-5B0F-4606-8182-4C7EFB834518}.Release|x64.ActiveCfg = Release|Any CPU + {E2DD0721-5B0F-4606-8182-4C7EFB834518}.Release|x64.Build.0 = Release|Any CPU + {E2DD0721-5B0F-4606-8182-4C7EFB834518}.Release-netcoreapp3_1|Any CPU.ActiveCfg = Release-netcoreapp3_1|Any CPU + {E2DD0721-5B0F-4606-8182-4C7EFB834518}.Release-netcoreapp3_1|Any CPU.Build.0 = Release-netcoreapp3_1|Any CPU + {E2DD0721-5B0F-4606-8182-4C7EFB834518}.Release-netcoreapp3_1|x64.ActiveCfg = Release-netcoreapp3_1|Any CPU + {E2DD0721-5B0F-4606-8182-4C7EFB834518}.Release-netcoreapp3_1|x64.Build.0 = Release-netcoreapp3_1|Any CPU + {E2DD0721-5B0F-4606-8182-4C7EFB834518}.Release-netfx|Any CPU.ActiveCfg = Release-netfx|Any CPU + {E2DD0721-5B0F-4606-8182-4C7EFB834518}.Release-netfx|Any CPU.Build.0 = Release-netfx|Any CPU + {E2DD0721-5B0F-4606-8182-4C7EFB834518}.Release-netfx|x64.ActiveCfg = Release-netfx|Any CPU + {E2DD0721-5B0F-4606-8182-4C7EFB834518}.Release-netfx|x64.Build.0 = Release-netfx|Any CPU {56CB0850-7341-4D71-9AE4-9EFC472D93DD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {56CB0850-7341-4D71-9AE4-9EFC472D93DD}.Debug|Any CPU.Build.0 = Debug|Any CPU {56CB0850-7341-4D71-9AE4-9EFC472D93DD}.Debug|x64.ActiveCfg = Debug|Any CPU @@ -1771,30 +1640,150 @@ Global {C8DB58DC-6434-4431-A81F-263D86E2A5F3}.Release-netfx|Any CPU.Build.0 = Release-netfx|Any CPU {C8DB58DC-6434-4431-A81F-263D86E2A5F3}.Release-netfx|x64.ActiveCfg = Release-netfx|Any CPU {C8DB58DC-6434-4431-A81F-263D86E2A5F3}.Release-netfx|x64.Build.0 = Release-netfx|Any CPU - {E2DD0721-5B0F-4606-8182-4C7EFB834518}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {E2DD0721-5B0F-4606-8182-4C7EFB834518}.Debug|Any CPU.Build.0 = Debug|Any CPU - {E2DD0721-5B0F-4606-8182-4C7EFB834518}.Debug|x64.ActiveCfg = Debug|Any CPU - {E2DD0721-5B0F-4606-8182-4C7EFB834518}.Debug|x64.Build.0 = Debug|Any CPU - {E2DD0721-5B0F-4606-8182-4C7EFB834518}.Debug-netcoreapp3_1|Any CPU.ActiveCfg = Debug-netcoreapp3_1|Any CPU - {E2DD0721-5B0F-4606-8182-4C7EFB834518}.Debug-netcoreapp3_1|Any CPU.Build.0 = Debug-netcoreapp3_1|Any CPU - {E2DD0721-5B0F-4606-8182-4C7EFB834518}.Debug-netcoreapp3_1|x64.ActiveCfg = Debug-netcoreapp3_1|Any CPU - {E2DD0721-5B0F-4606-8182-4C7EFB834518}.Debug-netcoreapp3_1|x64.Build.0 = Debug-netcoreapp3_1|Any CPU - {E2DD0721-5B0F-4606-8182-4C7EFB834518}.Debug-netfx|Any CPU.ActiveCfg = Debug-netfx|Any CPU - {E2DD0721-5B0F-4606-8182-4C7EFB834518}.Debug-netfx|Any CPU.Build.0 = Debug-netfx|Any CPU - {E2DD0721-5B0F-4606-8182-4C7EFB834518}.Debug-netfx|x64.ActiveCfg = Debug-netfx|Any CPU - {E2DD0721-5B0F-4606-8182-4C7EFB834518}.Debug-netfx|x64.Build.0 = Debug-netfx|Any CPU - {E2DD0721-5B0F-4606-8182-4C7EFB834518}.Release|Any CPU.ActiveCfg = Release|Any CPU - {E2DD0721-5B0F-4606-8182-4C7EFB834518}.Release|Any CPU.Build.0 = Release|Any CPU - {E2DD0721-5B0F-4606-8182-4C7EFB834518}.Release|x64.ActiveCfg = Release|Any CPU - {E2DD0721-5B0F-4606-8182-4C7EFB834518}.Release|x64.Build.0 = Release|Any CPU - {E2DD0721-5B0F-4606-8182-4C7EFB834518}.Release-netcoreapp3_1|Any CPU.ActiveCfg = Release-netcoreapp3_1|Any CPU - {E2DD0721-5B0F-4606-8182-4C7EFB834518}.Release-netcoreapp3_1|Any CPU.Build.0 = Release-netcoreapp3_1|Any CPU - {E2DD0721-5B0F-4606-8182-4C7EFB834518}.Release-netcoreapp3_1|x64.ActiveCfg = Release-netcoreapp3_1|Any CPU - {E2DD0721-5B0F-4606-8182-4C7EFB834518}.Release-netcoreapp3_1|x64.Build.0 = Release-netcoreapp3_1|Any CPU - {E2DD0721-5B0F-4606-8182-4C7EFB834518}.Release-netfx|Any CPU.ActiveCfg = Release-netfx|Any CPU - {E2DD0721-5B0F-4606-8182-4C7EFB834518}.Release-netfx|Any CPU.Build.0 = Release-netfx|Any CPU - {E2DD0721-5B0F-4606-8182-4C7EFB834518}.Release-netfx|x64.ActiveCfg = Release-netfx|Any CPU - {E2DD0721-5B0F-4606-8182-4C7EFB834518}.Release-netfx|x64.Build.0 = Release-netfx|Any CPU + {6CF88209-69DB-4B36-9604-3ECD9F163E96}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {6CF88209-69DB-4B36-9604-3ECD9F163E96}.Debug|Any CPU.Build.0 = Debug|Any CPU + {6CF88209-69DB-4B36-9604-3ECD9F163E96}.Debug|x64.ActiveCfg = Debug|Any CPU + {6CF88209-69DB-4B36-9604-3ECD9F163E96}.Debug|x64.Build.0 = Debug|Any CPU + {6CF88209-69DB-4B36-9604-3ECD9F163E96}.Debug-netcoreapp3_1|Any CPU.ActiveCfg = Debug-netcoreapp3_1|Any CPU + {6CF88209-69DB-4B36-9604-3ECD9F163E96}.Debug-netcoreapp3_1|Any CPU.Build.0 = Debug-netcoreapp3_1|Any CPU + {6CF88209-69DB-4B36-9604-3ECD9F163E96}.Debug-netcoreapp3_1|x64.ActiveCfg = Debug-netcoreapp3_1|Any CPU + {6CF88209-69DB-4B36-9604-3ECD9F163E96}.Debug-netcoreapp3_1|x64.Build.0 = Debug-netcoreapp3_1|Any CPU + {6CF88209-69DB-4B36-9604-3ECD9F163E96}.Debug-netfx|Any CPU.ActiveCfg = Debug-netfx|Any CPU + {6CF88209-69DB-4B36-9604-3ECD9F163E96}.Debug-netfx|Any CPU.Build.0 = Debug-netfx|Any CPU + {6CF88209-69DB-4B36-9604-3ECD9F163E96}.Debug-netfx|x64.ActiveCfg = Debug-netfx|Any CPU + {6CF88209-69DB-4B36-9604-3ECD9F163E96}.Debug-netfx|x64.Build.0 = Debug-netfx|Any CPU + {6CF88209-69DB-4B36-9604-3ECD9F163E96}.Release|Any CPU.ActiveCfg = Release|Any CPU + {6CF88209-69DB-4B36-9604-3ECD9F163E96}.Release|Any CPU.Build.0 = Release|Any CPU + {6CF88209-69DB-4B36-9604-3ECD9F163E96}.Release|x64.ActiveCfg = Release|Any CPU + {6CF88209-69DB-4B36-9604-3ECD9F163E96}.Release|x64.Build.0 = Release|Any CPU + {6CF88209-69DB-4B36-9604-3ECD9F163E96}.Release-netcoreapp3_1|Any CPU.ActiveCfg = Release-netcoreapp3_1|Any CPU + {6CF88209-69DB-4B36-9604-3ECD9F163E96}.Release-netcoreapp3_1|Any CPU.Build.0 = Release-netcoreapp3_1|Any CPU + {6CF88209-69DB-4B36-9604-3ECD9F163E96}.Release-netcoreapp3_1|x64.ActiveCfg = Release-netcoreapp3_1|Any CPU + {6CF88209-69DB-4B36-9604-3ECD9F163E96}.Release-netcoreapp3_1|x64.Build.0 = Release-netcoreapp3_1|Any CPU + {6CF88209-69DB-4B36-9604-3ECD9F163E96}.Release-netfx|Any CPU.ActiveCfg = Release-netfx|Any CPU + {6CF88209-69DB-4B36-9604-3ECD9F163E96}.Release-netfx|Any CPU.Build.0 = Release-netfx|Any CPU + {6CF88209-69DB-4B36-9604-3ECD9F163E96}.Release-netfx|x64.ActiveCfg = Release-netfx|Any CPU + {6CF88209-69DB-4B36-9604-3ECD9F163E96}.Release-netfx|x64.Build.0 = Release-netfx|Any CPU + {4584326B-C5B3-4CAE-B98A-34C5F5AA16F3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {4584326B-C5B3-4CAE-B98A-34C5F5AA16F3}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4584326B-C5B3-4CAE-B98A-34C5F5AA16F3}.Debug|x64.ActiveCfg = Debug|Any CPU + {4584326B-C5B3-4CAE-B98A-34C5F5AA16F3}.Debug|x64.Build.0 = Debug|Any CPU + {4584326B-C5B3-4CAE-B98A-34C5F5AA16F3}.Debug-netcoreapp3_1|Any CPU.ActiveCfg = Debug-netcoreapp3_1|Any CPU + {4584326B-C5B3-4CAE-B98A-34C5F5AA16F3}.Debug-netcoreapp3_1|Any CPU.Build.0 = Debug-netcoreapp3_1|Any CPU + {4584326B-C5B3-4CAE-B98A-34C5F5AA16F3}.Debug-netcoreapp3_1|x64.ActiveCfg = Debug-netcoreapp3_1|Any CPU + {4584326B-C5B3-4CAE-B98A-34C5F5AA16F3}.Debug-netcoreapp3_1|x64.Build.0 = Debug-netcoreapp3_1|Any CPU + {4584326B-C5B3-4CAE-B98A-34C5F5AA16F3}.Debug-netfx|Any CPU.ActiveCfg = Debug-netfx|Any CPU + {4584326B-C5B3-4CAE-B98A-34C5F5AA16F3}.Debug-netfx|Any CPU.Build.0 = Debug-netfx|Any CPU + {4584326B-C5B3-4CAE-B98A-34C5F5AA16F3}.Debug-netfx|x64.ActiveCfg = Debug-netfx|Any CPU + {4584326B-C5B3-4CAE-B98A-34C5F5AA16F3}.Debug-netfx|x64.Build.0 = Debug-netfx|Any CPU + {4584326B-C5B3-4CAE-B98A-34C5F5AA16F3}.Release|Any CPU.ActiveCfg = Release|Any CPU + {4584326B-C5B3-4CAE-B98A-34C5F5AA16F3}.Release|Any CPU.Build.0 = Release|Any CPU + {4584326B-C5B3-4CAE-B98A-34C5F5AA16F3}.Release|x64.ActiveCfg = Release|Any CPU + {4584326B-C5B3-4CAE-B98A-34C5F5AA16F3}.Release|x64.Build.0 = Release|Any CPU + {4584326B-C5B3-4CAE-B98A-34C5F5AA16F3}.Release-netcoreapp3_1|Any CPU.ActiveCfg = Release-netcoreapp3_1|Any CPU + {4584326B-C5B3-4CAE-B98A-34C5F5AA16F3}.Release-netcoreapp3_1|Any CPU.Build.0 = Release-netcoreapp3_1|Any CPU + {4584326B-C5B3-4CAE-B98A-34C5F5AA16F3}.Release-netcoreapp3_1|x64.ActiveCfg = Release-netcoreapp3_1|Any CPU + {4584326B-C5B3-4CAE-B98A-34C5F5AA16F3}.Release-netcoreapp3_1|x64.Build.0 = Release-netcoreapp3_1|Any CPU + {4584326B-C5B3-4CAE-B98A-34C5F5AA16F3}.Release-netfx|Any CPU.ActiveCfg = Release-netfx|Any CPU + {4584326B-C5B3-4CAE-B98A-34C5F5AA16F3}.Release-netfx|Any CPU.Build.0 = Release-netfx|Any CPU + {4584326B-C5B3-4CAE-B98A-34C5F5AA16F3}.Release-netfx|x64.ActiveCfg = Release-netfx|Any CPU + {4584326B-C5B3-4CAE-B98A-34C5F5AA16F3}.Release-netfx|x64.Build.0 = Release-netfx|Any CPU + {84150C22-0627-4A11-81C9-F214762855EA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {84150C22-0627-4A11-81C9-F214762855EA}.Debug|Any CPU.Build.0 = Debug|Any CPU + {84150C22-0627-4A11-81C9-F214762855EA}.Debug|x64.ActiveCfg = Debug|Any CPU + {84150C22-0627-4A11-81C9-F214762855EA}.Debug|x64.Build.0 = Debug|Any CPU + {84150C22-0627-4A11-81C9-F214762855EA}.Debug-netcoreapp3_1|Any CPU.ActiveCfg = Debug-netcoreapp3_1|Any CPU + {84150C22-0627-4A11-81C9-F214762855EA}.Debug-netcoreapp3_1|Any CPU.Build.0 = Debug-netcoreapp3_1|Any CPU + {84150C22-0627-4A11-81C9-F214762855EA}.Debug-netcoreapp3_1|x64.ActiveCfg = Debug-netcoreapp3_1|Any CPU + {84150C22-0627-4A11-81C9-F214762855EA}.Debug-netcoreapp3_1|x64.Build.0 = Debug-netcoreapp3_1|Any CPU + {84150C22-0627-4A11-81C9-F214762855EA}.Debug-netfx|Any CPU.ActiveCfg = Debug-netfx|Any CPU + {84150C22-0627-4A11-81C9-F214762855EA}.Debug-netfx|Any CPU.Build.0 = Debug-netfx|Any CPU + {84150C22-0627-4A11-81C9-F214762855EA}.Debug-netfx|x64.ActiveCfg = Debug-netfx|Any CPU + {84150C22-0627-4A11-81C9-F214762855EA}.Debug-netfx|x64.Build.0 = Debug-netfx|Any CPU + {84150C22-0627-4A11-81C9-F214762855EA}.Release|Any CPU.ActiveCfg = Release|Any CPU + {84150C22-0627-4A11-81C9-F214762855EA}.Release|Any CPU.Build.0 = Release|Any CPU + {84150C22-0627-4A11-81C9-F214762855EA}.Release|x64.ActiveCfg = Release|Any CPU + {84150C22-0627-4A11-81C9-F214762855EA}.Release|x64.Build.0 = Release|Any CPU + {84150C22-0627-4A11-81C9-F214762855EA}.Release-netcoreapp3_1|Any CPU.ActiveCfg = Release-netcoreapp3_1|Any CPU + {84150C22-0627-4A11-81C9-F214762855EA}.Release-netcoreapp3_1|Any CPU.Build.0 = Release-netcoreapp3_1|Any CPU + {84150C22-0627-4A11-81C9-F214762855EA}.Release-netcoreapp3_1|x64.ActiveCfg = Release-netcoreapp3_1|Any CPU + {84150C22-0627-4A11-81C9-F214762855EA}.Release-netcoreapp3_1|x64.Build.0 = Release-netcoreapp3_1|Any CPU + {84150C22-0627-4A11-81C9-F214762855EA}.Release-netfx|Any CPU.ActiveCfg = Release-netfx|Any CPU + {84150C22-0627-4A11-81C9-F214762855EA}.Release-netfx|Any CPU.Build.0 = Release-netfx|Any CPU + {84150C22-0627-4A11-81C9-F214762855EA}.Release-netfx|x64.ActiveCfg = Release-netfx|Any CPU + {84150C22-0627-4A11-81C9-F214762855EA}.Release-netfx|x64.Build.0 = Release-netfx|Any CPU + {D9FDD2D5-BFFC-4A4D-8589-7F63AA3EA923}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D9FDD2D5-BFFC-4A4D-8589-7F63AA3EA923}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D9FDD2D5-BFFC-4A4D-8589-7F63AA3EA923}.Debug|x64.ActiveCfg = Debug|Any CPU + {D9FDD2D5-BFFC-4A4D-8589-7F63AA3EA923}.Debug|x64.Build.0 = Debug|Any CPU + {D9FDD2D5-BFFC-4A4D-8589-7F63AA3EA923}.Debug-netcoreapp3_1|Any CPU.ActiveCfg = Debug-netcoreapp3_1|Any CPU + {D9FDD2D5-BFFC-4A4D-8589-7F63AA3EA923}.Debug-netcoreapp3_1|Any CPU.Build.0 = Debug-netcoreapp3_1|Any CPU + {D9FDD2D5-BFFC-4A4D-8589-7F63AA3EA923}.Debug-netcoreapp3_1|x64.ActiveCfg = Debug-netcoreapp3_1|Any CPU + {D9FDD2D5-BFFC-4A4D-8589-7F63AA3EA923}.Debug-netcoreapp3_1|x64.Build.0 = Debug-netcoreapp3_1|Any CPU + {D9FDD2D5-BFFC-4A4D-8589-7F63AA3EA923}.Debug-netfx|Any CPU.ActiveCfg = Debug-netfx|Any CPU + {D9FDD2D5-BFFC-4A4D-8589-7F63AA3EA923}.Debug-netfx|Any CPU.Build.0 = Debug-netfx|Any CPU + {D9FDD2D5-BFFC-4A4D-8589-7F63AA3EA923}.Debug-netfx|x64.ActiveCfg = Debug-netfx|Any CPU + {D9FDD2D5-BFFC-4A4D-8589-7F63AA3EA923}.Debug-netfx|x64.Build.0 = Debug-netfx|Any CPU + {D9FDD2D5-BFFC-4A4D-8589-7F63AA3EA923}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D9FDD2D5-BFFC-4A4D-8589-7F63AA3EA923}.Release|Any CPU.Build.0 = Release|Any CPU + {D9FDD2D5-BFFC-4A4D-8589-7F63AA3EA923}.Release|x64.ActiveCfg = Release|Any CPU + {D9FDD2D5-BFFC-4A4D-8589-7F63AA3EA923}.Release|x64.Build.0 = Release|Any CPU + {D9FDD2D5-BFFC-4A4D-8589-7F63AA3EA923}.Release-netcoreapp3_1|Any CPU.ActiveCfg = Release-netcoreapp3_1|Any CPU + {D9FDD2D5-BFFC-4A4D-8589-7F63AA3EA923}.Release-netcoreapp3_1|Any CPU.Build.0 = Release-netcoreapp3_1|Any CPU + {D9FDD2D5-BFFC-4A4D-8589-7F63AA3EA923}.Release-netcoreapp3_1|x64.ActiveCfg = Release-netcoreapp3_1|Any CPU + {D9FDD2D5-BFFC-4A4D-8589-7F63AA3EA923}.Release-netcoreapp3_1|x64.Build.0 = Release-netcoreapp3_1|Any CPU + {D9FDD2D5-BFFC-4A4D-8589-7F63AA3EA923}.Release-netfx|Any CPU.ActiveCfg = Release-netfx|Any CPU + {D9FDD2D5-BFFC-4A4D-8589-7F63AA3EA923}.Release-netfx|Any CPU.Build.0 = Release-netfx|Any CPU + {D9FDD2D5-BFFC-4A4D-8589-7F63AA3EA923}.Release-netfx|x64.ActiveCfg = Release-netfx|Any CPU + {D9FDD2D5-BFFC-4A4D-8589-7F63AA3EA923}.Release-netfx|x64.Build.0 = Release-netfx|Any CPU + {0B765344-11A4-4738-9759-5060599DC134}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {0B765344-11A4-4738-9759-5060599DC134}.Debug|Any CPU.Build.0 = Debug|Any CPU + {0B765344-11A4-4738-9759-5060599DC134}.Debug|x64.ActiveCfg = Debug|Any CPU + {0B765344-11A4-4738-9759-5060599DC134}.Debug|x64.Build.0 = Debug|Any CPU + {0B765344-11A4-4738-9759-5060599DC134}.Debug-netcoreapp3_1|Any CPU.ActiveCfg = Debug-netcoreapp3_1|Any CPU + {0B765344-11A4-4738-9759-5060599DC134}.Debug-netcoreapp3_1|Any CPU.Build.0 = Debug-netcoreapp3_1|Any CPU + {0B765344-11A4-4738-9759-5060599DC134}.Debug-netcoreapp3_1|x64.ActiveCfg = Debug-netcoreapp3_1|Any CPU + {0B765344-11A4-4738-9759-5060599DC134}.Debug-netcoreapp3_1|x64.Build.0 = Debug-netcoreapp3_1|Any CPU + {0B765344-11A4-4738-9759-5060599DC134}.Debug-netfx|Any CPU.ActiveCfg = Debug-netfx|Any CPU + {0B765344-11A4-4738-9759-5060599DC134}.Debug-netfx|Any CPU.Build.0 = Debug-netfx|Any CPU + {0B765344-11A4-4738-9759-5060599DC134}.Debug-netfx|x64.ActiveCfg = Debug-netfx|Any CPU + {0B765344-11A4-4738-9759-5060599DC134}.Debug-netfx|x64.Build.0 = Debug-netfx|Any CPU + {0B765344-11A4-4738-9759-5060599DC134}.Release|Any CPU.ActiveCfg = Release|Any CPU + {0B765344-11A4-4738-9759-5060599DC134}.Release|Any CPU.Build.0 = Release|Any CPU + {0B765344-11A4-4738-9759-5060599DC134}.Release|x64.ActiveCfg = Release|Any CPU + {0B765344-11A4-4738-9759-5060599DC134}.Release|x64.Build.0 = Release|Any CPU + {0B765344-11A4-4738-9759-5060599DC134}.Release-netcoreapp3_1|Any CPU.ActiveCfg = Release-netcoreapp3_1|Any CPU + {0B765344-11A4-4738-9759-5060599DC134}.Release-netcoreapp3_1|Any CPU.Build.0 = Release-netcoreapp3_1|Any CPU + {0B765344-11A4-4738-9759-5060599DC134}.Release-netcoreapp3_1|x64.ActiveCfg = Release-netcoreapp3_1|Any CPU + {0B765344-11A4-4738-9759-5060599DC134}.Release-netcoreapp3_1|x64.Build.0 = Release-netcoreapp3_1|Any CPU + {0B765344-11A4-4738-9759-5060599DC134}.Release-netfx|Any CPU.ActiveCfg = Release-netfx|Any CPU + {0B765344-11A4-4738-9759-5060599DC134}.Release-netfx|Any CPU.Build.0 = Release-netfx|Any CPU + {0B765344-11A4-4738-9759-5060599DC134}.Release-netfx|x64.ActiveCfg = Release-netfx|Any CPU + {0B765344-11A4-4738-9759-5060599DC134}.Release-netfx|x64.Build.0 = Release-netfx|Any CPU + {8AFB8CC3-DA0B-4364-BFB3-296A7C54CC25}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {8AFB8CC3-DA0B-4364-BFB3-296A7C54CC25}.Debug|Any CPU.Build.0 = Debug|Any CPU + {8AFB8CC3-DA0B-4364-BFB3-296A7C54CC25}.Debug|x64.ActiveCfg = Debug|Any CPU + {8AFB8CC3-DA0B-4364-BFB3-296A7C54CC25}.Debug|x64.Build.0 = Debug|Any CPU + {8AFB8CC3-DA0B-4364-BFB3-296A7C54CC25}.Debug-netcoreapp3_1|Any CPU.ActiveCfg = Debug-netcoreapp3_1|Any CPU + {8AFB8CC3-DA0B-4364-BFB3-296A7C54CC25}.Debug-netcoreapp3_1|Any CPU.Build.0 = Debug-netcoreapp3_1|Any CPU + {8AFB8CC3-DA0B-4364-BFB3-296A7C54CC25}.Debug-netcoreapp3_1|x64.ActiveCfg = Debug-netcoreapp3_1|Any CPU + {8AFB8CC3-DA0B-4364-BFB3-296A7C54CC25}.Debug-netcoreapp3_1|x64.Build.0 = Debug-netcoreapp3_1|Any CPU + {8AFB8CC3-DA0B-4364-BFB3-296A7C54CC25}.Debug-netfx|Any CPU.ActiveCfg = Debug-netfx|Any CPU + {8AFB8CC3-DA0B-4364-BFB3-296A7C54CC25}.Debug-netfx|Any CPU.Build.0 = Debug-netfx|Any CPU + {8AFB8CC3-DA0B-4364-BFB3-296A7C54CC25}.Debug-netfx|x64.ActiveCfg = Debug-netfx|Any CPU + {8AFB8CC3-DA0B-4364-BFB3-296A7C54CC25}.Debug-netfx|x64.Build.0 = Debug-netfx|Any CPU + {8AFB8CC3-DA0B-4364-BFB3-296A7C54CC25}.Release|Any CPU.ActiveCfg = Release|Any CPU + {8AFB8CC3-DA0B-4364-BFB3-296A7C54CC25}.Release|Any CPU.Build.0 = Release|Any CPU + {8AFB8CC3-DA0B-4364-BFB3-296A7C54CC25}.Release|x64.ActiveCfg = Release|Any CPU + {8AFB8CC3-DA0B-4364-BFB3-296A7C54CC25}.Release|x64.Build.0 = Release|Any CPU + {8AFB8CC3-DA0B-4364-BFB3-296A7C54CC25}.Release-netcoreapp3_1|Any CPU.ActiveCfg = Release-netcoreapp3_1|Any CPU + {8AFB8CC3-DA0B-4364-BFB3-296A7C54CC25}.Release-netcoreapp3_1|Any CPU.Build.0 = Release-netcoreapp3_1|Any CPU + {8AFB8CC3-DA0B-4364-BFB3-296A7C54CC25}.Release-netcoreapp3_1|x64.ActiveCfg = Release-netcoreapp3_1|Any CPU + {8AFB8CC3-DA0B-4364-BFB3-296A7C54CC25}.Release-netcoreapp3_1|x64.Build.0 = Release-netcoreapp3_1|Any CPU + {8AFB8CC3-DA0B-4364-BFB3-296A7C54CC25}.Release-netfx|Any CPU.ActiveCfg = Release-netfx|Any CPU + {8AFB8CC3-DA0B-4364-BFB3-296A7C54CC25}.Release-netfx|Any CPU.Build.0 = Release-netfx|Any CPU + {8AFB8CC3-DA0B-4364-BFB3-296A7C54CC25}.Release-netfx|x64.ActiveCfg = Release-netfx|Any CPU + {8AFB8CC3-DA0B-4364-BFB3-296A7C54CC25}.Release-netfx|x64.Build.0 = Release-netfx|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -1817,17 +1806,12 @@ Global {B7B593C5-FB8C-4ADA-A638-5B53B47D087E} = {09EADF06-BE25-4228-AB53-95AE3E15B530} {16BB1454-2108-40E5-B3A6-594654005303} = {09EADF06-BE25-4228-AB53-95AE3E15B530} {55C8122D-79EA-48AB-85D0-EB551FC1C427} = {09EADF06-BE25-4228-AB53-95AE3E15B530} - {DEC8F776-49F7-4D87-836C-FE4DC057D08C} = {D3D38B03-B557-484D-8348-8BADEE4DF592} - {6C95FC87-F5F2-4EEF-BB97-567F2F5DD141} = {D3D38B03-B557-484D-8348-8BADEE4DF592} {7A9DB75F-2CA5-4184-9EF5-1F17EB39483F} = {AED9C836-31E3-4F3F-8ABC-929555D3F3C4} {64F40A0D-D4C2-4AA7-8470-E9CC437827E4} = {09EADF06-BE25-4228-AB53-95AE3E15B530} {362A98CF-FBF7-4EBB-A11B-990BBF845B15} = {09EADF06-BE25-4228-AB53-95AE3E15B530} - {487213C9-E8A9-4F94-85D7-28A05DBBFE3A} = {DEC8F776-49F7-4D87-836C-FE4DC057D08C} - {9252A8EB-ABFB-440C-AB4D-1D562753CE0F} = {487213C9-E8A9-4F94-85D7-28A05DBBFE3A} {3DEB504D-7A07-48CE-91A2-8047461CB3D4} = {AED9C836-31E3-4F3F-8ABC-929555D3F3C4} {001F3B4E-FBE4-4001-AFD2-A6A989CD1C25} = {09EADF06-BE25-4228-AB53-95AE3E15B530} {DCF46B79-1FDB-4DBA-A263-D3D64E3AAA27} = {09EADF06-BE25-4228-AB53-95AE3E15B530} - {BF66A305-DF10-47E4-8D81-42049B149D2B} = {D3D38B03-B557-484D-8348-8BADEE4DF592} {B4E55B2D-2A92-46E7-B72F-E76D6FD83440} = {7F13E156-3EBA-4021-84A5-CD56BA72F99E} {3E4ABF07-7970-4BE6-B45B-A13D3C397545} = {AED9C836-31E3-4F3F-8ABC-929555D3F3C4} {7333EDEF-4144-405C-A5EC-6F42201857D8} = {AED9C836-31E3-4F3F-8ABC-929555D3F3C4} @@ -1850,47 +1834,29 @@ Global {4805129D-78C8-46D4-9519-0AD9B0574D6D} = {09EADF06-BE25-4228-AB53-95AE3E15B530} {DB7CEB5E-8BE6-48A7-87BE-B91D9AE96F71} = {09EADF06-BE25-4228-AB53-95AE3E15B530} {7504D46F-E4B3-43CB-9B1C-82F3131F1C99} = {09EADF06-BE25-4228-AB53-95AE3E15B530} - {63006A14-B924-48C5-83C9-CFE9DA22B01F} = {D3D38B03-B557-484D-8348-8BADEE4DF592} - {1229F799-37F0-4282-B9F0-74BFA97CC362} = {D3D38B03-B557-484D-8348-8BADEE4DF592} - {DE95FE65-9FF7-4233-93DF-7A8F2805624A} = {D3D38B03-B557-484D-8348-8BADEE4DF592} - {4CF8095E-B4A3-4326-A550-43098E447288} = {D3D38B03-B557-484D-8348-8BADEE4DF592} - {19AC192B-75FE-45D5-B219-898E401D5904} = {D3D38B03-B557-484D-8348-8BADEE4DF592} - {93FF16AA-635E-421D-96C1-008818C143A2} = {D3D38B03-B557-484D-8348-8BADEE4DF592} - {320AF46A-4809-486E-8F9E-A00C8AE47751} = {D3D38B03-B557-484D-8348-8BADEE4DF592} - {11894B4A-78B4-4523-A6DD-4495722E244F} = {D3D38B03-B557-484D-8348-8BADEE4DF592} - {B836F712-7FB6-4B75-A3EB-FB05F8E0D15E} = {D3D38B03-B557-484D-8348-8BADEE4DF592} - {B00098E4-771E-41DF-A3AA-A606AAB334B7} = {D3D38B03-B557-484D-8348-8BADEE4DF592} - {BD93C0F3-3CED-4BE8-9389-4234250FBFB1} = {D3D38B03-B557-484D-8348-8BADEE4DF592} - {8EDFB7E5-7E7E-411D-99C5-7A4895D0F9CB} = {D3D38B03-B557-484D-8348-8BADEE4DF592} - {9E689AD4-F908-493C-B882-B1B33E8F7696} = {D3D38B03-B557-484D-8348-8BADEE4DF592} - {8D8CC016-0020-40EC-BD8E-73F1CE0F9662} = {D3D38B03-B557-484D-8348-8BADEE4DF592} - {A84717CB-F11A-41C5-A74D-C0F1D47B7431} = {D3D38B03-B557-484D-8348-8BADEE4DF592} {85D0CAFD-2FE8-496A-88C7-585D35B94243} = {09EADF06-BE25-4228-AB53-95AE3E15B530} - {31D38B21-102B-41C0-9E0A-2FE0BF68D123} = {D3D38B03-B557-484D-8348-8BADEE4DF592} {5E920CAC-5A28-42FB-936E-49C472130953} = {AED9C836-31E3-4F3F-8ABC-929555D3F3C4} - {AD7058C9-5608-49A8-BE23-58C33A74EE91} = {D3D38B03-B557-484D-8348-8BADEE4DF592} {E02DA82D-3FEE-4C60-BD80-9EC3C3448DFC} = {09EADF06-BE25-4228-AB53-95AE3E15B530} - {B1B3F284-FA3D-4D76-A712-FF04495D244B} = {D3D38B03-B557-484D-8348-8BADEE4DF592} {D6741C37-B5E6-4050-BCBA-9715809EA15B} = {09EADF06-BE25-4228-AB53-95AE3E15B530} {21CAD3A1-5E1F-42C1-BB73-46B6E67F4206} = {AED9C836-31E3-4F3F-8ABC-929555D3F3C4} - {AE4F7569-26F3-4160-8A8B-7A57D0DA3350} = {D3D38B03-B557-484D-8348-8BADEE4DF592} {F308DC6B-7E59-40D7-A581-834E8CD99CFE} = {7F13E156-3EBA-4021-84A5-CD56BA72F99E} {C2652287-CD6D-40FB-B042-95FB56D09DB8} = {AED9C836-31E3-4F3F-8ABC-929555D3F3C4} {E48285BF-F49A-4EA3-AED0-1BDDBF77EB80} = {09EADF06-BE25-4228-AB53-95AE3E15B530} - {F5D11F71-2D61-4AE9-99D7-0F0B54649B15} = {D3D38B03-B557-484D-8348-8BADEE4DF592} {A6924919-9E37-4023-8B7F-E85C8E3CC9B3} = {DA452A53-2E94-4433-B08C-041EDEC729E6} {3C8F910B-7F23-4D25-B521-6D5AC9570ADD} = {DA452A53-2E94-4433-B08C-041EDEC729E6} + {E2DD0721-5B0F-4606-8182-4C7EFB834518} = {09EADF06-BE25-4228-AB53-95AE3E15B530} {56CB0850-7341-4D71-9AE4-9EFC472D93DD} = {09EADF06-BE25-4228-AB53-95AE3E15B530} {46CC5637-3DDF-4100-93FC-44BB87B2DB81} = {AED9C836-31E3-4F3F-8ABC-929555D3F3C4} - {3817A875-278C-4140-BF66-3C4A8CA55F0D} = {D3D38B03-B557-484D-8348-8BADEE4DF592} {419F93D5-4135-4DA0-A76E-EFC23E04093D} = {09EADF06-BE25-4228-AB53-95AE3E15B530} {A22FAD27-77E8-4460-8B92-EC7090B7173A} = {AED9C836-31E3-4F3F-8ABC-929555D3F3C4} {A1CAC86F-F4BB-4B6D-9D18-E9AE15B3C66E} = {AED9C836-31E3-4F3F-8ABC-929555D3F3C4} {C8DB58DC-6434-4431-A81F-263D86E2A5F3} = {AED9C836-31E3-4F3F-8ABC-929555D3F3C4} - {C91F81E3-B900-4968-A6DF-F53B515E97E1} = {BF66A305-DF10-47E4-8D81-42049B149D2B} - {027DBA48-85B6-46F1-9487-0B49B5057FC0} = {C91F81E3-B900-4968-A6DF-F53B515E97E1} - {E2DD0721-5B0F-4606-8182-4C7EFB834518} = {09EADF06-BE25-4228-AB53-95AE3E15B530} - {1BA5C784-52E8-4A87-8525-26B2452F2882} = {D3D38B03-B557-484D-8348-8BADEE4DF592} + {6CF88209-69DB-4B36-9604-3ECD9F163E96} = {09EADF06-BE25-4228-AB53-95AE3E15B530} + {4584326B-C5B3-4CAE-B98A-34C5F5AA16F3} = {09EADF06-BE25-4228-AB53-95AE3E15B530} + {84150C22-0627-4A11-81C9-F214762855EA} = {09EADF06-BE25-4228-AB53-95AE3E15B530} + {D9FDD2D5-BFFC-4A4D-8589-7F63AA3EA923} = {09EADF06-BE25-4228-AB53-95AE3E15B530} + {0B765344-11A4-4738-9759-5060599DC134} = {AED9C836-31E3-4F3F-8ABC-929555D3F3C4} + {8AFB8CC3-DA0B-4364-BFB3-296A7C54CC25} = {AED9C836-31E3-4F3F-8ABC-929555D3F3C4} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {41165AF1-35BB-4832-A189-73060F82B01D} diff --git a/NuGet.config b/NuGet.config new file mode 100644 index 0000000000..976d8d3441 --- /dev/null +++ b/NuGet.config @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/README.md b/README.md index 474113b97c..06b5634b50 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Machine Learning for .NET -[ML.NET](https://www.microsoft.com/net/learn/apps/machine-learning-and-ai/ml-dotnet) is a cross-platform open-source machine learning framework which makes machine learning accessible to .NET developers with the same code that powers machine learning across many Microsoft products, including Power BI, Windows Defender, and Azure. +[ML.NET](https://www.microsoft.com/net/learn/apps/machine-learning-and-ai/ml-dotnet) is a cross-platform open-source machine learning framework which makes machine learning accessible to .NET developers with the same code that powers machine learning across many Microsoft products, including Power BI, Windows Defender, and Azure. ML.NET allows .NET developers to develop/train their own models and infuse custom machine learning into their applications using .NET, even without prior expertise in developing or tuning machine learning models. It provides data loading from files and databases, enables data transformations and includes many ML algorithms. @@ -14,15 +14,15 @@ If you are new to machine learning, start by learning the basics from this colle ## ML.NET Documentation, tutorials and reference -Please check our [documentation and tutorials](https://docs.microsoft.com/en-us/dotnet/machine-learning/). +Please check our [documentation and tutorials](https://docs.microsoft.com/en-us/dotnet/machine-learning/). See the [API Reference documentation](https://docs.microsoft.com/en-us/dotnet/api/?view=ml-dotnet). ## Sample apps -We have a GitHub repo with [ML.NET sample apps](https://github.com/dotnet/machinelearning-samples) with many scenarios such as Sentiment analysis, Fraud detection, Product Recommender, Price Prediction, Anomaly Detection, Image Classification, Object Detection and many more. +We have a GitHub repo with [ML.NET sample apps](https://github.com/dotnet/machinelearning-samples) with many scenarios such as Sentiment analysis, Fraud detection, Product Recommender, Price Prediction, Anomaly Detection, Image Classification, Object Detection and many more. -In addition to the ML.NET samples provided by Microsoft, we're also highlighting many more samples created by the community showcased in this separate page [ML.NET Community Samples](https://github.com/dotnet/machinelearning-samples/blob/master/docs/COMMUNITY-SAMPLES.md) +In addition to the ML.NET samples provided by Microsoft, we're also highlighting many more samples created by the community showcased in this separate page [ML.NET Community Samples](https://github.com/dotnet/machinelearning-samples/blob/main/docs/COMMUNITY-SAMPLES.md) ## ML.NET videos playlist at YouTube @@ -31,7 +31,7 @@ The [ML.NET videos playlist](https://aka.ms/mlnetyoutube) on YouTube contains se ## Operating systems and processor architectures supported by ML.NET -ML.NET runs on Windows, Linux, and macOS using [.NET Core](https://github.com/dotnet/core), or Windows using .NET Framework. +ML.NET runs on Windows, Linux, and macOS using [.NET Core](https://github.com/dotnet/core), or Windows using .NET Framework. 64 bit is supported on all platforms. 32 bit is supported on Windows, except for TensorFlow and LightGBM related functionality. @@ -67,17 +67,17 @@ Daily NuGet builds of the project are also available in our Azure DevOps feed: To build ML.NET from source please visit our [developers guide](docs/project-docs/developer-guide.md). -[![codecov](https://codecov.io/gh/dotnet/machinelearning/branch/master/graph/badge.svg?flag=production)](https://codecov.io/gh/dotnet/machinelearning) +[![codecov](https://codecov.io/gh/dotnet/machinelearning/branch/main/graph/badge.svg?flag=production)](https://codecov.io/gh/dotnet/machinelearning) | | Debug | Release | |:---|----------------:|------------------:| -|**CentOS**|[![Build Status](https://dev.azure.com/dnceng/public/_apis/build/status/dotnet/machinelearning/MachineLearning-CI?branchName=master&jobName=Centos_x64_NetCoreApp31&configuration=Centos_x64_NetCoreApp31%20Debug_Build)](https://dev.azure.com/dnceng/public/_build/latest?definitionId=104&branchName=master)|[![Build Status](https://dev.azure.com/dnceng/public/_apis/build/status/dotnet/machinelearning/MachineLearning-CI?branchName=master&jobName=Centos_x64_NetCoreApp31&configuration=Centos_x64_NetCoreApp31%20Release_Build)](https://dev.azure.com/dnceng/public/_build/latest?definitionId=104&branchName=master)| -|**Ubuntu**|[![Build Status](https://dev.azure.com/dnceng/public/_apis/build/status/dotnet/machinelearning/MachineLearning-CI?branchName=master&jobName=Ubuntu_x64_NetCoreApp21&configuration=Ubuntu_x64_NetCoreApp21%20Debug_Build)](https://dev.azure.com/dnceng/public/_build/latest?definitionId=104&branchName=master)|[![Build Status](https://dev.azure.com/dnceng/public/_apis/build/status/dotnet/machinelearning/MachineLearning-CI?branchName=master&jobName=Ubuntu_x64_NetCoreApp21&configuration=Ubuntu_x64_NetCoreApp21%20Release_Build)](https://dev.azure.com/dnceng/public/_build/latest?definitionId=104&branchName=master)| -|**macOS**|[![Build Status](https://dev.azure.com/dnceng/public/_apis/build/status/dotnet/machinelearning/MachineLearning-CI?branchName=master&jobName=MacOS_x64_NetCoreApp21&configuration=MacOS_x64_NetCoreApp21%20Debug_Build)](https://dev.azure.com/dnceng/public/_build/latest?definitionId=104&branchName=master)|[![Build Status](https://dev.azure.com/dnceng/public/_apis/build/status/dotnet/machinelearning/MachineLearning-CI?branchName=master&jobName=MacOS_x64_NetCoreApp21&configuration=MacOS_x64_NetCoreApp21%20Release_Build)](https://dev.azure.com/dnceng/public/_build/latest?definitionId=104&branchName=master)| -|**Windows x64**|[![Build Status](https://dev.azure.com/dnceng/public/_apis/build/status/dotnet/machinelearning/MachineLearning-CI?branchName=master&jobName=Windows_x64_NetCoreApp21&configuration=Windows_x64_NetCoreApp21%20Debug_Build)](https://dev.azure.com/dnceng/public/_build/latest?definitionId=104&branchName=master)|[![Build Status](https://dev.azure.com/dnceng/public/_apis/build/status/dotnet/machinelearning/MachineLearning-CI?branchName=master&jobName=Windows_x64_NetCoreApp21&configuration=Windows_x64_NetCoreApp21%20Release_Build)](https://dev.azure.com/dnceng/public/_build/latest?definitionId=104&branchName=master)| -|**Windows FullFramework**|[![Build Status](https://dev.azure.com/dnceng/public/_apis/build/status/dotnet/machinelearning/MachineLearning-CI?branchName=master&jobName=Windows_x64_NetFx461&configuration=Windows_x64_NetFx461%20Debug_Build)](https://dev.azure.com/dnceng/public/_build/latest?definitionId=104&branchName=master)|[![Build Status](https://dev.azure.com/dnceng/public/_apis/build/status/dotnet/machinelearning/MachineLearning-CI?branchName=master&jobName=Windows_x64_NetFx461&configuration=Windows_x64_NetFx461%20Release_Build)](https://dev.azure.com/dnceng/public/_build/latest?definitionId=104&branchName=master)| -|**Windows x86**|[![Build Status](https://dev.azure.com/dnceng/public/_apis/build/status/dotnet/machinelearning/MachineLearning-CI?branchName=master&jobName=Windows_x86_NetCoreApp21&configuration=Windows_x86_NetCoreApp21%20Debug_Build)](https://dev.azure.com/dnceng/public/_build/latest?definitionId=104&branchName=master)|[![Build Status](https://dev.azure.com/dnceng/public/_apis/build/status/dotnet/machinelearning/MachineLearning-CI?branchName=master&jobName=Windows_x86_NetCoreApp21&configuration=Windows_x86_NetCoreApp21%20Release_Build)](https://dev.azure.com/dnceng/public/_build/latest?definitionId=104&branchName=master)| -|**Windows NetCore3.1**|[![Build Status](https://dev.azure.com/dnceng/public/_apis/build/status/dotnet/machinelearning/MachineLearning-CI?branchName=master&jobName=Windows_x64_NetCoreApp31&configuration=Windows_x64_NetCoreApp31%20Debug_Build)](https://dev.azure.com/dnceng/public/_build/latest?definitionId=104&branchName=master)|[![Build Status](https://dev.azure.com/dnceng/public/_apis/build/status/dotnet/machinelearning/MachineLearning-CI?branchName=master&jobName=Windows_x64_NetCoreApp31&configuration=Windows_x64_NetCoreApp31%20Release_Build)](https://dev.azure.com/dnceng/public/_build/latest?definitionId=104&branchName=master)| +|**CentOS**|[![Build Status](https://dev.azure.com/dnceng/public/_apis/build/status/dotnet/machinelearning/MachineLearning-CI?branchName=main&jobName=Centos_x64_NetCoreApp31&configuration=Centos_x64_NetCoreApp31%20Debug_Build)](https://dev.azure.com/dnceng/public/_build/latest?definitionId=104&branchName=main)|[![Build Status](https://dev.azure.com/dnceng/public/_apis/build/status/dotnet/machinelearning/MachineLearning-CI?branchName=main&jobName=Centos_x64_NetCoreApp31&configuration=Centos_x64_NetCoreApp31%20Release_Build)](https://dev.azure.com/dnceng/public/_build/latest?definitionId=104&branchName=main)| +|**Ubuntu**|[![Build Status](https://dev.azure.com/dnceng/public/_apis/build/status/dotnet/machinelearning/MachineLearning-CI?branchName=main&jobName=Ubuntu_x64_NetCoreApp21&configuration=Ubuntu_x64_NetCoreApp21%20Debug_Build)](https://dev.azure.com/dnceng/public/_build/latest?definitionId=104&branchName=main)|[![Build Status](https://dev.azure.com/dnceng/public/_apis/build/status/dotnet/machinelearning/MachineLearning-CI?branchName=main&jobName=Ubuntu_x64_NetCoreApp21&configuration=Ubuntu_x64_NetCoreApp21%20Release_Build)](https://dev.azure.com/dnceng/public/_build/latest?definitionId=104&branchName=main)| +|**macOS**|[![Build Status](https://dev.azure.com/dnceng/public/_apis/build/status/dotnet/machinelearning/MachineLearning-CI?branchName=main&jobName=MacOS_x64_NetCoreApp21&configuration=MacOS_x64_NetCoreApp21%20Debug_Build)](https://dev.azure.com/dnceng/public/_build/latest?definitionId=104&branchName=main)|[![Build Status](https://dev.azure.com/dnceng/public/_apis/build/status/dotnet/machinelearning/MachineLearning-CI?branchName=main&jobName=MacOS_x64_NetCoreApp21&configuration=MacOS_x64_NetCoreApp21%20Release_Build)](https://dev.azure.com/dnceng/public/_build/latest?definitionId=104&branchName=main)| +|**Windows x64**|[![Build Status](https://dev.azure.com/dnceng/public/_apis/build/status/dotnet/machinelearning/MachineLearning-CI?branchName=main&jobName=Windows_x64_NetCoreApp21&configuration=Windows_x64_NetCoreApp21%20Debug_Build)](https://dev.azure.com/dnceng/public/_build/latest?definitionId=104&branchName=main)|[![Build Status](https://dev.azure.com/dnceng/public/_apis/build/status/dotnet/machinelearning/MachineLearning-CI?branchName=main&jobName=Windows_x64_NetCoreApp21&configuration=Windows_x64_NetCoreApp21%20Release_Build)](https://dev.azure.com/dnceng/public/_build/latest?definitionId=104&branchName=main)| +|**Windows FullFramework**|[![Build Status](https://dev.azure.com/dnceng/public/_apis/build/status/dotnet/machinelearning/MachineLearning-CI?branchName=main&jobName=Windows_x64_NetFx461&configuration=Windows_x64_NetFx461%20Debug_Build)](https://dev.azure.com/dnceng/public/_build/latest?definitionId=104&branchName=main)|[![Build Status](https://dev.azure.com/dnceng/public/_apis/build/status/dotnet/machinelearning/MachineLearning-CI?branchName=main&jobName=Windows_x64_NetFx461&configuration=Windows_x64_NetFx461%20Release_Build)](https://dev.azure.com/dnceng/public/_build/latest?definitionId=104&branchName=main)| +|**Windows x86**|[![Build Status](https://dev.azure.com/dnceng/public/_apis/build/status/dotnet/machinelearning/MachineLearning-CI?branchName=main&jobName=Windows_x86_NetCoreApp21&configuration=Windows_x86_NetCoreApp21%20Debug_Build)](https://dev.azure.com/dnceng/public/_build/latest?definitionId=104&branchName=main)|[![Build Status](https://dev.azure.com/dnceng/public/_apis/build/status/dotnet/machinelearning/MachineLearning-CI?branchName=main&jobName=Windows_x86_NetCoreApp21&configuration=Windows_x86_NetCoreApp21%20Release_Build)](https://dev.azure.com/dnceng/public/_build/latest?definitionId=104&branchName=main)| +|**Windows NetCore3.1**|[![Build Status](https://dev.azure.com/dnceng/public/_apis/build/status/dotnet/machinelearning/MachineLearning-CI?branchName=main&jobName=Windows_x64_NetCoreApp31&configuration=Windows_x64_NetCoreApp31%20Debug_Build)](https://dev.azure.com/dnceng/public/_build/latest?definitionId=104&branchName=main)|[![Build Status](https://dev.azure.com/dnceng/public/_apis/build/status/dotnet/machinelearning/MachineLearning-CI?branchName=main&jobName=Windows_x64_NetCoreApp31&configuration=Windows_x64_NetCoreApp31%20Release_Build)](https://dev.azure.com/dnceng/public/_build/latest?definitionId=104&branchName=main)| ## Release process and versioning diff --git a/build.cmd b/build.cmd index c020999ade..9aef81fd1f 100644 --- a/build.cmd +++ b/build.cmd @@ -1,2 +1,3 @@ -@call "%~dp0run.cmd" build %* -@exit /b %ERRORLEVEL% +@echo off +powershell -ExecutionPolicy ByPass -NoProfile -command "& """%~dp0eng\common\Build.ps1""" -restore -build -warnAsError 0 %*" +exit /b %ErrorLevel% diff --git a/build.proj b/build.proj deleted file mode 100644 index 1d95743b60..0000000000 --- a/build.proj +++ /dev/null @@ -1,159 +0,0 @@ - - - - - true - - - - - - - - - - - true - - - - - $(RepoRoot) - - - - - - - - - - - - - CreateOrUpdateCurrentVersionFile; - RestoreProjects; - BuildRedist; - BuildNative; - $(TraversalBuildDependsOn); - DownloadExternalTestFiles; - DownloadTensorflowMetaFiles; - DeleteTestHost; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - https://aka.ms/mlnet-resources/benchmarks/%(Identity) - $(MSBuildThisFileDirectory)/test/data/external/%(Identity) - - - - - - - - - - - - - - https://aka.ms/mlnet-resources/meta/%(Identity) - $([System.IO.Path]::GetTempPath())/MLNET/ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/build.sh b/build.sh index dc1acca8df..87cb508fc7 100755 --- a/build.sh +++ b/build.sh @@ -10,4 +10,4 @@ while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symli done DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )" -"$DIR/run.sh" build "$@" +"$DIR/eng/common/build.sh" --restore --build --warnAsError false "$@" diff --git a/build/.night-build.yml b/build/.night-build.yml index f68a4e5ff3..4b90a32cf2 100644 --- a/build/.night-build.yml +++ b/build/.night-build.yml @@ -8,14 +8,14 @@ pr: none # no CI builds trigger: none -# scheduled trigger, runs at UTC 8:00 every day which is midnight of GMT-8 +# scheduled trigger, runs at UTC 8:00 every day which is midnight of GMT-8 schedules: - cron: "0 8 * * *" displayName: Nightly Build at midnight branches: include: - - master - - releases/1.0 + - main + - releases/1.5.5 - features/automl - features/integrationPackage always: true diff --git a/build/.outer-loop-build.yml b/build/.outer-loop-build.yml index 92edc2ac5e..984fd67945 100644 --- a/build/.outer-loop-build.yml +++ b/build/.outer-loop-build.yml @@ -8,14 +8,14 @@ pr: none # no CI builds trigger: none -# scheduled trigger, runs at UTC 8:00 every day which is midnight of GMT-8 +# scheduled trigger, runs at UTC 8:00 every day which is midnight of GMT-8 schedules: - cron: "0 8 * * *" displayName: outer loop build at midnight branches: include: - - master - - releases/1.0 + - main + - releases/1.5.5 - features/automl - features/integrationPackage always: true @@ -25,7 +25,7 @@ resources: containers: - container: CentosContainer image: mcr.microsoft.com/dotnet-buildtools/prereqs:centos-7-mlnet-8bba86b-20190314145033 - + - container: UbuntuContainer image: mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-16.04-mlnet-20200515184230-2c829e8 diff --git a/build/Codecoverage.proj b/build/Codecoverage.proj index 03595f7ca8..c8c68a762b 100644 --- a/build/Codecoverage.proj +++ b/build/Codecoverage.proj @@ -16,12 +16,12 @@ <_ReportGeneratorPath>$(PkgReportGenerator)\tools\net47\ReportGenerator.exe - - + + - <_CodecovArgs Include="-f;$(BaseOutputPath)$(PlatformConfig)\coverage\Cobertura.xml" /> - + <_CodecovArgs Include="-f;$(ArtifactsDir)bin\coverage\Cobertura.xml" /> + <_CodecovArgs Include="--required" /> diff --git a/build/Dependencies.props b/build/Dependencies.props deleted file mode 100644 index 196d7b9bad..0000000000 --- a/build/Dependencies.props +++ /dev/null @@ -1,65 +0,0 @@ - - - - - 10.0.3 - 4.4.0 - 4.4.0 - 1.5.0 - 4.5.1 - 4.3.0 - 4.7.1 - - - - - 3.10.1 - 2.2.3 - 2.1.0 - 1.5.1 - 0.0.0.9 - 2.1.3 - 4.5.0 - 4.5.0 - 4.5.0 - 1.14.0 - 1 - 0.11.8.1 - - - - - 2.9.0 - - - - - 3.3.1 - 4.5.0 - 1.2.0 - - - - - 1.0.0-beta-62824-02 - 1.9.0 - 1.2.1 - 4.3.6 - 1.0.0-beta.19225.5 - - - - - 0.12.0 - 1.0.1-beta1.20080.1 - 3.0.1 - 0.0.6-test - 0.0.6-test - 0.0.12-test - 0.0.6-test - 4.6.1 - 1.2.7 - 1.0.112.2 - - - diff --git a/build/ci/job-template.yml b/build/ci/job-template.yml index 52abf2dc99..4944eb6c6c 100644 --- a/build/ci/job-template.yml +++ b/build/ci/job-template.yml @@ -1,3 +1,4 @@ +#TODO: Need to update build documentation. parameters: name: '' architecture: x64 @@ -21,13 +22,18 @@ jobs: timeoutInMinutes: 120 cancelTimeoutInMinutes: 10 variables: - dotnetPath: $(Build.SourcesDirectory)/Tools/dotnetcli/dotnet + dotnetPath: $(Build.SourcesDirectory)/.dotnet/dotnet nugetFeed: https://pkgs.dev.azure.com/dnceng/public/_packaging/MachineLearning/nuget/v3/index.json nightlyBuildProjPath: $(Build.SourcesDirectory)/test/Microsoft.ML.NightlyBuild.Tests/Microsoft.ML.NightlyBuild.Tests.csproj - nightlyBuildRunPath: $(Build.SourcesDirectory)/bin/AnyCPU.$(_configuration)/Microsoft.ML.NightlyBuild.Tests/$(_targetFramework) + nightlyBuildRunPath: $(Build.SourcesDirectory)/artifacts/bin/Microsoft.ML.NightlyBuild.Tests/$(_configuration)/$(_targetFramework) + runNightlyBuildProj: $(Build.SourcesDirectory)/test/run-night-build-tests.proj packageUpdaterProjPath: $(Build.SourcesDirectory)/test/Microsoft.ML.NugetPackageVersionUpdater/Microsoft.ML.NugetPackageVersionUpdater.csproj versionFilePath: $(Build.SourcesDirectory)/test/Microsoft.ML.NugetPackageVersionUpdater/latest_versions.txt PROCDUMP_PATH: '$(Build.SourcesDirectory)/Tools/ProcDump/' + ${{ if eq(parameters.buildScript, 'build.cmd') }}: + spaceValue: ' ' + ${{ if eq(parameters.buildScript, './build.sh') }}: + spaceValue: '%20' strategy: matrix: ${{ if eq(parameters.customMatrixes, '') }}: @@ -43,19 +49,26 @@ jobs: _targetFramework: netcoreapp2.1 ${{ if ne(parameters.customMatrixes, '') }}: ${{ insert }}: ${{ parameters.customMatrixes }} - + pool: ${{ parameters.pool }} ${{ if ne(parameters.container, '') }}: container: ${{ parameters.container }} steps: + # Work around MacOS Homebrew image/environment bug: https://github.com/actions/virtual-environments/issues/2322#issuecomment-749211076 + - ${{ if eq(parameters.pool.name, 'Hosted macOS') }}: + - script: | + rm -rf /usr/local/bin/2to3 + displayName: MacOS Homebrew bug Workaround + continueOnError: true + # Extra MacOS step required to install OS-specific dependencies - ${{ if eq(parameters.pool.name, 'Hosted macOS') }}: - - script: brew update && brew install $(Build.SourcesDirectory)/build/libomp.rb && brew unlink python@2 && brew install mono-libgdiplus gettext && brew link gettext --force && brew link libomp --force - displayName: Install build dependencies + - script: brew update && brew install mono-libgdiplus && brew install $(Build.SourcesDirectory)/build/libomp.rb && brew link libomp --force + displayName: Install MacOS build dependencies - ${{ if and( eq(parameters.nightlyBuild, 'true'), eq(parameters.pool.name, 'Hosted Ubuntu 1604')) }}: - bash: echo "##vso[task.setvariable variable=LD_LIBRARY_PATH]$(nightlyBuildRunPath):$LD_LIBRARY_PATH" displayName: Set LD_LIBRARY_PATH for Ubuntu and CentOS to locate Native shared library in current running path - - script: ${{ parameters.buildScript }} -$(_configuration) -buildArch=${{ parameters.architecture }} + - script: ${{ parameters.buildScript }} -configuration $(_configuration) /p:TargetArchitecture=${{ parameters.architecture }} /p:TestArchitectures=${{ parameters.architecture }} /p:RestorePackagesPath=$(Build.SourcesDirectory)\packages /p:NUGET_PACKAGES=$(Build.SourcesDirectory)\packages displayName: Build - ${{ if eq(parameters.pool.name, 'Hosted macOS') }}: - task: Bash@3 @@ -70,13 +83,13 @@ jobs: script: cd packages;find . -type d -path "*/runtimes/osx-*" -exec rm -rv {} +;find . -type d -path "*/runtimes/win-*" -exec rm -rv {} +;cd .. displayName: Clean up non-Linux runtime folders of NuGet Packages to save disk space - ${{ if eq(parameters.buildScript, 'build.cmd') }}: + - script: dir /s "$(Build.SourcesDirectory)" + displayName: show bin folder disk usage - task: PowerShell@2 inputs: targetType: inline - script: Get-ChildItem -Path '.\packages\*\runtimes\*' -Recurse | Select -ExpandProperty FullName | Where {$_ -notlike '*\win-*'} | sort length -Descending | Remove-Item -Recurse -Confirm:$false -Force + script: Get-ChildItem -Path '$(Build.SourcesDirectory)\packages\*\runtimes\*' -Recurse | Select -ExpandProperty FullName | Where {$_ -notlike '*\win-*'} | sort length -Descending | Remove-Item -Recurse -Confirm:$false -Force displayName: Clean up non-Windows runtime folders of NuGet Packages to save disk space - - script: dir /s "bin" - displayName: show bin folder disk usage - ${{ if eq(parameters.nightlyBuild, 'true') }}: - script: $(dotnetPath) restore $(nightlyBuildProjPath) displayName: Restore nightly build project @@ -86,30 +99,25 @@ jobs: displayName: Update package versions for nightly build - ${{ if eq(parameters.buildScript, 'build.cmd') }}: - powershell: | - Get-ChildItem -Path '.\bin\AnyCPU.*' -Recurse | + Get-ChildItem -Path '.\artifacts\bin\*' -Recurse | Select -ExpandProperty FullName | - Where {$_ -notlike '*\Microsoft.ML.NightlyBuild.Tests*'} | - sort length -Descending | - Remove-Item -force + Where {$_ -NotMatch '.*\\Microsoft\.ML\.NightlyBuild\.Tests.*|.*\\Native.*'} | + sort length -Descending | + Remove-Item -force Write-Output "Done cleaning up usless project..." displayName: Clean up useless project - script: $(dotnetPath) msbuild -restore $(nightlyBuildProjPath) /p:ReferenceTypeForTestFramework="Nuget" /p:Configuration=$(_configuration) /p:TargetArchitecture=${{ parameters.architecture }} displayName: Build Nightly-Build Project with latest package versions - - script: ${{ parameters.buildScript }} -$(_configuration) -runnightlybuildtests + - script: $(dotnetPath) msbuild $(runNightlyBuildProj) /t:RunNightlyBuildTests /p:Configuration=$(_configuration) /p:TargetArchitecture=${{ parameters.architecture }} /p:TestArchitectures=${{ parameters.architecture }} displayName: Run Nightly Build Tests - ${{ if eq(parameters.nightlyBuild, 'false') }}: - - script: ${{ parameters.buildScript }} -- /t:DownloadExternalTestFiles /p:IncludeBenchmarkData=$(_includeBenchmarkData) - displayName: Download Benchmark Data - timeoutInMinutes: 10 - - script: ${{ parameters.buildScript }} -- /t:DownloadTensorflowMetaFiles /p:IncludeTensorflowMetaFile=true - displayName: Download Tensorflow Meta File - timeoutInMinutes: 20 - ${{ if eq(parameters.innerLoop, 'false') }}: - ${{ if and(eq(parameters.runSpecific, 'false'), eq(parameters.useVSTestTask, 'false')) }}: - - script: ${{ parameters.buildScript }} -$(_configuration) -runtests -coverage=${{ parameters.codeCoverage }} + # TODO: Code coverage needs to be fixed. + - script: ${{ parameters.buildScript }} /p:Build=false -configuration $(_configuration) /p:TargetArchitecture=${{ parameters.architecture }} /p:TestArchitectures=${{ parameters.architecture }} -test -integrationTest -ci /p:RestorePackagesPath=$(Build.SourcesDirectory)\packages /p:NUGET_PACKAGES=$(Build.SourcesDirectory)\packages /p:Coverage=${{ parameters.codeCoverage }} displayName: Run All Tests. - ${{ if and(eq(parameters.runSpecific, 'true'), eq(parameters.useVSTestTask, 'false')) }}: - - script: ${{ parameters.buildScript }} -$(_configuration) -runSpecificTests -coverage=${{ parameters.codeCoverage }} + - script: ${{ parameters.buildScript }} /p:Build=false -configuration $(_configuration) /p:TargetArchitecture=${{ parameters.architecture }} /p:TestArchitectures=${{ parameters.architecture }} -test -integrationTest -ci /p:TestRunnerAdditionalArguments='-trait$(spaceValue)Category=RunSpecificTest' /p:RestorePackagesPath=$(Build.SourcesDirectory)\packages /p:NUGET_PACKAGES=$(Build.SourcesDirectory)\packages /p:Coverage=${{ parameters.codeCoverage }} displayName: Run Specific Tests. - ${{ if and(eq(parameters.buildScript, 'build.cmd'), eq(parameters.useVSTestTask, 'true')) }}: - task: VSTest@2 @@ -119,10 +127,10 @@ jobs: testAssemblyVer2: | **\*test.dll **\*tests.dll - !**\obj\** + !**\obj\** runSettingsFile: $(Build.SourcesDirectory)/tools-local/vstest.runsettings searchFolder: '$(System.DefaultWorkingDirectory)' - vstestLocationMethod: 'version' + vstestLocationMethod: 'version' vsTestVersion: 'latest' runInParallel: False runTestsInIsolation: True @@ -133,18 +141,23 @@ jobs: collectDumpOn: onAbortOnly publishRunAttachments: true - ${{ if eq(parameters.innerLoop, 'true') }}: - - script: ${{ parameters.buildScript }} -$(_configuration) -runCITests -coverage=${{ parameters.codeCoverage }} + - script: ${{ parameters.buildScript }} /p:Build=false -configuration $(_configuration) /p:TargetArchitecture=${{ parameters.architecture }} /p:TestArchitectures=${{ parameters.architecture }} -test -integrationTest -ci /p:TestRunnerAdditionalArguments='-notrait$(spaceValue)Category=SkipInCI' /p:RestorePackagesPath=$(Build.SourcesDirectory)\packages /p:NUGET_PACKAGES=$(Build.SourcesDirectory)\packages /p:Coverage=${{ parameters.codeCoverage }} displayName: Run CI Tests. - - script: $(Build.SourcesDirectory)/Tools/dotnetcli/dotnet msbuild -restore build/Codecoverage.proj + - script: $(dotnetPath) msbuild -restore build/Codecoverage.proj displayName: Upload coverage to codecov.io condition: and(succeeded(), eq(${{ parameters.codeCoverage }}, True)) - task: PublishTestResults@2 displayName: Publish Test Results condition: succeededOrFailed() inputs: - testRunner: 'vSTest' - searchFolder: '$(System.DefaultWorkingDirectory)/bin' - testResultsFiles: '**/*.trx' + testRunner: 'xUnit' + searchFolder: '$(Build.SourcesDirectory)/artifacts/TestResults' + # Upload all test results except performance test project. On CI by default performance tests + # will not run and test result files will still be generate without details. Avoid uploading + # performance test result to avoid warnings on publish test result stage. + testResultsFiles: | + **/*.xml + !**/*PerformanceTests*.xml testRunTitle: Machinelearning_Tests_${{ parameters.name }}_$(_configuration)_$(Build.BuildNumber) configuration: $(_configuration) mergeTestResults: true @@ -153,16 +166,15 @@ jobs: condition: not(succeeded()) inputs: sourceFolder: $(Build.SourcesDirectory) - contents: '?(msbuild.*|binclash.log|init-tools.log)' + contents: 'artifacts/log/**' targetFolder: $(Build.ArtifactStagingDirectory) - task: CopyFiles@2 displayName: Stage test output condition: not(succeeded()) inputs: - sourceFolder: $(Build.SourcesDirectory)/bin + sourceFolder: $(Build.SourcesDirectory) contents: | - **/TestOutput/**/* - **/*.trx + artifacts/TestResults/** targetFolder: $(Build.ArtifactStagingDirectory) - task: CopyFiles@2 displayName: Stage process dump and pdb if any @@ -172,7 +184,7 @@ jobs: contents: | *.dmp CrashDumps/*.dmp - bin/**/*.pdb + artifacts/bin/**/*.pdb targetFolder: $(Build.ArtifactStagingDirectory) - task: PublishBuildArtifacts@1 displayName: Publish build and test logs @@ -182,5 +194,5 @@ jobs: artifactName: ${{ parameters.name }} $(_config_short) artifactType: container - ${{ if eq(parameters.nightlyBuild, 'false') }}: - - script: ${{ parameters.buildScript }} -buildPackages - displayName: Build Packages + - script: ${{ parameters.buildScript }} /p:Build=false -pack -ci -configuration $(_configuration) /p:TargetArchitecture=${{ parameters.architecture }} /p:TestArchitectures=${{ parameters.architecture }} /p:RestorePackagesPath=$(Build.SourcesDirectory)\packages /p:NUGET_PACKAGES=$(Build.SourcesDirectory)\packages + displayName: Build Packages \ No newline at end of file diff --git a/build/publish.proj b/build/publish.proj index 065f5294cf..e35ac8f123 100644 --- a/build/publish.proj +++ b/build/publish.proj @@ -1,52 +1,20 @@ + - - Microsoft.SymbolUploader.Build.Task true 600 - - - - - - - - - - - - Pushing took too long - - - - - - - $(ToolsDir)dotnetcli/dotnet - $(DotnetToolCommand) nuget push --source $(NuGetFeedUrl) --api-key $(NuGetApiKey) --timeout $(NuGetPushTimeoutSeconds) - - - - + - + @@ -55,15 +23,15 @@ 180 - true + false - + - + \ No newline at end of file diff --git a/build/sign.proj b/build/sign.proj deleted file mode 100644 index 90666e989a..0000000000 --- a/build/sign.proj +++ /dev/null @@ -1,50 +0,0 @@ - - - - - - - - - - - - - - - $(PackageAssetsPath) - $(PackageOutputPath) - $(IntermediateOutputRootPath) - - - - - - - - - - - - - - - - - Microsoft400 - - - - - - - NuGet - - - - - - - - \ No newline at end of file diff --git a/build/vsts-ci.yml b/build/vsts-ci.yml index 36874b2105..a6c730106f 100644 --- a/build/vsts-ci.yml +++ b/build/vsts-ci.yml @@ -1,5 +1,5 @@ ################################################################################ -# ML.NET's official, signed build +# ML.NET's official, signed build ################################################################################ resources: @@ -23,14 +23,18 @@ phases: - agent.os -equals linux container: CentosContainer steps: + - script: ./restore.sh + displayName: restore all projects + - script: ./build.sh -configuration $(BuildConfig) /p:CopyPackageAssets=true /p:SkipRIDAgnosticAssets=true -projects $(Build.SourcesDirectory)/src/Redist/Microsoft.ML.DnnImageFeaturizer.ModelRedist/Microsoft.ML.DnnImageFeaturizer.ModelRedist.proj + displayName: build redist # Only build native assets to avoid conflicts. - - script: ./build.sh -buildNative -$(BuildConfig) -skipRIDAgnosticAssets + - script: ./build.sh -configuration $(BuildConfig) -projects $(Build.SourcesDirectory)/src/Native/Native.proj /p:TargetArchitecture=x64 /p:CopyPackageAssets=true displayName: Build - task: PublishBuildArtifacts@1 displayName: Publish Linux package assets inputs: - pathToPublish: $(Build.SourcesDirectory)/bin/obj/packages + pathToPublish: $(Build.SourcesDirectory)/artifacts/pkgassets artifactName: PackageAssets artifactType: container @@ -46,16 +50,25 @@ phases: queue: name: Hosted macOS steps: - - script: brew update && brew install $(Build.SourcesDirectory)/build/libomp.rb && brew link libomp --force + # Work around MacOS Homebrew image/environment bug: https://github.com/actions/virtual-environments/issues/2322#issuecomment-749211076 + - script: | + rm -rf /usr/local/bin/2to3 + displayName: MacOS Homebrew bug Workaround + continueOnError: true + - script: brew update && brew unlink python@3.8 && brew install mono-libgdiplus && brew install $(Build.SourcesDirectory)/build/libomp.rb && brew link libomp --force displayName: Install build dependencies + - script: ./restore.sh + displayName: restore all projects + - script: ./build.sh -configuration $(BuildConfig) /p:CopyPackageAssets=true /p:SkipRIDAgnosticAssets=true -projects $(Build.SourcesDirectory)/src/Redist/Microsoft.ML.DnnImageFeaturizer.ModelRedist/Microsoft.ML.DnnImageFeaturizer.ModelRedist.proj + displayName: build redist # Only build native assets to avoid conflicts. - - script: ./build.sh -buildNative -$(BuildConfig) -skipRIDAgnosticAssets + - script: ./build.sh -projects $(Build.SourcesDirectory)/src/Native/Native.proj -configuration $(BuildConfig) /p:TargetArchitecture=x64 /p:CopyPackageAssets=true displayName: Build - task: PublishBuildArtifacts@1 displayName: Publish macOS package assets inputs: - pathToPublish: $(Build.SourcesDirectory)/bin/obj/packages + pathToPublish: $(Build.SourcesDirectory)/artifacts/pkgassets artifactName: PackageAssets artifactType: container @@ -73,7 +86,7 @@ phases: _TeamName: DotNetCore queue: name: DotNetCore-Build - demands: + demands: - agent.os -equals Windows_NT steps: @@ -88,27 +101,26 @@ phases: continueOnError: false condition: and(succeeded(), in(variables._SignType, 'real', 'test')) + - script: ./restore.cmd + displayName: restore all projects + - script: ./build.cmd -configuration $(BuildConfig) /p:CopyPackageAssets=true /p:SkipRIDAgnosticAssets=true -projects $(Build.SourcesDirectory)/src/Redist/Microsoft.ML.DnnImageFeaturizer.ModelRedist/Microsoft.ML.DnnImageFeaturizer.ModelRedist.proj + displayName: build redist # Only build native assets to avoid conflicts. - - script: ./build.cmd -buildNative -$(BuildConfig) -buildArch=x86 -skipRIDAgnosticAssets + - script: ./build.cmd -projects $(Build.SourcesDirectory)/src/Native/Native.proj -configuration $(BuildConfig) /p:TargetArchitecture=x86 /p:CopyPackageAssets=true displayName: Build - - - task: MSBuild@1 - displayName: Sign Windows_x86 Binaries - inputs: - solution: build/sign.proj - msbuildArguments: /p:SignType=$(_SignType) - msbuildVersion: 15.0 - continueOnError: false + + - script: ./sign.cmd -configuration $(BuildConfig) /p:TargetArchitecture=x86 /p:SignBinaries=true + displayName: sign binaries - task: PublishBuildArtifacts@1 displayName: Publish Windows_x86 package assets inputs: - pathToPublish: $(Build.SourcesDirectory)/bin/obj/packages + pathToPublish: $(Build.SourcesDirectory)/artifacts/pkgassets artifactName: PackageAssets artifactType: container # Terminate all dotnet build processes. - - script: $(Build.SourcesDirectory)/Tools/dotnetcli/dotnet.exe build-server shutdown + - script: $(Build.SourcesDirectory)/.dotnet/dotnet.exe build-server shutdown displayName: Dotnet Server Shutdown ################################################################################ @@ -125,7 +137,7 @@ phases: _TeamName: DotNetCore queue: name: DotNetCore-Build - demands: + demands: - agent.os -equals Windows_NT steps: @@ -140,8 +152,8 @@ phases: continueOnError: false condition: and(succeeded(), in(variables._SignType, 'real', 'test')) - # Build both native and managed assets. - - script: ./build.cmd -$(BuildConfig) + # Build both native and managed assets. + - script: ./build.cmd -configuration $(BuildConfig) /p:TargetArchitecture=x64 /p:CopyPackageAssets=true displayName: Build - task: ComponentGovernanceComponentDetection@0 @@ -150,24 +162,19 @@ phases: verbosity: 'Verbose' alertWarningLevel: 'High' - - - task: MSBuild@1 - displayName: Sign Windows_x64 Binaries - inputs: - solution: build/sign.proj - msbuildArguments: /p:SignType=$(_SignType) - msbuildVersion: 15.0 - continueOnError: false + + - script: ./sign.cmd -configuration $(BuildConfig) /p:TargetArchitecture=x64 /p:SignBinaries=true + displayName: sign binaries - task: PublishBuildArtifacts@1 displayName: Publish Windows_x64 package assets inputs: - pathToPublish: $(Build.SourcesDirectory)/bin/obj/packages + pathToPublish: $(Build.SourcesDirectory)/artifacts/pkgassets artifactName: PackageAssets artifactType: container # Terminate all dotnet build processes. - - script: $(Build.SourcesDirectory)/Tools/dotnetcli/dotnet.exe build-server shutdown + - script: $(Build.SourcesDirectory)/.dotnet/dotnet.exe build-server shutdown displayName: Dotnet Server Shutdown ################################################################################ @@ -181,6 +188,7 @@ phases: variables: BuildConfig: Release OfficialBuildId: $(BUILD.BUILDNUMBER) + DotnetVersionKind: $[variables.VERSIONKIND] # If no "VERSIONKIND" variable is set when queuing the publishing task, this defaults to empty string. DOTNET_CLI_TELEMETRY_OPTOUT: 1 DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1 DOTNET_MULTILEVEL_LOOKUP: 0 @@ -192,7 +200,7 @@ phases: _MsdlSymbolServerPath: https://microsoftpublicsymbols.artifacts.visualstudio.com/DefaultCollection queue: name: DotNetCore-Build - demands: + demands: - agent.os -equals Windows_NT steps: @@ -213,38 +221,53 @@ phases: displayName: Download package assets inputs: artifactName: PackageAssets - downloadPath: $(Build.SourcesDirectory)/bin/obj/packages + downloadPath: $(Build.SourcesDirectory)/artifacts/pkgassets # Workaround https://github.com/Microsoft/vsts-tasks/issues/6739 - task: CopyFiles@2 displayName: Copy package assets to correct folder inputs: - sourceFolder: $(Build.SourcesDirectory)/bin/obj/packages/PackageAssets - targetFolder: $(Build.SourcesDirectory)/bin/obj/packages - - - script: ./build.cmd -buildPackages - displayName: Create Packages + sourceFolder: $(Build.SourcesDirectory)/artifacts/pkgassets/PackageAssets + targetFolder: $(Build.SourcesDirectory)/artifacts/pkgassets - - task: MSBuild@1 - displayName: Sign Packages - inputs: - solution: build/sign.proj - msbuildArguments: /p:SignType=$(_SignType) /p:SignNugetPackages=true - msbuildVersion: 15.0 + # Depending on the value of DotNetFinalVersionKind, the name of the package will change. + # For our nightly builds we want it to be empty, and when creating the official nugets, we want it to be "release" + # the value of the version kind is set when queuing the publishing job on AzureDevOps by adding a VERSIONKIND variable + # See more info in: https://github.com/dotnet/arcade/blob/master/Documentation/CorePackages/Versioning.md#package-version + - script: ./build.cmd -configuration $(BuildConfig) -pack -ci /p:OfficialBuildId=$(OfficialBuildId) /p:DotNetFinalVersionKind=$(DotnetVersionKind) /p:RestorePackagesPath=$(Build.SourcesDirectory)\packages /p:NUGET_PACKAGES=$(Build.SourcesDirectory)\packages + displayName: Build Packages + + - script: ./sign.cmd /p:SignNugetPackages=true /p:RestorePackagesPath=$(Build.SourcesDirectory)\packages /p:NUGET_PACKAGES=$(Build.SourcesDirectory)\packages + displayName: sign packages continueOnError: false + # The generated .nupkgs and .snupkgs packages are published to Azure artifacts, + # in case we need to debug them. They're found under Release/Shipping + - task: PublishBuildArtifacts@1 + displayName: Push packages and symbol packages to Azure Artifacts + inputs: + pathToPublish: $(Build.SourcesDirectory)/artifacts/packages + artifactName: PackageAssets + artifactType: container + continueOnError: true + - task: NuGetAuthenticate@0 inputs: nuGetServiceConnections: machinelearning-dnceng-public-feed # To allow publishing to a feed of another organization - - script: Tools\dotnetcli\dotnet msbuild build\publish.proj /t:PublishPackages /p:NuGetFeedUrl=$(_AzureDevopsFeedUrl) /p:NuGetApiKey=AzureArtifacts - displayName: Publish Packages to AzureDevOps Feed + - task: NuGetCommand@2 + displayName: Push packages to AzureDevOps feed + inputs: + command: push + packagesToPush: $(Build.SourcesDirectory)/artifacts/**/*.nupkg;!$(Build.SourcesDirectory)/artifacts/**/*.snupkg + nuGetFeedType: external + publishFeedCredentials: machinelearning-dnceng-public-feed - task: MSBuild@1 displayName: Publish Symbols to SymWeb Symbol Server inputs: solution: build/publish.proj - msbuildArguments: /t:PublishSymbolPackages /p:SymbolServerPath=$(_SymwebSymbolServerPath) /p:SymbolServerPAT=$(SymwebSymbolServerPAT) + msbuildArguments: /t:PublishSymbolPackages /p:SymbolServerPath=$(_SymwebSymbolServerPath) /p:SymbolServerPAT=$(SymwebSymbolServerPAT) /p:RestorePackagesPath=$(Build.SourcesDirectory)\packages /p:NUGET_PACKAGES=$(Build.SourcesDirectory)\packages msbuildVersion: 15.0 continueOnError: true @@ -252,10 +275,10 @@ phases: displayName: Publish Symbols to Msdl Symbol Server inputs: solution: build/publish.proj - msbuildArguments: /t:PublishSymbolPackages /p:SymbolServerPath=$(_MsdlSymbolServerPath) /p:SymbolServerPAT=$(MsdlSymbolServerPAT) + msbuildArguments: /t:PublishSymbolPackages /p:SymbolServerPath=$(_MsdlSymbolServerPath) /p:SymbolServerPAT=$(MsdlSymbolServerPAT) /p:RestorePackagesPath=$(Build.SourcesDirectory)\packages /p:NUGET_PACKAGES=$(Build.SourcesDirectory)\packages msbuildVersion: 15.0 continueOnError: true # Terminate all dotnet build processes. - - script: $(Build.SourcesDirectory)/Tools/dotnetcli/dotnet.exe build-server shutdown - displayName: Dotnet Server Shutdown \ No newline at end of file + - script: $(Build.SourcesDirectory)/.dotnet/dotnet.exe build-server shutdown + displayName: Dotnet Server Shutdown diff --git a/config.json b/config.json deleted file mode 100644 index f484ae92c6..0000000000 --- a/config.json +++ /dev/null @@ -1,250 +0,0 @@ -{ - "settings": { - "Configuration": { - "description": "Sets the optimization level for the Build Configuration you want to build.", - "valueType": "property", - "values": [ "Debug", "Release", "Debug-netcoreapp3_1", "Release-netcoreapp3_1", "Debug-netfx", "Release-netfx" ], - "defaultValue": "Debug" - }, - "TargetArchitecture": { - "description": "Sets the architecture for the native assets you want to build.", - "valueType": "property", - "values": [ "x64", "x86" ], - "defaultValue": "x64" - }, - "OfficialBuildId": { - "description": "Specifies the SeedDate and the revision of the build to generate the version of the libraries.", - "valueType": "property", - "values": [], - "defaultValue": "" - }, - "BuildNumberMajor": { - "description": "Product build major number.", - "valueType": "property", - "values": [], - "defaultValue": "" - }, - "BuildNumberMinor": { - "description": "Product build minor number.", - "valueType": "property", - "values": [], - "defaultValue": "" - }, - "SkipRIDAgnosticAssets": { - "description": "Prevents RID agnostic assets in redist from being built.", - "valueType": "property", - "values": [], - "defaultValue": "" - }, - "MsBuildLogging": { - "description": "MsBuild logging options.", - "valueType": "passThrough", - "values": [], - "defaultValue": "/flp:v=normal" - }, - "MsBuildWarning": { - "description": "MsBuild warning logging.", - "valueType": "passThrough", - "values": [], - "defaultValue": "/flp2:warningsonly;logfile=msbuild.wrn" - }, - "MsBuildError": { - "description": "MsBuild error logging.", - "valueType": "passThrough", - "values": [], - "defaultValue": "/flp3:errorsonly;logfile=msbuild.err" - }, - "Project": { - "description": "Project where the commands are going to be applied.", - "valueType": "passThrough", - "values": [], - "defaultValue": "" - }, - "BuildNative": { - "description": "MsBuild target that builds the native assets.", - "valueType": "target", - "values": [], - "defaultValue": "" - }, - "BuildPackages": { - "description": "MsBuild target that builds packages.", - "valueType": "target", - "values": [], - "defaultValue": "" - }, - "RunTests": { - "description": "MsBuild target that run the tests. Call this after building.", - "valueType": "target", - "values": [], - "defaultValue": "" - }, - "RunCITests": { - "description": "MsBuild target that run CI tests. Call this after building.", - "valueType": "target", - "values": [], - "defaultValue": "" - }, - "RunSpecificTests": { - "description": "MsBuild target that run specific tests only. Call this after building.", - "valueType": "target", - "values": [], - "defaultValue": "" - }, - "RunNightlyBuildTests": { - "description": "MsBuild target that run the nightly build tests. Call this after building.", - "valueType": "target", - "values": [], - "defaultValue": "" - }, - "Coverage": { - "description": "Turn on code coverge.", - "valueType": "property", - "values": ["false", "true"], - "defaultValue": "false" - }, - "CleanAllProjects": { - "description": "MsBuild target that deletes the binary output directory.", - "valueType": "target", - "values": [], - "defaultValue": "" - } - }, - "commands": { - "build": { - "alias": { - "debug": { - "description": "Sets optimization level to debug for managed build configuration. (/p:Configuration=Debug)", - "settings": { - "Configuration": "Debug" - } - }, - "release": { - "description": "Sets optimization level to release for managed build configuration. (/p:Configuration=Release)", - "settings": { - "Configuration": "Release" - } - }, - "debug-netcoreapp3_1": { - "description": "Sets optimization level to debug for managed build configuration and builds against netcoreapp3.1. (/p:Configuration=Debug-netcoreapp3_1)", - "settings": { - "Configuration": "Debug-netcoreapp3_1" - } - }, - "release-netcoreapp3_1": { - "description": "Sets optimization level to release for managed build configuration and builds against netcoreapp3.1. (/p:Configuration=Release-netcoreapp3_1)", - "settings": { - "Configuration": "Release-netcoreapp3_1" - } - }, - "debug-netfx": { - "description": "Sets optimization level to debug for managed build configuration and builds against fullframework. (/p:Configuration=Debug-netfx)", - "settings": { - "Configuration": "Debug-netfx" - } - }, - "release-netfx": { - "description": "Sets optimization level to release for managed build configuration and builds against fullframework. (/p:Configuration=Release-netfx)", - "settings": { - "Configuration": "Release-netfx" - } - }, - "buildArch": { - "description": "Sets the architecture for the native build. (/p:TargetArchitecture=[value])", - "settings": { - "TargetArchitecture": "default" - } - }, - "buildNative": { - "description": "Builds the native assets.", - "settings": { - "BuildNative": "default" - } - }, - "skipRIDAgnosticAssets": { - "description": "Avoid building RID agnostic assets in redist.", - "settings": { - "SkipRIDAgnosticAssets": "default" - } - }, - "buildPackages": { - "description": "Builds the NuGet packages.", - "settings": { - "BuildPackages": "default" - } - }, - "runtests": { - "description": "Runs the tests. Call this after building.", - "settings": { - "RunTests": "default" - } - }, - "runCITests": { - "description": "Runs CI tests. Call this after building.", - "settings": { - "RunCITests": "default" - } - }, - "runSpecificTests": { - "description": "Runs Specific tests. Call this after building.", - "settings": { - "RunSpecificTests": "default" - } - }, - "runnightlybuildtests": { - "description": "Runs the nightly build tests. Call this after building.", - "settings": { - "RunNightlyBuildTests": "default" - } - }, - "verbose": { - "description": "Passes /flp:v=diag to the msbuild command or the value passed by the user.", - "settings": { - "MsBuildLogging": "/flp:v=diag;LogFile=build-managed.log" - } - } - }, - "defaultValues": { - "toolName": "msbuild", - "settings": { - "Project": "build.proj", - "Configuration": "default", - "MsBuildLogging": "default", - "MsBuildWarning": "default", - "MsBuildError": "default" - } - } - } - }, - "tools": { - "msbuild": { - "osSpecific": { - "windows": { - "defaultParameters": "msbuild /nologo /verbosity:minimal /clp:Summary /maxcpucount /l:BinClashLogger,Tools\\Microsoft.DotNet.Build.Tasks.dll;LogFile=binclash.log", - "path": "Tools/dotnetcli/dotnet" - }, - "unix": { - "defaultParameters": "msbuild /nologo /verbosity:minimal /clp:Summary /maxcpucount /l:BinClashLogger,Tools/Microsoft.DotNet.Build.Tasks.dll;LogFile=binclash.log", - "path": "Tools/dotnetcli/dotnet" - } - }, - "valueTypes": { - "property": "/p:{name}={value}", - "target": "/t:{name}", - "internal": "/{name}" - } - }, - "terminal": { - "osSpecific": { - "windows": { - "filesExtension": "cmd" - }, - "unix": { - "filesExtension": "sh" - } - }, - "valueTypes": { - "property": "--{name}={value}" - } - } - } -} diff --git a/docs/README.md b/docs/README.md index 44ed54f306..da5ab98236 100644 --- a/docs/README.md +++ b/docs/README.md @@ -11,10 +11,10 @@ Project Docs - [Developer Guide](project-docs/developer-guide.md) - [Contributing to ML.NET](project-docs/contributing.md) -- [Strong Name Signing](https://github.com/dotnet/corefx/blob/master/Documentation/project-docs/strong-name-signing.md) -- [Public Signing](https://github.com/dotnet/corefx/blob/master/Documentation/project-docs/public-signing.md) +- [Strong Name Signing](https://github.com/dotnet/runtime/blob/main/docs/project/strong-name-signing.md) +- [Public Signing](https://github.com/dotnet/runtime/blob/main/docs/project/public-signing.md) - [Project NuGet Dependencies](https://github.com/dotnet/buildtools/blob/master/Documentation/project-nuget-dependencies.md) -- [ML.NET Roadmap](https://github.com/dotnet/machinelearning/blob/master/README.md) +- [ML.NET Roadmap](https://github.com/dotnet/machinelearning/blob/main/README.md) - [ML.NET Cookbook](code/MlNetCookBook.md) - [ML.NET API Reference Documentation](https://docs.microsoft.com/en-us/dotnet/api/?view=ml-dotnet) @@ -27,7 +27,7 @@ Building from Source Repo of Samples ==================== -- [ML.NET Samples](https://github.com/dotnet/machinelearning-samples/blob/master/README.md) +- [ML.NET Samples](https://github.com/dotnet/machinelearning-samples/blob/main/README.md) Extensions for ML.NET ==================== diff --git a/docs/api-reference/tensorflow-usage.md b/docs/api-reference/tensorflow-usage.md index d054365f1f..0f4b434566 100644 --- a/docs/api-reference/tensorflow-usage.md +++ b/docs/api-reference/tensorflow-usage.md @@ -1,6 +1,6 @@ ## Using TensorFlow based APIs -In order to run any TensorFlow based ML.Net APIs you must first add a NuGet dependency -on the TensorFlow redist library. There are currently two versions you can use. One which is +In order to run any TensorFlow based ML.Net APIs you must first add a NuGet dependency +on the TensorFlow redist library. There are currently two versions you can use. One which is compiled for GPU support, and one which has CPU support only. ### CPU only @@ -22,18 +22,18 @@ As of now TensorFlow does not support running on GPUs for MacOS, so we cannot su You must have at least one CUDA compatible GPU, for a list of compatible GPUs see [Nvidia's Guide](https://developer.nvidia.com/cuda-gpus). -Install [CUDA v10.0](https://developer.nvidia.com/cuda-10.0-download-archive) and [CUDNN v7.6.4](https://developer.nvidia.com/rdp/cudnn-download). +Install [CUDA v10.1](https://developer.nvidia.com/cuda-10.1-download-archive-update2) and [CUDNN v7.6.4](https://developer.nvidia.com/rdp/cudnn-download). -Make sure you install CUDA v10.0, not any other newer version. +Make sure you install CUDA v10.1, not any other newer version. After downloading CUDNN v7.6.4 .zip file and unpacking it, you need to do the following steps: -`copy \cuda\bin\cudnn64_7.dll to \Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.0\bin` +`copy \cuda\bin\cudnn64_7.dll to \Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\bin` For C/C++ development: -`Copy \cuda\ include\cudnn.h to \Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.0\include` +`Copy \cuda\ include\cudnn.h to \Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\include` -`Copy \cuda\lib\x64\cudnn.lib to \Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.0\lib\x64` +`Copy \cuda\lib\x64\cudnn.lib to \Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\lib\x64` For further details in cuDNN you can follow the [cuDNN Installation guide](https://docs.nvidia.com/deeplearning/sdk/cudnn-install/index.html#installwindows). diff --git a/docs/building/MlNetMklDeps/README.md b/docs/building/MlNetMklDeps/README.md index 0095553cc1..27e54cd98d 100644 --- a/docs/building/MlNetMklDeps/README.md +++ b/docs/building/MlNetMklDeps/README.md @@ -1,54 +1,69 @@ -#Instructions to build a custom DLL from Intel's MKL SDK -ML.NET MKL implementation uses Intel MKL Custom DLL builder to produce a single DLL which contains all of the MKL functions used by it. -To update the DLL, follow the steps below: +# The MlNetMklDeps nuget +ML.NET's repository takes a dependency of the MlNetMklDeps nuget, which contains the MKL binaries of the MKL functions that ML.NET uses. This other nuget is actually also built and managed by the team. In the next section, the steps to create those binaries are described. In this section the contents of the nuget are mentioned. -Windows (32 and 64 bit): -- Ensure you have Intel's MKL SDK installed, you can find it here: https://software.intel.com/en-us/mkl. -- Open an admin command prompt and run the following commands, CAREFULLY INSPECTING THE COMMAND OUTPUT FOR ERRORS. -- TLCROOT should be the root of your TLC_Resources folder. - -Directory layout for nuget file is as follows: +**MlNetMklDeps nuget follows this layout:** * licensing (contains Intel's license.txt they ship MKL with along with any third party licenses) +* MlNetMklDeps.nuspec * runtimes -** linux-x64 -*** native (contains linux binaries) -** osx-x64 -*** native (cntains osx binaries) -** win-x64 -*** native (contains windows x64 binaries) -** win-x86 -*** native (contains windows ia32 binaries) - -##Windows -1. In the Intel install directory, go to compilers_and_libraries\windows\mkl\tools\builder -2. Modify user_example_list file in directory to contain all required functions, that are present in the [mlnetmkl.list -](mlnetmkl.list) file -3. "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x86 -4. nmake libia32 name=MklImports (add threading=sequential if you are building without openmp) -5. Copy MKL library: copy /Y MklImports.* to the folder that will host the x86 binaries. -6. Copy openmp library: copy /Y ..\..\..\redist\ia32_win\compiler\libiomp5md* to the folder for x86 binaries. -7. del MklImports.* -8. "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" amd64 -9. nmake intel64 name=MklImports (add threading=sequential if you are building without openmp) -10. Copy mkl library: copy /Y MklImports.* to the folder that will host the x64 binaries. -11. Copy openmp library: copy /Y ..\..\..\redist\intel64_win\compiler\libiomp5md* to the folder for x86 binaries. - -##Linux -NOTE: Do not copy the libiomp5 file for Linux builds as this relies on OpenMP to be installed on the system. -1. untar the linux sdk (tar -zxvf name_of_downloaded_file) -2. Run installation script and follow the instuctions in the dialog screens that are presented ./install.sh -3. Go to /opt/intel/mkl/tools/builder. -4. Modify makefile add -Wl,-rpath,'$$ORIGIN' \ -Wl,-z,origin \ after -Wl,--end-group \ -5. Modify user_example_list file in directory to contain all the required functions, that are present in the [mlnetmkl.list](mlnetmkl.list) file -6. Run make intel64 name=libMklImports (add threading=sequential if you are building without openmp) - -##OSX -NOTE: Do not copy the libiomp5 file for OSX builds as this relies on OpenMP to be installed on the system. -1. extract and install the dmg (double-click and drag it in the Applications folder) -2. Go to /opt/mkl/tools/builder. -3. Modify user_example_list file in directory to contain all the required functions, that are present in the [mlnetmkl.list](mlnetmkl.list) file -4. Run make libintel64 name=libMklImports (add threading=sequential if you are building without openmp) -5. Copy libMklImports.dylib from the builder directory to the folder containign the OSX binaries. + * linux-x64 + * native (contains linux binaries) + * osx-x64 + * native (cntains osx binaries) + * win-x64 + * native (contains windows x64 binaries) + * win-x86 + * native (contains windows ia32 binaries) + +The .nuspec can be found on this folder: +https://github.com/dotnet/machinelearning/tree/main/docs/building/MlNetMklDeps + +If actually publishing a new version of MlNetMklDeps, remember to update this other file to document any changes: +https://github.com/dotnet/machinelearning/blob/main/docs/building/MlNetMklDeps/version.md + +# Instructions to build the binaries using Intel's MKL SDK +ML.NET MKL implementation uses Intel MKL Custom Builder to produce the binaries for the functions that we select. Follow the instructions below to produce the binaries for each platform, which will then be added to the MlNetMklDeps nuget described on the previus section. + +**Download Intel MKL SDK** before following the instructions below on each platform: +https://software.intel.com/en-us/mkl + +**NOTE about TLC**: The previous version of this instructions said to set the `TLCROOT` variable to "your TLC_Resources folder", since in ML.NET we don't have a `TLC_Resources` folder this seems to be stale instructions, which aren't needed any more. But it might become relevant if trying to test anything MKL related with TLC. + +## Windows + +1. In the Intel MKL SDK install directory, go to the Builder folder, found in `compilers_and_libraries\windows\mkl\tools\builder` +2. Replace the contents of the `user_example_list` file, found in that folder, with the contents of the [mlnetmkl.list +](mlnetmkl.list) file. +3. Initialize your environment by running the `vcvarsall.bat x86` command found on your Visual Studio installation directory. E.g., it might be found on any path similar to these: + * `"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x86` + * `"C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x86` +4. Back to the Builder folder run the following command to create the binary files: +`nmake libia32 name=MklImports`. Add `threading=sequential` if you are building without openmp (**NOTE:** it seems that starting on [PR #2867](https://github.com/dotnet/machinelearning/pull/2867) we always want to build using openmp, so there's no need to use this `threading` flag). This will produce `MklImports.dll, MklImports.dll.manifest, MklImports.exp, and MklImports.lib`. To also create `MklImports.pdb` see the note at the end of this section. +5. Copy the MKLImports files to the folder that will host the binaries inside the nuget: `copy /Y MklImports.*` +6. Also copy the Openmp library found inside the MKL SDK installation folder to the folder with the binaries: `copy /Y ..\..\..\redist\ia32_win\compiler\libiomp5md*` +7. Delete the x86 MklImports files from the Builder folder: `del MklImports.*` +8. Initialize your environment with `vcvarsall.bat amd64`. It should be in the same path as found on step 3. +9. On the Builder folder: `nmake intel64 name=MklImports` (add `threading=sequential` if you are building without openmp) +10. Copy the MKL files to the folder for x64 binaries: `copy /Y MklImports.*` +11. Copy the Openmp library to the folder with the x64 binaries: `copy /Y ..\..\..\redist\intel64_win\compiler\libiomp5md* ` + +**NOTE to create MklImports.pdb:** If the symbols for the built MklImports.dlls are required, add `/DEBUG:FULL /PDB:MklImports.pdb \` on the makefile after `mkl_custom_vers.res \`, in both the `libintel64` and `libia32` targets, to get the symbols for both x86 and x64 binaries. + +## Linux +**NOTE:** Do not copy the libiomp5 file for Linux builds as this relies on OpenMP to be installed on the system. +1. Untar the linux Intel MKL SDK: `tar -zxvf name_of_downloaded_file` +2. Run the installation script and follow the instuctions in the dialog screens that are presented: `./install.sh` +3. Go to the Builder directory found in `/opt/intel/mkl/tools/builder` (it might be in another path, such as `/home/username/intel/compilers_and_libraries/linux/mkl/tools/builder` depending on your installation). +4. Modify the makefile found on the Builder directory: add `-Wl,-rpath,'$$ORIGIN' \ -Wl,-z,origin \` after `-Wl,--end-group \` +5. Modify `user_example_list` file in the Builder directory to contain all the required functions, that are present in the [mlnetmkl.list](mlnetmkl.list) file +6. Run `make intel64 name=libMklImports` (add `threading=sequential` if you are building without openmp) + +## OSX +**NOTE:** Do not copy the libiomp5 file for OSX builds as this relies on OpenMP to be installed on the system. +1. Extract and install the Intel MKL SDK dmg (double-click and drag it in the `Applications` folder) +2. Go to the Builder directory: `/opt/mkl/tools/builder`. +3. Modify user_example_list file in the Builder directory to contain all the required functions, that are present in the [mlnetmkl.list](mlnetmkl.list) file +4. Run `make libintel64 name=libMklImports` (add `threading=sequential` if you are building without openmp) +5. Copy `libMklImports.dylib` from the builder directory to the folder containing the OSX binaries. 6. Fix the id and the rpath running the following commands: - sudo install_name_tool -id "@loader_path/libMklImports.dylib" libMklImports.dylib - sudo install_name_tool -id "@rpath/libMklImports.dylib" libMklImports.dylib + * `sudo install_name_tool -id "@loader_path/libMklImports.dylib" libMklImports.dylib` + * `sudo install_name_tool -id "@rpath/libMklImports.dylib" libMklImports.dylib` \ No newline at end of file diff --git a/docs/building/assets/process_architecture_run_tests_vs.png b/docs/building/assets/process_architecture_run_tests_vs.png new file mode 100644 index 0000000000000000000000000000000000000000..99989d82d5d90301a1b7f361442c878dd69cbf5b GIT binary patch literal 39747 zcmYg&Ra9NUvMuiJt_kk$8r*}sTkwqqcejnZ1r4sj9X1<>;O_43;c?D=_l@_n#`;>_ ztE;=J=B!yArK&80ibRA20Re$3C;RO?1O#N;=ld`M+~+eCnVA^^f&xPBo4CeL$g^B{ z9h{McN8a^1-ZDSWOZlW&S(3lN5E${kKmrWyz8tn9Dl8ZrT(%%HH1}KJd3PO!u z?i$m_ixW8B^(+6&_kgM6!ic<5`0#@G6(N;b;oORox!*7M{O%R6%$%GGkuh}8YVhAk zG2F%Gf)>@_H@r!a@7q&G)|`ZxsClAe=t6j<;bjkv(;pbqB!$U{zJY(&e^m%<)YE%j z@o?7Qk;9v-jK%&V*04=0%kxiEM|q=!r$Jjm_x@@CzVeicWDXiF_cy%Z|$*q**nB zYHviE&swFxh#oks5>rnvEORtQ-$Vwv1f1lef$G@6j7(jz=91ggwe@hyxq|1o?hf1X z)%yyu$-X{JN=oW_=WVkuUzvxKzACU=jq5C}3X0@U>cE0^^;i36XNhM^C&YZ;IGFU) zB9|Kv`xh6<@$eR=z8Y76qi?u9FMO*EJB+%S^l(sDY8~BKQ^>o!k(&_=3*%S}dn-Vredap>!_#fNnX?lAoA@#T(vYf3nXV*L1 z7;0&O&eRt{y$87qqZEgGd(mfpuc|M$^rZ(%VPhWnOAhrR6IR4aj`d-;9@bU?rmmD| zX^IG7u}1@1aN)Fg+NT4UMQIlahBn_;Y%QDtz(&j6O5^f=dZbEGgX= z#ihBBylUBwn!ZMq0o(u#+5oV2i#1_EQv{%j(_Ma?EdS&Vhh_S(wX?HjgbX4CJ8S(| z9X_nJO;Y+4hGCiEP_u&vLg%x~HCNKaQPM0FXEHLQqfJqWCYs0eZ)V7hj7T?imi~>y zA;EB*ct$cnraa5WZIYxoDUB7sf)k38y=WM~bh-;r5o6V^zP| zr$q`~=NisO-!lvCu#mq)C5ZT<8>1aZL}-s;V6qnupNPw9Y2-@;5_=ygRMotqHPLK! zF%;~ccBp0_$wn+chygJ5%BxdSQiSlQ-RD@RB~^5mXu)7`Z?Rmm<^n1Mc8g(S&oN|r zSUg6?k~!%}Y=FU$Q3_3ojNQNIyKMBf7W_2H*#HJmJaIx*6;o_J8=^mC5O`$7bQJJ# zrV9fDLuGFd!@%aT;h(L7vcaHL7Vau2E^q}!z7fo+3 zFY~Ql3KUWSMN4oAPZbO^V`Vxu;6w3e{MlkP0Fm3qzX(4Gp5E}0(i#=MW1(D`hExG5 z*u@G@;j6oq^(Bn{=>j{QoxaR7H{JoMzLo^3r^XzWL8}*}NQWQHHqA0q-&^qWl14M) zHtoRnp8?b`rLf4TC|F&6366#oS^b-@VO}!mvQR*3eglC3GL=%l;9>F)qD|(^IP1!t z>(<3r09g3nE35vaU1vhAG<@O1DDI~-Lq3SQvAv{7t{rU943~H=^OI=6f+7)*gOCYm zvZ`*M47%7qhE7dR4N}cENubwnJP#sElNAXH3c(;E0)1niz1$v<;W!UtYL7&iuco&= zc6n4cUNq_v+ik7Xs_rk8jA*wQsShmV#`jKvr(|=-14uj;G}&yE?WSd}A4p!TKjWL8 zuoGnSI$7O#AOHP|gNw_)n&PP!9TSrYkG4W{+EIHd*2(+mo4%eVPs!_kYJs9cz!E{C zFXvLi9-I2t@bN1$Kh*lo&9~TC^5@{SbdJEpm?S1{D3YLw4Wm(r1S-Ob31&jD%kYuj z@Lo!Xwyq^juhc$E?@_VpPhjQZEb;EJ3XJ<)F+o%5CI`OFYi_q{h!!m1`Wi8V+YZfq zWag)&tu1{Tt8pO!BDA?08zfCr^d*3|_z#EO+*&`Hn%!gJ@85(IadBYbIv(>l5tL<&^05hyN3#iu4ob zYd+Z|=x>RO!;OWNRoFH*eqnJt;>5%R-H2f1cDFLrVe>&UE2CwgIvl?yb9;I|!g|$CP--c6o$GIi4&okuw2Z&SXXmvtUTCnHJ4-mq zH|%&Uo?BI=P{+w+unP!G*=A$2Y_`X`>{8*(a<)iYjFK6E*W-gGF9_KE*%@l*DSinr z@}mQaJ%{5-`jRs-W9Ow8i2LFwh67oc5vS6I*#ciL1OA0vHZJVcA2?;Y_PkgiAgSbA zxuxlE{>d9qQ&o#9rZ?X@V8=L3FzP*Ku0QWjXJw4e>U66;Cou21z| zk!Inz<(nme^(rES5j#7#d;$N2;84-RYaR*SY{%iI?4RrzO(_!xyx=$Ox6sjFWxqiG(fj&vZk`t_D<_ELTX#zqy^KAuMcNHB@l|FINUboS zcM+aqGFcJA_lJ^bftf{iI4FPXsoq?6Gb3)68Mr%Yw6lc%I;m+sqvQ0|ojRGZXSdWw zE;_Gx3yTtrsO#dEcW$MBR=pf!IhKU;x3S3ubP=q_M7o*3>_q7@*lwO)Z@Nue2ZYYn z9u@*8y6b9dg$Ml9X=$h7FBtfE&qw(w)H|cIj=#{}I;)Bf4==^&V6!K0z~6@W-A;Ff zYyiKYTL_-)K`5P_Ho;eShASvlQ)T}`7K)$)p^b6byva!OJtfnux0-WB3*PUDVJ}p` zeC6;`RIJZXuD2*`1*sXc8)a!T_tJ@}?*SRjUzyFCEYI>@A@?QeD?7k*{d#v8lbCoo zb}X?hqBO7W7^zyfy#9GVE%i@W&GEQMJ1cRgG{6*pMP~RZX1c2l_^M#T;0p!Ej{a`Z z_T5Rj|A z-?wlR&UP{LwgZKKp&~n96n+D9WBe|7QjuL1jvvafe@Lelj*+}^3pp7yS#Dkyq^LLR z^pC%~#}Y^#6K7ZLLMc;FBrW!;<7vgXmD0gzdjjG40zuE9YY)=|i;PFX&K|W~%KcvY z?v^uYH<534xS|VA>@Z(%zpra_{bsUdk|XFDuZH)XPEVuxfKK#pBJxk5-9+}_2ziG} zx~bG2o0ZVm$|U@0LxTD8oLUA+PcAe+;~lvOV&&fjlgn%MrABY|v#PLRunysspku}C zx#p@k9&sPznGONx1D=lv-h=)*Y&9QVc;tFYr>PY9HzPE-=2U)jV;%Zo>6hxLy?77&hDo> z8WPerac!(|oo;wq&h$}oBKwjewH2M6+pmbb!A}*ysWLA$3YVeG^o3M}5 zzZc6BNlyxyw26!Lj?A!TK&fKpf~BYB;R~?>jl7}FiE9LQv7Q_2>C6(0LSq%T877+VjJGLK2(@dn;FQX~B_$Za)xfHmL5 z=5O+1HFDn#popbZ>yiI!W6)9SBA`VOnxEsIlan*k1rD%XT2`CNOQB^7o>F>Ff?aN6 z)wj&e3fUE_TFwn|U_9jLc}2imxDL^^hh_&squqDAO!;Y zh=@<~l7b4GU>PLiX>yG_ym5{B9#f%X1>qhyKi-Y&7Dxo8hx@OPiT&0b%}16^CQl^! zayGKy^=;``cv78jmj85zQpn&DBJ*6df7PS+XQpO?bylQ!Jd37}bk?$nB zBgrAV;*rR!z~ZtyEP$5NS*KjTx4bTijI?gx&(ZT7+AcY z(W5Zh^zoWfW;(~!geM2SwO26=LFhqbt@%eXfBt3$i6|?ML2rK;P6mX`;dGX!O-&M@ z*7`pdBvLIyGo-2?E>|mZ*$%dcNS}c2ps}mzIuhY=pagrNMD+$04YN6Yw;9t(#0?*p z?W@-3tz&eB{yV$4Z6nTKlb$POzo#S1*GF=Yh8DT(1|_q|6gVj1wR`BfMlBOBJ#>y_ zMMeS{djKMB_ec16zYMru7q!F;S*z#61N^Q2p3~z+_L*mB9x;7+faFtG50QJ<--tJJ zjL8@$InyH>AvE6GPp}?QOEKDrO8&`V%LUC3+xvbf`eZsR?VF#sCLq0t75f?ZPLd1x zJYTqW$;>SstgPaqTm+pxWT-gP=k z+?HWDC#;hAhc>q4F(5`Jj_myR^ri#rP-bQnG9u(ogpMJBo!o0j@|x?Z2FsNTn^$+T zQDuR_vpV>sutO+hLK@=MZO09(zTo;EUAxrD-QWb|uMcGB)yKY?6pI_et-vDiXisRV z_>>O{916)`Zw_ePh6rsQQP=tIN)}Q)EKI84y1h>_*mTJW=O0N{_~QXy%V+w&@>CBIZ-AL1K*M!b=CV=LmMFYXI_njg6N^X=umL!$e%JT8} z&42zEqb{<_&-MD9ZX1Qkfg*Bj_Jy7g2x&DsoUAaS0HuYsU|2PI$y43T8$s?U8HD)# zoZcsl3w=U8X6_%w7Q$pA`r)URusQ;+OjTddfGXT|fWaMi8C=lyQd6s)$R0RXO-(-t zk(L%byr*Lq|AxI5DUaveMCR#B!f;x#bymeEqF@ftpPDln`+FU`Z*@u%7$RkBg5__&56sf7&=NZv);X>V`7Gz?iMYRheB{&+u{O8wq8n`&t( zhTSzAZXM~XADH-f5)8ogTKHYvb_P#By(q|n9QQ}(V`BjKCtS}2U!_7-a=38Gld=J7 zQp7*&A5U$naR4}|-){GyXwXxpl9M}Vp$$!}Ea$5ied~dz6+TJ0X4(rCpf8W6#rBy z>%nO2UkGC0uBVEax&phXWB3DRyRlpS?}hp!JXqS3MrG7Oh9-ubH;*R+S%{{Vv*&R5QV(tUI}@5bRzg%_i^(~^kB8w(!qb(k^M+=FygYFcn8A1aMDCtoZ-I%C114D3d&19yX-p&VWM$Sw$>{Q zYmsELNGW}%_Su+8-4iG(^JEzmSP}7i;j*z0o~WE&nG_^IRO8%F%XkFV%PQHyk_0(= zt@+C0(u5^j@*=v@#KI`O{b_LTe{0n!y)OO29Mpr&yCk8LCPB(8#re0g{YZ(1YbHA^ zb25V#x^=;%hFfp(wI@-Up&;f4bHx#6-{twMHGvlEIdX;uSwe;qd*sW z$$!j{+df;$_I>XYM1lF(c8C~GS77sdQ7i$pB)(7z@S`4AYMUC!1_B;!6}m$$q@J;$ zNH>#CQMQiqSk=kfq1wbl!ok&0jy?s-DFqUV;HvB-!^T}Dhm-vIki(`@%2;l@1qvad zUjs+hJWjsl^*uhLhV(G9@*#Kvpo5~WW{f?zHyV?_d-O|PKIo;&*@#5hUy##IB0*c> zaOlH(^s@w0bHyX-g}a<+cQs@2Ogxsusd|7s>X(uA#PJSB{+?CFl#1b;Hv=P}&-Yg9 zuQrHX9Z6IhHXJ`0=X6@#C!@{x#csC{+@@UfNTiyRki$vG_jzmz9lYhUIIZ*KR&HMEu(#?n$4Q~Co`U!FE0B4D;`>WFPA zG+TuHhXLJhB+85TykVYC0QJjwoH_W93e5OA+)h!ULc!%NqE@xu#N6yk^J&2)HxfDA z@UH}Y4DZ))&O=7%42IWKiFg68A$rKS&C#uEhI6M^Tqy5bITgrwO`?V)u)ADb1Wxk8 zT}Rim%UN>;Tpmy%fkv%CMej3uIGj~Hy)6rM9=ZFF^6I*|xFD97{}vl5`>J?nA?*d{ zp?zuPzi3oD)G+vk#=A!5wi*UtPsBCz1m33pX`mTY`{+2Z$hdobUjZXDu@S`jqauR> zS0JJQY&45~`d}gTXf5vfujcF&`ZIk!n91$AZ5m*2%>x^&tQA!PscXlduCZ5|5WNvO z+OiHOvNsP1&Wk93d0RVtZosm|v0lI+4fI5i}rmeGZ$T+q4n2)+ZPj^>&>+A2-%Jj5NX5si&I% z*42iUEQ^$*X*y|XYfTRNW_b6H`htQLQ+m!ziQQ))_vlpi{!xwPmI@V@mU1F@y~G&t zy>^l@Xe8p6C?$4t2?rX|*&KN7|1NW{tpuJP`$j&V`o5~c@w24Ro!o?M%Z&@Q_QdJT zRA2L6_$@nN0;WcWH`GxjLJbaywNyrownZ4kl(*mTi?u7nE-d#dX=iaL%V-=5kOiud z_H+n@Ynu_;STqb&c(&p%=F3!!K@tU9SPusNMb?i!EO!4b<&4~4N}Uq^rw%k2Gnt%` z_hSo}vg{yGOypcI+oqKRz_LV~I z=J!Q3qw(~wtv}O$|AvQ$r?p0M{I>wcD-U0OSp-jDIgUa3NTidg(FfCN z)WtO@l@e4A{R^#AO+d`gxC6+^&K}ma2lCYWEcz*!(&Txj5)jo@L3h+AM ze0s6S7=;>cWVKxGDa$@)Pz9_yPa%DTC2 z?cr{&VmIIR<;y-EOYp3IW7XR*^LCOKwzaY8Ut9Y%`!XVNF@P@GzxnZx{niZSVrfl3 zZjoquS~cQqDDkMWLetzPcFTp6ZD~^qrl^9$C;sp^@g7rGuuD@NiWDun+1DTwFQkWy zk-(5bqcYqKhb`|kXjL5_++?U66B`qlTJh}+u72_?BGz{7Icb|Y>ABRr{tDa?S=|n3 z)WtFO8SRz*hI&hj#jKb3CBThP{N?7Pn4^?DoYpugDk&sE!=jDNiRnl| zO%SOSOCIv?dXI$tWF>ur9vf0$;aO_7ArPp4ejXJ@Nb|lz5-b%52ue-mW}2ALfYTy( zWjyQANC@SZ)a;gSLdwtAELR53a=C$OT=&7TWYFelb4_lj1`sn29c2K*C(Z^5 z7G6Ncqy@Kev6d3ag)`JB6&MBvm7<=(qIgJ8&vdiVG5aQ}GnQZid&5QdKmkMWvs!>YsRa7g<8mh2qP zd5|XgL!lV9H{97DxX>FLd&iKfPWdm2H_#)2A067Pqy&V-e{^!rc&e2MbQ#k$6}pWT z)QP1*pqmIp2SZ7(b$X*)Z;wuU;po#t;~to{X1hfyZf;zE|MyQ`d!_DM1TdR(Ngj@& zsQZeP3(jRPTrO4y!LB4T!(4SqgGs?CeqRm|;m)OZZz!s~?H0p2-a+!Me}wIlv0cEJ zW^f)6FjFHsW)~2Ge|IS4FU`=Ue8$}0&NjT9Zu*P;Uwco(vLLk_W zk-D(5D8kDQ&CJpQp@{$p{%cY*n?kypm>U0<^uyv?Tv%cv&UNq{+ z&z?|PO2UAICS|_+dlW~BIn%1)1I)QXFJ440h>z zH?=p3Y_R}x_5%?S=~#Or=k{Q}lw68E@6Uc7>;A3ZW2%N}345UgO!|58a^~<9_6Jl3 zZ7%r3jl2{909|ZsDD8IFc>ITwyuKerS)7_0F)+JL$7=tI2?tO(m?97~`hLs4z)LCG@ zpYeeMVxv0x&Ya`2UsVp2b89O}qa=wJX&VYa6aTi(%!^~eelCO)TRs0p)%Dn4%enA7l$zB z)aG~W>~L+2=&8oT95aT$@hYx^$Lft)|EB!;Uw_kCfCHMEx4mt}}59 z$YlH@38rVwSCuKZv!lGA)ADC7R4w1hpue1vtUz2A-aW}K59D1FISbGMI z5typrHNklk>+Sy3rKWkj3@L2@LzP6OqR;obx5*9v$A>X>DKh% z+Pd);=O9BEI7m@;R>$pAnB!_LszxVkpRyMklRvYYzb4XEkA{>L){_|62TJv(Sm0bLIpPDP z!@uuo%u)Bpbd~YY3_8d-T2+2cZ?xhpTj@uEgtE*Gbl5rrL z69^`;n^*G|c%fO+_k~u6Qe+4C!$o_vh!h_^Tn{a`Gr$4dYNEnue7fN>O^Ed6bhW%n=9X*o6{ z*9J)|-k`|Mq=;ME2MVrfb-d!~GFG@agrG1vW2R+aIM|5UZCi&Zky5M3NulV@376?v z`{v0|ih}W^*+p*9iDY_Wb~DTZo)z#X`ariUH<%V|drBo_%F2M`*{5KJsK2=lu6@FR zPbv*W=T{RZ$KZGJ+6Xk>)`zk2IQFK(8}S(0r0e}Eg9kuVgN(El_P@UolnR|w$lir-B{_d|?m)8gGPywQWK5L8@xoT5;vv4oF1k-@gJG@H$`o_(8E>P5rvGB)hcgm+;|SLu{!xQn`Xz8Orxs|$?yEA-<*TGfJxDBCF*N(tru z9@k%A2WHDcm*p*!onQ2sr$iymKuejQ<~duev4xWA7pI!%E?kXqrL>+K*CgA8Ja#K; zc1-k&cd0V#!Nq`yr)!(k<`_aD4Uo%B9}oZf`aE4mx;E%@yU~nFxJ^D=vWnW zFgo&FXXRyT6*vNu>04<~^!jIQ1p>*WE}C`xh_Y60*xaBENuT|dn1u-d68pzO)RIsX zu!gES9rbI%AW?0F;lQ@CL^Wfk(ea_e`Nlo1@VAUYk=Df-f61%_^rRt5F&g+Ew z=Q7t=ls3FPn!7lg(U2;p(Z9Q;N{`>^@`I(S=mh;mQV!H471BJ5(gHEUHr-Tq)2^j1 z{!~dWaI*!m2*!_s^>~_l|L$UI@ECzG>_XB6falswJxjkE+bL^|J6Y<0uR4Fky}E z6qYZ!Nlg@(QF6pc)*6C;UWu zI;24HNjN<{f$4efz$iIm9UYyJ7b&w<{gonhivPijT~B2)*HMNkZROA>h0rkk$c#R3 z6CM;I&Zq;!&{mS1U(oc5(m3sXPCvzu80p&ja8!G9MfFj+c{=Ey*z_kU1vpco_~)Vz z&jwLDmXi`+V9Pj>&5#@3VhTj3_GnU5{k4=E~1+CGnFgP0MbB(HS zHvTO$MxcO9V0srw4V(~lC$~h;r~Ll}ejBgx%dEjQKD{SMS5n~LGUnKV!u4d|NPk`n zOcw#oAw91fFSq=6*hMz(#kyq^L_o_OR7dSlzb}laB`$_|nd&*QEm=+iy^q8qfIhT( z++&gm&XQBUQSxGK>$xa< zG3OAR?_}&2D%5e^E{ErLR1lkgYExY8=az6cm@`BClayfIP{#!MLfj2rKAPFFUtRez ziQGcaxNyr`4y8qne%1eR^+)X4n@VNPC-T34UdK7RV7@{6yRv^V7PdA(+4QO%PI^4T zI_&S<3})}k#%j~Xm8_*GAaC_OAt1=^v0GeYQkY<9 z&TOl%qfT*qpr%A|^BtKt|1DYf$E6>1<BqEup?hGz~;Ma+#l_xap?=T8r$fW+l-24Lu!H*u68BscE})=YD$y z9zwXVuGOJIC5?@r{AO+r&G8E)QKr3kQJVp;B>S51&G%PT?1)?x0qzm#wL4d}tP(Ln z+??GjMbwSU$K33V$37Y@Jz%|%8`U8;rv>g+OM0}YeA-*_sC!35P2{8unpEOqgZCr+ zOA+Sn4LMS9{4W{>QJ)1Xlp0}heL=_5GA9jEBXeK{rvD3l-oHC?g9_isO;!i@+b&}5 z1c#P@eoxVNc+N&ULWnn>ZoD4Dmn14)^B-(IC-5YEuIN1m24R~+yuaSY@-ey-(OGpf zf1Hs2(*Dl;FM~pVL)~g*Xu<5bI=_zV@xcz3-%ye^$FVi+J^OEBr!OoTeoCQs^_#%fq@x{(u5EC3AaTm_>L}4D!Xqzvw3oE=mx6!Q1540;kYnZc) zQ*w3hDm(^BSJf3Q2dO-sj??ZPAhq1&ALctBZBbmc9%T2)34jLlFzXx&YM}ogdEn49 zyOcz%J5H4I%#J!99at?(cH zk7A%r|FL_Zy4F9`DGSBQEpI4q%6WHtvGw7+hXCBwRZJuq?+5qF%~Ad)P=mLz{8(4M zg}E!zq*y&Pe45R6epGg~;e#J@b1BLAhbTbLg>+Y0q&LYm0W;N;+=@AEah09BZqo%` z&6=F@&kDwms|TpOk!=gTc(+513Y@Js~|HElw}z6(98ORVS*wBWoSN1t#e1M}MvUT8sB- zc4p?g#>{BSmed6;c;BEJ7$CQ@G>yN= z9lt|~D;#i%1FR=iuR2i5u*i>wBzB8P6mjftZm84Q5j!_{VJ-g3nNxt*2q%FAc@CFl zWWGYIncxJIC}D5)$E;r<0Nh9oYf%8ri)7|r>zrr&o)O1Qn?~Pb_T4wBPtOcfe7}aQ zvF`q;znqz3?yVf!xv5oqK3>$x`G8=@@AcbM)Uu`)3(^X^2D>o@0NB!RDe?w+x_sHDTt8CX@irnYH0;T zxGv_I7;QkGIlhs>%U^8sx^U~LzCvI4KSM9zh)B$}vAUd&Od(8`4>&FQMmMnff42kc z{)`{kSCHAZC_t7RR-OnBM`u47SXV!Ou5!IXHwqm?7FX%P;fby z(=LMPe}J>$n~}DBntEftbB&!>birLml0{ip#QdbN+O?doF%Mt*8M&~yl^(Cplc!v| zYLI3_NLO>r%U2%?#mB&Cg11xK*sR2Zj{I?Z^#8^m&rwK&)pXWFoqGI&OWPTWi);4Q zjgf?@>34W9twq4z)rFAySTw-0-~J z=^Ojd@QsyOcwFBVgOOTNPvm9PU4g+-MQ$ag>yG=*h={H3?i(n`_ka;v8_Biaat~c`Cg2v_m+K zWmnL4%<_ZGAAWJp+W;eQ4PN)rd3Wq``%nAOO-v2wRiTm)?Dubv@GNcYAz}O#YaTU! zH-s-U=9U-ne(B@NdR%Ziv|u;C==oyNS+>$TSl6FW9hC^W)8&xSw^PyMAM37NqWddt zG1&*s|K4R<4| zdZaB7~N)HuGB@$Yf9@ql3-+Q78B`6R>c<` zlc&!6Rsa*}Cj?ze(vEAr?q<6%hphE~FDR)--IN$aiV1BfbmmYO2}%+B@%bUCKG*$g}l2D_a<4zf+zNto&GENznqm_ z7~!I~-TFoK@0g{DG8gXzCh~>6kVJL8h|ivxXmfzj`_4i~>%>Wsca3In&TgsIr`i`5 z&wGnUo?OVh6y6z9X7!C8W^I=zf_!^C_Y%WpFaEniJjG+WW%H8TtxPdVN0gU#ci+F; z$E%1ZJ#p|dxmRTA>qjrSnf`iEicG^^&8A=MCg-aiThW$a4xbNtkJ<2m*^j!qfAC)p zH$az3wUiHku{A_rFkfr^(Hi&kLJvjzN|L6oh#%gDxFeao!zIfux3zOaNj44X8_g=& z>#ykZ-tSlyH&?JmMngza&pQJCMT}_A7m=&oAJNXOf8eE!oqRGCA|5i&zh5C=Z!ULu z73|nJE?t{LNCatGY^Pju1alCx(|VKRDLlKcIi#1e+0qo9B<)C8?FRS$HEh1cOJf4E z2sjvV7a3#f0BuaN)b8gjTs-)Fv*Re7+SWx|OJqzrSV-!A%LF;*M-m!)RvhMlJ!u>P z8A>HoL#A=QsL}pioxB{B_K%6zMGUIc{RCs4i}(L9VLyKp(t4D%z>HT7UjLG}H|D_e zBau|o^~4kLvskE>$m+64Gq@-v03~s@03>$elb0HO1@62($v&AdEE1;QecwbI@$A%y zi;7wz({d2_;vdC?#Y>l1aBi0<_e4HEyQ=)RV|egLPR+h3&|j=U=X5+85>L~AD(zSv zA6mx$BaEwEXx@2Bod}Y7x|`wT^1X)+URdBTSC>f3Ie74CeV%^=ei>o<(~>^NmWCyM zu|kRmm`9j=#&YNV7bM!E1L#qCw2hsMl^+=2{E%R%c8oD>=b293f3Ub)f45C6~zNbK|UZaS>GR|JbMJBODQMlWgpx>o#I)+0&_v$I+A7 zgz<@SGLa8t0M7OoWZJgsx|027)ThEsPR8u`f~BRWR}cyARZ~xFJ0w6#un#N|cXFou zc8r)i;GpBZ(9P%m8zuX%R!iUyShO65p+BuE1x3r>dE!$?yF?*hzs>uRY&O^I>y7Sm z#FFkIQs=pkDK%;%?*TaUn3)$%;rn--pyPE$&`EvbFA`Lu8%jGaVCm>*i0=rayiU$j7>BMgI*ibrjAz5| zpivH^a%}67zd2A&Uo-R1L(qog+?TEr^t43P4aabWB!i zscYTB1YOvN_Jvz13VS2>MAwA7FE}tUr@-c_Zpqyp!#i&*McVQ|nyvsuE16r^&%w-A zLRSg&aT%@$m{w#RA&+Sq+bvOxZ0whmy8?OHuIPA`Kl(~9)0R2%KAVVH z7of|(pRrfFmZaa@LvSl2Fd{&wB#c5z9;d*)m~mZcH;>QukxX$!q(k+7`IMEP z=%Aro{`BjSZggBFpMd;7K z!rZUl(9F}b(@83r(=&6SLF~l#ed}q$aVJC>O@e*;GMfb6NHggTO_ruFAjLiEeQ||h zF|u}*8Yv!QJ;kMNL|1gn!@9%oMmV!c>k&65Vy+OGfacPX;;}Z-cdNZ=j<8i;v~*m2L-U)x9(?x$RbFP1){Tx zk0H+_)G}biFm=|UwY2wWB`)r5>&y-r7fQ;Zb7zANq1tNP26wop(EX|Q1QzKAmA|E= zmqXVkpt&Km^}sL(|Bv$G@r6sL{ucN2`&`iEF@*SJ|0r4y?`6d1GFl(GFlcw`U*mOp zFI~8U6CnYCgn^L*p)+M!VIiUmrX|HmU^%o?FxoUUr1<3D@4@JzZwLV&ufzY*g5>3i z+})!R{Amu#`DQjX-tjA5-M~ng5PUL4q@}e(H7Yg-`Kc%|Car5~`r%b@`DL%F+JO)Y zi*#szJ}D?I4Xym&7cAoc9iz7SbBx$=y>qBNF7DOtAj3Os&qa%5=SLzd9u66l50@KoH;Byh$w8;Sr3rUMB_#dTQX7xE#b>B!;Yd(jl z`Ro}B3KEx<)d78qMb;`&`J*FC%BjCYV0w%agU61A&bChupt2X~DEgO&P#tS^GmYXM z%d=}L0{jJF`A<-Ug@g#FKQ$!xl-561@U5&4P|l3Fj_l8UF_V*`Kl@$S6?T3dJEwMw zVCM7uiO;}pB*6|xKWb_|+an4OuHYotKUq7_OVW3{;Xru+n8nNG8k$F&TU7m-=J^+onyKJYhEh*Sz zl86u=GrzQXOc2GQUJMKUTxy4-WD!9!ivRBQ!t=*5gB+i=HhrNfb+ha~Ctkd-_Hoic z;jlZ>`@%l2-M2fASu$mdsr_Pm#;p#%L5G3###;0G8TMNsSlxvW!%9EV|xSxvhf8)a=lA-@4s? zc69XBbS(Ui!~Xt=yZtZMTM^Oi@_SpG*F9opWTzk(?dSCX|8p-u5<^N3e-sMT$_ok! ze*-kMfkD0Vxyzh^(9qe`k{^oFy*3;F5l3Gsj0?l)%I-ga4w^E&ivb6Yq5Zou~BdceSSn^PpZy#+4Xf}dYr%!ZGxZOQQ|F0S~YM*oVS#z#u z&!y9OMgC}Mxvy@?00=Muy?p6R&-m0@Ywc?)nQZ1|rq?&j0{6Dfy(C!X@xuF;elJz1 zYB?dY0({b!*qFE~^kMBYK)V+R`o|Ld?sbGh8kBp(kmE;U`0}(5WB{dNR z2a}P-;-Z{Zpw_Wt=w=79{B>-b^ofWIVWp$@KS=b<+|bS0!akH;`tjQ|7i~M6foVsG zB5W`qRg2%9pq2C2bPk?_gv0Seotlo$eEHdQ)+eHGiJ-hbDWz*!20h@l(|=UJCt(=8 z2_rn+0s4k2W@;PryeH&v?M7S}{dj*uq8~{A98+z_X^@b0ZJo8C%QcG;l zS80P3!QD|EPgY2N9dF3wfj9GSo|wxl#Hjj$tS(i5#6PySMhY5Vkmk*oi;C(HTbu&E zU);CFrA@SR%KE*T3?!@j-+=UmJA;U5WO;j~8NaDJ5nUfP205bCComZOB@%`%DH&m} zEg7(0pltcAu*+@Go*EUukxJovo5Ur7qlhLZ+=3c}HoVdcPWwY7+PAm9sV!^;&V=3DG3HkJ+@!_^1dn5Ma`#|5 z1B1;vUuVqe{LQ$&yu9oCtHduI(?#!6vtXvv;ZwHzehUs*fl9Ch;Y~C`0WETo0?&3w7!OCv?$r?-x}~j}fB?y_ zs$#nN$1kQ{;|AWXt-aQR!kWf4;{Eq^E?#c3a^BR{i$(+ct|4(?R0wXT$@XA3;j(Nz zN!XnJf_SU$z~M`}5|Y_`aVOHmBx)a*_JO=It^tEH=xWoA@EljAw{h^2zr#)77tlVb z3CWfv%wYNm#=EU;AZXDdr^6s-^=nwiZnZFy<|$Tcm-5Lk_VEH*1-4x`A^575+)HzeHOG z+&#*v!kivLUK1qj8Uy?CtW=GW)vA_GLMyw<{rv1ef84+-79V2ddVNdt{qjmwB!WN$ z+V>6JhkIV0^>Num*QX<;&Cazrw~;4G_h5Tu1f<%a2Y;*g;l43+x(Pydu|#;#O7ix&M-kJ+Re^w{Xa&qf3YxIzMUtSnh&Khck z)L*dKXlqB!iut)Q#b0X+y<9aR^-%(svy%%W+wo|5bb=esm6oPR()t`#T)+?ZgmW-S z8!++EOF6WD3HJcSu|dkacO&^6xYim2-+r;=jsH62bRo2>&L3e{*4-dW(EyTlD{dsm z6ItgpcRXB(xDz9>WtbnoHsK3R;#KOmRH3XdhY02j0Is@T@Cr$|iI$tuavpbhXTSy9 z?5vz9rok5ZF;N|kz}mT~brCd+hTny-FCjMER|*nt>|>-vlgucp3jg*R%AMru3EzT%X} zB+)jZ#V#)UmqU+Z_I1A2DUO&yv^@^p)-4x;Y)*@$Vua}>28BIyI^<=1AxBJ4(&>?* z&C6@oADocHn*q?BQH^bE*;dinQGhaV=te?dv8s0yQbz-Cv(&j`Z;adFYKtHi+T(YU zZq>DuK!es!9@W`!*rr>~dXiX(!UAlM`TJN@#Q^83G#>HPa`up!0+Gy9$}4FOajDOf2zs zlf~s^!49?NFqs4aY&gHg6sOo$7G5 z|C#Wpd?`MSYmQel5;1VD&+;V(6)r*l`Ix<(SMM7Ay&(C{6d$j{#Rg?`m8X;1O@>aU#i^F}ouoc~zEKZa zLQhb}DBu-l1~ApcNIi)VRhBIj85cV^^j&_E!Ca(FgBLMtsLGBy210q9(tna>#qJEdgOC?+- z3x-V=Z>SerIZ9>4GN-b4$eaM-_H^XLVtm>^HMwIe?=NqPgfeMwf18Sa7GnnLQ(sxf zgRqGOeSM0PeFR&!qeO`Hw?D0KEBvW)?WNlTSO3HuFxrMd-;;oVPhWoX)Y3=mFg z0k<<9aU7!7Pkg+FFV^)M(_i)C~5FQ;3b=u)u4jS<{M^AFN<7r5TuFtTc1shB@l~-(HvVG96oZla4aQB9`hQObb4Ev z1V$W6@LRZ%`JA_YzuA(8)Rf2MGHP+sI7cR#dp!$xyb4*gR_WmU5p z7GR5PF_)IpIs4B5dLSvFJ{obG+{eF7{`N;_z@?ow&#!5&&bl1Pl0p-T2)&CrFHPrSy6c9cH=_Qv!I z=z^M)85t_cWNM2S97}V&%f@4xU~98(GV^j5eeac=|Hi0iQ*oqALN0qCIPKJbSL#5L zqra8Gk{cOc)#d*aLd@c)pW=AJgPgXjE?TqYF)sIy; zIuFmNlwJcdcsgyX@zB|(O?QhIXC|Wdnq3Yep;BQSZ_0@Z?YTxn6i;k6U~sIsH#mML)Bv6$P-I+)wTR~S!FO=?lrWBEaC*Sr$jZWU;z#UOJLnLzg_MsT)zOwLYu# zExiK5N6Q4=i}MaWF3|9-xA7~)Kh|!$E6!J-fIru*bh?lEf6&64o64{@(|7F!6VgrJwUByXZKofQfe9tL#iMLfNh4tA3YWE z8k1g3lkHTNI?s4u?9o!p?C6(mKDeR7+E6SCwZ}oF3Xk z3b3{gUTQ@%r9>bIED=Vn#zX_bj@Hr&Bqoq}LYV-^sO29s$Y!gfh1GoOXSV*RSeK+c z1#1z?e^T{!J!TC#Y}w96Ls!u0XF(!-JVaWm4ThZB-2VIV~iEeJ-U&WoWJjXeWL zl%RL;7n`Ee)LcuAbOx@52G=kY&UulW2gSI;f4nv}8SvNsx2fdYwR}E=aO$BZBMQ2I zh@UM>B!K1vX9v1lQts5DkQ3iV4Di-DBA!=kYW^bchqs|TL#{f;90b^rH|-1CE)61 z^xLAgT6Gaxc@0`Qioo}JVlJyV_0fk*`)wL8yd7y;@JARFv?=&pOfV=ZhX*DmI+RFa zuf~tHjm<_F#6+1ZL!Di4)-^j`4^F=K2^LuQw*x&ch*IB_KZ>bOM_$HvBxCctD>uA(-4?Oo*g^Rg>O8+)z&Dd;o&>9OtasS}NGN?J}%6{C^QeyO6!ZiO`8SJdb6{<#g9M?w21koXvmvPV3szsOAZ>K`hfy-F>+ z{Aw*usOyDc#cj;+(iv9tWu+{Gs(SNASI_?b4JVrWivWUQ0l^n1&T)QDW8Q1T_~G<4 z$OFa=otK{{^=mO!6oG$Pz1fS;T`T=FeR(N^BBWd0Yfzu2Ps!^RobR4a$A9EMN*(8u z@pa{`Hgh7kg@iz+W{?rOdD0N1G&FW_lA9oIJT%$N?W-ZB=pZ(B0L_RpKl|eFfJc@5 z^F{|vph$`llet@*%^ojUiaQXMIC;8@U&413amrd({Pje4d_~?Qb_;ZM;L$cwAa6Ts zgeR7!!Qa8WQ32eNu^HsAL36{3!aV_Stah;Bp~(&MQ4=x{qB+fSlfBCP!pn;Li#_(8 ziklrE5zo(WG0|J*OGcBuk$8!@a{a^h%*L4NC?^CLq#RwIv8Msl}|x|cPp2kLdEj^h@3B|o3E&t&+K&GrCgIR zvteHp7C4q&?0N^r)=+OjOFcaA+D;==BO)h%|H}FuSV}$f*UengkdBJ@Uuc>jClnf`LQ>$oVQ9upUt^P3y?+W1S9-^}Z3C$}Me zu!;p#`;LF_=lf0miQf&eD<)O$W&QW&Vr>0)131%3aTCYHGzQC7gJjg0DvTd(6s=l8 z1dwhZ_HU(GTvc^8FT4f;*Kta3(j$h?w#3Q)wP-Ym6BHI-idoEnOs>Krgl<%x_#pf3 zS+49XEsWn?syZ)JMm<-upXWxK6(S-h8p*K-QP4x>jJj!IC3SYSw&Icq_!b&d)Dj zPV15;EHbfcvEnb;)~tuuXE1=J^QjYu{2s-~0@?4qqng(@4-vELgn|0Eb3O+!_G4?< z($jA=$~c!>E1&StV%T^p|4vRF0O1`lo|6vmE@iNY6aL9sMyOklsye!BnatSPW!2WB z8=WYezj55~VEdIAWzOc{h?U}rLpQY?zf?5pn=-LaW{5=QuTi{#95;Wngq0bfMT`@i zju2kAHp5^EVK&>b?HjHbO2N%U&5vQrR*Uwjyd9WWv!`2EIQ;s^55(_%Dbl0|A;DD2 zNqYqe0dfXa**3!;^XLrx7#DRqTA+GR?&}SgKwYKXv@o2M&8SL4rWFC16wXuw7~OLZ zgx{iK3z-;(4*k56TNrYh2!|S|ZZ348tl;THvrAsc{-8bAOV-e-JpGKwq4Cq! zgAyGI}SXIQ_4BQ)?x}|(=Wg=tE?t=Sl^N3-irDcc6}Yiw0E@Vc8DUU1G>m; z6*~<+3!y>k7U@QoZME#tB%A$dhRc}vVLFkZfP~rIKs@yg)}?l@L}UTUS7EHyL26Cx zB>H*efxs4z1 zrz4Vy#^odb6u!6+#s@93CQM$2jUIkeY1WYC)e}NJ#g42Wecq!6Y)Ao zc|UW4A2Uv1l`fN0XVTq9W<=!KKqgI7i0V}&8SBpQkt%xS7=P^9Kikz>sBe-+H|Trn=kd|S_i5FR7e7(Ai00%Rc+XG%9%N8zu}1mg6=an{dsr~a|Z{`={U3* z%|=)N2k5)USMc;K1bL8IxycZGzmcm&KZ9T0qFS%4JtHkdm!o_o2LV?U>9wvprln~l z^NiI8npXD(LtMAegopwZiY2GiIQ{Y_iMvZ1s;+xTgh7H(O{2>Yv{VPnVZqs&T(?<& zK7BXO{bOYDp2Bn}VBm%)K(T3Kvf}NsB+m^>@DyH@j#EiAcx8V~S=#Ez=`j6v*Bdfc zFN8J?XIiWJ503eES*#*W8e^K7^xPKS(|owj6y?ho6gRp+G}STN>G^F zToJaACRE7|%b}SOZAN>3DO;iH$%v^;{2G>%z2Sg^m$AFs7e=0<$j@}Oo2j+wO~L0@ zic*sCx6s=UX1R=H*!Gh55zqD&9sTBLNYbFPGWcp2(f#R>+|dxCGMqPBSt$GtUZZbS zPAxDVFzuqxW;T_~Az(Ha5gD0vp|u=#RZPLB4`mO}aI3sE`0pntf6QgUqh4&YHOp$J zFa)OzQr0Fc1>|;Z12)yaRTcxG?8G%?M)o)qqY#C?Y8R6rN3p;sd7M-BtRz9?c_^u(b$8+&`H zf+!ryCNa{-Zb08riAyR&ElUs9=dw6@!t#i-y=ZoO~3FFzQACi0T08oGeMW%4s;jrPnw%Q{2;wpamcv^p%b0H znHOebp&W!3uaFhGZ>X={bVS6ty9TfTY@8I8ci;{L63Kw1<+gUijGl-gUoHq#a@v=} z-Qd-C>CG^@8Aw#xjqA+yYTEUZ>RH2ywAJ2rPlog_22(yhR?5ZnzYE0itd!g<5TT{# zjojhYT)%q2f8Wtb|dW5}DFr z^h$I=G%1ms@Cn`wLT7C3>~HBiDOUIN;C---+v#u%-X zYFpY%YMT9HZnJM`;NaYPx1=_5(2>K=S!`(IBaqv;E%+82Pc^F}B4TsYe@fE*HKx$o ztch=Y+E`+TiSy+BDqx!D93NOc57Rz?Y1K+b49gPSbUMBj)>=;&C1Tpt@#viq>mvPErL38&NC=89 za(BBksS=ofkY;X&MOI84I{k9)O+n{*Goq4cTy%aV;LX^E?&$a8v3SCZ7B2x)&DNir zpKxIFjq2m&&9C#6PW}Y-<6-1;033V>=Tz-r^qn2` zMft19$!*vKvVox@BPf~&534@)@)Zd=mVM(vTAYt`6tR*-&AX6veHGzCz?Y;9nYS;* z{aZNA{^`Mn4jw;x+%WdYS^loencZp(+zLtE`ELW)_akf^XGD%RUK>tEf5w9x(xhzu zJsJ-Im^KLoGsg3bQjvOdBJIlmW&s>w0d$pm1pS^b;~+OREiW>aKw*fOhtY=!W4Eq3 zL3{>mjk)C%B!Mmu-n=_+a=dmHvZp{{sFErSPi2W#k59Cs3}4eDML&lrk+=lX`r+S1 zP4M%DKk%>o$t6r5lq_mW6cFSx4!qZ+$viu^(y&=Tk%rRPBx3P@57JU|M@dEq^;TJp z>woQEl`LF)Sw}L@^Z>Tz1)sfNvglu)izw)7Q-U$kRcM+sgG1hKYPEWc$(r18fe)Gj3VH&s#jJS(;GSFr6 zusCM_E9Mn~9#k4cq@=08;BBL?L9lB9mRs9BL5biTT9lCKRk*2NoMO#?Cay)+*;Afe z)kl?#w$$57JQOTVe8+=zN4tFPaQpfwMkgk$C9IKvjUi>$(03aV0H@a$%$}|j9!EAt z=zLaaTnXi3*WpmuZRQhtkZ9L@nY;@FsC%xM3L9t_j)Te&xaqo!9xDKbO0K-5xh4EZi${cn!6h_1*o! zwG~k8dNA*{-~Z!U`9kDiZ_Lda551LthLAao$-vr2e8A5*KjS8KEGuiwDn*sGxhuMn%Sa42j}M+bbz8pGPPX3*dW z-R{-I&aQ7e^3LJbV9*7Bg7fmx-j234fFvb$*AVt1>wQM7a>deAL66iw0I&YMY4m5+ zo;htNt}I2MBSd8cuMTEPaLG37wQ)D5TH*G^vT@zlj=EXNXaX&O)X-nEnlvLwx%Fn0 z(5&~??yzwth?qKxTC>0Urh7kFqS5aAPy&8(!64}1CC*B_nOHJOs}2$l(ovJ!S<+iH zFJJ3*;%@Z+W4{v$=+x4|$BOlU+|In|f{0xiHox45b@11M;@MA0*(<@i9hcm0=v3U9 z#v!No#0$lp=8X07ZvZY~>1} zD2z@$Ct~}rZ?(-oAv1=O`BgK+_SH%JbBM_s>m(mPfZ=cJedFu6U)%p(G`SnG%PZXN zQPx`?{N&Jx20x&^EH+={>zDgw_mNuH6+JCScRRZ z%;NIA+KL*q47o;H5B}$KgR$n~lWR)_nA|pVKzQg!VIrzjoTsq0#Hj4fhqNcsK0!;R z7@bPc52J02jOX#0x#bLCYwTOU_@_hEoup02#jZh?k;aqmuo?d&4rW<8zI%I=wv)>m zK{jn>c^NY3jVNSuXEhAsD(LfX&q2rEZtICx0WqBr)$gmRl@vWLJ{>I*94DJV%G;Sp6Cs*{oRS0GSwx?%V31j4*3%1 zvxp0#T2gJq#1LNSlEK6r7~teq%IK=`nwgs=S2GPnU`uD#G)B!DgxZ$wVZc_twlwWbW`^&|7G-$dtH z^$g7xp(w){2V8bkW{$B#=gb zT}7>r4tSb&%sgifi!w&=9FCM293Cn;+Ve8?Mo0$Y? zS-~||B8C7M%@*9L7lsmYRq`2{YHM3j%@u{YP>(HuSc(&E$G>kt3D_lLIrj35sMPb0tNn`g*sdl-!71 zeZF3$p(Umse+y!#VU$0ZS`;B0$8f}$E|SOTap!i84?M28;k~$VQiBZ^&)`UAd*G45 zEJCFs6RPBK`D>yA^WOHCHQhuA#Lw>DVaQlstNoWtE*CYX$eiNafs=!Ud|5#Md?z8q zs7&022A^71UBaD>NTznAHOUV$4_*L;oY6%%pc&=WA2sS=WTNNjEH*XK&61h~>T~ox zyIMQI=QL}1E`t)V!6(#?)gZ1ynd(hs;ff)P2q_bp{+ay9iTLMT zgk8fX5ftXZ?^lG_prPPk|>3u%ve!_o9y%Y{yxJmNQe-7d5PLS!V zC@WWAs3)G1*TMk#+Kr0OTsYimN?QH@vflDWxNY}X%kHl=z)g~dZenpi@K7XS*2zDg zMnUGV$wvUH#e2VNx<9p04ce|2()ajBCZ%|@$|~3+don+TX_oeX2MySCsl&AyBxvxp zCpC+85<*1RqeIVkmd3z*QV!$C&wd64m-V^-cU$XvrI6-7m!W-*c+Amj|k?| z*Gq2o7Zvsg)Y&u>R$t{sGYLkOy7^!TL?`LFBIkNd_wOh{*2!52=TwO_+x<~3*&0t6 zLp9W2Bd=>jjuv8bB%1*buS z;{4^Q@sSN&XadP$TxWTmLrZR!Vc2f+symA@Tm;q!-&xb`Ti$CAyElt$Pt>xF| z-*ABMSMvIGTnUDLarL=-oA@{(2FFU1$u3)IW+NpwSN5d!pnENnmlFr#U*&dz@l_$| z;>yvp&(P0pZ;b(&fa zkUQ97q;fLk998ueU*U$AOS>3ng>H|CnO4id+S~u0WA{INVn{k@{}S~jrfU$nr9GdD zVH1z@h1r6%CvtmZgkK>6ULa*pQG9w@Chp$6#pTjL)Jo`gFFU6XmPOpOYO(WypU)8i0AgFkZCeE2$T=j2A+0kPfMhWweo2QDAa5lluv z@2*wx9kebK>6LPpIbLQc5aqxKX*Z0papMn zm=qFG-}MM3#*Y%{9810hdHzPJUK#S>Xw%hd#oO&`o~P}xnsW~7 zJwNMVKiK>$88vbkw6|S@0t=j0vQO|k5OIcC0!)J zhuxV(N&y!vzeZBS zWKjwgMF&z(_ocM@pg*)UTi;nK=lg3lS;w+{f$Eg>R2A*7K^UTNqN@0VK| zUqSskw}9DlFM7~PlyaI#T1Za?c&#?ULzpm$i9E*(%)i(lQcadKsF1J^DWpe*C=-{HiV?7p*t1)SoRyKWP~AMj{jwW~a> zNEET3%m$l?ZgeDbpfO6{!LB3%XjBYrK8#LILIrUmg%GcWXQ8wGYZ4euej0r%C0_|F z!Ljt1DreY+Y|}xhTZFX~Yu;6qfcok8syjNCs$6b=xfe|LO;TSsaaky%aB2*o_QEje zj3lL_E*f|m6yb*|R>V*DWqW%<^|KsWo0VAF$`>~QeDeEWAkTYFnhw~pGIVSyn3#|X zG$r7bWeuOC!T9F2F{|nar%RBtW`-1jQ3lO!n+tGg7oiuG2VLYmlfTqUDH2esH9DJYA2x)v5zLyX z50zrBsTe?&=q3HVa6(=^M0%mgGOJ$y_6NbZ1kRQV<%S*p*^uk zd8R^h+rC5-oyP@p2p|KhAG2Evp@&8}U{jSP!eAUcc4&e&eA3gDuEJqLFrqmh%{2YT z`MxIql!W0qGRO&C*8R-%p4+%zeMi8A8pT4LL96US((6Fi+Xlp}X~Bq>)3y^&)v;11 zv~s-ET*S*}Ti#LM)UsmXRYGIQ2`^A0h@;ZpQR|VgjsT)&XWr42P-Zic8aZpa=Cs7!(p9`g9Mz zFSKl^l+vuJK7@vUPxl@g=GZav6D4kGNYy-?p4^ zi&Gq) zz(dF6jwLe2=0cLA#=-^8{LMfCC?{mzlg+wTLH(3aP`=_M!z1;iqGOGIV57z5a>>Sv zKFc<2&CCie|HXOVXwb{d)1r@D>^V?JL_)6+AF5-8(1y_nZl0*)^CgVZr>ZiI`K4!! z;eaCde=sI{pCIM!{O&h<+PjheZGb4V&tKt>1JrC&i~ttes<&mMahl))!DlRJA`{%G2-;UygM5`&(GpyFM7fqtVnvjI%&2J#Dy_ zyi(V5*1O#ITQ+Y0kxA+xri30H`!-$f^A4pwlR?fQh?2d4R&>`V?Onlr5vPW>X`T@i zVX%O_X{MX=xcReEXi+OdPYXTa-I~ki`(EP%|tDo>EZ6as}pWf ztO~-sTN6Davy|REueaUkg(8E0hE#FzWaXkQCRrB>BWw$~{^e=nVx>Q?|L~Q!cN;&}>raDdmc<_)d$*+iB z7Nrg$Ue{ohy)E1xJ8K?wPDou%M>B4}2yn4R5Gz3F#39)8|Gc=7>_q25<^>Ch1G;GZ zXaMsP$^7`51bR?;eHPkyOPKKy6g*kn_uUMCsQZ6qe+={qcG70P#jL;4w?IY5JpiPXNI8a*4o z1M@HVz8dsQW%H52c&8s(tCP!a{>AtU^?Jh(q}@gu{Z}(3|B5xvmCGy;vWk6t)ly6; zf`o!@2N1%92^-fpIe>^vu8*1m!wzzzYq108P*-8(**s))&Si zM&)ex82lflA$Tw(!%1l`Fh?1@k!*%t9oeF2Dnqb#i@SR+t|9mHGAP zt6&~SMSY08>?U>@G9(LuGOu-T!qqGxgUZ~Sh77f`{|m%%(WVVCWeL1$jZtNz$q5*^ zZhgYrY*0FbE0$^84hlb=-ghnPBm&T;6yXa_(3-oUhG-vQK59Zpu2@iGJw^B@4 z!i}6MMF)i=#P1}&iGlk1e7QjmQq$#ri}CnDBNUdDbIbz^R~y$qGcguM6O5G)bXf--@g){8kO!;=|x{0h6op19;iI)a4KFXS|4^f z7?GL~j0zwxtBJRa7NH6~ZUrpG(c8k{(JATaGarzxzrI>g$ils%Y@OpXs+k8<3FYE% zbj+*IGNdZc+T@UP%y-eHGwG6f{m&{LZgN*kJJRQk_>&6>wFvuBylko;P;%N7oSyL& zB~1@Ha<3VOOA8JwV;tao0=_C*F1I`3c?mMii|mr*3&<6@tI#WXU4vG}YqMO#j$cT{ zdLW%SxR8K!^UEl@K-c!4eP0EXcq(e&cG?&!}}>=a*Ak5=LqJFNmo~ZALEd z7o+npJ7ibzc()6qIun~o)qG>$Qu(~`-s2QVs5WrH?d|ubBTOp0KJvesTA47p482*Q z#BI)`?m%h_?Y)(jF1hcS&g{CeR2g+F6|>MO~`Ao3zSwN=t07I~8O z-KC$8?qtJ|{pR8wyp#$qnM0>obP@G?$bDwoT~$MYv6VCCIV%gvJiJ=2-GaZ1HFo28u?=pZmTpHGzji=j0kP zpA~^x@^wcsXLi92I%bJ@U3ZIR5H^*$i@C&qc2`eXE7OE#O@1~QvX2`f(wqeV4be8W zUeWDf+wk%8@!y`h?cTAD1Upn>mPR|7GD~7K+^Cd_B>e|`57;qDWeu{YPWDsor6Nv- zMS9x{iLbtK$?X&`B&Q{&m7T0gli6BHRQ=X;o-*pnu!2TifFQ9flliCy%ikv9fas-d zdZ8fLfST5~{|N~Q-B1hugJE=QsZ~Irc8XQ=dt=ysd@6n!hfU3IWq+Q;eRmoBp&&LF z+{qFmxxD^g?g9B$+DGfMCkdpmLV_Rd$h&37?A+atshxpy9-Xri;(FE>GK{Xg!11JJ zL`Upy6df3W_+bKMTyG*+5?xa9$5QHDPT@EY?b`v2#C_1eIr*O&`&}$vb8oi<%g<t;GG@CrOGO z!cZ_&eKbd&#-T1~D+4DtE1rh8FO#BqtMfFbJ=k=)5v=DhJRU>fi7qI3x4e9gip;Rh;R+sqk&wsfo;Qh^`Yrg@7Pj|0*S+iKWnTSp4S_*WD*; zl#O}dXfz_J4W{VKiHOi{hMb8C8-8Z7@b0TfXqQ2qg(K8i{{5b90M8?}!@zVG{2bpk zQAHw%!qa26;7@_+`NR*-csyYCLhQ|z5?O^ZnUq#F8hX2*tM>|{_bXgs<=Gi`#Ae1_ zvTB6P#`p2w3?}IRrIb3D5r0KXm%?S z+B?^bUCAqqa|e#5?H-27d)xeS&^}T&{Ibq=EJ=gcV41IM4%F23ZyOJ7CUNXwQ-fm; zHSqQhSL?+*Pw>X`zWq?~3T8LGc=hzgVXdcUf-TzrXZM zrIV#RwtzlEqn4~%#*Z+tF%$LGOOUwa7mk$OM^hM=)i!6)M8fL%Z>i*o60f9R3g|20 zO|={ZoHk<&eOa=xca}A@BzWI4Ov=;_gO_dCrC&at!8|RAZ%xfd$bBZ}cI_y>a z9}?k+r2KXy=l{1%a+A+jT#x?x2}!cTSU}JS0+1w*|K$frP~Qa54~Y z%)9`dMX}G)P~#8e7*f?~M@s(no2XQi_+;2c{ToqsAnKk?*KCB^uv@7&sq*oqpG}ow zd`*%dOP3e0_VhJ1S~wPoD`|}}>b`nM3Y7=}t*o(S|pPc4!(_Saf5-HWy z-4)~d_^sRta=wc|3>cd{D8+!5EQNi_D4V|8=m%m=KdaxSU%kKMY%v=&#@V4nq6saC z&k|8Ur^op)orP9R7N(Xmg=CGpQP4MD;$zCer$EZ_&P0@izIprGs9mP~@aHG>TvDXi zrViwMW*mV>N^XZE@PxYt(BfaPLMlxzJ;iE8or@l6R8^U0{X)Q%`|zy5c{G*gMY<*@1b z8dS+B%ISDi;;ZZwjxCIyMd&o56*Y;cpWb2&zDo@5D*13YtFWuGkkgFu$->2(A>Kih zcR#nW57ECg!G2XqTY9Q-#;oz-Y+MpB7a~}ZkbC-^6?+P5-?C1hI;%=DumI-LA*oLx z{T<<<@+k%JEqLBxa(zo~=e6GyDqMFWb7}qYWEh z!^&D)b0a-S1cy?iS@Is~r3^EuGAWt){5~)Av&sHToxjRjVfenj2D`BA;wF;Xh_=$O zuopYm2q#b9P(_RJ*Yv#_0csWj;~HS%!maEgYZwkK<8nVIlvi#H7q7=&%k zG_GDWqTwYEUagdi@A(e@Mz6xI*@!4uM2Y3@hD#8Dy%*)zv04$)`^GaUolb1gz99in zeRpJUt0Q##-kS(jDMqQ5=V>&wP^#T0Rt7ZcJBpEOLbK`bWr!6`oS|_G@i;~mDxp{} z6;;xZk>FCki3k zA3lB*_qkpj&)+*LxQI`qjZAN|U)U8~_mQJRJNGVrr8Z~qBSOVH_L$$5nrQv)!{-6blJ1oH}y(dIy**2&}u|UGC=9gXf721xE3a-<|<% zVq)uebwh8i+$rc(VlphC!ML|2e#@Dx8_YQz*X$MgmK%?l3G_L6@5I5It&N>Xm13-9 z_+d0_A}&cM%G?5At0IiY*xJn{iszzp2YW1BT86wRh2-(7p!&mm(pzNGN^X?D6u|60 zoK-ZXZY>8_w`SK3WJ&@$! z)a>EXDP^lk8)Z#)^Mm_}Fw_%n6UdEYrXRo zxxhk_PTtb;MPGm!fY8%28nPAiqH$Q&$8uj{HFJ%0WL(kR33u_5J`(VH_;7kADsfXZ zch>dkMj`4{!$VH)ysO`qE2OO0S(Bf();_kKYR`rKzZS9op2C&Nb1Vrz zlgFun&bwcx@V>gBTt~5k^?Gn~hxc3t7uytO`Jvs%+_c8V#-WYrO4#*P$czb>?X!sq z#NH{Ty-@o?izgSiBOePZcCm2(M>h`-O*1q4i|>w|c$*z!%saCwDjt)*GMkGnere0- zaYIMMVGKTP+}4gvdK(w}Z`cBD|YE;@OG_~42%8rVhk{@ z>zzRi!n(k?0mVfFRSxHu3;w}79#b=t9{l%A2Wp2Yn-n=~&kE+o1-@y4k>f`awoAxze9B;QA6}Sn)u~{ys*52=cN2 zM~?DK{e1Cvit_J}2BhBNVl0Iru=*chLk6gt)!ox2%OdPb=aB^eSj)Gr^w=BIq%aWV z;8ot?jcWLDgYrHh5s{ern-oVCOYESy&(#)&bsHwm%V61O$K3~88!tg48YWhQ5G}9w>mLzK&k7mW8 zX3&}nQlX!wDvs2_DYhwLOEwEgZk?HyX|HiWjqRJgN%$&D$dC1mm{&qZxwr95JHY)f z)DFwh-}!zxcqDJBchs_W`}u6|$U~Cmc zp1LWpTxR;v;Y;YYz?hb1GlK=jcggtR-m5Qo#v$)nEnXXO3UHBXiP&gvb-4oCMmey- zmCcW&=R+c1$HBxjWqozv9grNmO;n{WyuVY(n9(pOkJ`)qdY9Ou>uCF=eTNz1x8$(;jOJ*4l`x(KORP*qe z6BD|kj?`?owfZk%6cAKjfXYo_N%{UCWgAphq?Sm9f6&`CK{c=ARbEO<^i(MJQ;#22 z9ClyYbfmBU$qVvfH?>mx*3;dV<_65Z(7W`1U^jX_?*I%h%&0m#r<&CdTZ$VIoG&R5 zT}A;(dQ-FUU#}~@d2uZ;+hT=`AK>b^IUvA*6ZGPcA8eV)Ej8 z2%8Q&-<+>yO%+trq)N6d2kq)>N!^fkSxVI|pFW<$11UQDDcoOc z-7+_Pi`!N_F+(|-r99E3QoxZhGE+2>ktjIByD_JgldlqQME^ttgJ;%Qh8KrMGES@UU+5YT*dRCj*zHZIY~DxM@y* zzyO<4PWYI}Ns5@VDOHl`lc3`+SXXS7mDsc<`mJ%>Jawt3FEVEbbg<7GSu^FA6yo=s z)*-yb;vIPHy~BQ`?7}G1kulZ)4Ln^0bvPMM8L*A%UmAnbxby(p4%2@a3Sm4zP`gpB z-{9{SAoJ)hP0c_syeyIZ(gzxo4gFK6Qn^2Z^%m%m09ErIU_gP6tz zWx;Jpa-Uooy<#N<0P0kK0Vv)W5SqRg0}VZ`mSDh1`m1^dquvhgfxg{DiU1q-@_mGY zPrsgSi?ANJ#r}mPnRi^mgk3X8JQ}k<{l@xW*vZ*B|7*v`n@dPT-oX<@6P*u91+63# zuXd6?8TDuuD8&Xy91#O>gB% zO!VLNi^MQ#A%#kNxn=Ew%wqfC@6No(zSnj&hG)1)x*@k&;)$;qtS z+nVg^H+cmN`uyFY?x=$;%w!!+@BGNfjdF^ViVLRN zuNtlrJ)ra$uT<>bh;m&;kxMPO7zf^>lakk_B zx003?Mv=fkuZtC8Ks)7br3*SXLTrj!FC{!hQf^;xiJ3n3=jNq-KZPYt8$K`Pqj2hl z#*n%4`$6ajaMU|J>P-d8=CUGSjMV;neE9gl5bXTG$)*cN`_xmWZdPf=l=C5*Lt0V1 zY}8EMoe5P(Gzr$fK5+eM%UCSRB3BNt9KlsB6}s6b@bHvjg{mqjfBAHqg*&&!pMb)m zNHdpI$+K(`X6z3tJGwn{J{fa7G(#RTxpKnJm(%C2iJ5L+8pZhlLu)B4COB}Mu8vy+ zh+?sn{o?I)WX&+I=HSv`WC5Fx<95neFH3DW_H-(7Y z!xTrGOmz3C;8lD~r@wIk{lswxwDU>GboVPoeEk~3H`-wqlzU$`@7njC&v>nEuja0S z>FJUN{Z%&kQI$f+#(a)thb}9u=2HW%>xQ0?Y_v?F^dxk zQ&Mm;qS+CHec9%nfv5z7qQ2vYo2(eA4%qhm1RFXjlA4I1mZ?gi{Gb%4_#!-Jc%{Gg^IgFVKdju*2<%dGfBxAU*~-GmHtz&n43 zTkZF@KA^6%v4b@@HS~4mR4?NgamCQO&e#}AwOSzZe-TZwm3{wLqNxEYA3>2!zA*2Y zRo<#JMMJEyetD6$F+4L z>DcCq>hM)a9X`xV$JZX3!2{U8vwnttl2qtPsY7v%xa1Q3yw(Pn9II?Oh&$O^#!_7G aU0>tMv83Zc;MQw6*oTgWp*lj`, where `A`, `B`, and `C` are integers, and `D` is an optional string. - `A` - **version number**: If `A` is 0, this NuGet is considered a **work in progress (WIP)**, and could be deleted at any time. If `A` is greater than 0, then we plan to support the corresponding NuGet indefinitely. @@ -16,7 +16,7 @@ approximately 25) are versioned with the following format: `A.B.C<-D>`, where `A ML. NET has four kinds of releases: daily builds, previews, periodic general availability (GA), and fix. We detail each kind of release below. -1. **Daily builds:** these can be downloaded from [this NuGet feed](https://dev.azure.com/dnceng/public/_packaging?_a=feed&feed=MachineLearning), and are built automatically each time a commit is made to the `master` branch. +1. **Daily builds:** these can be downloaded from [this NuGet feed](https://dev.azure.com/dnceng/public/_packaging?_a=feed&feed=MachineLearning), and are built automatically each time a commit is made to the `main` branch. 1. **Preview:** These releases are built from the corresponding `A.B-preview-X` GitHub branch, and are expected to meet a higher quality bar than the daily builds. These can also be downloaded from [this NuGet feed](https://dev.azure.com/dnceng/public/_packaging?_a=feed&feed=MachineLearning), or within Visual Studio, as detailed below. When we introduce new API's in a preview release, we avoid doing a GA release at the same time (unless there are patches required for the last GA release). If there are no new API's, then we go straight to a GA release and skip the preview release. 1. **GA:** These releases are built from the corresponding `A.B` GitHub branch. They are rigorously tested, stable, and meant for general use. They are also the default choice when installing ML. NET via the `Install-Package Microsoft.ML` command, and are published to [nuget.org](https://www.nuget.org/packages/Microsoft.ML/) 1. **Fix:** These releases include patches for bugs in either the preview or GA releases. diff --git a/docs/release-notes/0.10/release-0.10.md b/docs/release-notes/0.10/release-0.10.md index ab363e7f9b..922673600d 100644 --- a/docs/release-notes/0.10/release-0.10.md +++ b/docs/release-notes/0.10/release-0.10.md @@ -4,7 +4,7 @@ We have also instrumented [code coverage](https://codecov.io/gh/dotnet/machinelearning) tools as part of our CI systems and will continue to push for stability and quality in the code. -One of the milestones that we have achieved in this release is moving `IDataView` into a new and separate assembly under `Microsoft.Data.DataView` namespace. For detailed documentation on `IDataView` please take a look at [IDataView design principles](https://github.com/dotnet/machinelearning/blob/master/docs/code/IDataViewDesignPrinciples.md). +One of the milestones that we have achieved in this release is moving `IDataView` into a new and separate assembly under `Microsoft.Data.DataView` namespace. For detailed documentation on `IDataView` please take a look at [IDataView design principles](https://github.com/dotnet/machinelearning/blob/main/docs/code/IDataViewDesignPrinciples.md). ### Installation @@ -27,7 +27,7 @@ Install-Package Microsoft.ML Below are a few of the highlights from this release. There are many other improvements in the API. -* DataView moved into a separate assembly and NuGet package +* DataView moved into a separate assembly and NuGet package ([#2220](https://github.com/dotnet/machinelearning/pull/2220)) * Improvements in the API for prediction engine @@ -38,20 +38,20 @@ Below are a few of the highlights from this release. There are many other improv - Better naming for NuGet packages based on the scenario (Recommendations) instead of the trainer's name * Support multiple 'feature columns' in FFM (Field-aware Factorization Machines) -([#2205](https://github.com/dotnet/machinelearning/pull/2205)) +([#2205](https://github.com/dotnet/machinelearning/pull/2205)) - Allows multiple feature column names in advanced trainer arguments so certain FFM trainers can support multiple multiple feature columns as explained in [#2179](https://github.com/dotnet/machinelearning/issues/2179) issue * Added support for loading map from file through dataview by using ValueMapperTransformer -([#2232](https://github.com/dotnet/machinelearning/pull/2232)) +([#2232](https://github.com/dotnet/machinelearning/pull/2232)) - This provides support for additional scenarios like a Text/NLP scenario ([#747](https://github.com/dotnet/machinelearning/issues/747)) in TensorFlowTransform where model's expected input is vector of integers * Added support for running benchmarks on .NET Framework in addition to .NET Core. -([#2157](https://github.com/dotnet/machinelearning/pull/2157)) - - Benchmarks can be based on [Microsoft.ML.Benchmarks](https://github.com/dotnet/machinelearning/tree/master/test/Microsoft.ML.Benchmarks) +([#2157](https://github.com/dotnet/machinelearning/pull/2157)) + - Benchmarks can be based on [Microsoft.ML.Benchmarks](https://github.com/dotnet/machinelearning/tree/main/test/Microsoft.ML.Benchmarks) - This fixes issues like [#1945](https://github.com/dotnet/machinelearning/issues/1945) -* Added Tensorflow unfrozen models support in GetModelSchema -([#2112](https://github.com/dotnet/machinelearning/pull/2112)) +* Added Tensorflow unfrozen models support in GetModelSchema +([#2112](https://github.com/dotnet/machinelearning/pull/2112)) - Fixes issue [#2102](https://github.com/dotnet/machinelearning/issues/2102) * Providing API for properly inspecting trees ([#2243](https://github.com/dotnet/machinelearning/pull/2243)) diff --git a/docs/release-notes/1.1.0/release-1.1.0.md b/docs/release-notes/1.1.0/release-1.1.0.md index 17931dd10b..44baea3935 100644 --- a/docs/release-notes/1.1.0/release-1.1.0.md +++ b/docs/release-notes/1.1.0/release-1.1.0.md @@ -1,6 +1,6 @@ -# [ML.NET](http://dot.net/ml) 1.1.0 +# [ML.NET](http://dot.net/ml) 1.1.0 ## **New Features** -- **Image type support in IDataView** +- **Image type support in IDataView** [PR#3263](https://github.com/dotnet/machinelearning/pull/3263) added support for in-memory image as a type in IDataView. Previously it was not possible to use an image directly in IDataView, and the user had to specify the file path @@ -14,16 +14,16 @@ [3460](https://github.com/dotnet/machinelearning/issues/3460), [2121](https://github.com/dotnet/machinelearning/issues/2121), [2495](https://github.com/dotnet/machinelearning/issues/2495), - [3784](https://github.com/dotnet/machinelearning/issues/3784). + [3784](https://github.com/dotnet/machinelearning/issues/3784). - Image type support in IDataView was a much requested feature by the users. + Image type support in IDataView was a much requested feature by the users. [Sample to convert gray scale image in-Memory](https://github.com/dotnet/machinelearning/blob/02a857a7646188fec2d1cba5e187a6c9d0838e23/docs/samples/Microsoft.ML.Samples/Dynamic/Transforms/ImageAnalytics/ConvertToGrayScaleInMemory.cs) | [Sample for custom mapping with in-memory using custom type](https://github.com/dotnet/machinelearning/blob/02a857a7646188fec2d1cba5e187a6c9d0838e23/docs/samples/Microsoft.ML.Samples/Dynamic/Transforms/CustomMappingWithInMemoryCustomType.cs) -- **Super-Resolution based Anomaly Detector (preview, please provide feedback)** +- **Super-Resolution based Anomaly Detector (preview, please provide feedback)** [PR#3693](https://github.com/dotnet/machinelearning/pull/3693) adds a new anomaly detection algorithm to the [Microsoft.ML.TimeSeries](https://www.nuget.org/packages/Microsoft.ML.TimeSeries/) @@ -44,11 +44,11 @@ SR | 0.601 | 0.670 | 0.634 | 2625 | 4370 | 3915 | WindowSize=64, BackAddWindowSize=5, LookaheadWindowSize=5, AveragingWindowSize=3, JudgementWindowSize=64, Threshold=0.45 [Sample for anomaly detection by - SRCNN](https://github.com/dotnet/machinelearning/blob/master/docs/samples/Microsoft.ML.Samples/Dynamic/Transforms/TimeSeries/DetectAnomalyBySrCnn.cs) + SRCNN](https://github.com/dotnet/machinelearning/blob/main/docs/samples/Microsoft.ML.Samples/Dynamic/Transforms/TimeSeries/DetectAnomalyBySrCnn.cs) | [Sample for anomaly detection by SRCNN using batch - prediction](https://github.com/dotnet/machinelearning/blob/master/docs/samples/Microsoft.ML.Samples/Dynamic/Transforms/TimeSeries/DetectAnomalyBySrCnnBatchPrediction.cs) + prediction](https://github.com/dotnet/machinelearning/blob/main/docs/samples/Microsoft.ML.Samples/Dynamic/Transforms/TimeSeries/DetectAnomalyBySrCnnBatchPrediction.cs) -- **Time Series Forecasting (preview, please provide feedback)** +- **Time Series Forecasting (preview, please provide feedback)** [PR#1900](https://github.com/dotnet/machinelearning/pull/1900) introduces a framework for time series forecasting models and exposes an API for Singular Spectrum Analysis(SSA) based forecasting model in the @@ -61,18 +61,18 @@ requested feature by the github community since September 2018. With this change [Microsoft.ML.TimeSeries](https://www.nuget.org/packages/Microsoft.ML.TimeSeries/) - nuget is feature complete for RTM. + nuget is feature complete for RTM. [Sample for - forecasting](https://github.com/dotnet/machinelearning/blob/master/docs/samples/Microsoft.ML.Samples/Dynamic/Transforms/TimeSeries/Forecasting.cs) + forecasting](https://github.com/dotnet/machinelearning/blob/main/docs/samples/Microsoft.ML.Samples/Dynamic/Transforms/TimeSeries/Forecasting.cs) | [Sample for forecasting using confidence - intervals](https://github.com/dotnet/machinelearning/blob/master/docs/samples/Microsoft.ML.Samples/Dynamic/Transforms/TimeSeries/ForecastingWithConfidenceInterval.cs) + intervals](https://github.com/dotnet/machinelearning/blob/main/docs/samples/Microsoft.ML.Samples/Dynamic/Transforms/TimeSeries/ForecastingWithConfidenceInterval.cs) ## **Bug Fixes** ### Serious - **Math Kernel Library fails to load with latest libomp:** Fixed by [PR#3721](https://github.com/dotnet/machinelearning/pull/3721) this bug made - it impossible for anyone to check code into master branch because it was + it impossible for anyone to check code into main branch because it was causing build failures. - **Transform Wrapper fails at deserialization:** Fixed by @@ -80,13 +80,13 @@ affected first party(1P) customer. A model trained using [NimbusML](https://github.com/microsoft/NimbusML)(Python bindings for [ML.NET](http://dot.net/ml)) and then loaded for scoring/inferencing using - ML.NET will hit this bug. + ML.NET will hit this bug. - **Index out of bounds exception in KeyToVector transformer:** Fixed by [PR#3763](https://github.com/dotnet/machinelearning/pull/3763) this bug closes following github issues: [3757](https://github.com/dotnet/machinelearning/issues/3757),[1751](https://github.com/dotnet/machinelearning/issues/1751),[2678](https://github.com/dotnet/machinelearning/issues/2678). - It affected first party customer and also github users. + It affected first party customer and also github users. ### Other - Download images only when not present on disk and print warning messages when @@ -125,7 +125,7 @@ None - Sample for WithOnFitDelegate by [PR#3738](https://github.com/dotnet/machinelearning/pull/3738) - Sample for loading data using text loader using various techniques by - [PR#3793](https://github.com/dotnet/machinelearning/pull/3793) + [PR#3793](https://github.com/dotnet/machinelearning/pull/3793) ## **Remarks** - [Microsoft.ML.TensorFlow](https://www.nuget.org/packages/Microsoft.ML.TensorFlow/), diff --git a/docs/release-notes/1.2.0/release-1.2.0.md b/docs/release-notes/1.2.0/release-1.2.0.md index c6b703e434..8214ede8d8 100644 --- a/docs/release-notes/1.2.0/release-1.2.0.md +++ b/docs/release-notes/1.2.0/release-1.2.0.md @@ -1,6 +1,6 @@ # [ML.NET](http://dot.net/ml) 1.2.0 ## **General Availability** -- **Microsoft.ML.TimeSeries** +- **Microsoft.ML.TimeSeries** - Anomaly detection algorithms (Spike and Change Point): - Independent and identically distributed. - Singular spectrum analysis. @@ -10,17 +10,17 @@ - Prediction Engine for online learning - Enables updating time series model with new observations at scoring so that the user does not have to re-train the time series with old data each time. - [Samples](https://github.com/dotnet/machinelearning/tree/master/docs/samples/Microsoft.ML.Samples/Dynamic/Transforms/TimeSeries) + [Samples](https://github.com/dotnet/machinelearning/tree/main/docs/samples/Microsoft.ML.Samples/Dynamic/Transforms/TimeSeries) -- **Microsoft.ML.OnnxTransformer** +- **Microsoft.ML.OnnxTransformer** Enables scoring of ONNX models in the learning pipeline. Uses ONNX Runtime v0.4. - - [Sample](https://github.com/dotnet/machinelearning/blob/master/docs/samples/Microsoft.ML.Samples/Dynamic/Transforms/ApplyOnnxModel.cs) -- **Microsoft.ML.TensorFlow** - Enables scoring of TensorFlow models in the learning pipeline. Uses TensorFlow v1.13. Very useful for image and text classification. Users can featurize images or text using DNN models and feed the result into a classical machine learning model like a decision tree or logistic regression trainer. + [Sample](https://github.com/dotnet/machinelearning/blob/main/docs/samples/Microsoft.ML.Samples/Dynamic/Transforms/ApplyOnnxModel.cs) - [Samples](https://github.com/dotnet/machinelearning/tree/master/docs/samples/Microsoft.ML.Samples/Dynamic/TensorFlow) +- **Microsoft.ML.TensorFlow** + Enables scoring of TensorFlow models in the learning pipeline. Uses TensorFlow v1.13. Very useful for image and text classification. Users can featurize images or text using DNN models and feed the result into a classical machine learning model like a decision tree or logistic regression trainer. + + [Samples](https://github.com/dotnet/machinelearning/tree/main/docs/samples/Microsoft.ML.Samples/Dynamic/TensorFlow) ## **New Features** - **Tree-based featurization** ([#3812](https://github.com/dotnet/machinelearning/pull/3812)) @@ -29,13 +29,13 @@ - The leaves it falls into. It's a binary vector with ones happens at the indexes of reached leaves, - The paths that the input vector passes before hitting the leaves, and - The reached leaves values. - + Here are two references. - [p. 9](https://www.csie.ntu.edu.tw/~r01922136/kaggle-2014-criteo.pdf) (a Kaggle solution adopted by FB below). - [Section 3](http://www.quinonero.net/Publications/predicting-clicks-facebook.pdf). (Facebook) - [Section of Entity-level personalization with GLMix](https://engineering.linkedin.com/blog/2019/04/ai-behind-linkedin-recruiter-search-and-recommendation-systems). (LinkedIn) - [Samples](https://github.com/dotnet/machinelearning/tree/master/docs/samples/Microsoft.ML.Samples/Dynamic/Transforms/TreeFeaturization) + [Samples](https://github.com/dotnet/machinelearning/tree/main/docs/samples/Microsoft.ML.Samples/Dynamic/Transforms/TreeFeaturization) - **Microsoft.Extensions.ML integration package.** ([#3827](https://github.com/dotnet/machinelearning/pull/3827)) @@ -51,7 +51,7 @@ ### Serious - **Time series Sequential Transform needs to have a binding mechanism:** This bug made it impossible to use time series in NimbusML. ([#3875](https://github.com/dotnet/machinelearning/pull/3875)) -- **Build errors resulting from upgrading to VS2019 compilers:** The default CMAKE_C_FLAG for debug configuration sets /ZI to generate a PDB capable of edit and continue. In the new compilers, this is incompatible with /guard:cf which we set for security reasons. ([#3894](https://github.com/dotnet/machinelearning/pull/3894)) +- **Build errors resulting from upgrading to VS2019 compilers:** The default CMAKE_C_FLAG for debug configuration sets /ZI to generate a PDB capable of edit and continue. In the new compilers, this is incompatible with /guard:cf which we set for security reasons. ([#3894](https://github.com/dotnet/machinelearning/pull/3894)) - **LightGBM Evaluation metric parameters:** In LightGbm EvaluateMetricType where if a user specified EvaluateMetricType.Default, the metric would not get added to the options Dictionary, and LightGbmWrappedTraining would throw because of that. ([#3815](https://github.com/dotnet/machinelearning/pull/3815)) @@ -66,10 +66,10 @@ None - Fixes the Hardcoded Sigmoid value from -0.5 to the value specified during training. ([#3850](https://github.com/dotnet/machinelearning/pull/3850)) - Fix TextLoader constructor and add exception message. ([#3788](https://github.com/dotnet/machinelearning/pull/3788)) - Introduce the `FixZero` argument to the LogMeanVariance normalizer. ([#3916](https://github.com/dotnet/machinelearning/pull/3916)) -- Ensembles trainer now work with ITrainerEstimators instead of ITrainers. ([#3796](https://github.com/dotnet/machinelearning/pull/3796)) +- Ensembles trainer now work with ITrainerEstimators instead of ITrainers. ([#3796](https://github.com/dotnet/machinelearning/pull/3796)) - LightGBM Unbalanced Data Argument. ([#3925](https://github.com/dotnet/machinelearning/pull/3925)) - Tree based trainers implement ICanGetSummaryAsIDataView. ([#3892](https://github.com/dotnet/machinelearning/pull/3892)) - + - **CLI and AutoML API** - Internationalization fixes to generate proper [ML.NET](dot.net/ml) C# code. ([#3725](https://github.com/dotnet/machinelearning/pull/3725)) - Automatic Cross Validation for small datasets, and CV stability fixes. ([#3794](https://github.com/dotnet/machinelearning/pull/3794)) diff --git a/docs/release-notes/1.3.1/release-1.3.1.md b/docs/release-notes/1.3.1/release-1.3.1.md index 30c2e05525..1ae4b64ef6 100644 --- a/docs/release-notes/1.3.1/release-1.3.1.md +++ b/docs/release-notes/1.3.1/release-1.3.1.md @@ -1,7 +1,7 @@ # [ML.NET](http://dot.net/ml) 1.3.1 ## **New Features** -- **Deep Neural Networks Training (PREVIEW)** ([#4057](https://github.com/dotnet/machinelearning/pull/4057)) +- **Deep Neural Networks Training (PREVIEW)** ([#4057](https://github.com/dotnet/machinelearning/pull/4057)) Introduces in-preview 0.15.1 `Microsoft.ML.DNN` package that enables full DNN model retraining and transfer learning in .NET using C# bindings for tensorflow provided by Tensorflow .NET. The goal of this package is to allow high level DNN training and scoring tasks such as image classification, text classification, object detection, etc using simple yet powerful APIs that are framework agnostic but currently they only uses Tensorflow as the backend. The below APIs are in early preview and we hope to get customer feedback that we can incorporate in the next iteration. ![DNN stack](dnn_stack.jpg) @@ -43,21 +43,21 @@ [Design specification](https://github.com/dotnet/machinelearning/blob/cd591dd492833964b6829e8bb2411fb81665ac6d/docs/specs/DNN/dnn_api_spec.md) - [Image classification (Inception V3) sample](https://github.com/dotnet/machinelearning/blob/master/docs/samples/Microsoft.ML.Samples/Dynamic/ImageClassification/InceptionV3TransferLearning.cs) + [Image classification (Inception V3) sample](https://github.com/dotnet/machinelearning/blob/main/docs/samples/Microsoft.ML.Samples/Dynamic/ImageClassification/InceptionV3TransferLearning.cs) - [Image classification (Resnet V2 101) sample](https://github.com/dotnet/machinelearning/blob/master/docs/samples/Microsoft.ML.Samples/Dynamic/ImageClassification/ResnetV2101TransferLearning.cs) + [Image classification (Resnet V2 101) sample](https://github.com/dotnet/machinelearning/blob/main/docs/samples/Microsoft.ML.Samples/Dynamic/ImageClassification/ResnetV2101TransferLearning.cs) -- **Database Loader (PREVIEW)** ([#4035](https://github.com/dotnet/machinelearning/pull/4035)) - Introduces Database loader that enables training on databases. This loader supports any relational database supported by System.Data in .NET Framework or .NET Core, meaning that you can use many RDBMS such as SQL Server, Azure SQL Database, Oracle, PostgreSQL, MySQL, etc. This feature is in early preview and can be accessed via `Microsoft.ML.Experimental` nuget. +- **Database Loader (PREVIEW)** ([#4035](https://github.com/dotnet/machinelearning/pull/4035)) + Introduces Database loader that enables training on databases. This loader supports any relational database supported by System.Data in .NET Framework or .NET Core, meaning that you can use many RDBMS such as SQL Server, Azure SQL Database, Oracle, PostgreSQL, MySQL, etc. This feature is in early preview and can be accessed via `Microsoft.ML.Experimental` nuget. - [Design specification](https://github.com/dotnet/machinelearning/pull/3857) - - [Sample](https://github.com/dotnet/machinelearning/blob/master/test/Microsoft.ML.Tests/DatabaseLoaderTests.cs) + [Design specification](https://github.com/dotnet/machinelearning/pull/3857) + + [Sample](https://github.com/dotnet/machinelearning/blob/main/test/Microsoft.ML.Tests/DatabaseLoaderTests.cs) ```cs public static DatabaseLoader CreateDatabaseLoader(this DataOperationsCatalog catalog, params DatabaseLoader.Column[] columns) - ``` + ``` ## **Bug Fixes** ### Serious @@ -73,7 +73,7 @@ - **Stop LightGbm Warning for Default Metric Input:** Fixes warning, LightGBM `Warning Unknown parameter metric=` is produced when the default metric is used. ([#3965](https://github.com/dotnet/machinelearning/pull/40079)) ## **Samples** -- [**Fraud Detection using the anomaly detection PCA trainer**](https://github.com/dotnet/machinelearning-samples/tree/master/samples/csharp/getting-started/AnomalyDetection_CreditCardFraudDetection) +- [**Fraud Detection using the anomaly detection PCA trainer**](https://github.com/dotnet/machinelearning-samples/tree/main/samples/csharp/getting-started/AnomalyDetection_CreditCardFraudDetection) ## **Breaking Changes** None @@ -82,7 +82,7 @@ None - Farewell to the Static API ([4009](https://github.com/dotnet/machinelearning/pull/4009)) - AVX and FMA intrinsics in Factorization Machine ([3940](https://github.com/dotnet/machinelearning/pull/3940)) - + ## **CLI and AutoML API** - Bug fixes. diff --git a/docs/release-notes/1.4.0-preview/release-1.4.0-preview.md b/docs/release-notes/1.4.0-preview/release-1.4.0-preview.md index 003fbcde6c..d51a683409 100644 --- a/docs/release-notes/1.4.0-preview/release-1.4.0-preview.md +++ b/docs/release-notes/1.4.0-preview/release-1.4.0-preview.md @@ -1,7 +1,7 @@ # [ML.NET](http://dot.net/ml) 1.4.0-preview ## **New Features** -- **Deep Neural Networks Training (0.16.0-preview)** ([#4151](https://github.com/dotnet/machinelearning/pull/4151)) +- **Deep Neural Networks Training (0.16.0-preview)** ([#4151](https://github.com/dotnet/machinelearning/pull/4151)) Improves the in-preview `ImageClassification` API further: - Increases DNN training speed by ~10x compared to the same API in 0.15.1 release. @@ -39,18 +39,18 @@ [Design specification](https://github.com/dotnet/machinelearning/blob/cd591dd492833964b6829e8bb2411fb81665ac6d/docs/specs/DNN/dnn_api_spec.md) - [Sample](https://github.com/dotnet/machinelearning/blob/master/docs/samples/Microsoft.ML.Samples/Dynamic/ImageClassification/ResnetV2101TransferLearningTrainTestSplit.cs) + [Sample](https://github.com/dotnet/machinelearning/blob/main/docs/samples/Microsoft.ML.Samples/Dynamic/ImageClassification/ResnetV2101TransferLearningTrainTestSplit.cs) -- **Database Loader (0.16.0-preview)** ([#4070](https://github.com/dotnet/machinelearning/pull/4070),[#4091](https://github.com/dotnet/machinelearning/pull/4091),[#4138](https://github.com/dotnet/machinelearning/pull/4138)) +- **Database Loader (0.16.0-preview)** ([#4070](https://github.com/dotnet/machinelearning/pull/4070),[#4091](https://github.com/dotnet/machinelearning/pull/4091),[#4138](https://github.com/dotnet/machinelearning/pull/4138)) Additional DatabaseLoader support: - Support DBNull. - Add `CreateDatabaseLoader` to map columns from a .NET Type. - Read multiple columns into a single vector - [Design specification](https://github.com/dotnet/machinelearning/pull/3857) - - [Sample](https://github.com/dotnet/machinelearning-samples/tree/master/samples/csharp/getting-started/DatabaseLoader) + [Design specification](https://github.com/dotnet/machinelearning/pull/3857) + + [Sample](https://github.com/dotnet/machinelearning-samples/tree/main/samples/csharp/getting-started/DatabaseLoader) ```cs string connectionString = "YOUR_RELATIONAL_DATABASE_CONNECTION_STRING"; @@ -58,10 +58,10 @@ string commandText = "SELECT * from URLClicks"; DatabaseLoader loader = mlContext.Data.CreateDatabaseLoader(); - - DatabaseSource dbSource = new DatabaseSource(SqlClientFactory.Instance, - connectionString, - commandText); + + DatabaseSource dbSource = new DatabaseSource(SqlClientFactory.Instance, + connectionString, + commandText); IDataView dataView = loader.Load(dbSource); ``` @@ -83,7 +83,7 @@ None ## **Enhancements** None. - + ## **CLI and AutoML API** - AutoML codebase has moved from feature branch to master branch ([#3882](https://github.com/dotnet/machinelearning/pull/3882)). diff --git a/docs/release-notes/1.4.0-preview2/release-1.4.0-preview2.md b/docs/release-notes/1.4.0-preview2/release-1.4.0-preview2.md index 584e27b78d..cd6e6eb697 100644 --- a/docs/release-notes/1.4.0-preview2/release-1.4.0-preview2.md +++ b/docs/release-notes/1.4.0-preview2/release-1.4.0-preview2.md @@ -10,9 +10,9 @@ - GPU support on Windows and Linux ([#4270](https://github.com/dotnet/machinelearning/pull/4270), [#4277](https://github.com/dotnet/machinelearning/pull/4277)) - Upgraded [TensorFlow .NET](https://github.com/SciSharp/TensorFlow.NET) version to 0.11.3 ([#4205](https://github.com/dotnet/machinelearning/pull/4205)) - [In-memory image inferencing sample](https://github.com/dotnet/machinelearning/blob/master/docs/samples/Microsoft.ML.Samples/Dynamic/ImageClassification/ResnetV2101TransferLearningTrainTestSplit.cs) - [Early stopping sample](https://github.com/dotnet/machinelearning/blob/master/docs/samples/Microsoft.ML.Samples/Dynamic/ImageClassification/ResnetV2101TransferLearningEarlyStopping.cs) - [GPU samples](https://github.com/dotnet/machinelearning/tree/master/docs/samples/Microsoft.ML.Samples.GPU) + [In-memory image inferencing sample](https://github.com/dotnet/machinelearning/blob/main/docs/samples/Microsoft.ML.Samples/Dynamic/ImageClassification/ResnetV2101TransferLearningTrainTestSplit.cs) + [Early stopping sample](https://github.com/dotnet/machinelearning/blob/main/docs/samples/Microsoft.ML.Samples/Dynamic/ImageClassification/ResnetV2101TransferLearningEarlyStopping.cs) + [GPU samples](https://github.com/dotnet/machinelearning/tree/main/docs/samples/Microsoft.ML.Samples.GPU) - **New ONNX Exporters (1.4.0-preview2)** - LpNormNormalizing transformer ([#4161](https://github.com/dotnet/machinelearning/pull/4161)) @@ -39,13 +39,13 @@ None. ## **Enhancements** - Improve exception message in LightGBM ([#4214](https://github.com/dotnet/machinelearning/pull/4214)) - FeaturizeText should allow only outputColumnName to be defined ([#4211](https://github.com/dotnet/machinelearning/pull/4211)) -- Fix NgramExtractingTransformer GetSlotNames to not allocate a new delegate on every invoke ([#4247](https://github.com/dotnet/machinelearning/pull/4247)) +- Fix NgramExtractingTransformer GetSlotNames to not allocate a new delegate on every invoke ([#4247](https://github.com/dotnet/machinelearning/pull/4247)) - Resurrect broken code coverage build and re-enable code coverage for pull request ([#4261](https://github.com/dotnet/machinelearning/pull/4261)) - NimbusML entrypoint for permutation feature importance ([#4232](https://github.com/dotnet/machinelearning/pull/4232)) - Reuse memory when copying outputs from TensorFlow graph ([#4260](https://github.com/dotnet/machinelearning/pull/4260)) - DateTime to DateTime standard conversion ([#4273](https://github.com/dotnet/machinelearning/pull/4273)) - CodeCov version upgraded to 1.7.2 ([#4291](https://github.com/dotnet/machinelearning/pull/4291)) - + ## **CLI and AutoML API** None. diff --git a/docs/release-notes/1.4.0/release-1.4.0.md b/docs/release-notes/1.4.0/release-1.4.0.md index 2b343cc958..4210d9b9f5 100644 --- a/docs/release-notes/1.4.0/release-1.4.0.md +++ b/docs/release-notes/1.4.0/release-1.4.0.md @@ -1,10 +1,10 @@ # [ML.NET](http://dot.net/ml) 1.4.0 ## **New Features** -- **General Availability of [Image Classification API](https://docs.microsoft.com/en-us/dotnet/api/microsoft.ml.visioncatalog.imageclassification?view=ml-dotnet#Microsoft_ML_VisionCatalog_ImageClassification_Microsoft_ML_MulticlassClassificationCatalog_MulticlassClassificationTrainers_System_String_System_String_System_String_System_String_Microsoft_ML_IDataView_)** +- **General Availability of [Image Classification API](https://docs.microsoft.com/en-us/dotnet/api/microsoft.ml.visioncatalog.imageclassification?view=ml-dotnet#Microsoft_ML_VisionCatalog_ImageClassification_Microsoft_ML_MulticlassClassificationCatalog_MulticlassClassificationTrainers_System_String_System_String_System_String_System_String_Microsoft_ML_IDataView_)** Introduces [`Microsoft.ML.Vision`](https://docs.microsoft.com/en-us/dotnet/api/microsoft.ml.vision?view=ml-dotnet) package that enables image classification by leveraging an existing pre-trained deep neural network model. Here the API trains the last classification layer using TensorFlow by using its C# bindings from TensorFlow .NET. This is a high level API that is simple yet powerful. Below are some of the key features: - - `GPU training`: Supported on Windows and Linux, more information [here](https://github.com/dotnet/machinelearning/blob/master/docs/api-reference/tensorflow-usage.md). - - `Early stopping`: Saves time by stopping training automatically when model has been stabelized. + - `GPU training`: Supported on Windows and Linux, more information [here](https://github.com/dotnet/machinelearning/blob/main/docs/api-reference/tensorflow-usage.md). + - `Early stopping`: Saves time by stopping training automatically when model has been stabelized. - `Learning rate scheduler`: Learning rate is an integral and potentially difficult part of deep learning. By providing learning rate schedulers, we give users a way to optimize the learning rate with high initial values which can decay over time. High initial learning rate helps to introduce randomness into the system, allowing the Loss function to better find the global minima. While the decayed learning rate helps to stabilize the loss over time. We have implemented [Exponential Decay Learning rate scheduler](https://www.tensorflow.org/api_docs/python/tf/compat/v1/train/exponential_decay) and [Polynomial Decay Learning rate scheduler](https://www.tensorflow.org/api_docs/python/tf/compat/v1/train/polynomial_decay). - `Pre-trained DNN Architectures`: The supported DNN architectures used internally for `transfer learning` are below: - Inception V3. @@ -24,17 +24,17 @@ #### Samples - [Defaults](https://github.com/dotnet/machinelearning/blob/master/docs/samples/Microsoft.ML.Samples/Dynamic/Trainers/MulticlassClassification/ImageClassification/ImageClassificationDefault.cs) + [Defaults](https://github.com/dotnet/machinelearning/blob/main/docs/samples/Microsoft.ML.Samples/Dynamic/Trainers/MulticlassClassification/ImageClassification/ImageClassificationDefault.cs) - [Learning rate scheduling](https://github.com/dotnet/machinelearning/blob/master/docs/samples/Microsoft.ML.Samples/Dynamic/Trainers/MulticlassClassification/ImageClassification/LearningRateSchedulingCifarResnetTransferLearning.cs) + [Learning rate scheduling](https://github.com/dotnet/machinelearning/blob/main/docs/samples/Microsoft.ML.Samples/Dynamic/Trainers/MulticlassClassification/ImageClassification/LearningRateSchedulingCifarResnetTransferLearning.cs) - [Early stopping](https://github.com/dotnet/machinelearning/blob/master/docs/samples/Microsoft.ML.Samples/Dynamic/Trainers/MulticlassClassification/ImageClassification/ResnetV2101TransferLearningEarlyStopping.cs) + [Early stopping](https://github.com/dotnet/machinelearning/blob/main/docs/samples/Microsoft.ML.Samples/Dynamic/Trainers/MulticlassClassification/ImageClassification/ResnetV2101TransferLearningEarlyStopping.cs) - [ResNet V2 101 train-test split](https://github.com/dotnet/machinelearning/blob/master/docs/samples/Microsoft.ML.Samples/Dynamic/Trainers/MulticlassClassification/ImageClassification/ResnetV2101TransferLearningTrainTestSplit.cs) + [ResNet V2 101 train-test split](https://github.com/dotnet/machinelearning/blob/main/docs/samples/Microsoft.ML.Samples/Dynamic/Trainers/MulticlassClassification/ImageClassification/ResnetV2101TransferLearningTrainTestSplit.cs) - [End-to-End](https://github.com/dotnet/machinelearning-samples/tree/master/samples/csharp/getting-started/DeepLearning_ImageClassification_Training) + [End-to-End](https://github.com/dotnet/machinelearning-samples/tree/main/samples/csharp/getting-started/DeepLearning_ImageClassification_Training) -- **General Availability of [Database Loader](https://docs.microsoft.com/en-us/dotnet/api/microsoft.ml.databaseloadercatalog?view=ml-dotnet)** +- **General Availability of [Database Loader](https://docs.microsoft.com/en-us/dotnet/api/microsoft.ml.databaseloadercatalog?view=ml-dotnet)** The database loader enables to load data from databases into the `IDataView` and therefore enables model training directly against relational databases. This loader supports any relational database provider supported by System.Data in .NET Core or .NET Framework, meaning that you can use any RDBMS such as SQL Server, Azure SQL Database, Oracle, SQLite, PostgreSQL, MySQL, Progress, etc. It is important to highlight that in the same way as when training from files, when training with a database ML .NET also supports data streaming, meaning that the whole database doesn’t need to fit into memory, it’ll be reading from the database as it needs so you can handle very large databases (i.e. 50GB, 100GB or larger). @@ -61,20 +61,20 @@ public string FeedbackText; public string Label; } - ``` + ``` + + [Design specification](https://github.com/dotnet/machinelearning/pull/3857) - [Design specification](https://github.com/dotnet/machinelearning/pull/3857) - - [Sample](https://github.com/dotnet/machinelearning-samples/tree/master/samples/csharp/getting-started/DatabaseLoader) + [Sample](https://github.com/dotnet/machinelearning-samples/tree/main/samples/csharp/getting-started/DatabaseLoader) [How to doc](https://docs.microsoft.com/en-us/dotnet/machine-learning/how-to-guides/load-data-ml-net#load-data-from-a-relational-database) -- **General Availability of PredictionEnginePool for scalable deployment** +- **General Availability of PredictionEnginePool for scalable deployment** When deploying an ML model into multi-threaded and scalable .NET Core web applications and services (such as ASP .NET Core web apps, WebAPIs or an Azure Function) it is recommended to use the PredictionEnginePool instead of directly creating the PredictionEngine object on every request due to performance and scalability reasons. For further background information on why the PredictionEnginePool is recommended, read [this](https://devblogs.microsoft.com/cesardelatorre/how-to-optimize-and-run-ml-net-models-on-scalable-asp-net-core-webapis-or-web-apps/) blog post. - - [Sample](https://github.com/dotnet/machinelearning-samples/tree/master/samples/csharp/end-to-end-apps/ScalableMLModelOnWebAPI-IntegrationPkg) -- **General Availability of Enhanced for .NET Core 3.0** + [Sample](https://github.com/dotnet/machinelearning-samples/tree/main/samples/csharp/end-to-end-apps/ScalableMLModelOnWebAPI-IntegrationPkg) + +- **General Availability of Enhanced for .NET Core 3.0** This means ML .NET can take advantage of the new features when running in a .NET Core 3.0 application. The first new feature we are using is the new hardware intrinsics feature, which allows .NET code to accelerate math operations by using processor specific instructions. ## **Bug Fixes** diff --git a/docs/release-notes/1.5.0-preview/release-1.5.0-preview.md b/docs/release-notes/1.5.0-preview/release-1.5.0-preview.md index d445544af4..55a928fefb 100644 --- a/docs/release-notes/1.5.0-preview/release-1.5.0-preview.md +++ b/docs/release-notes/1.5.0-preview/release-1.5.0-preview.md @@ -3,7 +3,7 @@ ## **New Features (IN-PREVIEW, please provide feedback)** - **Export-to-ONNX for below components:** - WordTokenizingTransformer ([#4451](https://github.com/dotnet/machinelearning/pull/4451)) - - NgramExtractingTransformer ([#4451](https://github.com/dotnet/machinelearning/pull/4451)) + - NgramExtractingTransformer ([#4451](https://github.com/dotnet/machinelearning/pull/4451)) - OptionalColumnTransform ([#4454](https://github.com/dotnet/machinelearning/pull/4454)) - KeyToValueMappingTransformer ([#4455](https://github.com/dotnet/machinelearning/pull/4455)) - LbfgsMaximumEntropyMulticlassTrainer ([4462](https://github.com/dotnet/machinelearning/pull/4462)) @@ -17,13 +17,13 @@ - **DateTime Transformer** ([#4521](https://github.com/dotnet/machinelearning/pull/4521)) - **Loader and Saver for [SVMLight file format](http://svmlight.joachims.org/)** ([#4190](https://github.com/dotnet/machinelearning/pull/4190)) - - [Sample](https://github.com/dotnet/machinelearning/blob/master/docs/samples/Microsoft.ML.Samples/Dynamic/DataOperations/LoadingSvmLight.cs) -- **Expression transformer** ([#4548](https://github.com/dotnet/machinelearning/pull/4548)) + + [Sample](https://github.com/dotnet/machinelearning/blob/main/docs/samples/Microsoft.ML.Samples/Dynamic/DataOperations/LoadingSvmLight.cs) +- **Expression transformer** ([#4548](https://github.com/dotnet/machinelearning/pull/4548)) The expression transformer takes the expression in the form of text using syntax of a simple expression language, and performs the operation defined in the expression on the input columns in each row of the data. The transformer supports having a vector input column, in which case it applies the expression to each slot of the vector independently. The expression language is extendable to user defined operations. - - [Sample](https://github.com/dotnet/machinelearning/blob/master/docs/samples/Microsoft.ML.Samples/Dynamic/Transforms/Expression.cs) - + + [Sample](https://github.com/dotnet/machinelearning/blob/main/docs/samples/Microsoft.ML.Samples/Dynamic/Transforms/Expression.cs) + ## **Bug Fixes** - Fix using permutation feature importance with Binary Prediction Transformer and CalibratedModelParametersBase loaded from disk. ([#4306](https://github.com/dotnet/machinelearning/pull/4306)) - Fixed model saving and loading of OneVersusAllTrainer to include SoftMax. ([#4472](https://github.com/dotnet/machinelearning/pull/4472)) @@ -55,7 +55,7 @@ - Create SafeBoosterHandle and SafeDataSetHandle. ([#4539](https://github.com/dotnet/machinelearning/pull/4539)) - Add IterationDataAttribute. ([#4561](https://github.com/dotnet/machinelearning/pull/4561)) - Add tests for ParameterSet equality. ([#4550](https://github.com/dotnet/machinelearning/pull/4550)) -- Add a test handler for AppDomain.UnhandledException. ([#4557](https://github.com/dotnet/machinelearning/commit/f1f8942a8272a9c87373d11bc89467461c8ecad1)) +- Add a test handler for AppDomain.UnhandledException. ([#4557](https://github.com/dotnet/machinelearning/commit/f1f8942a8272a9c87373d11bc89467461c8ecad1)) ## **Breaking Changes** None diff --git a/docs/release-notes/1.5.4/release-1.5.4.md b/docs/release-notes/1.5.4/release-1.5.4.md new file mode 100644 index 0000000000..d33df6b718 --- /dev/null +++ b/docs/release-notes/1.5.4/release-1.5.4.md @@ -0,0 +1,45 @@ +# [ML.NET](http://dot.net/ml) 1.5.4 + +## **New Features** +- **New API for exporting models to Onnx**. ([#5544](https://github.com/dotnet/machinelearning/pull/5544)). A new API has been added to Onnx converter to specify the output columns you care about. This will export a smaller and more performant model in many cases. + +## **Enhancements** +- Perf improvement for TopK Accuracy and return all topK in Classification Evaluator ([#5395](https://github.com/dotnet/machinelearning/pull/5395)) (**Thank you @jasallen**) +- Update OnnxRuntime to 1.6 ([#5529](https://github.com/dotnet/machinelearning/pull/5529)) +- Updated tensorflow.net to 0.20.0 ([#5404](https://github.com/dotnet/machinelearning/pull/5404)) +- Added in DcgTruncationLevel to AutoML api and increased default level to 10 ([#5433](https://github.com/dotnet/machinelearning/pull/5433)) + +## **Bug Fixes** +- **AutoML.NET specific fixes**. + - Fixed AutoFitMaxExperimentTimeTest ([#5506](https://github.com/dotnet/machinelearning/pull/5506)) + - Fixed code generator tests failure ([#5520](https://github.com/dotnet/machinelearning/pull/5520)) + - Use Timer and ctx.CancelExecution() to fix AutoML max-time experiment bug ([#5445](https://github.com/dotnet/machinelearning/pull/5445)) + - Handled exception during GetNextPipeline for AutoML ([#5455](https://github.com/dotnet/machinelearning/pull/5455)) + - Fixed internationalization bug([#5162](https://github.com/dotnet/machinelearning/pull/5163)) in AutoML parameter sweeping caused by culture dependent float parsing. ([#5163](https://github.com/dotnet/machinelearning/pull/5163)) + - Fixed MaxModels exit criteria for AutoML unit test ([#5471](https://github.com/dotnet/machinelearning/pull/5471)) + - Fixed AutoML CrossValSummaryRunner for TopKAccuracyForAllK ([#5548](https://github.com/dotnet/machinelearning/pull/5548)) +- Fixed bug in Tensorflow Transforer with handling primitive types ([#5547](https://github.com/dotnet/machinelearning/pull/5547)) +- Fixed MLNet.CLI build error ([#5546](https://github.com/dotnet/machinelearning/pull/5546)) +- Fixed memory leaks from OnnxTransformer ([#5518](https://github.com/dotnet/machinelearning/pull/5518)) +- Fixed memory leak in object pool ([#5521](https://github.com/dotnet/machinelearning/pull/5521)) +- Fixed Onnx Export for ProduceWordBags ([#5435](https://github.com/dotnet/machinelearning/pull/5435)) +- Upgraded boundary calculation and expected value calculation in SrCnnEntireAnomalyDetector ([#5436](https://github.com/dotnet/machinelearning/pull/5436)) +- Fixed SR anomaly score calculation at beginning ([#5502](https://github.com/dotnet/machinelearning/pull/5502)) +- Improved error message in ColumnConcatenatingEstimator ([#5444](https://github.com/dotnet/machinelearning/pull/5444)) +- Fixed issue 5020, allow ML.NET to load tf model with primitive input and output column ([#5468](https://github.com/dotnet/machinelearning/pull/5468)) +- Fixed issue 4322, enable lda summary output ([#5260](https://github.com/dotnet/machinelearning/pull/5260)) +- Fixed perf regression in ShuffleRows ([#5417](https://github.com/dotnet/machinelearning/pull/5417)) +- Change the _maxCalibrationExamples default on CalibratorUtils ([#5415](https://github.com/dotnet/machinelearning/pull/5415)) + + +## **Build / Test updates** +- Migrated to [Arcade](https://github.com/dotnet/arcade/) build system that is used my multiple dotnet projects. This will give increased build/CI efficiencies going forward. Updated build instructions can be found in the docs/building folder +- Fixed MacOS builds ([#5467](https://github.com/dotnet/machinelearning/pull/5467) and [#5457](https://github.com/dotnet/machinelearning/pull/5457)) + +## **Documentation Updates** +- Fixed Spelling on stopwords ([#5524](https://github.com/dotnet/machinelearning/pull/5524))(**Thank you @LeoGaunt**) +- Changed LoadRawImages Sample ([#5460](https://github.com/dotnet/machinelearning/pull/5460)) + + +## **Breaking Changes** +- None diff --git a/docs/release-notes/1.5.5/release-1.5.5.md b/docs/release-notes/1.5.5/release-1.5.5.md new file mode 100644 index 0000000000..c9d5874256 --- /dev/null +++ b/docs/release-notes/1.5.5/release-1.5.5.md @@ -0,0 +1,39 @@ +# [ML.NET](http://dot.net/ml) 1.5.5 + +## **New Features** +- **New API allowing confidence parameter to be a double**.([#5623](https://github.com/dotnet/machinelearning/pull/5623)) +. A new API has been added to accept double type for the confidence level. This helps when you need to have higher precision than an int will allow for. (**Thank you @esso23**) +- **Support to export ValueMapping estimator to ONNX was added** ([#5577](https://github.com/dotnet/machinelearning/pull/5577)) +- **New API to treat TensorFlow output as batched/not-batched** ([#5634](https://github.com/dotnet/machinelearning/pull/5634)) A new API has been added so you can specify if the output from TensorFlow is batched or not. + + +## **Enhancements** +- Make ColumnInference serializable ([#5611](https://github.com/dotnet/machinelearning/pull/5611)) + + +## **Bug Fixes** +- **AutoML.NET specific fixes**. + - Fixed an AutoML aggregate timeout exception ([#5631](https://github.com/dotnet/machinelearning/pull/5631)) + - Offer suggestions for possibly mistyped label column names in AutoML ([#5624](https://github.com/dotnet/machinelearning/pull/5624)) (**Thank you @Crabzmatic**) +- Update some ToString conversions ([#5627](https://github.com/dotnet/machinelearning/pull/5627)) (**Thanks @4201104140**) +- Fixed an issue in SRCnnEntireAnomalyDetector ([#5579](https://github.com/dotnet/machinelearning/pull/5579)) +- Fixed nuget.config multi-feed issue ([#5614](https://github.com/dotnet/machinelearning/pull/5614)) +- Remove references to Microsoft.ML.Scoring ([#5602](https://github.com/dotnet/machinelearning/pull/5602)) +- Fixed Averaged Perceptron default value ([#5586](https://github.com/dotnet/machinelearning/pull/5586)) + + +## **Build / Test updates** +- Fixing official build by adding homebrew bug workaround ([#5596](https://github.com/dotnet/machinelearning/pull/5596)) +- Nuget.config url fix for roslyn compilers ([#5584](https://github.com/dotnet/machinelearning/pull/5584)) +- Add SymSgdNative reference to AutoML.Tests.csproj ([#5559](https://github.com/dotnet/machinelearning/pull/5559)) + + +## **Documentation Updates** +- Updated documentation for the correct version of CUDA for TensorFlow. ([#5635](https://github.com/dotnet/machinelearning/pull/5635)) +- Updates documentation for an issue with brew and installing libomp. ([#5635](https://github.com/dotnet/machinelearning/pull/5635)) +- Updated an ONNX url to the correct url. ([#5635](https://github.com/dotnet/machinelearning/pull/5635)) +- Added a note in the documentation that the PredictionEngine is not thread safe. ([#5583](https://github.com/dotnet/machinelearning/pull/5583)) + + +## **Breaking Changes** +- None diff --git a/docs/samples/Microsoft.ML.AutoML.Samples/Microsoft.ML.AutoML.Samples.csproj b/docs/samples/Microsoft.ML.AutoML.Samples/Microsoft.ML.AutoML.Samples.csproj index 9d951867e1..4628e6b6e2 100644 --- a/docs/samples/Microsoft.ML.AutoML.Samples/Microsoft.ML.AutoML.Samples.csproj +++ b/docs/samples/Microsoft.ML.AutoML.Samples/Microsoft.ML.AutoML.Samples.csproj @@ -7,6 +7,14 @@ + + all + + + + all + + diff --git a/docs/samples/Microsoft.ML.Samples.GPU/Microsoft.ML.Samples.GPU.csproj b/docs/samples/Microsoft.ML.Samples.GPU/Microsoft.ML.Samples.GPU.csproj index 0c01186724..2b54ea24b0 100644 --- a/docs/samples/Microsoft.ML.Samples.GPU/Microsoft.ML.Samples.GPU.csproj +++ b/docs/samples/Microsoft.ML.Samples.GPU/Microsoft.ML.Samples.GPU.csproj @@ -20,9 +20,13 @@ + + + + @@ -48,14 +52,14 @@ - + DnnImageModels\ResNet18Onnx\ResNet18.onnx PreserveNewest - + DnnImageModels\ResNetPrepOnnx\ResNetPreprocess.onnx PreserveNewest diff --git a/docs/samples/Microsoft.ML.Samples/Dynamic/ModelOperations/OnnxConversion.cs b/docs/samples/Microsoft.ML.Samples/Dynamic/ModelOperations/OnnxConversion.cs index 8a55b8fc64..cbd4162385 100644 --- a/docs/samples/Microsoft.ML.Samples/Dynamic/ModelOperations/OnnxConversion.cs +++ b/docs/samples/Microsoft.ML.Samples/Dynamic/ModelOperations/OnnxConversion.cs @@ -74,7 +74,7 @@ public static void Example() //However, you can also specify a custom OpSet version by using the following code //Currently, we support OpSet versions 9 for most transformers, but there are certain transformers that require a higher OpSet version //Please refer to the following link for most update information of what OpSet version we support - //https://github.com/dotnet/machinelearning/blob/master/src/Microsoft.ML.OnnxConverter/OnnxExportExtensions.cs + //https://github.com/dotnet/machinelearning/blob/main/src/Microsoft.ML.OnnxConverter/OnnxExportExtensions.cs int customOpSetVersion = 9; using (var stream = File.Create("sample_onnx_conversion_2.onnx")) mlContext.Model.ConvertToOnnx(transformer, originalData, customOpSetVersion, stream); @@ -82,7 +82,8 @@ public static void Example() //Create the pipeline using onnx file. var onnxModelPath = "your_path_to_sample_onnx_conversion_1.onnx"; var onnxEstimator = mlContext.Transforms.ApplyOnnxModel(onnxModelPath); - var onnxTransformer = onnxEstimator.Fit(trainTestOriginalData.TrainSet); + //Make sure to either use the 'using' clause or explicitly dispose the returned onnxTransformer to prevent memory leaks + using var onnxTransformer = onnxEstimator.Fit(trainTestOriginalData.TrainSet); //Inference the testset var output = transformer.Transform(trainTestOriginalData.TestSet); diff --git a/docs/samples/Microsoft.ML.Samples/Dynamic/Transforms/ApplyONNXModelWithInMemoryImages.cs b/docs/samples/Microsoft.ML.Samples/Dynamic/Transforms/ApplyONNXModelWithInMemoryImages.cs index 4c1c3a3d4b..71bd61bf90 100644 --- a/docs/samples/Microsoft.ML.Samples/Dynamic/Transforms/ApplyONNXModelWithInMemoryImages.cs +++ b/docs/samples/Microsoft.ML.Samples/Dynamic/Transforms/ApplyONNXModelWithInMemoryImages.cs @@ -13,7 +13,7 @@ public static class ApplyOnnxModelWithInMemoryImages public static void Example() { // Download the squeeznet image model from ONNX model zoo, version 1.2 - // https://github.com/onnx/models/tree/master/squeezenet or use + // https://github.com/onnx/models/tree/master/vision/classification/squeezenet or use // Microsoft.ML.Onnx.TestModels nuget. // It's a multiclass classifier. It consumes an input "data_0" and // produces an output "softmaxout_1". @@ -45,7 +45,7 @@ public static void Example() // Map column "data_0" to column "softmaxout_1" var pipeline = mlContext.Transforms.ExtractPixels("data_0", "Image") .Append(mlContext.Transforms.ApplyOnnxModel("softmaxout_1", - "data_0", modelPath)); + "data_0", modelPath)); var model = pipeline.Fit(dataView); var onnx = model.Transform(dataView); @@ -60,12 +60,12 @@ public static void Example() ImageDataPoint>(onnx, false).ToList(); // The scores are probabilities of all possible classes, so they should - // all be positive. + // all be positive. foreach (var dataPoint in transformedDataPoints) { var firstClassProb = dataPoint.Scores.First(); var lastClassProb = dataPoint.Scores.Last(); - Console.WriteLine("The probability of being the first class is " + + Console.WriteLine("The probability of being the first class is " + (firstClassProb * 100) + "%."); Console.WriteLine($"The probability of being the last class is " + diff --git a/docs/samples/Microsoft.ML.Samples/Dynamic/Transforms/Conversion/MapKeyToBinaryVector.cs b/docs/samples/Microsoft.ML.Samples/Dynamic/Transforms/Conversion/MapKeyToBinaryVector.cs index 57ae091124..9933ef030e 100644 --- a/docs/samples/Microsoft.ML.Samples/Dynamic/Transforms/Conversion/MapKeyToBinaryVector.cs +++ b/docs/samples/Microsoft.ML.Samples/Dynamic/Transforms/Conversion/MapKeyToBinaryVector.cs @@ -8,11 +8,11 @@ namespace Samples.Dynamic class MapKeyToBinaryVector { /// This example demonstrates the use of MapKeyToVector by mapping keys to - /// floats[] of 0 and 1, representing the number in binary format. + /// floats[] of 0 and 1, representing the number in binary format. /// Because the ML.NET KeyType maps the missing value to zero, counting /// starts at 1, so the uint values converted to KeyTypes will appear - /// skewed by one. - /// See https://github.com/dotnet/machinelearning/blob/master/docs/code/IDataViewTypeSystem.md#key-types + /// skewed by one. + /// See https://github.com/dotnet/machinelearning/blob/main/docs/code/IDataViewTypeSystem.md#key-types public static void Example() { // Create a new ML context, for ML.NET operations. It can be used for diff --git a/docs/samples/Microsoft.ML.Samples/Dynamic/Transforms/Conversion/MapKeyToValueMultiColumn.cs b/docs/samples/Microsoft.ML.Samples/Dynamic/Transforms/Conversion/MapKeyToValueMultiColumn.cs index bc7e2fded9..41eb6929b4 100644 --- a/docs/samples/Microsoft.ML.Samples/Dynamic/Transforms/Conversion/MapKeyToValueMultiColumn.cs +++ b/docs/samples/Microsoft.ML.Samples/Dynamic/Transforms/Conversion/MapKeyToValueMultiColumn.cs @@ -7,7 +7,7 @@ namespace Samples.Dynamic { /// This example demonstrates the use of the ValueToKeyMappingEstimator, by /// mapping KeyType values to the original strings. For more on ML.NET KeyTypes - /// see: https://github.com/dotnet/machinelearning/blob/master/docs/code/IDataViewTypeSystem.md#key-types + /// see: https://github.com/dotnet/machinelearning/blob/main/docs/code/IDataViewTypeSystem.md#key-types public class MapKeyToValueMultiColumn { public static void Example() @@ -26,7 +26,7 @@ public static void Example() // by ML.NET API. var dataView = mlContext.Data.LoadFromEnumerable(examples); - // Create a pipeline. + // Create a pipeline. var pipeline = // Convert the string labels into key types. mlContext.Transforms.Conversion.MapValueToKey("Label") @@ -34,8 +34,8 @@ public static void Example() .Append(mlContext.MulticlassClassification.Trainers. SdcaMaximumEntropy()); - // Train the model and do predictions on same data set. - // Typically predictions would be in a different, validation set. + // Train the model and do predictions on same data set. + // Typically predictions would be in a different, validation set. var dataWithPredictions = pipeline.Fit(dataView).Transform(dataView); // At this point, the Label column is transformed from strings, to diff --git a/docs/samples/Microsoft.ML.Samples/Dynamic/Transforms/Conversion/MapKeyToVector.cs b/docs/samples/Microsoft.ML.Samples/Dynamic/Transforms/Conversion/MapKeyToVector.cs index f9a4809fa5..fd1646f014 100644 --- a/docs/samples/Microsoft.ML.Samples/Dynamic/Transforms/Conversion/MapKeyToVector.cs +++ b/docs/samples/Microsoft.ML.Samples/Dynamic/Transforms/Conversion/MapKeyToVector.cs @@ -11,7 +11,7 @@ class MapKeyToVector /// This example demonstrates the use of MapKeyToVector by mapping keys to /// floats[]. Because the ML.NET KeyType maps the missing value to zero, /// counting starts at 1, so the uint values converted to KeyTypes will - /// appear skewed by one. See https://github.com/dotnet/machinelearning/blob/master/docs/code/IDataViewTypeSystem.md#key-types + /// appear skewed by one. See https://github.com/dotnet/machinelearning/blob/main/docs/code/IDataViewTypeSystem.md#key-types public static void Example() { // Create a new ML context, for ML.NET operations. It can be used for @@ -50,7 +50,7 @@ public static void Example() // Fits the pipeline to the data. IDataView transformedData = pipeline.Fit(data).Transform(data); - + // Getting the resulting data as an IEnumerable. // This will contain the newly created columns. IEnumerable features = mlContext.Data.CreateEnumerable< @@ -62,7 +62,7 @@ public static void Example() foreach (var featureRow in features) Console.WriteLine(featureRow.Timeframe + " " + string.Join(',', featureRow.TimeframeVector.Select(x=>x)) + " " - + string.Join(',', featureRow.PartsCount.Select(x => x)) + + + string.Join(',', featureRow.PartsCount.Select(x => x)) + " " + string.Join(',', featureRow.PartsNoCount.Select( x => x))); diff --git a/docs/samples/Microsoft.ML.Samples/Dynamic/Transforms/Conversion/MapKeyToVectorMultiColumn.cs b/docs/samples/Microsoft.ML.Samples/Dynamic/Transforms/Conversion/MapKeyToVectorMultiColumn.cs index 606c371497..aa8df148aa 100644 --- a/docs/samples/Microsoft.ML.Samples/Dynamic/Transforms/Conversion/MapKeyToVectorMultiColumn.cs +++ b/docs/samples/Microsoft.ML.Samples/Dynamic/Transforms/Conversion/MapKeyToVectorMultiColumn.cs @@ -10,8 +10,8 @@ public class MapKeyToVectorMultiColumn /// This example demonstrates the use of MapKeyToVector by mapping keys to /// floats[] for multiple columns at once. Because the ML.NET KeyType maps /// the missing value to zero, counting starts at 1, so the uint values - /// converted to KeyTypes will appear skewed by one. - /// See https://github.com/dotnet/machinelearning/blob/master/docs/code/IDataViewTypeSystem.md#key-types + /// converted to KeyTypes will appear skewed by one. + /// See https://github.com/dotnet/machinelearning/blob/main/docs/code/IDataViewTypeSystem.md#key-types public static void Example() { // Create a new ML context, for ML.NET operations. It can be used for diff --git a/docs/samples/Microsoft.ML.Samples/Dynamic/Transforms/Conversion/MapValueToKeyMultiColumn.cs b/docs/samples/Microsoft.ML.Samples/Dynamic/Transforms/Conversion/MapValueToKeyMultiColumn.cs index 8e8c0e62bd..6d94eb53c6 100644 --- a/docs/samples/Microsoft.ML.Samples/Dynamic/Transforms/Conversion/MapValueToKeyMultiColumn.cs +++ b/docs/samples/Microsoft.ML.Samples/Dynamic/Transforms/Conversion/MapValueToKeyMultiColumn.cs @@ -8,7 +8,7 @@ public static class MapValueToKeyMultiColumn { /// This example demonstrates the use of the ValueToKeyMappingEstimator, by /// mapping strings to KeyType values. For more on ML.NET KeyTypes see: - /// https://github.com/dotnet/machinelearning/blob/master/docs/code/IDataViewTypeSystem.md#key-types + /// https://github.com/dotnet/machinelearning/blob/main/docs/code/IDataViewTypeSystem.md#key-types /// It is possible to have multiple values map to the same category. public static void Example() { @@ -64,7 +64,7 @@ public static void Example() // are not found in the lookup IDataView they will get mapped to the // missing value, 0. The keyData are shared among the columns, therefore // the keys are not contiguous for the column. Create the lookup map - // data IEnumerable. + // data IEnumerable. var lookupData = new[] { new LookupMap { Key = "0-4yrs" }, new LookupMap { Key = "6-11yrs" }, diff --git a/docs/samples/Microsoft.ML.Samples/Dynamic/Transforms/TimeSeries/DetectChangePointBySsa.cs b/docs/samples/Microsoft.ML.Samples/Dynamic/Transforms/TimeSeries/DetectChangePointBySsa.cs index 7d545770f9..23fb7e5c9c 100644 --- a/docs/samples/Microsoft.ML.Samples/Dynamic/Transforms/TimeSeries/DetectChangePointBySsa.cs +++ b/docs/samples/Microsoft.ML.Samples/Dynamic/Transforms/TimeSeries/DetectChangePointBySsa.cs @@ -52,7 +52,7 @@ public static void Example() // Setup SsaChangePointDetector arguments var inputColumnName = nameof(TimeSeriesData.Value); var outputColumnName = nameof(ChangePointPrediction.Prediction); - int confidence = 95; + double confidence = 95; int changeHistoryLength = 8; // Train the change point detector. diff --git a/docs/samples/Microsoft.ML.Samples/Dynamic/Transforms/TimeSeries/DetectChangePointBySsaBatchPrediction.cs b/docs/samples/Microsoft.ML.Samples/Dynamic/Transforms/TimeSeries/DetectChangePointBySsaBatchPrediction.cs index 25819052d8..85732f9259 100644 --- a/docs/samples/Microsoft.ML.Samples/Dynamic/Transforms/TimeSeries/DetectChangePointBySsaBatchPrediction.cs +++ b/docs/samples/Microsoft.ML.Samples/Dynamic/Transforms/TimeSeries/DetectChangePointBySsaBatchPrediction.cs @@ -59,7 +59,7 @@ public static void Example() // The transformed data. var transformedData = ml.Transforms.DetectChangePointBySsa( - outputColumnName, inputColumnName, 95, 8, TrainingSize, + outputColumnName, inputColumnName, 95.0d, 8, TrainingSize, SeasonalitySize + 1).Fit(dataView).Transform(dataView); // Getting the data of the newly created column as an IEnumerable of diff --git a/docs/samples/Microsoft.ML.Samples/Dynamic/Transforms/TimeSeries/DetectChangePointBySsaStream.cs b/docs/samples/Microsoft.ML.Samples/Dynamic/Transforms/TimeSeries/DetectChangePointBySsaStream.cs index c65d3af987..dfab85aee2 100644 --- a/docs/samples/Microsoft.ML.Samples/Dynamic/Transforms/TimeSeries/DetectChangePointBySsaStream.cs +++ b/docs/samples/Microsoft.ML.Samples/Dynamic/Transforms/TimeSeries/DetectChangePointBySsaStream.cs @@ -52,7 +52,7 @@ public static void Example() // Setup SsaChangePointDetector arguments var inputColumnName = nameof(TimeSeriesData.Value); var outputColumnName = nameof(ChangePointPrediction.Prediction); - int confidence = 95; + double confidence = 95; int changeHistoryLength = 8; // Train the change point detector. diff --git a/docs/samples/Microsoft.ML.Samples/Dynamic/Transforms/TimeSeries/DetectIidChangePoint.cs b/docs/samples/Microsoft.ML.Samples/Dynamic/Transforms/TimeSeries/DetectIidChangePoint.cs index 4e44a73607..852fc9f8e9 100644 --- a/docs/samples/Microsoft.ML.Samples/Dynamic/Transforms/TimeSeries/DetectIidChangePoint.cs +++ b/docs/samples/Microsoft.ML.Samples/Dynamic/Transforms/TimeSeries/DetectIidChangePoint.cs @@ -55,7 +55,7 @@ public static void Example() // Time Series model. ITransformer model = ml.Transforms.DetectIidChangePoint( - outputColumnName, inputColumnName, 95, Size / 4).Fit(dataView); + outputColumnName, inputColumnName, 95.0d, Size / 4).Fit(dataView); // Create a time series prediction engine from the model. var engine = model.CreateTimeSeriesEngine + + + @@ -977,14 +980,14 @@ - + DnnImageModels\ResNet18Onnx\ResNet18.onnx PreserveNewest - + DnnImageModels\ResNetPrepOnnx\ResNetPreprocess.onnx PreserveNewest diff --git a/docs/specs/mlnet-cli/MLNET-CLI-Specs.md b/docs/specs/mlnet-cli/MLNET-CLI-Specs.md index 6a4f13469a..a0c013d405 100644 --- a/docs/specs/mlnet-cli/MLNET-CLI-Specs.md +++ b/docs/specs/mlnet-cli/MLNET-CLI-Specs.md @@ -9,7 +9,7 @@ The CLI will be branded as the ML.NET CLI since this CLI will also have addition The .NET AutoML API (.NET based) will be part of the [ML.NET](https://github.com/dotnet/machinelearning) API. AutoML features will be used for certain important foundational features of the ML.NET CLI. -This specs-doc focuses most of all on the CLI features related to AutoML, but it will also consider (in less detail) the scenarios where AutoML is not needed, so the CLI syntax will be consistent end-to-end for all the possible scenarios in the future. +This specs-doc focuses most of all on the CLI features related to AutoML, but it will also consider (in less detail) the scenarios where AutoML is not needed, so the CLI syntax will be consistent end-to-end for all the possible scenarios in the future. # Problem to solve @@ -17,9 +17,9 @@ Customers (.NET developers) have tolds us through many channels that they can ge The subset of .NET developers who at the same time are skilled on data science and machine learning in general is very small compared to the total number of regular .NET developers. -We need a way to enable regular .NET developers to easily use [ML.NET](https://github.com/dotnet/machinelearning) to create custom models solving typical ML scenarios in the enterprise. +We need a way to enable regular .NET developers to easily use [ML.NET](https://github.com/dotnet/machinelearning) to create custom models solving typical ML scenarios in the enterprise. -If we don't provide a really simple way to use [ML.NET](https://github.com/dotnet/machinelearning) for regular developers (almost no data science knowledge at all), then we won't be able to really "democratize" machine learning for .NET developers. +If we don't provide a really simple way to use [ML.NET](https://github.com/dotnet/machinelearning) for regular developers (almost no data science knowledge at all), then we won't be able to really "democratize" machine learning for .NET developers. ## Evidence @@ -66,24 +66,24 @@ The business goals are the following, depending on the possible scenarios: The goals for the features is to automate the following steps when building a model to achieve the above business goals: -**Foundational features:** +**Foundational features:** - Provide an end-to-end **ML.NET CLI** for developers (i.e. *"mlnet new"*) to generate either the final trained model and the pipeline's C#/ML.NET implementation code in a similar fashion to the [.NET Core CLI](https://docs.microsoft.com/en-us/dotnet/core/tools/?tabs=netcore2x). The CLI is also a foundation upon which higher-level tools, such as Integrated Development Environments (IDEs) can rest. - Automatic selection of best columns (input variables) to be used by the model -- Automatic featurization and feature engineering +- Automatic featurization and feature engineering - Automatic learner sweeping and selection - Automatic hyperparameter sweeping and selection - + # Solution -The solution that can target any kind of developer and fits especially well when generating code is a CLI (Command-Line Interface). +The solution that can target any kind of developer and fits especially well when generating code is a CLI (Command-Line Interface). The main support reasons are: - A CLI can be the foundation where other higher level tooling (UI, IDEs) can also rest on. - A CLI makes sense as a tool for "code generation". For the end-user experience, just using a C# API to generate C# code would not make sense and would feel a bit weird for the developer experience used to .NET approaches. -- A CLI is aligned to modern cross-platform frameworks experience such as .NET Core, Python, Node, etc. +- A CLI is aligned to modern cross-platform frameworks experience such as .NET Core, Python, Node, etc. ## Positioning the CLI and AutoML in ML.NET @@ -110,7 +110,7 @@ The .NET AutoML API will be used for the most important foundational features th - The CLI proposed here will not provide for “continue sweeping” after sweeping has ended. - When running locally with the by default behavior (no Azure), the CLI will be able to work without needing to make any remote service call or requiring any authentication from the user. - The CLI will provide feedback output (such as % work done or high level details on what's happening under the covers) while working on the long-running tasks. -- The ML.NET CLI will be aligned and integrated to the [.NET Core CLI](https://docs.microsoft.com/en-us/dotnet/core/tools/?tabs=netcore2x). A good approach is to implement the ML.NET CLI as a [.NET Core Global Tool](https://docs.microsoft.com/en-us/dotnet/core/tools/global-tools) (i.e. named "mlnet" package) on top of the "dotnet CLI". +- The ML.NET CLI will be aligned and integrated to the [.NET Core CLI](https://docs.microsoft.com/en-us/dotnet/core/tools/?tabs=netcore2x). A good approach is to implement the ML.NET CLI as a [.NET Core Global Tool](https://docs.microsoft.com/en-us/dotnet/core/tools/global-tools) (i.e. named "mlnet" package) on top of the "dotnet CLI". - [System-Command-Line](https://github.com/dotnet/command-line-api) package can precisely help on those typical CLI console apps features (CLI plumbing) so if can be implemented a lot easier than by implementing a CLI app from scratch in features like command line parsing, invocation and rendering of terminal output. Otherwise, a CLI implementation starting from scratch can be significantly more costly to develop. ### CLI default behaviour and overridability @@ -136,13 +136,13 @@ The conditions for each version are incremental on top of previous versions. - NuGet package available at any private NuGet feed ([Azure DevOps?](https://docs.microsoft.com/en-us/azure/devops/artifacts/get-started-nuget?view=azure-devops&tabs=new-nav) [MyGet?](https://docs.myget.org/docs/reference/security)) with daily drops from CI/CD pipelines. -- Add telemetry for the CLI NuGet package. +- Add telemetry for the CLI NuGet package. - Minimum MVP functionality for users to test custom datasets. Implementation of the CLI arguments especified for v0.1 in the syntax section and code generation section. - Documentation: Have needed documentation for users to get started autonomously and provide feedback (Installation, getting started and test without help from the dev team). -- Test with ML.NET Samples: Quality of generated code/models targeting the samples should improve the current published samples. +- Test with ML.NET Samples: Quality of generated code/models targeting the samples should improve the current published samples. Nice to have for v0.1: @@ -188,7 +188,7 @@ Nice to have for v0.1: - `weight-column` // indicates the weight/importance of training example. Related: `sample_weight` argument for training data such as in [Python AutoML here](https://docs.microsoft.com/en-us/python/api/azureml-train-automl/azureml.train.automl.automl?view=azure-ml-py). - Add additonal commands to do *"machine learning without code"*: - - *train*: It will only generate the best model .ZIP file. For example: + - *train*: It will only generate the best model .ZIP file. For example: - `mlnet train --ml-task Regression --dataset "/MyDataSets/Sales.csv"` - *predict*: Having a serialized model .ZIP file, you can test a single prediction. For example: @@ -229,7 +229,7 @@ Nice to have for v0.1: ## Tool name -**mlnet** +**mlnet** ## Installing the tool @@ -255,9 +255,9 @@ mlnet - A new project or group of projects (by default, a single console app) with the generated .NET code. - The "best model" (or multiple "best models") as serialized files. -- An analysis report of the generated models. +- An analysis report of the generated models. -By default (with no app template parameter), the CLI will create a single console application containing either the training code and the model scoring code. However, in next ML.NET CLI versions (heading v1.0), when the user provides an app-type template argument (such as `mlnet new web`), it will be able to generate different application type projects (web, console, desktop, Unity, etc.) for the model scoring code. +By default (with no app template parameter), the CLI will create a single console application containing either the training code and the model scoring code. However, in next ML.NET CLI versions (heading v1.0), when the user provides an app-type template argument (such as `mlnet new web`), it will be able to generate different application type projects (web, console, desktop, Unity, etc.) for the model scoring code. ## Examples @@ -293,7 +293,7 @@ Create and train a model based on parameters specified in the .rsp file plus mor (*Release v1.0 examples*) -CLI command specifying to run AutoML compute in Azure's cloud +CLI command specifying to run AutoML compute in Azure's cloud ` mlnet new --ml-task BinaryClassification --dataset "/MyDataSets/Cars.csv" --label-column-name "InsuranceRisk" --azure-automl-service-key "key-value"` @@ -304,7 +304,7 @@ Syntax should be aligned to [dotnet new](https://docs.microsoft.com/en-us/dotnet #### Syntax ```console -mlnet new +mlnet new --------------- (v0.1) ------------------- @@ -380,7 +380,7 @@ There should be a pre-validation of the arguments with basic rules in the CLI to `--ml-task` (string) (*Release 0.1*) -A single string providing the ML problem to solve. For instance, any of the following depending on the supported tasks in .NET AutoML: +A single string providing the ML problem to solve. For instance, any of the following depending on the supported tasks in .NET AutoML: *Release 0.1* - `regression` - Choose if the ML Model will be used to predict a numeric value @@ -417,7 +417,7 @@ This argument provides the filepath to either one of the following: File path pointing to the test dataset file, for example when using a 80% - 20% approach when making regular validations to obtain accuracy metrics. -If using `--test-dataset`, then `--dataset` is also required. +If using `--test-dataset`, then `--dataset` is also required. The `--test-dataset` argument is optional unless the --validation-dataset is used. In that case, the user must use the three arguments. @@ -431,7 +431,7 @@ If using a `validation dataset`, this is how the behaviour should be: - The `test-dataset` and `--dataset` arguments are also required. -- The `validation-dataset` dataset is used to estimate prediction error for model selection. +- The `validation-dataset` dataset is used to estimate prediction error for model selection. - The `test-dataset` is used for assessment of the generalization error of the final chosen model. Ideally, the test set should be kept in a “vault,” and be brought out only at the end of the data analysis. @@ -439,7 +439,7 @@ Basically, when using a `validation dataset` plus the `test dataset`, the valida 1. In the first part you just look at your models and select the best performing approach using the validation data (=validation) 2. Then you estimate the accuracy of the selected approach (=test). - + Hence, the separation of data could be 80/10/10 or 75/15/10. For example: - `training-dataset` file should have 75% of the data. @@ -452,7 +452,7 @@ In any case, those percentages will be decided by the user using the CLI who wil `--label-column-name` (string) (*Release 0.1*) -With this argument, a specifc objective/target column (the variable that you want to predict) can be specified by using the column's name set in the dataset's header. +With this argument, a specifc objective/target column (the variable that you want to predict) can be specified by using the column's name set in the dataset's header. If you do not explicitly specify a label column, the CLI will automatically infer what's the label column in the dataset (To be implemented in v0.2 or v1.0). @@ -475,11 +475,11 @@ This argument is used only for supervised ML task such as a *classification prob `--has-header` (bool) (*Release 0.1*) Specify if the dataset file(s) have a header row. -Possible values are: +Possible values are: - `true` - `false` -The by default value is `true`. +The by default value is `true`. In order to use the `--label-column-name` argument you need to have a header in the file. @@ -498,7 +498,7 @@ Therefore, if `--max-exploration-time` is very short (say less than 1 minute), t `--name` (string) (*Release 0.1*) -The name for the created output project or solution. If no name is specified, the name 'Sample' is used. +The name for the created output project or solution. If no name is specified, the name 'Sample' is used. The ML.NET model file (.ZIP file) will get the same name, as well. @@ -514,11 +514,11 @@ Location/folder to place the generated output. The default is the current direct `--verbosity` (string) - (*Release 0.1*) -Sets the verbosity level of the in the std output. +Sets the verbosity level of the in the std output. Allowed values are: -- `q[uiet]` +- `q[uiet]` - `m[inimal]` (by default) - `diag[nostic]` (logging information level) @@ -586,13 +586,13 @@ Path to .YAML file (internally it might be easier and more robust to internally All these parameters must be optional (opt-in). If not provided by the user, AutoML should infer all of them based on the provided dataset. -However, this advanced configuration allows the users with knowledge on its dataset and ML skills to provide "shortcuts" and improvements so AutoML can work on a more oppinionated direction for a specific model in less time. +However, this advanced configuration allows the users with knowledge on its dataset and ML skills to provide "shortcuts" and improvements so AutoML can work on a more oppinionated direction for a specific model in less time. -These parameters should be similar to the ones provided by the .NET AutoML API, probably also similar to the [Python AutoMLConfig class](https://docs.microsoft.com/en-us/python/api/azureml-train-automl/azureml.train.automl.automlconfig(class)?view=azure-ml-py) where the user can drill down and specify more specific configuration such as number of `iterations`, `primary-metric`, `n_cross_validations`, `enable_cache`, etc. +These parameters should be similar to the ones provided by the .NET AutoML API, probably also similar to the [Python AutoMLConfig class](https://docs.microsoft.com/en-us/python/api/azureml-train-automl/azureml.train.automl.automlconfig(class)?view=azure-ml-py) where the user can drill down and specify more specific configuration such as number of `iterations`, `primary-metric`, `n_cross_validations`, `enable_cache`, etc. In cases where a parameter in this file coincides with a CLI argument (i.e. label-column-name, etc.), the parameter in the .YAML file will be overriden by the CLI argument which has higher priority. -*TO BE DEFINED*: If there's a 1:1 mapping between the first level of paramenters in the .YAML file and the CLI arguments, how do we deal with expected syntax/naming of the args?: +*TO BE DEFINED*: If there's a 1:1 mapping between the first level of paramenters in the .YAML file and the CLI arguments, how do we deal with expected syntax/naming of the args?: - `--test-dataset` vs. `test_dataset` *IMPORTANT: The whole list and explanation of each advanced AutoML config parameters still have to be defined.* @@ -675,11 +675,11 @@ Sample JSON **Matching CLI arguments with first level of .YAML file elements** The first level items in the YAML file must match the CLI arguments. -The CLI arguments will always override the items in the YAML file. +The CLI arguments will always override the items in the YAML file. **Embeding .YAML text as inline text in the CLI** (v1.0) -Since the first level elements of the .YAML file should match the arguments, it should be possible to embed YAML text directly in-line as arguments, in a similar way than the original MAML.exe CLI does. +Since the first level elements of the .YAML file should match the arguments, it should be possible to embed YAML text directly in-line as arguments, in a similar way than the original MAML.exe CLI does. Sample CLI command with embeded extended: @@ -691,15 +691,15 @@ mlnet new --ml-task Regression --dataset "/MyDataSets/Sales.csv" --label-column ---------------------------------------------------------- `@args-response-file` (string) (*Release 0.2*) -Path to `.rsp` file containing the arguments/parameters to be used by the CLI. +Path to `.rsp` file containing the arguments/parameters to be used by the CLI. In this case we use the `@` syntax so it is consistent to other CLIs using the `.rsp` files, such as the [C# Compiler Options](https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/compiler-options/response-file-compiler-option), etc. This `.rsp` file should provide the same arguments than the ones supported by the CLI command (`mlnet new` arguments), except the `--args-config-file` argument, logically. -The advantage of using an `.rsp` file for loading existing arguments, compared to a .YAML or .JSON file, is that we can use exactly the same argument names than the ones used in the CLI, such as `--label-column-name`, `--test-dataset` instead of having to map argument names to JSON-style names such as `labelColumnName` or `testDataset` or .YAML style and having to maitain two different schemas. +The advantage of using an `.rsp` file for loading existing arguments, compared to a .YAML or .JSON file, is that we can use exactly the same argument names than the ones used in the CLI, such as `--label-column-name`, `--test-dataset` instead of having to map argument names to JSON-style names such as `labelColumnName` or `testDataset` or .YAML style and having to maitain two different schemas. -The parameters provided in the `.rsp` file will be overriden by any parameter provided in the CLI command itself. +The parameters provided in the `.rsp` file will be overriden by any parameter provided in the CLI command itself. *Sample .rsp file with CLI arguments and optional configuration* @@ -730,11 +730,11 @@ Lists application types supported, such as 'console', 'web', etc. *NOTE: For the 0.1 preview version, only the `console` app-type (by default) will be implemented.* -The app-type project to generate the code when the command is invoked. +The app-type project to generate the code when the command is invoked. If `--app-type` argument is not provided, the `console` template will be used by default. -The command `new` will contain a default list of templates. Use `--list-app-types` to obtain a list of the available templates. The following table shows the templates that could come built-in with the ML.NET CLI. +The command `new` will contain a default list of templates. Use `--list-app-types` to obtain a list of the available templates. The following table shows the templates that could come built-in with the ML.NET CLI. The default language for the template is shown inside the brackets. @@ -782,9 +782,9 @@ As introduced, the CLI will generate the following assets as result of the opera The training code for a single generated console app project should be similar to the following sample app: -- Sentiment Analysis sample: https://github.com/dotnet/machinelearning-samples/blob/master/samples/csharp/getting-started/BinaryClassification_SentimentAnalysis/SentimentAnalysis/SentimentAnalysisConsoleApp/Program.cs - - Notes: +- Sentiment Analysis sample: https://github.com/dotnet/machinelearning-samples/blob/main/samples/csharp/getting-started/BinaryClassification_SentimentAnalysis/SentimentAnalysis/SentimentAnalysisConsoleApp/Program.cs + + Notes: - This sample code is evolving when upgrading to upcoming preview versions, such as 0.10, 0.11, etc.) - Columns being loaded, instead of being explicit in the TextLoader, they should use a class such as this: @@ -796,7 +796,7 @@ For v0.1, it must load data from text file using the data-structure (observation // Read the data into a data view. var dataView = mlContext.Data.ReadFromTextFile(dataPath, hasHeader: true); -// The data model. This type will be used from multiple code. +// The data model. This type will be used from multiple code. private class InspectedRow { [LoadColumn(0)] @@ -819,7 +819,7 @@ When having tens, hundreds or thousands of contiguous numeric columns (usually o hasHeader: true ); - var trainData = reader.Read(trainDatasetFileNamePath)); + var trainData = reader.Read(trainDatasetFileNamePath)); ``` Rules to follow: @@ -844,11 +844,11 @@ If you have more than a few dozens of columns, those columns should be grouped i Related sample code is available in the following ML.NET tests: -Loading data: -https://github.com/dotnet/machinelearning/blob/master/test/Microsoft.ML.Tests/ScenariosWithDirectInstantiation/TensorflowTests.cs#L375 +Loading data: +https://github.com/dotnet/machinelearning/blob/main/test/Microsoft.ML.Tests/ScenariosWithDirectInstantiation/TensorflowTests.cs#L375 Data observation class: -https://github.com/dotnet/machinelearning/blob/master/test/Microsoft.ML.Tests/ScenariosWithDirectInstantiation/TensorflowTests.cs#L700 +https://github.com/dotnet/machinelearning/blob/main/test/Microsoft.ML.Tests/ScenariosWithDirectInstantiation/TensorflowTests.cs#L700 ### Generated code for solution with multiple projects (Since v1.0) @@ -857,12 +857,12 @@ By v1.0, the CLI should be able to generate solutions with multiple projects. Fo Solution: - Training project: Console project with model-training ML.NET code - Class library project with common code (Data/Observation class, Prediction class, etc.) -- End-user project with model-scoring ML.NET code, such as any of the following (Depending on the supported app-types): +- End-user project with model-scoring ML.NET code, such as any of the following (Depending on the supported app-types): - Web app project (ASP.NET Core Razor app) - Web API project (ASP.NET Core Web API) - Console project - Unity project - - WPF project + - WPF project ## Results report (HTML) @@ -885,7 +885,7 @@ The visualization of results by class is very nice. - Clustering plotting showing the identified clusters per model. - Other related plotting for Ranking, Recommendations and Anomaly detection. -It is important to always show reports and visual charts comparing quality metrics and performance for the best ranked models, meaning having reports with comparisons between multiple models. +It is important to always show reports and visual charts comparing quality metrics and performance for the best ranked models, meaning having reports with comparisons between multiple models. Some report results can be comparable to the [results in AutoML for Python](https://docs.microsoft.com/en-us/azure/machine-learning/service/tutorial-auto-train-models#explore-the-results): @@ -902,17 +902,17 @@ Some report results can be comparable to the [results in AutoML for Python](http ### Results/reports: Viewable and exportable (v1.0 or vNext) -Results (reports) should be both viewable and exportable. Often you want to do results processing automation so would be nice to export the reports data as a .json file, then later can be viewed by a vieweer. +Results (reports) should be both viewable and exportable. Often you want to do results processing automation so would be nice to export the reports data as a .json file, then later can be viewed by a vieweer. Comparable references from other CLIs: - TLC exe's results processor and result visualization tab. -- [Uber Ludwig](https://uber.github.io/ludwig/getting_started/#programmatic-api): +- [Uber Ludwig](https://uber.github.io/ludwig/getting_started/#programmatic-api): `ludwig visualize --visualization compare_performance --test_statistics path/to/test_statistics_model_1.json path/to/test_statistics_model_2.json` # Open questions -- If there's a 1:1 mapping between the first level of paramenters in the .YAML file and the CLI arguments, how do we deal with expected syntax/naming of the args? Same IDs/text?: +- If there's a 1:1 mapping between the first level of paramenters in the .YAML file and the CLI arguments, how do we deal with expected syntax/naming of the args? Same IDs/text?: - `--test-dataset` vs. `test_dataset` - If we were using a sub-command for the ML-Task (such as `mlnet new regression`) instead of a regular argument (such as `mlnet new --ml-task regression`), how can a sub-command be specified in the response file? diff --git a/docs/specs/mlnet-database-loader/mlnet-database-loader-specs.md b/docs/specs/mlnet-database-loader/mlnet-database-loader-specs.md index b84d428b3a..3254250a26 100644 --- a/docs/specs/mlnet-database-loader/mlnet-database-loader-specs.md +++ b/docs/specs/mlnet-database-loader/mlnet-database-loader-specs.md @@ -1,7 +1,7 @@ # Specs for ML.NET Relational Database Loader -This specs-doc focuses on the features needed for the base **ML.NET API**, most of all. -The scenarios related to ML.NET **AutoML API**, the **CLI** and **VS Model Builder** will also be considered and covered in this document by in a significantly less detail since there should be different spec docs for those additional tools and APIs. +This specs-doc focuses on the features needed for the base **ML.NET API**, most of all. +The scenarios related to ML.NET **AutoML API**, the **CLI** and **VS Model Builder** will also be considered and covered in this document by in a significantly less detail since there should be different spec docs for those additional tools and APIs. # Problem to solve @@ -11,7 +11,7 @@ ML.NET 1.0 and 1.1 only supports the [IDataView LoadFromEnumerable()](https://do Within the 'databases scope' problem there are multiple areas. -The **scope** for this feature is initially limited to **relational databases** with higher priority on SQL Server and Azure SQL Database, but one of the goals is to make this loader/connector compatible with any relational database which is supported by .NET providers. +The **scope** for this feature is initially limited to **relational databases** with higher priority on SQL Server and Azure SQL Database, but one of the goals is to make this loader/connector compatible with any relational database which is supported by .NET providers. - Scope to support in this feature: - Relational Databases, such as: @@ -49,11 +49,11 @@ The business goals are the following, depending on the possible scenarios: - Ability for developers to load and automatically stream data from relational databases in order to train/evaluate ML.NET models. - The code to load from a database should be extremely easy, a single line of code in most cases. -- Tooling (Model Builder in VS and the CLI) and AutoML API should also support this feature. +- Tooling (Model Builder in VS and the CLI) and AutoML API should also support this feature. # Solution -The solution is to create an ML.NET database loader classes supporting the above scenarios. +The solution is to create an ML.NET database loader classes supporting the above scenarios. The main supported features are: @@ -69,7 +69,7 @@ The main supported features are: - Cross-validation scenario. Single database source. Internally it'll be split in multiple folds (such as 5 folds) for multiple trains and tests. This should be transparent from a database connection point of view which only needs one database source. -- **Additional support for AutoML API, CLI and Model Builder:** Loading data from databases should be supported by AutoML API, Model Builder in VS and the ML.NET CLI. +- **Additional support for AutoML API, CLI and Model Builder:** Loading data from databases should be supported by AutoML API, Model Builder in VS and the ML.NET CLI. -------------------------------------- @@ -101,7 +101,7 @@ The way to support those frameworks would be by creating a **.NET Standard 2.0 l - PostgreSQL providers - Test on: - Npgsql open source ADO.NET Data Provider for PostgreSQL - This ML.NET database loader won't probably need Entity Framework, but for a relationship, see [EF providers](https://docs.microsoft.com/en-us/ef/core/providers/) for a relationship to ADO.NET providers. + This ML.NET database loader won't probably need Entity Framework, but for a relationship, see [EF providers](https://docs.microsoft.com/en-us/ef/core/providers/) for a relationship to ADO.NET providers. - **P2 RDBMS support/tested priorities:** @@ -112,8 +112,8 @@ The way to support those frameworks would be by creating a **.NET Standard 2.0 l - Data Provider for EntityClient Provider (Entity Data Model (EDM)) - **CRITICAL: Implement support for 'handle and continue' after transient errors happening in Azure SQL Database (or any DB):** When using Azure SQL Database as the source of your training database, because databases in Azure SQL DB can be moved to different servers across the internal Azure SQL Database cluster, transient failures (usually for just a few seconds) in the form of connectivity exceptions can happen. Even further, by design in Azure SQL Database, if a process is blocking too many resources in SQL, sometimes the database connection can be thrown away in favor of other customers/databases. -There are several strategies in order to handle database transient errors (see [Working with SQL Database connection issues and transient errors](https://docs.microsoft.com/en-us/azure/sql-database/sql-database-connectivity-issues)) like doing a 'Retry strategy' and start with a new connection again. But that strategy is only okay for short/fast queries. That simple strategy which throws away all the progress made and start the same query again wouldn't be good when training with a very large table because it could mean that the training operation "never finishes" if you have at least one transient error on every "training try". -We'll need to come up with a reasonably general pattern (probably something that reasons about primary keys), but this scenario is not simple. +There are several strategies in order to handle database transient errors (see [Working with SQL Database connection issues and transient errors](https://docs.microsoft.com/en-us/azure/sql-database/sql-database-connectivity-issues)) like doing a 'Retry strategy' and start with a new connection again. But that strategy is only okay for short/fast queries. That simple strategy which throws away all the progress made and start the same query again wouldn't be good when training with a very large table because it could mean that the training operation "never finishes" if you have at least one transient error on every "training try". +We'll need to come up with a reasonably general pattern (probably something that reasons about primary keys), but this scenario is not simple. See [related issue](https://github.com/dotnet/machinelearning-samples/issues/507) @@ -123,17 +123,17 @@ We'll need to come up with a reasonably general pattern (probably something that 2. RDBMS-server running database and .NET code using ML.NET code -- **NuGet packages and libraries design**: +- **NuGet packages and libraries design**: The implementation of this feature should be packaged following the following approach, which is aligned and consistent to the current approach used by the .NET Framework and .NET Core in the System.Data.Common and System.Data.SqlClient: - Implementation code with NO depedencies to specific database providers (such as SQL Server, Oracle, MySQL, etc.) will be packaged in the same NuGet package and library than the existing TextLoader-related classes which is in the Microsoft.ML.Data library. This code is basically the foundational API for the Database loader where the user has to provide any specific database connection (so dependencies are taken in user's code). - Implementation code WITH dependencies to data proviers (such as SQL Server, Oracle, MySQL, etc.) that might be created when creating additional convenient APIs where the user only needs to provide a connection string and table-name or SQL statement, will be placed in a segregated class library and NuGet package, so that ML.NET core packages don't depend on specific database providers. - + - **Support for sparse data**: The database loader should support sparse data, at least up to the maximum number of columns in SQL Server (1,024 columns per nonwide table, 30,000 columns per wide table or 4,096 columns per SELECT statement). - ML.NET supports sparse data such as in the following example using a [sparse matrix](https://en.wikipedia.org/wiki/Sparse_matrix) of thousands or even millions of columns even when in this example only 200 columns have real data (sparse data): + ML.NET supports sparse data such as in the following example using a [sparse matrix](https://en.wikipedia.org/wiki/Sparse_matrix) of thousands or even millions of columns even when in this example only 200 columns have real data (sparse data): - - [ML.NET sample using millions of columns with sparse data](https://github.com/dotnet/machinelearning-samples/tree/master/samples/csharp/getting-started/LargeDatasets) + - [ML.NET sample using millions of columns with sparse data](https://github.com/dotnet/machinelearning-samples/tree/main/samples/csharp/getting-started/LargeDatasets) SQL Server supports [Sparse columns](https://docs.microsoft.com/en-us/sql/relational-databases/tables/use-sparse-columns?view=sql-server-2017), however, it is just a way to optimize storage for null values. It still needs to have a real column created in the table per each logical column (i.e. 1,000 columns defined in the SQL table) even when it might not have data. @@ -180,7 +180,7 @@ Example code using it: MLContext mlContext = new MLContext(); //Example loading from a SQL Server or SQL Azure database with a SQL query sentence -IDataView trainingDataView = mlContext.Data.LoadFromDbSqlQuery(connString: myConnString, sqlQuerySentence: "Select * from InputMLModelDataset where InputMLModelDataset.CompanyName = 'MSFT'"); +IDataView trainingDataView = mlContext.Data.LoadFromDbSqlQuery(connString: myConnString, sqlQuerySentence: "Select * from InputMLModelDataset where InputMLModelDataset.CompanyName = 'MSFT'"); ``` **2. (Foundational method) Data loading from a database with a System.Data.IDataReader object:** @@ -229,8 +229,8 @@ Example code using it: MLContext mlContext = new MLContext(); //Example loading from a SQL Server or SQL Azure database table -IDataView trainingDataView = mlContext.Data.LoadFromDbTable(connString: myConnString, - tableName: "TrainingDataTable"); +IDataView trainingDataView = mlContext.Data.LoadFromDbTable(connString: myConnString, + tableName: "TrainingDataTable"); ``` **4. ('Nice to have') Data loading from a database view:** @@ -248,8 +248,8 @@ Example code using it: MLContext mlContext = new MLContext(); //Example loading from a SQL Server or SQL Azure database view -IDataView trainingDataView = mlContext.Data.LoadFromDbView(connString: myConnString, - viewName: "TrainingDatabaseView"); +IDataView trainingDataView = mlContext.Data.LoadFromDbView(connString: myConnString, + viewName: "TrainingDatabaseView"); ``` ## Support connectivity from .NET assemblies embedded into the RDBMS server @@ -258,7 +258,7 @@ As introduced, the database loader should not only support remote/network connec The only difference is the way you define the connection string, which simply provides **'context' string** (instead of server name, user, etc. when using the network), such as: -- Code example running on [SQL Server CLR integration](https://docs.microsoft.com/en-us/sql/relational-databases/clr-integration/clr-integration-overview?view=sql-server-2017) +- Code example running on [SQL Server CLR integration](https://docs.microsoft.com/en-us/sql/relational-databases/clr-integration/clr-integration-overview?view=sql-server-2017) ``` //SQL Server @@ -273,7 +273,7 @@ The only difference is the way you define the connection string, which simply pr ``` //Oracle OracleConnection con = new OracleConnection(); - con.ConnectionString = "context connection=true"; + con.ConnectionString = "context connection=true"; ``` - See here an [exampleof a C# stored procedure in Oracle ](https://www.oracle.com/technetwork/articles/dotnet/williams-sps-089817.html?printOnly=1) @@ -286,7 +286,7 @@ ML.NET won't implement components creating concrete database objects such as **C Also, note that the fact that ML.NET will be supported to be used within user components using CLR integration, that doesn't mean that the user can do it on any RDBMS. There are RDBMS such as Azure SQL Database with single databases and elastic pools and other RDBMS that don't support that feature. Other RDBMS suchas SQL Server on-premises or Azure SQL Database Managed Instances, Oracle, etc. do support it. -For instance: +For instance: - [Feature comparison: Azure SQL Database versus SQL Server](https://docs.microsoft.com/en-us/azure/sql-database/sql-database-features) @@ -295,7 +295,7 @@ For instance: There can be two different approaches here: - Use similar input data classes/types to ML.NET 1.x input data classes -- Use similar input data classes/types to Entity Framework POCO entity data model classes +- Use similar input data classes/types to Entity Framework POCO entity data model classes ## Approach A: Using ML.NET input data classes @@ -358,7 +358,7 @@ This last approach is similar to the Entity Framework POCO entity class approach ## Approach B: Using Entity Framework POCO entity data model classes -When using Entity Framework, a POCO entity is a class that doesn't depend on any framework-specific base class. This is also why they are persistence-ignorant objects following the [persistence ignorance principle](https://deviq.com/persistence-ignorance/). +When using Entity Framework, a POCO entity is a class that doesn't depend on any framework-specific base class. This is also why they are persistence-ignorant objects following the [persistence ignorance principle](https://deviq.com/persistence-ignorance/). It is like any other normal .NET CLR class, which is why it is called POCO ("Plain Old CLR Object"). @@ -373,7 +373,7 @@ public class ModelInputData public byte[] Photo { get; set; } public decimal Height { get; set; } public float Weight { get; set; } - + public StudentAddress StudentAddress { get; set; } public Grade Grade { get; set; } } @@ -387,10 +387,10 @@ Cons: - EF does not support loading many columns at the same time into a single vector column. - EF requires a mandatory ID property in the POCO class - ML.NET might not support certain .NET types allowed by EF POCO classes (i.e. DateTime, etc.). -- ML.NET doesn't support embedded/navigation/relationship entity types such as `StudentAddress` in the sample above, neither complex-types in EF. +- ML.NET doesn't support embedded/navigation/relationship entity types such as `StudentAddress` in the sample above, neither complex-types in EF. - Input data classes won't be consistent/similar to ML.NET input data classes when using dataset files. -### Selected approach for input data class when reading from a database +### Selected approach for input data class when reading from a database *TO BE DISCUSSED/CONFIRMED:* @@ -406,7 +406,7 @@ Supporting the same scope of POCO entities supported by entity Framework seems p Sample CLI command: ``` -> mlnet auto-train --task regression --db-conn-string "YOUR-DATABASE-CONNECTION-STRING" --db-table "MyTrainingDbTable" --label-column-name Price +> mlnet auto-train --task regression --db-conn-string "YOUR-DATABASE-CONNECTION-STRING" --db-table "MyTrainingDbTable" --label-column-name Price ``` **2. CLI training from a database view:** @@ -414,7 +414,7 @@ Sample CLI command: Sample CLI command: ``` -> mlnet auto-train --task regression --db-conn-string "YOUR-DATABASE-CONNECTION-STRING" --db-view "MyTrainingDbView" --label-column-name Price +> mlnet auto-train --task regression --db-conn-string "YOUR-DATABASE-CONNECTION-STRING" --db-view "MyTrainingDbView" --label-column-name Price ``` **3. CLI training from a database with a SQL query sentence:** @@ -422,7 +422,7 @@ Sample CLI command: Sample CLI command: ``` -> mlnet auto-train --task regression --db-conn-string "YOUR-DATABASE-CONNECTION-STRING" --sql-query "SELECT * FROM MyTrainingDbTable WHERE Company = 'MSFT'" --label-column-name Price +> mlnet auto-train --task regression --db-conn-string "YOUR-DATABASE-CONNECTION-STRING" --sql-query "SELECT * FROM MyTrainingDbTable WHERE Company = 'MSFT'" --label-column-name Price ``` @@ -434,10 +434,10 @@ For ML.NET AutoML the C# code to use is the same than for regular ML.NET code si MLContext mlContext = new MLContext(); //Load train dataset from a database table -IDataView trainDataView = mlContext.Data.LoadFromDatabaseTable(connString: myConnString, tableName: "MyTrainDataTable"); +IDataView trainDataView = mlContext.Data.LoadFromDatabaseTable(connString: myConnString, tableName: "MyTrainDataTable"); //Load train dataset from a database table -IDataView testDataView = mlContext.Data.LoadFromDatabaseTable(connString: myConnString, tableName: "MyTestDataTable"); +IDataView testDataView = mlContext.Data.LoadFromDatabaseTable(connString: myConnString, tableName: "MyTestDataTable"); // Run AutoML experiment var progressHandler = new BinaryExperimentProgressHandler(); @@ -447,7 +447,7 @@ ExperimentResult experimentResult = mlContext.Auto( .Execute(trainingDataView, progressHandler: progressHandler); ``` -Therefore, most of the code above is regular AutoML API code and the only pieces of code using the DatabaseLoader are using the same API than when using regular ML.NET code for loading data from a database. +Therefore, most of the code above is regular AutoML API code and the only pieces of code using the DatabaseLoader are using the same API than when using regular ML.NET code for loading data from a database. # Model Builder for Visual Studio mock UI samples @@ -458,7 +458,7 @@ TBD # Open questions -- QUESTION 1 TBD: +- QUESTION 1 TBD: # References diff --git a/build/BranchInfo.props b/eng/BranchInfo.props similarity index 95% rename from build/BranchInfo.props rename to eng/BranchInfo.props index 5ed7f0fb5f..fe62447068 100644 --- a/build/BranchInfo.props +++ b/eng/BranchInfo.props @@ -30,11 +30,11 @@ 1 5 - 3 + 6 0 17 - 3 + 6 diff --git a/eng/Build.props b/eng/Build.props new file mode 100644 index 0000000000..de6a651461 --- /dev/null +++ b/eng/Build.props @@ -0,0 +1,17 @@ + + + + + + true + false + + + + + + + + + + diff --git a/build/ExternalBenchmarkDataFiles.props b/eng/ExternalBenchmarkDataFiles.props similarity index 100% rename from build/ExternalBenchmarkDataFiles.props rename to eng/ExternalBenchmarkDataFiles.props diff --git a/eng/Signing.props b/eng/Signing.props new file mode 100644 index 0000000000..5213afc61e --- /dev/null +++ b/eng/Signing.props @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/build/TensorflowMetaFiles.props b/eng/TensorflowMetaFiles.props similarity index 100% rename from build/TensorflowMetaFiles.props rename to eng/TensorflowMetaFiles.props diff --git a/eng/Tools.props b/eng/Tools.props new file mode 100644 index 0000000000..a0890081f2 --- /dev/null +++ b/eng/Tools.props @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml new file mode 100644 index 0000000000..e348d0998a --- /dev/null +++ b/eng/Version.Details.xml @@ -0,0 +1,67 @@ + + + + + https://dev.azure.com/dnceng/internal/_git/dotnet-symuploader + 9bdfdb0af37d2e93bdecf238a8a51c0a965444d6 + + + + + https://github.com/dotnet/arcade + a81e6e87cf21837abfde2da6eb9b057bea9f49fc + + + https://github.com/dotnet/arcade + a81e6e87cf21837abfde2da6eb9b057bea9f49fc + + + https://github.com/dotnet/arcade + a81e6e87cf21837abfde2da6eb9b057bea9f49fc + + + https://github.com/dotnet/arcade + a81e6e87cf21837abfde2da6eb9b057bea9f49fc + + + https://github.com/dotnet/arcade + a81e6e87cf21837abfde2da6eb9b057bea9f49fc + + + https://github.com/dotnet/arcade-services + 869869342f1ec338de96adcea6e003b61f195256 + + + https://github.com/dotnet/arcade-services + 592654f4a6855d7738a7c7c780355ac54457fdae + + + https://github.com/dotnet/xharness + 3b64ab7ab565cfd19fe7102e3d76271f16f0fc6d + + + https://github.com/dotnet/roslyn + d57cda76c2b76cff75487a085d289cfadd99150b + + + https://github.com/dotnet/sourcelink + 8a3edd1902dbfe3adba65f22e3bb7aa2cc73e97f + + + https://github.com/dotnet/sourcelink + 8a3edd1902dbfe3adba65f22e3bb7aa2cc73e97f + + + https://github.com/dotnet/symreader-converter + c5ba7c88f92e2dde156c324a8c8edc04d9fa4fe0 + + + https://github.com/dotnet/symreader-converter + c5ba7c88f92e2dde156c324a8c8edc04d9fa4fe0 + + + https://github.com/dotnet/xliff-tasks + 975065e08307a459dc2649b1c852f5c4cafd2f91 + + + diff --git a/eng/Versions.props b/eng/Versions.props new file mode 100644 index 0000000000..96685cc388 --- /dev/null +++ b/eng/Versions.props @@ -0,0 +1,141 @@ + + + + + + true + 1.5.6 + preview + 1.0.0.0 + + + 10.0.3 + 4.4.0 + 4.3.0 + 4.7.1 + + + 3.10.1 + 2.2.3 + 2.1.0 + 1.6.0 + 0.0.0.9 + 2.1.3 + 4.5.0 + 4.5.0 + 4.5.0 + 2.3.1 + 2 + 0.20.1 + 3.3.1 + 1.0.0-beta.21155.3 + 1.0.0-beta.21155.3 + 2.0.0 + 4.3.0 + 4.5.0 + 1.2.0 + + + 1.0.0-beta-62824-02 + 1.9.0 + 1.2.1 + 4.3.6 + 1.0.0-beta.19225.5 + 1.1.0-beta-20206-02 + 3.0.0-preview4-04926-01 + + + 0.12.0 + 1.0.1-beta1.20374.2 + 3.0.1 + 0.0.6-test + 0.0.7-test + 0.0.13-test + 0.0.6-test + 4.6.1 + 1.2.7 + 1.0.112.2 + + + false + true + + 2.2.1 + 1.0.2 + 4.0.0-rc3-24214-00 + 1.10.1 + 0.25.2 + 2.0.8 + 4.3.4 + 12.3.0 + 3.0.0 + 1.3.1 + 0.1.0 + 15.7.179 + 15.7.179 + 15.7.179 + 15.7.179 + 2.6.3 + 2.9.0 + 3.4.0 + 3.19.8 + 2.3.13 + 2.1.0 + 2.0.0 + 2.1.0 + 3.1.0 + 3.8.0-3.20460.2 + 4.8.3 + 5.3.0.1 + 2.3.0 + 9.0.1 + 4.7.0 + 4.4.0 + 5.6.0-preview.2.6489 + 0.32.0 + 2.2.143 + 3.0.0 + 4.5.0 + 1.5.0 + 4.0.0 + 4.3.0 + 4.5.0 + 4.3.0 + 4.5.3 + 4.5.0 + 1.6.0 + 4.7.0 + 4.3.0 + 4.5.0 + 4.5.2 + 4.4.0 + 8.5.0 + 2.4.0 + 2.0.3 + 2.4.0 + 5.0.0-beta.20461.7 + 5.0.0-beta.20461.7 + 1.22.0 + 1.1.2 + 2.0.0 + 1.6.0 + 1.0.0 + 2.0.4 + 1.1.0-beta2-19575-01 + 1.1.0-beta2-19575-01 + 1.7.0 + 1.1.0-beta.20258.6 + 1.1.0-beta-20464-02 + 1.1.0-beta-20464-02 + 5.0.0-beta.20461.7 + 1.0.0-beta.20420.1 + 1.1.0-beta.20461.2 + 1.0.0-prerelease.20457.1 + 1.1.145102 + + diff --git a/eng/common/CIBuild.cmd b/eng/common/CIBuild.cmd new file mode 100644 index 0000000000..56c2f25ac2 --- /dev/null +++ b/eng/common/CIBuild.cmd @@ -0,0 +1,2 @@ +@echo off +powershell -ExecutionPolicy ByPass -NoProfile -command "& """%~dp0Build.ps1""" -restore -build -test -sign -pack -publish -ci %*" \ No newline at end of file diff --git a/eng/common/PSScriptAnalyzerSettings.psd1 b/eng/common/PSScriptAnalyzerSettings.psd1 new file mode 100644 index 0000000000..4c1ea7c98e --- /dev/null +++ b/eng/common/PSScriptAnalyzerSettings.psd1 @@ -0,0 +1,11 @@ +@{ + IncludeRules=@('PSAvoidUsingCmdletAliases', + 'PSAvoidUsingWMICmdlet', + 'PSAvoidUsingPositionalParameters', + 'PSAvoidUsingInvokeExpression', + 'PSUseDeclaredVarsMoreThanAssignments', + 'PSUseCmdletCorrectly', + 'PSStandardDSCFunctionsInResource', + 'PSUseIdenticalMandatoryParametersForDSC', + 'PSUseIdenticalParametersForDSC') +} \ No newline at end of file diff --git a/eng/common/README.md b/eng/common/README.md new file mode 100644 index 0000000000..ff49c37152 --- /dev/null +++ b/eng/common/README.md @@ -0,0 +1,28 @@ +# Don't touch this folder + + uuuuuuuuuuuuuuuuuuuu + u" uuuuuuuuuuuuuuuuuu "u + u" u$$$$$$$$$$$$$$$$$$$$u "u + u" u$$$$$$$$$$$$$$$$$$$$$$$$u "u + u" u$$$$$$$$$$$$$$$$$$$$$$$$$$$$u "u + u" u$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$u "u + u" u$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$u "u + $ $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ $ + $ $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ $ + $ $$$" ... "$... ...$" ... "$$$ ... "$$$ $ + $ $$$u `"$$$$$$$ $$$ $$$$$ $$ $$$ $$$ $ + $ $$$$$$uu "$$$$ $$$ $$$$$ $$ """ u$$$ $ + $ $$$""$$$ $$$$ $$$u "$$$" u$$ $$$$$$$$ $ + $ $$$$....,$$$$$..$$$$$....,$$$$..$$$$$$$$ $ + $ $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ $ + "u "$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$" u" + "u "$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$" u" + "u "$$$$$$$$$$$$$$$$$$$$$$$$$$$$" u" + "u "$$$$$$$$$$$$$$$$$$$$$$$$" u" + "u "$$$$$$$$$$$$$$$$$$$$" u" + "u """""""""""""""""" u" + """""""""""""""""""" + +!!! Changes made in this directory are subject to being overwritten by automation !!! + +The files in this directory are shared by all Arcade repos and managed by automation. If you need to make changes to these files, open an issue or submit a pull request to https://github.com/dotnet/arcade first. diff --git a/eng/common/SetupNugetSources.ps1 b/eng/common/SetupNugetSources.ps1 new file mode 100644 index 0000000000..bb3617133f --- /dev/null +++ b/eng/common/SetupNugetSources.ps1 @@ -0,0 +1,160 @@ +# This file is a temporary workaround for internal builds to be able to restore from private AzDO feeds. +# This file should be removed as part of this issue: https://github.com/dotnet/arcade/issues/4080 +# +# What the script does is iterate over all package sources in the pointed NuGet.config and add a credential entry +# under for each Maestro managed private feed. Two additional credential +# entries are also added for the two private static internal feeds: dotnet3-internal and dotnet3-internal-transport. +# +# This script needs to be called in every job that will restore packages and which the base repo has +# private AzDO feeds in the NuGet.config. +# +# See example YAML call for this script below. Note the use of the variable `$(dn-bot-dnceng-artifact-feeds-rw)` +# from the AzureDevOps-Artifact-Feeds-Pats variable group. +# +# Any disabledPackageSources entries which start with "darc-int" will be re-enabled as part of this script executing +# +# - task: PowerShell@2 +# displayName: Setup Private Feeds Credentials +# condition: eq(variables['Agent.OS'], 'Windows_NT') +# inputs: +# filePath: $(Build.SourcesDirectory)/eng/common/SetupNugetSources.ps1 +# arguments: -ConfigFile $(Build.SourcesDirectory)/NuGet.config -Password $Env:Token +# env: +# Token: $(dn-bot-dnceng-artifact-feeds-rw) + +[CmdletBinding()] +param ( + [Parameter(Mandatory = $true)][string]$ConfigFile, + [Parameter(Mandatory = $true)][string]$Password +) + +$ErrorActionPreference = "Stop" +Set-StrictMode -Version 2.0 +[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 + +. $PSScriptRoot\tools.ps1 + +# Add source entry to PackageSources +function AddPackageSource($sources, $SourceName, $SourceEndPoint, $creds, $Username, $Password) { + $packageSource = $sources.SelectSingleNode("add[@key='$SourceName']") + + if ($packageSource -eq $null) + { + $packageSource = $doc.CreateElement("add") + $packageSource.SetAttribute("key", $SourceName) + $packageSource.SetAttribute("value", $SourceEndPoint) + $sources.AppendChild($packageSource) | Out-Null + } + else { + Write-Host "Package source $SourceName already present." + } + + AddCredential -Creds $creds -Source $SourceName -Username $Username -Password $Password +} + +# Add a credential node for the specified source +function AddCredential($creds, $source, $username, $password) { + # Looks for credential configuration for the given SourceName. Create it if none is found. + $sourceElement = $creds.SelectSingleNode($Source) + if ($sourceElement -eq $null) + { + $sourceElement = $doc.CreateElement($Source) + $creds.AppendChild($sourceElement) | Out-Null + } + + # Add the node to the credential if none is found. + $usernameElement = $sourceElement.SelectSingleNode("add[@key='Username']") + if ($usernameElement -eq $null) + { + $usernameElement = $doc.CreateElement("add") + $usernameElement.SetAttribute("key", "Username") + $sourceElement.AppendChild($usernameElement) | Out-Null + } + $usernameElement.SetAttribute("value", $Username) + + # Add the to the credential if none is found. + # Add it as a clear text because there is no support for encrypted ones in non-windows .Net SDKs. + # -> https://github.com/NuGet/Home/issues/5526 + $passwordElement = $sourceElement.SelectSingleNode("add[@key='ClearTextPassword']") + if ($passwordElement -eq $null) + { + $passwordElement = $doc.CreateElement("add") + $passwordElement.SetAttribute("key", "ClearTextPassword") + $sourceElement.AppendChild($passwordElement) | Out-Null + } + $passwordElement.SetAttribute("value", $Password) +} + +function InsertMaestroPrivateFeedCredentials($Sources, $Creds, $Username, $Password) { + $maestroPrivateSources = $Sources.SelectNodes("add[contains(@key,'darc-int')]") + + Write-Host "Inserting credentials for $($maestroPrivateSources.Count) Maestro's private feeds." + + ForEach ($PackageSource in $maestroPrivateSources) { + Write-Host "`tInserting credential for Maestro's feed:" $PackageSource.Key + AddCredential -Creds $creds -Source $PackageSource.Key -Username $Username -Password $Password + } +} + +function EnablePrivatePackageSources($DisabledPackageSources) { + $maestroPrivateSources = $DisabledPackageSources.SelectNodes("add[contains(@key,'darc-int')]") + ForEach ($DisabledPackageSource in $maestroPrivateSources) { + Write-Host "`tEnsuring private source '$($DisabledPackageSource.key)' is enabled" + $DisabledPackageSource.SetAttribute("value", "false") + } +} + +if (!(Test-Path $ConfigFile -PathType Leaf)) { + Write-PipelineTelemetryError -Category 'Build' -Message "Eng/common/SetupNugetSources.ps1 returned a non-zero exit code. Couldn't find the NuGet config file: $ConfigFile" + ExitWithExitCode 1 +} + +if (!$Password) { + Write-PipelineTelemetryError -Category 'Build' -Message 'Eng/common/SetupNugetSources.ps1 returned a non-zero exit code. Please supply a valid PAT' + ExitWithExitCode 1 +} + +# Load NuGet.config +$doc = New-Object System.Xml.XmlDocument +$filename = (Get-Item $ConfigFile).FullName +$doc.Load($filename) + +# Get reference to or create one if none exist already +$sources = $doc.DocumentElement.SelectSingleNode("packageSources") +if ($sources -eq $null) { + $sources = $doc.CreateElement("packageSources") + $doc.DocumentElement.AppendChild($sources) | Out-Null +} + +# Looks for a node. Create it if none is found. +$creds = $doc.DocumentElement.SelectSingleNode("packageSourceCredentials") +if ($creds -eq $null) { + $creds = $doc.CreateElement("packageSourceCredentials") + $doc.DocumentElement.AppendChild($creds) | Out-Null +} + +# Check for disabledPackageSources; we'll enable any darc-int ones we find there +$disabledSources = $doc.DocumentElement.SelectSingleNode("disabledPackageSources") +if ($disabledSources -ne $null) { + Write-Host "Checking for any darc-int disabled package sources in the disabledPackageSources node" + EnablePrivatePackageSources -DisabledPackageSources $disabledSources +} + +$userName = "dn-bot" + +# Insert credential nodes for Maestro's private feeds +InsertMaestroPrivateFeedCredentials -Sources $sources -Creds $creds -Username $userName -Password $Password + +$dotnet31Source = $sources.SelectSingleNode("add[@key='dotnet3.1']") +if ($dotnet31Source -ne $null) { + AddPackageSource -Sources $sources -SourceName "dotnet3.1-internal" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3.1-internal/nuget/v2" -Creds $creds -Username $userName -Password $Password + AddPackageSource -Sources $sources -SourceName "dotnet3.1-internal-transport" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3.1-internal-transport/nuget/v2" -Creds $creds -Username $userName -Password $Password +} + +$dotnet5Source = $sources.SelectSingleNode("add[@key='dotnet5']") +if ($dotnet5Source -ne $null) { + AddPackageSource -Sources $sources -SourceName "dotnet5-internal" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/internal/_packaging/dotnet5-internal/nuget/v2" -Creds $creds -Username $userName -Password $Password + AddPackageSource -Sources $sources -SourceName "dotnet5-internal-transport" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/internal/_packaging/dotnet5-internal-transport/nuget/v2" -Creds $creds -Username $userName -Password $Password +} + +$doc.Save($filename) diff --git a/eng/common/SetupNugetSources.sh b/eng/common/SetupNugetSources.sh new file mode 100755 index 0000000000..ef33382954 --- /dev/null +++ b/eng/common/SetupNugetSources.sh @@ -0,0 +1,167 @@ +#!/usr/bin/env bash + +# This file is a temporary workaround for internal builds to be able to restore from private AzDO feeds. +# This file should be removed as part of this issue: https://github.com/dotnet/arcade/issues/4080 +# +# What the script does is iterate over all package sources in the pointed NuGet.config and add a credential entry +# under for each Maestro's managed private feed. Two additional credential +# entries are also added for the two private static internal feeds: dotnet3-internal and dotnet3-internal-transport. +# +# This script needs to be called in every job that will restore packages and which the base repo has +# private AzDO feeds in the NuGet.config. +# +# See example YAML call for this script below. Note the use of the variable `$(dn-bot-dnceng-artifact-feeds-rw)` +# from the AzureDevOps-Artifact-Feeds-Pats variable group. +# +# Any disabledPackageSources entries which start with "darc-int" will be re-enabled as part of this script executing. +# +# - task: Bash@3 +# displayName: Setup Private Feeds Credentials +# inputs: +# filePath: $(Build.SourcesDirectory)/eng/common/SetupNugetSources.sh +# arguments: $(Build.SourcesDirectory)/NuGet.config $Token +# condition: ne(variables['Agent.OS'], 'Windows_NT') +# env: +# Token: $(dn-bot-dnceng-artifact-feeds-rw) + +ConfigFile=$1 +CredToken=$2 +NL='\n' +TB=' ' + +source="${BASH_SOURCE[0]}" + +# resolve $source until the file is no longer a symlink +while [[ -h "$source" ]]; do + scriptroot="$( cd -P "$( dirname "$source" )" && pwd )" + source="$(readlink "$source")" + # if $source was a relative symlink, we need to resolve it relative to the path where the + # symlink file was located + [[ $source != /* ]] && source="$scriptroot/$source" +done +scriptroot="$( cd -P "$( dirname "$source" )" && pwd )" + +. "$scriptroot/tools.sh" + +if [ ! -f "$ConfigFile" ]; then + Write-PipelineTelemetryError -Category 'Build' "Error: Eng/common/SetupNugetSources.sh returned a non-zero exit code. Couldn't find the NuGet config file: $ConfigFile" + ExitWithExitCode 1 +fi + +if [ -z "$CredToken" ]; then + Write-PipelineTelemetryError -category 'Build' "Error: Eng/common/SetupNugetSources.sh returned a non-zero exit code. Please supply a valid PAT" + ExitWithExitCode 1 +fi + +if [[ `uname -s` == "Darwin" ]]; then + NL=$'\\\n' + TB='' +fi + +# Ensure there is a ... section. +grep -i "" $ConfigFile +if [ "$?" != "0" ]; then + echo "Adding ... section." + ConfigNodeHeader="" + PackageSourcesTemplate="${TB}${NL}${TB}" + + sed -i.bak "s|$ConfigNodeHeader|$ConfigNodeHeader${NL}$PackageSourcesTemplate|" $ConfigFile +fi + +# Ensure there is a ... section. +grep -i "" $ConfigFile +if [ "$?" != "0" ]; then + echo "Adding ... section." + + PackageSourcesNodeFooter="" + PackageSourceCredentialsTemplate="${TB}${NL}${TB}" + + sed -i.bak "s|$PackageSourcesNodeFooter|$PackageSourcesNodeFooter${NL}$PackageSourceCredentialsTemplate|" $ConfigFile +fi + +PackageSources=() + +# Ensure dotnet3.1-internal and dotnet3.1-internal-transport are in the packageSources if the public dotnet3.1 feeds are present +grep -i "" + + sed -i.bak "s|$PackageSourcesNodeFooter|$PackageSourceTemplate${NL}$PackageSourcesNodeFooter|" $ConfigFile + fi + PackageSources+=('dotnet3.1-internal') + + grep -i "" $ConfigFile + if [ "$?" != "0" ]; then + echo "Adding dotnet3.1-internal-transport to the packageSources." + PackageSourcesNodeFooter="" + PackageSourceTemplate="${TB}" + + sed -i.bak "s|$PackageSourcesNodeFooter|$PackageSourceTemplate${NL}$PackageSourcesNodeFooter|" $ConfigFile + fi + PackageSources+=('dotnet3.1-internal-transport') +fi + +# Ensure dotnet5-internal and dotnet5-internal-transport are in the packageSources if the public dotnet5 feeds are present +grep -i "" + + sed -i.bak "s|$PackageSourcesNodeFooter|$PackageSourceTemplate${NL}$PackageSourcesNodeFooter|" $ConfigFile + fi + PackageSources+=('dotnet5-internal') + + grep -i "" $ConfigFile + if [ "$?" != "0" ]; then + echo "Adding dotnet5-internal-transport to the packageSources." + PackageSourcesNodeFooter="" + PackageSourceTemplate="${TB}" + + sed -i.bak "s|$PackageSourcesNodeFooter|$PackageSourceTemplate${NL}$PackageSourcesNodeFooter|" $ConfigFile + fi + PackageSources+=('dotnet5-internal-transport') +fi + +# I want things split line by line +PrevIFS=$IFS +IFS=$'\n' +PackageSources+="$IFS" +PackageSources+=$(grep -oh '"darc-int-[^"]*"' $ConfigFile | tr -d '"') +IFS=$PrevIFS + +for FeedName in ${PackageSources[@]} ; do + # Check if there is no existing credential for this FeedName + grep -i "<$FeedName>" $ConfigFile + if [ "$?" != "0" ]; then + echo "Adding credentials for $FeedName." + + PackageSourceCredentialsNodeFooter="" + NewCredential="${TB}${TB}<$FeedName>${NL}${NL}${NL}" + + sed -i.bak "s|$PackageSourceCredentialsNodeFooter|$NewCredential${NL}$PackageSourceCredentialsNodeFooter|" $ConfigFile + fi +done + +# Re-enable any entries in disabledPackageSources where the feed name contains darc-int +grep -i "" $ConfigFile +if [ "$?" == "0" ]; then + DisabledDarcIntSources=() + echo "Re-enabling any disabled \"darc-int\" package sources in $ConfigFile" + DisabledDarcIntSources+=$(grep -oh '"darc-int-[^"]*" value="true"' $ConfigFile | tr -d '"') + for DisabledSourceName in ${DisabledDarcIntSources[@]} ; do + if [[ $DisabledSourceName == darc-int* ]] + then + OldDisableValue="add key=\"$DisabledSourceName\" value=\"true\"" + NewDisableValue="add key=\"$DisabledSourceName\" value=\"false\"" + sed -i.bak "s|$OldDisableValue|$NewDisableValue|" $ConfigFile + echo "Neutralized disablePackageSources entry for '$DisabledSourceName'" + fi + done +fi diff --git a/eng/common/build.ps1 b/eng/common/build.ps1 new file mode 100644 index 0000000000..1fd7f686fa --- /dev/null +++ b/eng/common/build.ps1 @@ -0,0 +1,161 @@ +[CmdletBinding(PositionalBinding=$false)] +Param( + [string][Alias('c')]$configuration = "Debug", + [string]$platform = $null, + [string] $projects, + [string][Alias('v')]$verbosity = "minimal", + [string] $msbuildEngine = $null, + [bool] $warnAsError = $true, + [bool] $nodeReuse = $true, + [bool] $useDefaultDotnetInstall = $false, + [switch][Alias('r')]$restore, + [switch] $deployDeps, + [switch][Alias('b')]$build, + [switch] $rebuild, + [switch] $deploy, + [switch][Alias('t')]$test, + [switch] $integrationTest, + [switch] $performanceTest, + [switch] $sign, + [switch] $pack, + [switch] $publish, + [switch] $clean, + [switch][Alias('bl')]$binaryLog, + [switch][Alias('nobl')]$excludeCIBinarylog, + [switch] $ci, + [switch] $prepareMachine, + [string] $runtimeSourceFeed = '', + [string] $runtimeSourceFeedKey = '', + [switch] $help, + [Parameter(ValueFromRemainingArguments=$true)][String[]]$properties +) + +# Unset 'Platform' environment variable to avoid unwanted collision in InstallDotNetCore.targets file +# some computer has this env var defined (e.g. Some HP) +if($env:Platform) { + $env:Platform="" +} +function Print-Usage() { + Write-Host "Common settings:" + Write-Host " -configuration Build configuration: 'Debug' or 'Release' (short: -c)" + Write-Host " -platform Platform configuration: 'x86', 'x64' or any valid Platform value to pass to msbuild" + Write-Host " -verbosity Msbuild verbosity: q[uiet], m[inimal], n[ormal], d[etailed], and diag[nostic] (short: -v)" + Write-Host " -binaryLog Output binary log (short: -bl)" + Write-Host " -help Print help and exit" + Write-Host "" + + Write-Host "Actions:" + Write-Host " -restore Restore dependencies (short: -r)" + Write-Host " -build Build solution (short: -b)" + Write-Host " -rebuild Rebuild solution" + Write-Host " -deploy Deploy built VSIXes" + Write-Host " -deployDeps Deploy dependencies (e.g. VSIXes for integration tests)" + Write-Host " -test Run all unit tests in the solution (short: -t)" + Write-Host " -integrationTest Run all integration tests in the solution" + Write-Host " -performanceTest Run all performance tests in the solution" + Write-Host " -pack Package build outputs into NuGet packages and Willow components" + Write-Host " -sign Sign build outputs" + Write-Host " -publish Publish artifacts (e.g. symbols)" + Write-Host " -clean Clean the solution" + Write-Host "" + + Write-Host "Advanced settings:" + Write-Host " -projects Semi-colon delimited list of sln/proj's to build. Globbing is supported (*.sln)" + Write-Host " -ci Set when running on CI server" + Write-Host " -excludeCIBinarylog Don't output binary log (short: -nobl)" + Write-Host " -prepareMachine Prepare machine for CI run, clean up processes after build" + Write-Host " -warnAsError Sets warnaserror msbuild parameter ('true' or 'false')" + Write-Host " -msbuildEngine Msbuild engine to use to run build ('dotnet', 'vs', or unspecified)." + Write-Host " -useDefaultDotnetInstall Use dotnet-install.* scripts from public location as opposed to from eng common folder" + Write-Host "" + + Write-Host "Command line arguments not listed above are passed thru to msbuild." + Write-Host "The above arguments can be shortened as much as to be unambiguous (e.g. -co for configuration, -t for test, etc.)." +} + +. $PSScriptRoot\tools.ps1 + +function InitializeCustomToolset { + if (-not $restore) { + return + } + + $script = Join-Path $EngRoot 'restore-toolset.ps1' + + if (Test-Path $script) { + . $script + } +} + +function Build { + $toolsetBuildProj = InitializeToolset + InitializeCustomToolset + + $bl = if ($binaryLog) { '/bl:' + (Join-Path $LogDir 'Build.binlog') } else { '' } + $platformArg = if ($platform) { "/p:Platform=$platform" } else { '' } + + if ($projects) { + # Re-assign properties to a new variable because PowerShell doesn't let us append properties directly for unclear reasons. + # Explicitly set the type as string[] because otherwise PowerShell would make this char[] if $properties is empty. + [string[]] $msbuildArgs = $properties + + # Resolve relative project paths into full paths + $projects = ($projects.Split(';').ForEach({Resolve-Path $_}) -join ';') + + $msbuildArgs += "/p:Projects=$projects" + $properties = $msbuildArgs + } + + MSBuild $toolsetBuildProj ` + $bl ` + $platformArg ` + /p:Configuration=$configuration ` + /p:RepoRoot=$RepoRoot ` + /p:Restore=$restore ` + /p:DeployDeps=$deployDeps ` + /p:Build=$build ` + /p:Rebuild=$rebuild ` + /p:Deploy=$deploy ` + /p:Test=$test ` + /p:Pack=$pack ` + /p:IntegrationTest=$integrationTest ` + /p:PerformanceTest=$performanceTest ` + /p:Sign=$sign ` + /p:Publish=$publish ` + @properties +} + +try { + if ($clean) { + if (Test-Path $ArtifactsDir) { + Remove-Item -Recurse -Force $ArtifactsDir + Write-Host 'Artifacts directory deleted.' + } + exit 0 + } + + if ($help -or (($null -ne $properties) -and ($properties.Contains('/help') -or $properties.Contains('/?')))) { + Print-Usage + exit 0 + } + + if ($ci) { + if (-not $excludeCIBinarylog) { + $binaryLog = $true + } + $nodeReuse = $false + } + + if ($restore) { + InitializeNativeTools + } + + Build +} +catch { + Write-Host $_.ScriptStackTrace + Write-PipelineTelemetryError -Category 'InitializeToolset' -Message $_ + ExitWithExitCode 1 +} + +ExitWithExitCode 0 diff --git a/eng/common/build.sh b/eng/common/build.sh new file mode 100755 index 0000000000..19849adbee --- /dev/null +++ b/eng/common/build.sh @@ -0,0 +1,239 @@ +#!/usr/bin/env bash + +# Stop script if unbound variable found (use ${var:-} if intentional) +set -u + +# Stop script if command returns non-zero exit code. +# Prevents hidden errors caused by missing error code propagation. +set -e + +usage() +{ + echo "Common settings:" + echo " --configuration Build configuration: 'Debug' or 'Release' (short: -c)" + echo " --verbosity Msbuild verbosity: q[uiet], m[inimal], n[ormal], d[etailed], and diag[nostic] (short: -v)" + echo " --binaryLog Create MSBuild binary log (short: -bl)" + echo " --help Print help and exit (short: -h)" + echo "" + + echo "Actions:" + echo " --restore Restore dependencies (short: -r)" + echo " --build Build solution (short: -b)" + echo " --rebuild Rebuild solution" + echo " --test Run all unit tests in the solution (short: -t)" + echo " --integrationTest Run all integration tests in the solution" + echo " --performanceTest Run all performance tests in the solution" + echo " --pack Package build outputs into NuGet packages and Willow components" + echo " --sign Sign build outputs" + echo " --publish Publish artifacts (e.g. symbols)" + echo " --clean Clean the solution" + echo "" + + echo "Advanced settings:" + echo " --projects Project or solution file(s) to build" + echo " --ci Set when running on CI server" + echo " --excludeCIBinarylog Don't output binary log (short: -nobl)" + echo " --prepareMachine Prepare machine for CI run, clean up processes after build" + echo " --nodeReuse Sets nodereuse msbuild parameter ('true' or 'false')" + echo " --warnAsError Sets warnaserror msbuild parameter ('true' or 'false')" + echo " --useDefaultDotnetInstall Use dotnet-install.* scripts from public location as opposed to from eng common folder" + + echo "" + echo "Command line arguments not listed above are passed thru to msbuild." + echo "Arguments can also be passed in with a single hyphen." +} + +source="${BASH_SOURCE[0]}" + +# resolve $source until the file is no longer a symlink +while [[ -h "$source" ]]; do + scriptroot="$( cd -P "$( dirname "$source" )" && pwd )" + source="$(readlink "$source")" + # if $source was a relative symlink, we need to resolve it relative to the path where the + # symlink file was located + [[ $source != /* ]] && source="$scriptroot/$source" +done +scriptroot="$( cd -P "$( dirname "$source" )" && pwd )" + +restore=false +build=false +rebuild=false +test=false +integration_test=false +performance_test=false +pack=false +publish=false +sign=false +public=false +ci=false +clean=false + +warn_as_error=true +node_reuse=true +binary_log=false +exclude_ci_binary_log=false +pipelines_log=false + +projects='' +configuration='Debug' +prepare_machine=false +verbosity='minimal' +runtime_source_feed='' +runtime_source_feed_key='' +use_default_dotnet_install=false + +properties='' +while [[ $# > 0 ]]; do + opt="$(echo "${1/#--/-}" | awk '{print tolower($0)}')" + case "$opt" in + -help|-h) + usage + exit 0 + ;; + -clean) + clean=true + ;; + -configuration|-c) + configuration=$2 + shift + ;; + -verbosity|-v) + verbosity=$2 + shift + ;; + -binarylog|-bl) + binary_log=true + ;; + -excludeCIBinarylog|-nobl) + exclude_ci_binary_log=true + ;; + -pipelineslog|-pl) + pipelines_log=true + ;; + -restore|-r) + restore=true + ;; + -build|-b) + build=true + ;; + -rebuild) + rebuild=true + ;; + -pack) + pack=true + ;; + -test|-t) + test=true + ;; + -integrationtest) + integration_test=true + ;; + -performancetest) + performance_test=true + ;; + -sign) + sign=true + ;; + -publish) + publish=true + ;; + -preparemachine) + prepare_machine=true + ;; + -projects) + projects=$2 + shift + ;; + -ci) + ci=true + ;; + -warnaserror) + warn_as_error=$2 + shift + ;; + -nodereuse) + node_reuse=$2 + shift + ;; + -runtimesourcefeed) + runtime_source_feed=$2 + shift + ;; + -runtimesourcefeedkey) + runtime_source_feed_key=$2 + shift + ;; + -usedefaultdotnetinstall) + use_default_dotnet_install=$2 + shift + ;; + *) + properties="$properties $1" + ;; + esac + + shift +done + +if [[ "$ci" == true ]]; then + pipelines_log=true + node_reuse=false + if [[ "$exclude_ci_binary_log" == false ]]; then + binary_log=true + fi +fi + +. "$scriptroot/tools.sh" + +function InitializeCustomToolset { + local script="$eng_root/restore-toolset.sh" + + if [[ -a "$script" ]]; then + . "$script" + fi +} + +function Build { + InitializeToolset + InitializeCustomToolset + + if [[ ! -z "$projects" ]]; then + properties="$properties /p:Projects=$projects" + fi + + local bl="" + if [[ "$binary_log" == true ]]; then + bl="/bl:\"$log_dir/Build.binlog\"" + fi + + MSBuild $_InitializeToolset \ + $bl \ + /p:Configuration=$configuration \ + /p:RepoRoot="$repo_root" \ + /p:Restore=$restore \ + /p:Build=$build \ + /p:Rebuild=$rebuild \ + /p:Test=$test \ + /p:Pack=$pack \ + /p:IntegrationTest=$integration_test \ + /p:PerformanceTest=$performance_test \ + /p:Sign=$sign \ + /p:Publish=$publish \ + $properties + + ExitWithExitCode 0 +} + +if [[ "$clean" == true ]]; then + if [ -d "$artifacts_dir" ]; then + rm -rf $artifacts_dir + echo "Artifacts directory deleted." + fi + exit 0 +fi + +if [[ "$restore" == true ]]; then + InitializeNativeTools +fi + +Build diff --git a/eng/common/cibuild.sh b/eng/common/cibuild.sh new file mode 100755 index 0000000000..1a02c0dec8 --- /dev/null +++ b/eng/common/cibuild.sh @@ -0,0 +1,16 @@ +#!/usr/bin/env bash + +source="${BASH_SOURCE[0]}" + +# resolve $SOURCE until the file is no longer a symlink +while [[ -h $source ]]; do + scriptroot="$( cd -P "$( dirname "$source" )" && pwd )" + source="$(readlink "$source")" + + # if $source was a relative symlink, we need to resolve it relative to the path where + # the symlink file was located + [[ $source != /* ]] && source="$scriptroot/$source" +done +scriptroot="$( cd -P "$( dirname "$source" )" && pwd )" + +. "$scriptroot/build.sh" --restore --build --test --pack --publish --ci $@ \ No newline at end of file diff --git a/eng/common/cross/arm/sources.list.bionic b/eng/common/cross/arm/sources.list.bionic new file mode 100644 index 0000000000..2109557409 --- /dev/null +++ b/eng/common/cross/arm/sources.list.bionic @@ -0,0 +1,11 @@ +deb http://ports.ubuntu.com/ubuntu-ports/ bionic main restricted universe +deb-src http://ports.ubuntu.com/ubuntu-ports/ bionic main restricted universe + +deb http://ports.ubuntu.com/ubuntu-ports/ bionic-updates main restricted universe +deb-src http://ports.ubuntu.com/ubuntu-ports/ bionic-updates main restricted universe + +deb http://ports.ubuntu.com/ubuntu-ports/ bionic-backports main restricted +deb-src http://ports.ubuntu.com/ubuntu-ports/ bionic-backports main restricted + +deb http://ports.ubuntu.com/ubuntu-ports/ bionic-security main restricted universe multiverse +deb-src http://ports.ubuntu.com/ubuntu-ports/ bionic-security main restricted universe multiverse diff --git a/eng/common/cross/arm/sources.list.jessie b/eng/common/cross/arm/sources.list.jessie new file mode 100644 index 0000000000..4d142ac9b1 --- /dev/null +++ b/eng/common/cross/arm/sources.list.jessie @@ -0,0 +1,3 @@ +# Debian (sid) # UNSTABLE +deb http://ftp.debian.org/debian/ sid main contrib non-free +deb-src http://ftp.debian.org/debian/ sid main contrib non-free diff --git a/eng/common/cross/arm/sources.list.trusty b/eng/common/cross/arm/sources.list.trusty new file mode 100644 index 0000000000..07d8f88d82 --- /dev/null +++ b/eng/common/cross/arm/sources.list.trusty @@ -0,0 +1,11 @@ +deb http://ports.ubuntu.com/ubuntu-ports/ trusty main restricted universe +deb-src http://ports.ubuntu.com/ubuntu-ports/ trusty main restricted universe + +deb http://ports.ubuntu.com/ubuntu-ports/ trusty-updates main restricted universe +deb-src http://ports.ubuntu.com/ubuntu-ports/ trusty-updates main restricted universe + +deb http://ports.ubuntu.com/ubuntu-ports/ trusty-backports main restricted +deb-src http://ports.ubuntu.com/ubuntu-ports/ trusty-backports main restricted + +deb http://ports.ubuntu.com/ubuntu-ports/ trusty-security main restricted universe multiverse +deb-src http://ports.ubuntu.com/ubuntu-ports/ trusty-security main restricted universe multiverse \ No newline at end of file diff --git a/eng/common/cross/arm/sources.list.xenial b/eng/common/cross/arm/sources.list.xenial new file mode 100644 index 0000000000..eacd86b7df --- /dev/null +++ b/eng/common/cross/arm/sources.list.xenial @@ -0,0 +1,11 @@ +deb http://ports.ubuntu.com/ubuntu-ports/ xenial main restricted universe +deb-src http://ports.ubuntu.com/ubuntu-ports/ xenial main restricted universe + +deb http://ports.ubuntu.com/ubuntu-ports/ xenial-updates main restricted universe +deb-src http://ports.ubuntu.com/ubuntu-ports/ xenial-updates main restricted universe + +deb http://ports.ubuntu.com/ubuntu-ports/ xenial-backports main restricted +deb-src http://ports.ubuntu.com/ubuntu-ports/ xenial-backports main restricted + +deb http://ports.ubuntu.com/ubuntu-ports/ xenial-security main restricted universe multiverse +deb-src http://ports.ubuntu.com/ubuntu-ports/ xenial-security main restricted universe multiverse \ No newline at end of file diff --git a/eng/common/cross/arm/sources.list.zesty b/eng/common/cross/arm/sources.list.zesty new file mode 100644 index 0000000000..ea2c14a787 --- /dev/null +++ b/eng/common/cross/arm/sources.list.zesty @@ -0,0 +1,11 @@ +deb http://ports.ubuntu.com/ubuntu-ports/ zesty main restricted universe +deb-src http://ports.ubuntu.com/ubuntu-ports/ zesty main restricted universe + +deb http://ports.ubuntu.com/ubuntu-ports/ zesty-updates main restricted universe +deb-src http://ports.ubuntu.com/ubuntu-ports/ zesty-updates main restricted universe + +deb http://ports.ubuntu.com/ubuntu-ports/ zesty-backports main restricted +deb-src http://ports.ubuntu.com/ubuntu-ports/ zesty-backports main restricted + +deb http://ports.ubuntu.com/ubuntu-ports/ zesty-security main restricted universe multiverse +deb-src http://ports.ubuntu.com/ubuntu-ports/ zesty-security main restricted universe multiverse diff --git a/eng/common/cross/arm/trusty-lttng-2.4.patch b/eng/common/cross/arm/trusty-lttng-2.4.patch new file mode 100644 index 0000000000..8e4dd7ae71 --- /dev/null +++ b/eng/common/cross/arm/trusty-lttng-2.4.patch @@ -0,0 +1,71 @@ +From e72c9d7ead60e3317bd6d1fade995c07021c947b Mon Sep 17 00:00:00 2001 +From: Mathieu Desnoyers +Date: Thu, 7 May 2015 13:25:04 -0400 +Subject: [PATCH] Fix: building probe providers with C++ compiler + +Robert Daniels wrote: +> > I'm attempting to use lttng userspace tracing with a C++ application +> > on an ARM platform. I'm using GCC 4.8.4 on Linux 3.14 with the 2.6 +> > release of lttng. I've compiled lttng-modules, lttng-ust, and +> > lttng-tools and have been able to get a simple test working with C +> > code. When I attempt to run the hello.cxx test on my target it will +> > segfault. +> +> +> I spent a little time digging into this issue and finally discovered the +> cause of my segfault with ARM C++ tracepoints. +> +> There is a struct called 'lttng_event' in ust-events.h which contains an +> empty union 'u'. This was the cause of my issue. Under C, this empty union +> compiles to a zero byte member while under C++ it compiles to a one byte +> member, and in my case was four-byte aligned which caused my C++ code to +> have the 'cds_list_head node' offset incorrectly by four bytes. This lead +> to an incorrect linked list structure which caused my issue. +> +> Since this union is empty, I simply removed it from the struct and everything +> worked correctly. +> +> I don't know the history or purpose behind this empty union so I'd like to +> know if this is a safe fix. If it is I can submit a patch with the union +> removed. + +That's a very nice catch! + +We do not support building tracepoint probe provider with +g++ yet, as stated in lttng-ust(3): + +"- Note for C++ support: although an application instrumented with + tracepoints can be compiled with g++, tracepoint probes should be + compiled with gcc (only tested with gcc so far)." + +However, if it works fine with this fix, then I'm tempted to take it, +especially because removing the empty union does not appear to affect +the layout of struct lttng_event as seen from liblttng-ust, which must +be compiled with a C compiler, and from probe providers compiled with +a C compiler. So all we are changing is the layout of a probe provider +compiled with a C++ compiler, which is anyway buggy at the moment, +because it is not compatible with the layout expected by liblttng-ust +compiled with a C compiler. + +Reported-by: Robert Daniels +Signed-off-by: Mathieu Desnoyers +--- + include/lttng/ust-events.h | 2 -- + 1 file changed, 2 deletions(-) + +diff --git a/usr/include/lttng/ust-events.h b/usr/include/lttng/ust-events.h +index 328a875..3d7a274 100644 +--- a/usr/include/lttng/ust-events.h ++++ b/usr/include/lttng/ust-events.h +@@ -407,8 +407,6 @@ struct lttng_event { + void *_deprecated1; + struct lttng_ctx *ctx; + enum lttng_ust_instrumentation instrumentation; +- union { +- } u; + struct cds_list_head node; /* Event list in session */ + struct cds_list_head _deprecated2; + void *_deprecated3; +-- +2.7.4 + diff --git a/eng/common/cross/arm/trusty.patch b/eng/common/cross/arm/trusty.patch new file mode 100644 index 0000000000..2f2972f8eb --- /dev/null +++ b/eng/common/cross/arm/trusty.patch @@ -0,0 +1,97 @@ +diff -u -r a/usr/include/urcu/uatomic/generic.h b/usr/include/urcu/uatomic/generic.h +--- a/usr/include/urcu/uatomic/generic.h 2014-03-28 06:04:42.000000000 +0900 ++++ b/usr/include/urcu/uatomic/generic.h 2017-02-13 10:35:21.189927116 +0900 +@@ -65,17 +65,17 @@ + switch (len) { + #ifdef UATOMIC_HAS_ATOMIC_BYTE + case 1: +- return __sync_val_compare_and_swap_1(addr, old, _new); ++ return __sync_val_compare_and_swap_1((uint8_t *) addr, old, _new); + #endif + #ifdef UATOMIC_HAS_ATOMIC_SHORT + case 2: +- return __sync_val_compare_and_swap_2(addr, old, _new); ++ return __sync_val_compare_and_swap_2((uint16_t *) addr, old, _new); + #endif + case 4: +- return __sync_val_compare_and_swap_4(addr, old, _new); ++ return __sync_val_compare_and_swap_4((uint32_t *) addr, old, _new); + #if (CAA_BITS_PER_LONG == 64) + case 8: +- return __sync_val_compare_and_swap_8(addr, old, _new); ++ return __sync_val_compare_and_swap_8((uint64_t *) addr, old, _new); + #endif + } + _uatomic_link_error(); +@@ -100,20 +100,20 @@ + switch (len) { + #ifdef UATOMIC_HAS_ATOMIC_BYTE + case 1: +- __sync_and_and_fetch_1(addr, val); ++ __sync_and_and_fetch_1((uint8_t *) addr, val); + return; + #endif + #ifdef UATOMIC_HAS_ATOMIC_SHORT + case 2: +- __sync_and_and_fetch_2(addr, val); ++ __sync_and_and_fetch_2((uint16_t *) addr, val); + return; + #endif + case 4: +- __sync_and_and_fetch_4(addr, val); ++ __sync_and_and_fetch_4((uint32_t *) addr, val); + return; + #if (CAA_BITS_PER_LONG == 64) + case 8: +- __sync_and_and_fetch_8(addr, val); ++ __sync_and_and_fetch_8((uint64_t *) addr, val); + return; + #endif + } +@@ -139,20 +139,20 @@ + switch (len) { + #ifdef UATOMIC_HAS_ATOMIC_BYTE + case 1: +- __sync_or_and_fetch_1(addr, val); ++ __sync_or_and_fetch_1((uint8_t *) addr, val); + return; + #endif + #ifdef UATOMIC_HAS_ATOMIC_SHORT + case 2: +- __sync_or_and_fetch_2(addr, val); ++ __sync_or_and_fetch_2((uint16_t *) addr, val); + return; + #endif + case 4: +- __sync_or_and_fetch_4(addr, val); ++ __sync_or_and_fetch_4((uint32_t *) addr, val); + return; + #if (CAA_BITS_PER_LONG == 64) + case 8: +- __sync_or_and_fetch_8(addr, val); ++ __sync_or_and_fetch_8((uint64_t *) addr, val); + return; + #endif + } +@@ -180,17 +180,17 @@ + switch (len) { + #ifdef UATOMIC_HAS_ATOMIC_BYTE + case 1: +- return __sync_add_and_fetch_1(addr, val); ++ return __sync_add_and_fetch_1((uint8_t *) addr, val); + #endif + #ifdef UATOMIC_HAS_ATOMIC_SHORT + case 2: +- return __sync_add_and_fetch_2(addr, val); ++ return __sync_add_and_fetch_2((uint16_t *) addr, val); + #endif + case 4: +- return __sync_add_and_fetch_4(addr, val); ++ return __sync_add_and_fetch_4((uint32_t *) addr, val); + #if (CAA_BITS_PER_LONG == 64) + case 8: +- return __sync_add_and_fetch_8(addr, val); ++ return __sync_add_and_fetch_8((uint64_t *) addr, val); + #endif + } + _uatomic_link_error(); diff --git a/eng/common/cross/arm64/sources.list.bionic b/eng/common/cross/arm64/sources.list.bionic new file mode 100644 index 0000000000..2109557409 --- /dev/null +++ b/eng/common/cross/arm64/sources.list.bionic @@ -0,0 +1,11 @@ +deb http://ports.ubuntu.com/ubuntu-ports/ bionic main restricted universe +deb-src http://ports.ubuntu.com/ubuntu-ports/ bionic main restricted universe + +deb http://ports.ubuntu.com/ubuntu-ports/ bionic-updates main restricted universe +deb-src http://ports.ubuntu.com/ubuntu-ports/ bionic-updates main restricted universe + +deb http://ports.ubuntu.com/ubuntu-ports/ bionic-backports main restricted +deb-src http://ports.ubuntu.com/ubuntu-ports/ bionic-backports main restricted + +deb http://ports.ubuntu.com/ubuntu-ports/ bionic-security main restricted universe multiverse +deb-src http://ports.ubuntu.com/ubuntu-ports/ bionic-security main restricted universe multiverse diff --git a/eng/common/cross/arm64/sources.list.buster b/eng/common/cross/arm64/sources.list.buster new file mode 100644 index 0000000000..7194ac64a9 --- /dev/null +++ b/eng/common/cross/arm64/sources.list.buster @@ -0,0 +1,11 @@ +deb http://deb.debian.org/debian buster main +deb-src http://deb.debian.org/debian buster main + +deb http://deb.debian.org/debian-security/ buster/updates main +deb-src http://deb.debian.org/debian-security/ buster/updates main + +deb http://deb.debian.org/debian buster-updates main +deb-src http://deb.debian.org/debian buster-updates main + +deb http://deb.debian.org/debian buster-backports main contrib non-free +deb-src http://deb.debian.org/debian buster-backports main contrib non-free diff --git a/eng/common/cross/arm64/sources.list.stretch b/eng/common/cross/arm64/sources.list.stretch new file mode 100644 index 0000000000..0e12157743 --- /dev/null +++ b/eng/common/cross/arm64/sources.list.stretch @@ -0,0 +1,12 @@ +deb http://deb.debian.org/debian stretch main +deb-src http://deb.debian.org/debian stretch main + +deb http://deb.debian.org/debian-security/ stretch/updates main +deb-src http://deb.debian.org/debian-security/ stretch/updates main + +deb http://deb.debian.org/debian stretch-updates main +deb-src http://deb.debian.org/debian stretch-updates main + +deb http://deb.debian.org/debian stretch-backports main contrib non-free +deb-src http://deb.debian.org/debian stretch-backports main contrib non-free + diff --git a/eng/common/cross/arm64/sources.list.trusty b/eng/common/cross/arm64/sources.list.trusty new file mode 100644 index 0000000000..07d8f88d82 --- /dev/null +++ b/eng/common/cross/arm64/sources.list.trusty @@ -0,0 +1,11 @@ +deb http://ports.ubuntu.com/ubuntu-ports/ trusty main restricted universe +deb-src http://ports.ubuntu.com/ubuntu-ports/ trusty main restricted universe + +deb http://ports.ubuntu.com/ubuntu-ports/ trusty-updates main restricted universe +deb-src http://ports.ubuntu.com/ubuntu-ports/ trusty-updates main restricted universe + +deb http://ports.ubuntu.com/ubuntu-ports/ trusty-backports main restricted +deb-src http://ports.ubuntu.com/ubuntu-ports/ trusty-backports main restricted + +deb http://ports.ubuntu.com/ubuntu-ports/ trusty-security main restricted universe multiverse +deb-src http://ports.ubuntu.com/ubuntu-ports/ trusty-security main restricted universe multiverse \ No newline at end of file diff --git a/eng/common/cross/arm64/sources.list.xenial b/eng/common/cross/arm64/sources.list.xenial new file mode 100644 index 0000000000..eacd86b7df --- /dev/null +++ b/eng/common/cross/arm64/sources.list.xenial @@ -0,0 +1,11 @@ +deb http://ports.ubuntu.com/ubuntu-ports/ xenial main restricted universe +deb-src http://ports.ubuntu.com/ubuntu-ports/ xenial main restricted universe + +deb http://ports.ubuntu.com/ubuntu-ports/ xenial-updates main restricted universe +deb-src http://ports.ubuntu.com/ubuntu-ports/ xenial-updates main restricted universe + +deb http://ports.ubuntu.com/ubuntu-ports/ xenial-backports main restricted +deb-src http://ports.ubuntu.com/ubuntu-ports/ xenial-backports main restricted + +deb http://ports.ubuntu.com/ubuntu-ports/ xenial-security main restricted universe multiverse +deb-src http://ports.ubuntu.com/ubuntu-ports/ xenial-security main restricted universe multiverse \ No newline at end of file diff --git a/eng/common/cross/arm64/sources.list.zesty b/eng/common/cross/arm64/sources.list.zesty new file mode 100644 index 0000000000..ea2c14a787 --- /dev/null +++ b/eng/common/cross/arm64/sources.list.zesty @@ -0,0 +1,11 @@ +deb http://ports.ubuntu.com/ubuntu-ports/ zesty main restricted universe +deb-src http://ports.ubuntu.com/ubuntu-ports/ zesty main restricted universe + +deb http://ports.ubuntu.com/ubuntu-ports/ zesty-updates main restricted universe +deb-src http://ports.ubuntu.com/ubuntu-ports/ zesty-updates main restricted universe + +deb http://ports.ubuntu.com/ubuntu-ports/ zesty-backports main restricted +deb-src http://ports.ubuntu.com/ubuntu-ports/ zesty-backports main restricted + +deb http://ports.ubuntu.com/ubuntu-ports/ zesty-security main restricted universe multiverse +deb-src http://ports.ubuntu.com/ubuntu-ports/ zesty-security main restricted universe multiverse diff --git a/eng/common/cross/arm64/tizen-build-rootfs.sh b/eng/common/cross/arm64/tizen-build-rootfs.sh new file mode 100755 index 0000000000..13bfddb5e2 --- /dev/null +++ b/eng/common/cross/arm64/tizen-build-rootfs.sh @@ -0,0 +1,35 @@ +#!/usr/bin/env bash +set -e + +__CrossDir=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd ) +__TIZEN_CROSSDIR="$__CrossDir/tizen" + +if [[ -z "$ROOTFS_DIR" ]]; then + echo "ROOTFS_DIR is not defined." + exit 1; +fi + +TIZEN_TMP_DIR=$ROOTFS_DIR/tizen_tmp +mkdir -p $TIZEN_TMP_DIR + +# Download files +echo ">>Start downloading files" +VERBOSE=1 $__CrossDir/tizen-fetch.sh $TIZEN_TMP_DIR +echo "<>Start constructing Tizen rootfs" +TIZEN_RPM_FILES=`ls $TIZEN_TMP_DIR/*.rpm` +cd $ROOTFS_DIR +for f in $TIZEN_RPM_FILES; do + rpm2cpio $f | cpio -idm --quiet +done +echo "<>Start configuring Tizen rootfs" +ln -sfn asm-arm64 ./usr/include/asm +patch -p1 < $__TIZEN_CROSSDIR/tizen.patch +echo "</dev/null; then + VERBOSE=0 +fi + +Log() +{ + if [ $VERBOSE -ge $1 ]; then + echo ${@:2} + fi +} + +Inform() +{ + Log 1 -e "\x1B[0;34m$@\x1B[m" +} + +Debug() +{ + Log 2 -e "\x1B[0;32m$@\x1B[m" +} + +Error() +{ + >&2 Log 0 -e "\x1B[0;31m$@\x1B[m" +} + +Fetch() +{ + URL=$1 + FILE=$2 + PROGRESS=$3 + if [ $VERBOSE -ge 1 ] && [ $PROGRESS ]; then + CURL_OPT="--progress-bar" + else + CURL_OPT="--silent" + fi + curl $CURL_OPT $URL > $FILE +} + +hash curl 2> /dev/null || { Error "Require 'curl' Aborting."; exit 1; } +hash xmllint 2> /dev/null || { Error "Require 'xmllint' Aborting."; exit 1; } +hash sha256sum 2> /dev/null || { Error "Require 'sha256sum' Aborting."; exit 1; } + +TMPDIR=$1 +if [ ! -d $TMPDIR ]; then + TMPDIR=./tizen_tmp + Debug "Create temporary directory : $TMPDIR" + mkdir -p $TMPDIR +fi + +TIZEN_URL=http://download.tizen.org/snapshots/tizen/ +BUILD_XML=build.xml +REPOMD_XML=repomd.xml +PRIMARY_XML=primary.xml +TARGET_URL="http://__not_initialized" + +Xpath_get() +{ + XPATH_RESULT='' + XPATH=$1 + XML_FILE=$2 + RESULT=$(xmllint --xpath $XPATH $XML_FILE) + if [[ -z ${RESULT// } ]]; then + Error "Can not find target from $XML_FILE" + Debug "Xpath = $XPATH" + exit 1 + fi + XPATH_RESULT=$RESULT +} + +fetch_tizen_pkgs_init() +{ + TARGET=$1 + PROFILE=$2 + Debug "Initialize TARGET=$TARGET, PROFILE=$PROFILE" + + TMP_PKG_DIR=$TMPDIR/tizen_${PROFILE}_pkgs + if [ -d $TMP_PKG_DIR ]; then rm -rf $TMP_PKG_DIR; fi + mkdir -p $TMP_PKG_DIR + + PKG_URL=$TIZEN_URL/$PROFILE/latest + + BUILD_XML_URL=$PKG_URL/$BUILD_XML + TMP_BUILD=$TMP_PKG_DIR/$BUILD_XML + TMP_REPOMD=$TMP_PKG_DIR/$REPOMD_XML + TMP_PRIMARY=$TMP_PKG_DIR/$PRIMARY_XML + TMP_PRIMARYGZ=${TMP_PRIMARY}.gz + + Fetch $BUILD_XML_URL $TMP_BUILD + + Debug "fetch $BUILD_XML_URL to $TMP_BUILD" + + TARGET_XPATH="//build/buildtargets/buildtarget[@name=\"$TARGET\"]/repo[@type=\"binary\"]/text()" + Xpath_get $TARGET_XPATH $TMP_BUILD + TARGET_PATH=$XPATH_RESULT + TARGET_URL=$PKG_URL/$TARGET_PATH + + REPOMD_URL=$TARGET_URL/repodata/repomd.xml + PRIMARY_XPATH='string(//*[local-name()="data"][@type="primary"]/*[local-name()="location"]/@href)' + + Fetch $REPOMD_URL $TMP_REPOMD + + Debug "fetch $REPOMD_URL to $TMP_REPOMD" + + Xpath_get $PRIMARY_XPATH $TMP_REPOMD + PRIMARY_XML_PATH=$XPATH_RESULT + PRIMARY_URL=$TARGET_URL/$PRIMARY_XML_PATH + + Fetch $PRIMARY_URL $TMP_PRIMARYGZ + + Debug "fetch $PRIMARY_URL to $TMP_PRIMARYGZ" + + gunzip $TMP_PRIMARYGZ + + Debug "unzip $TMP_PRIMARYGZ to $TMP_PRIMARY" +} + +fetch_tizen_pkgs() +{ + ARCH=$1 + PACKAGE_XPATH_TPL='string(//*[local-name()="metadata"]/*[local-name()="package"][*[local-name()="name"][text()="_PKG_"]][*[local-name()="arch"][text()="_ARCH_"]]/*[local-name()="location"]/@href)' + + PACKAGE_CHECKSUM_XPATH_TPL='string(//*[local-name()="metadata"]/*[local-name()="package"][*[local-name()="name"][text()="_PKG_"]][*[local-name()="arch"][text()="_ARCH_"]]/*[local-name()="checksum"]/text())' + + for pkg in ${@:2} + do + Inform "Fetching... $pkg" + XPATH=${PACKAGE_XPATH_TPL/_PKG_/$pkg} + XPATH=${XPATH/_ARCH_/$ARCH} + Xpath_get $XPATH $TMP_PRIMARY + PKG_PATH=$XPATH_RESULT + + XPATH=${PACKAGE_CHECKSUM_XPATH_TPL/_PKG_/$pkg} + XPATH=${XPATH/_ARCH_/$ARCH} + Xpath_get $XPATH $TMP_PRIMARY + CHECKSUM=$XPATH_RESULT + + PKG_URL=$TARGET_URL/$PKG_PATH + PKG_FILE=$(basename $PKG_PATH) + PKG_PATH=$TMPDIR/$PKG_FILE + + Debug "Download $PKG_URL to $PKG_PATH" + Fetch $PKG_URL $PKG_PATH true + + echo "$CHECKSUM $PKG_PATH" | sha256sum -c - > /dev/null + if [ $? -ne 0 ]; then + Error "Fail to fetch $PKG_URL to $PKG_PATH" + Debug "Checksum = $CHECKSUM" + exit 1 + fi + done +} + +Inform "Initialize arm base" +fetch_tizen_pkgs_init standard base +Inform "fetch common packages" +fetch_tizen_pkgs aarch64 gcc glibc glibc-devel libicu libicu-devel libatomic linux-glibc-devel +Inform "fetch coreclr packages" +fetch_tizen_pkgs aarch64 lldb lldb-devel libgcc libstdc++ libstdc++-devel libunwind libunwind-devel lttng-ust-devel lttng-ust userspace-rcu-devel userspace-rcu +Inform "fetch corefx packages" +fetch_tizen_pkgs aarch64 libcom_err libcom_err-devel zlib zlib-devel libopenssl11 libopenssl1.1-devel krb5 krb5-devel + +Inform "Initialize standard unified" +fetch_tizen_pkgs_init standard unified +Inform "fetch corefx packages" +fetch_tizen_pkgs aarch64 gssdp gssdp-devel tizen-release + diff --git a/eng/common/cross/arm64/tizen/tizen.patch b/eng/common/cross/arm64/tizen/tizen.patch new file mode 100644 index 0000000000..af7c8be059 --- /dev/null +++ b/eng/common/cross/arm64/tizen/tizen.patch @@ -0,0 +1,9 @@ +diff -u -r a/usr/lib/libc.so b/usr/lib/libc.so +--- a/usr/lib64/libc.so 2016-12-30 23:00:08.284951863 +0900 ++++ b/usr/lib64/libc.so 2016-12-30 23:00:32.140951815 +0900 +@@ -2,4 +2,4 @@ + Use the shared library, but some functions are only in + the static library, so try that secondarily. */ + OUTPUT_FORMAT(elf64-littleaarch64) +-GROUP ( /lib64/libc.so.6 /usr/lib64/libc_nonshared.a AS_NEEDED ( /lib/ld-linux-aarch64.so.1 ) ) ++GROUP ( libc.so.6 libc_nonshared.a AS_NEEDED ( ld-linux-aarch64.so.1 ) ) diff --git a/eng/common/cross/armel/sources.list.jessie b/eng/common/cross/armel/sources.list.jessie new file mode 100644 index 0000000000..3d9c3059d8 --- /dev/null +++ b/eng/common/cross/armel/sources.list.jessie @@ -0,0 +1,3 @@ +# Debian (jessie) # Stable +deb http://ftp.debian.org/debian/ jessie main contrib non-free +deb-src http://ftp.debian.org/debian/ jessie main contrib non-free diff --git a/eng/common/cross/armel/tizen-build-rootfs.sh b/eng/common/cross/armel/tizen-build-rootfs.sh new file mode 100755 index 0000000000..9a4438af61 --- /dev/null +++ b/eng/common/cross/armel/tizen-build-rootfs.sh @@ -0,0 +1,35 @@ +#!/usr/bin/env bash +set -e + +__ARM_SOFTFP_CrossDir=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd ) +__TIZEN_CROSSDIR="$__ARM_SOFTFP_CrossDir/tizen" + +if [[ -z "$ROOTFS_DIR" ]]; then + echo "ROOTFS_DIR is not defined." + exit 1; +fi + +TIZEN_TMP_DIR=$ROOTFS_DIR/tizen_tmp +mkdir -p $TIZEN_TMP_DIR + +# Download files +echo ">>Start downloading files" +VERBOSE=1 $__ARM_SOFTFP_CrossDir/tizen-fetch.sh $TIZEN_TMP_DIR +echo "<>Start constructing Tizen rootfs" +TIZEN_RPM_FILES=`ls $TIZEN_TMP_DIR/*.rpm` +cd $ROOTFS_DIR +for f in $TIZEN_RPM_FILES; do + rpm2cpio $f | cpio -idm --quiet +done +echo "<>Start configuring Tizen rootfs" +ln -sfn asm-arm ./usr/include/asm +patch -p1 < $__TIZEN_CROSSDIR/tizen.patch +echo "</dev/null; then + VERBOSE=0 +fi + +Log() +{ + if [ $VERBOSE -ge $1 ]; then + echo ${@:2} + fi +} + +Inform() +{ + Log 1 -e "\x1B[0;34m$@\x1B[m" +} + +Debug() +{ + Log 2 -e "\x1B[0;32m$@\x1B[m" +} + +Error() +{ + >&2 Log 0 -e "\x1B[0;31m$@\x1B[m" +} + +Fetch() +{ + URL=$1 + FILE=$2 + PROGRESS=$3 + if [ $VERBOSE -ge 1 ] && [ $PROGRESS ]; then + CURL_OPT="--progress-bar" + else + CURL_OPT="--silent" + fi + curl $CURL_OPT $URL > $FILE +} + +hash curl 2> /dev/null || { Error "Require 'curl' Aborting."; exit 1; } +hash xmllint 2> /dev/null || { Error "Require 'xmllint' Aborting."; exit 1; } +hash sha256sum 2> /dev/null || { Error "Require 'sha256sum' Aborting."; exit 1; } + +TMPDIR=$1 +if [ ! -d $TMPDIR ]; then + TMPDIR=./tizen_tmp + Debug "Create temporary directory : $TMPDIR" + mkdir -p $TMPDIR +fi + +TIZEN_URL=http://download.tizen.org/snapshots/tizen +BUILD_XML=build.xml +REPOMD_XML=repomd.xml +PRIMARY_XML=primary.xml +TARGET_URL="http://__not_initialized" + +Xpath_get() +{ + XPATH_RESULT='' + XPATH=$1 + XML_FILE=$2 + RESULT=$(xmllint --xpath $XPATH $XML_FILE) + if [[ -z ${RESULT// } ]]; then + Error "Can not find target from $XML_FILE" + Debug "Xpath = $XPATH" + exit 1 + fi + XPATH_RESULT=$RESULT +} + +fetch_tizen_pkgs_init() +{ + TARGET=$1 + PROFILE=$2 + Debug "Initialize TARGET=$TARGET, PROFILE=$PROFILE" + + TMP_PKG_DIR=$TMPDIR/tizen_${PROFILE}_pkgs + if [ -d $TMP_PKG_DIR ]; then rm -rf $TMP_PKG_DIR; fi + mkdir -p $TMP_PKG_DIR + + PKG_URL=$TIZEN_URL/$PROFILE/latest + + BUILD_XML_URL=$PKG_URL/$BUILD_XML + TMP_BUILD=$TMP_PKG_DIR/$BUILD_XML + TMP_REPOMD=$TMP_PKG_DIR/$REPOMD_XML + TMP_PRIMARY=$TMP_PKG_DIR/$PRIMARY_XML + TMP_PRIMARYGZ=${TMP_PRIMARY}.gz + + Fetch $BUILD_XML_URL $TMP_BUILD + + Debug "fetch $BUILD_XML_URL to $TMP_BUILD" + + TARGET_XPATH="//build/buildtargets/buildtarget[@name=\"$TARGET\"]/repo[@type=\"binary\"]/text()" + Xpath_get $TARGET_XPATH $TMP_BUILD + TARGET_PATH=$XPATH_RESULT + TARGET_URL=$PKG_URL/$TARGET_PATH + + REPOMD_URL=$TARGET_URL/repodata/repomd.xml + PRIMARY_XPATH='string(//*[local-name()="data"][@type="primary"]/*[local-name()="location"]/@href)' + + Fetch $REPOMD_URL $TMP_REPOMD + + Debug "fetch $REPOMD_URL to $TMP_REPOMD" + + Xpath_get $PRIMARY_XPATH $TMP_REPOMD + PRIMARY_XML_PATH=$XPATH_RESULT + PRIMARY_URL=$TARGET_URL/$PRIMARY_XML_PATH + + Fetch $PRIMARY_URL $TMP_PRIMARYGZ + + Debug "fetch $PRIMARY_URL to $TMP_PRIMARYGZ" + + gunzip $TMP_PRIMARYGZ + + Debug "unzip $TMP_PRIMARYGZ to $TMP_PRIMARY" +} + +fetch_tizen_pkgs() +{ + ARCH=$1 + PACKAGE_XPATH_TPL='string(//*[local-name()="metadata"]/*[local-name()="package"][*[local-name()="name"][text()="_PKG_"]][*[local-name()="arch"][text()="_ARCH_"]]/*[local-name()="location"]/@href)' + + PACKAGE_CHECKSUM_XPATH_TPL='string(//*[local-name()="metadata"]/*[local-name()="package"][*[local-name()="name"][text()="_PKG_"]][*[local-name()="arch"][text()="_ARCH_"]]/*[local-name()="checksum"]/text())' + + for pkg in ${@:2} + do + Inform "Fetching... $pkg" + XPATH=${PACKAGE_XPATH_TPL/_PKG_/$pkg} + XPATH=${XPATH/_ARCH_/$ARCH} + Xpath_get $XPATH $TMP_PRIMARY + PKG_PATH=$XPATH_RESULT + + XPATH=${PACKAGE_CHECKSUM_XPATH_TPL/_PKG_/$pkg} + XPATH=${XPATH/_ARCH_/$ARCH} + Xpath_get $XPATH $TMP_PRIMARY + CHECKSUM=$XPATH_RESULT + + PKG_URL=$TARGET_URL/$PKG_PATH + PKG_FILE=$(basename $PKG_PATH) + PKG_PATH=$TMPDIR/$PKG_FILE + + Debug "Download $PKG_URL to $PKG_PATH" + Fetch $PKG_URL $PKG_PATH true + + echo "$CHECKSUM $PKG_PATH" | sha256sum -c - > /dev/null + if [ $? -ne 0 ]; then + Error "Fail to fetch $PKG_URL to $PKG_PATH" + Debug "Checksum = $CHECKSUM" + exit 1 + fi + done +} + +Inform "Initialize arm base" +fetch_tizen_pkgs_init standard base +Inform "fetch common packages" +fetch_tizen_pkgs armv7l gcc glibc glibc-devel libicu libicu-devel libatomic linux-glibc-devel +Inform "fetch coreclr packages" +fetch_tizen_pkgs armv7l lldb lldb-devel libgcc libstdc++ libstdc++-devel libunwind libunwind-devel lttng-ust-devel lttng-ust userspace-rcu-devel userspace-rcu +Inform "fetch corefx packages" +fetch_tizen_pkgs armv7l libcom_err libcom_err-devel zlib zlib-devel libopenssl11 libopenssl1.1-devel krb5 krb5-devel + +Inform "Initialize standard unified" +fetch_tizen_pkgs_init standard unified +Inform "fetch corefx packages" +fetch_tizen_pkgs armv7l gssdp gssdp-devel tizen-release + diff --git a/eng/common/cross/armel/tizen/tizen-dotnet.ks b/eng/common/cross/armel/tizen/tizen-dotnet.ks new file mode 100644 index 0000000000..506d455bd4 --- /dev/null +++ b/eng/common/cross/armel/tizen/tizen-dotnet.ks @@ -0,0 +1,50 @@ +lang en_US.UTF-8 +keyboard us +timezone --utc Asia/Seoul + +part / --fstype="ext4" --size=3500 --ondisk=mmcblk0 --label rootfs --fsoptions=defaults,noatime + +rootpw tizen +desktop --autologinuser=root +user --name root --groups audio,video --password 'tizen' + +repo --name=standard --baseurl=http://download.tizen.org/releases/milestone/tizen/unified/latest/repos/standard/packages/ --ssl_verify=no +repo --name=base --baseurl=http://download.tizen.org/releases/milestone/tizen/base/latest/repos/standard/packages/ --ssl_verify=no + +%packages +tar +gzip + +sed +grep +gawk +perl + +binutils +findutils +util-linux +lttng-ust +userspace-rcu +procps-ng +tzdata +ca-certificates + + +### Core FX +libicu +libunwind +iputils +zlib +krb5 +libcurl +libopenssl + +%end + +%post + +### Update /tmp privilege +chmod 777 /tmp +#################################### + +%end diff --git a/eng/common/cross/armel/tizen/tizen.patch b/eng/common/cross/armel/tizen/tizen.patch new file mode 100644 index 0000000000..ca7c7c1ff7 --- /dev/null +++ b/eng/common/cross/armel/tizen/tizen.patch @@ -0,0 +1,9 @@ +diff -u -r a/usr/lib/libc.so b/usr/lib/libc.so +--- a/usr/lib/libc.so 2016-12-30 23:00:08.284951863 +0900 ++++ b/usr/lib/libc.so 2016-12-30 23:00:32.140951815 +0900 +@@ -2,4 +2,4 @@ + Use the shared library, but some functions are only in + the static library, so try that secondarily. */ + OUTPUT_FORMAT(elf32-littlearm) +-GROUP ( /lib/libc.so.6 /usr/lib/libc_nonshared.a AS_NEEDED ( /lib/ld-linux.so.3 ) ) ++GROUP ( libc.so.6 libc_nonshared.a AS_NEEDED ( ld-linux.so.3 ) ) diff --git a/eng/common/cross/build-android-rootfs.sh b/eng/common/cross/build-android-rootfs.sh new file mode 100755 index 0000000000..e7f12edb56 --- /dev/null +++ b/eng/common/cross/build-android-rootfs.sh @@ -0,0 +1,131 @@ +#!/usr/bin/env bash +set -e +__NDK_Version=r21 + +usage() +{ + echo "Creates a toolchain and sysroot used for cross-compiling for Android." + echo. + echo "Usage: $0 [BuildArch] [ApiLevel]" + echo. + echo "BuildArch is the target architecture of Android. Currently only arm64 is supported." + echo "ApiLevel is the target Android API level. API levels usually match to Android releases. See https://source.android.com/source/build-numbers.html" + echo. + echo "By default, the toolchain and sysroot will be generated in cross/android-rootfs/toolchain/[BuildArch]. You can change this behavior" + echo "by setting the TOOLCHAIN_DIR environment variable" + echo. + echo "By default, the NDK will be downloaded into the cross/android-rootfs/android-ndk-$__NDK_Version directory. If you already have an NDK installation," + echo "you can set the NDK_DIR environment variable to have this script use that installation of the NDK." + echo "By default, this script will generate a file, android_platform, in the root of the ROOTFS_DIR directory that contains the RID for the supported and tested Android build: android.28-arm64. This file is to replace '/etc/os-release', which is not available for Android." + exit 1 +} + +__ApiLevel=28 # The minimum platform for arm64 is API level 21 but the minimum version that support glob(3) is 28. See $ANDROID_NDK/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/glob.h +__BuildArch=arm64 +__AndroidArch=aarch64 +__AndroidToolchain=aarch64-linux-android + +for i in "$@" + do + lowerI="$(echo $i | awk '{print tolower($0)}')" + case $lowerI in + -?|-h|--help) + usage + exit 1 + ;; + arm64) + __BuildArch=arm64 + __AndroidArch=aarch64 + __AndroidToolchain=aarch64-linux-android + ;; + arm) + __BuildArch=arm + __AndroidArch=arm + __AndroidToolchain=arm-linux-androideabi + ;; + *[0-9]) + __ApiLevel=$i + ;; + *) + __UnprocessedBuildArgs="$__UnprocessedBuildArgs $i" + ;; + esac +done + +# Obtain the location of the bash script to figure out where the root of the repo is. +__ScriptBaseDir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" + +__CrossDir="$__ScriptBaseDir/../../../.tools/android-rootfs" + +if [[ ! -f "$__CrossDir" ]]; then + mkdir -p "$__CrossDir" +fi + +# Resolve absolute path to avoid `../` in build logs +__CrossDir="$( cd "$__CrossDir" && pwd )" + +__NDK_Dir="$__CrossDir/android-ndk-$__NDK_Version" +__lldb_Dir="$__CrossDir/lldb" +__ToolchainDir="$__CrossDir/android-ndk-$__NDK_Version" + +if [[ -n "$TOOLCHAIN_DIR" ]]; then + __ToolchainDir=$TOOLCHAIN_DIR +fi + +if [[ -n "$NDK_DIR" ]]; then + __NDK_Dir=$NDK_DIR +fi + +echo "Target API level: $__ApiLevel" +echo "Target architecture: $__BuildArch" +echo "NDK location: $__NDK_Dir" +echo "Target Toolchain location: $__ToolchainDir" + +# Download the NDK if required +if [ ! -d $__NDK_Dir ]; then + echo Downloading the NDK into $__NDK_Dir + mkdir -p $__NDK_Dir + wget -q --progress=bar:force:noscroll --show-progress https://dl.google.com/android/repository/android-ndk-$__NDK_Version-linux-x86_64.zip -O $__CrossDir/android-ndk-$__NDK_Version-linux-x86_64.zip + unzip -q $__CrossDir/android-ndk-$__NDK_Version-linux-x86_64.zip -d $__CrossDir +fi + +if [ ! -d $__lldb_Dir ]; then + mkdir -p $__lldb_Dir + echo Downloading LLDB into $__lldb_Dir + wget -q --progress=bar:force:noscroll --show-progress https://dl.google.com/android/repository/lldb-2.3.3614996-linux-x86_64.zip -O $__CrossDir/lldb-2.3.3614996-linux-x86_64.zip + unzip -q $__CrossDir/lldb-2.3.3614996-linux-x86_64.zip -d $__lldb_Dir +fi + +echo "Download dependencies..." +__TmpDir=$__CrossDir/tmp/$__BuildArch/ +mkdir -p "$__TmpDir" + +# combined dependencies for coreclr, installer and libraries +__AndroidPackages="libicu" +__AndroidPackages+=" libandroid-glob" +__AndroidPackages+=" liblzma" +__AndroidPackages+=" krb5" +__AndroidPackages+=" openssl" + +for path in $(wget -qO- http://termux.net/dists/stable/main/binary-$__AndroidArch/Packages |\ + grep -A15 "Package: \(${__AndroidPackages// /\\|}\)" | grep -v "static\|tool" | grep Filename); do + + if [[ "$path" != "Filename:" ]]; then + echo "Working on: $path" + wget -qO- http://termux.net/$path | dpkg -x - "$__TmpDir" + fi +done + +cp -R "$__TmpDir/data/data/com.termux/files/usr/"* "$__ToolchainDir/sysroot/usr/" + +# Generate platform file for build.sh script to assign to __DistroRid +echo "Generating platform file..." +echo "RID=android.${__ApiLevel}-${__BuildArch}" > $__ToolchainDir/sysroot/android_platform + +echo "Now to build coreclr, libraries and installers; run:" +echo ROOTFS_DIR=\$\(realpath $__ToolchainDir/sysroot\) ./build.sh --cross --arch $__BuildArch \ + --subsetCategory coreclr +echo ROOTFS_DIR=\$\(realpath $__ToolchainDir/sysroot\) ./build.sh --cross --arch $__BuildArch \ + --subsetCategory libraries +echo ROOTFS_DIR=\$\(realpath $__ToolchainDir/sysroot\) ./build.sh --cross --arch $__BuildArch \ + --subsetCategory installer diff --git a/eng/common/cross/build-rootfs.sh b/eng/common/cross/build-rootfs.sh new file mode 100755 index 0000000000..ffdff38542 --- /dev/null +++ b/eng/common/cross/build-rootfs.sh @@ -0,0 +1,349 @@ +#!/usr/bin/env bash + +set -e + +usage() +{ + echo "Usage: $0 [BuildArch] [CodeName] [lldbx.y] [--skipunmount] --rootfsdir ]" + echo "BuildArch can be: arm(default), armel, arm64, x86" + echo "CodeName - optional, Code name for Linux, can be: trusty, xenial(default), zesty, bionic, alpine. If BuildArch is armel, LinuxCodeName is jessie(default) or tizen." + echo " for FreeBSD can be: freebsd11 or freebsd12." + echo " for illumos can be: illumos." + echo "lldbx.y - optional, LLDB version, can be: lldb3.9(default), lldb4.0, lldb5.0, lldb6.0 no-lldb. Ignored for alpine and FReeBSD" + echo "--skipunmount - optional, will skip the unmount of rootfs folder." + echo "--use-mirror - optional, use mirror URL to fetch resources, when available." + exit 1 +} + +__CodeName=xenial +__CrossDir=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd ) +__InitialDir=$PWD +__BuildArch=arm +__AlpineArch=armv7 +__QEMUArch=arm +__UbuntuArch=armhf +__UbuntuRepo="http://ports.ubuntu.com/" +__LLDB_Package="liblldb-3.9-dev" +__SkipUnmount=0 + +# base development support +__UbuntuPackages="build-essential" + +__AlpinePackages="alpine-base" +__AlpinePackages+=" build-base" +__AlpinePackages+=" linux-headers" +__AlpinePackagesEdgeCommunity=" lldb-dev" +__AlpinePackagesEdgeMain=" llvm10-libs" +__AlpinePackagesEdgeMain+=" python3" +__AlpinePackagesEdgeMain+=" libedit" + +# symlinks fixer +__UbuntuPackages+=" symlinks" + +# CoreCLR and CoreFX dependencies +__UbuntuPackages+=" libicu-dev" +__UbuntuPackages+=" liblttng-ust-dev" +__UbuntuPackages+=" libunwind8-dev" + +__AlpinePackages+=" gettext-dev" +__AlpinePackages+=" icu-dev" +__AlpinePackages+=" libunwind-dev" +__AlpinePackages+=" lttng-ust-dev" + +# CoreFX dependencies +__UbuntuPackages+=" libcurl4-openssl-dev" +__UbuntuPackages+=" libkrb5-dev" +__UbuntuPackages+=" libssl-dev" +__UbuntuPackages+=" zlib1g-dev" + +__AlpinePackages+=" curl-dev" +__AlpinePackages+=" krb5-dev" +__AlpinePackages+=" openssl-dev" +__AlpinePackages+=" zlib-dev" + +__FreeBSDBase="12.1-RELEASE" +__FreeBSDPkg="1.12.0" +__FreeBSDPackages="libunwind" +__FreeBSDPackages+=" icu" +__FreeBSDPackages+=" libinotify" +__FreeBSDPackages+=" lttng-ust" +__FreeBSDPackages+=" krb5" + +__IllumosPackages="icu-64.2nb2" +__IllumosPackages+=" mit-krb5-1.16.2nb4" +__IllumosPackages+=" openssl-1.1.1e" +__IllumosPackages+=" zlib-1.2.11" + +__UseMirror=0 + +__UnprocessedBuildArgs= +while :; do + if [ $# -le 0 ]; then + break + fi + + lowerI="$(echo $1 | awk '{print tolower($0)}')" + case $lowerI in + -?|-h|--help) + usage + exit 1 + ;; + arm) + __BuildArch=arm + __UbuntuArch=armhf + __AlpineArch=armv7 + __QEMUArch=arm + ;; + arm64) + __BuildArch=arm64 + __UbuntuArch=arm64 + __AlpineArch=aarch64 + __QEMUArch=aarch64 + ;; + armel) + __BuildArch=armel + __UbuntuArch=armel + __UbuntuRepo="http://ftp.debian.org/debian/" + __CodeName=jessie + ;; + x86) + __BuildArch=x86 + __UbuntuArch=i386 + __UbuntuRepo="http://archive.ubuntu.com/ubuntu/" + ;; + lldb3.6) + __LLDB_Package="lldb-3.6-dev" + ;; + lldb3.8) + __LLDB_Package="lldb-3.8-dev" + ;; + lldb3.9) + __LLDB_Package="liblldb-3.9-dev" + ;; + lldb4.0) + __LLDB_Package="liblldb-4.0-dev" + ;; + lldb5.0) + __LLDB_Package="liblldb-5.0-dev" + ;; + lldb6.0) + __LLDB_Package="liblldb-6.0-dev" + ;; + no-lldb) + unset __LLDB_Package + ;; + trusty) # Ubuntu 14.04 + if [ "$__CodeName" != "jessie" ]; then + __CodeName=trusty + fi + ;; + xenial) # Ubuntu 16.04 + if [ "$__CodeName" != "jessie" ]; then + __CodeName=xenial + fi + ;; + zesty) # Ubuntu 17.04 + if [ "$__CodeName" != "jessie" ]; then + __CodeName=zesty + fi + ;; + bionic) # Ubuntu 18.04 + if [ "$__CodeName" != "jessie" ]; then + __CodeName=bionic + fi + ;; + jessie) # Debian 8 + __CodeName=jessie + __UbuntuRepo="http://ftp.debian.org/debian/" + ;; + stretch) # Debian 9 + __CodeName=stretch + __UbuntuRepo="http://ftp.debian.org/debian/" + __LLDB_Package="liblldb-6.0-dev" + ;; + buster) # Debian 10 + __CodeName=buster + __UbuntuRepo="http://ftp.debian.org/debian/" + __LLDB_Package="liblldb-6.0-dev" + ;; + tizen) + if [ "$__BuildArch" != "armel" ] && [ "$__BuildArch" != "arm64" ]; then + echo "Tizen is available only for armel and arm64." + usage; + exit 1; + fi + __CodeName= + __UbuntuRepo= + __Tizen=tizen + ;; + alpine) + __CodeName=alpine + __UbuntuRepo= + ;; + freebsd11) + __FreeBSDBase="11.3-RELEASE" + ;& + freebsd12) + __CodeName=freebsd + __BuildArch=x64 + __SkipUnmount=1 + ;; + illumos) + __CodeName=illumos + __BuildArch=x64 + __SkipUnmount=1 + ;; + --skipunmount) + __SkipUnmount=1 + ;; + --rootfsdir|-rootfsdir) + shift + __RootfsDir=$1 + ;; + --use-mirror) + __UseMirror=1 + ;; + *) + __UnprocessedBuildArgs="$__UnprocessedBuildArgs $1" + ;; + esac + + shift +done + +if [ "$__BuildArch" == "armel" ]; then + __LLDB_Package="lldb-3.5-dev" +fi +__UbuntuPackages+=" ${__LLDB_Package:-}" + +if [ -z "$__RootfsDir" ] && [ ! -z "$ROOTFS_DIR" ]; then + __RootfsDir=$ROOTFS_DIR +fi + +if [ -z "$__RootfsDir" ]; then + __RootfsDir="$__CrossDir/../../../.tools/rootfs/$__BuildArch" +fi + +if [ -d "$__RootfsDir" ]; then + if [ $__SkipUnmount == 0 ]; then + umount $__RootfsDir/* || true + fi + rm -rf $__RootfsDir +fi + +mkdir -p $__RootfsDir +__RootfsDir="$( cd "$__RootfsDir" && pwd )" + +if [[ "$__CodeName" == "alpine" ]]; then + __ApkToolsVersion=2.9.1 + __AlpineVersion=3.9 + __ApkToolsDir=$(mktemp -d) + wget https://github.com/alpinelinux/apk-tools/releases/download/v$__ApkToolsVersion/apk-tools-$__ApkToolsVersion-x86_64-linux.tar.gz -P $__ApkToolsDir + tar -xf $__ApkToolsDir/apk-tools-$__ApkToolsVersion-x86_64-linux.tar.gz -C $__ApkToolsDir + mkdir -p $__RootfsDir/usr/bin + cp -v /usr/bin/qemu-$__QEMUArch-static $__RootfsDir/usr/bin + + $__ApkToolsDir/apk-tools-$__ApkToolsVersion/apk \ + -X http://dl-cdn.alpinelinux.org/alpine/v$__AlpineVersion/main \ + -X http://dl-cdn.alpinelinux.org/alpine/v$__AlpineVersion/community \ + -U --allow-untrusted --root $__RootfsDir --arch $__AlpineArch --initdb \ + add $__AlpinePackages + + $__ApkToolsDir/apk-tools-$__ApkToolsVersion/apk \ + -X http://dl-cdn.alpinelinux.org/alpine/edge/main \ + -U --allow-untrusted --root $__RootfsDir --arch $__AlpineArch --initdb \ + add $__AlpinePackagesEdgeMain + + $__ApkToolsDir/apk-tools-$__ApkToolsVersion/apk \ + -X http://dl-cdn.alpinelinux.org/alpine/edge/community \ + -U --allow-untrusted --root $__RootfsDir --arch $__AlpineArch --initdb \ + add $__AlpinePackagesEdgeCommunity + + rm -r $__ApkToolsDir +elif [[ "$__CodeName" == "freebsd" ]]; then + mkdir -p $__RootfsDir/usr/local/etc + wget -O - https://download.freebsd.org/ftp/releases/amd64/${__FreeBSDBase}/base.txz | tar -C $__RootfsDir -Jxf - ./lib ./usr/lib ./usr/libdata ./usr/include ./usr/share/keys ./etc ./bin/freebsd-version + # For now, ask for 11 ABI even on 12. This can be revisited later. + echo "ABI = \"FreeBSD:11:amd64\"; FINGERPRINTS = \"${__RootfsDir}/usr/share/keys\"; REPOS_DIR = [\"${__RootfsDir}/etc/pkg\"]; REPO_AUTOUPDATE = NO; RUN_SCRIPTS = NO;" > ${__RootfsDir}/usr/local/etc/pkg.conf + echo "FreeBSD: { url: "pkg+http://pkg.FreeBSD.org/\${ABI}/quarterly", mirror_type: \"srv\", signature_type: \"fingerprints\", fingerprints: \"${__RootfsDir}/usr/share/keys/pkg\", enabled: yes }" > ${__RootfsDir}/etc/pkg/FreeBSD.conf + mkdir -p $__RootfsDir/tmp + # get and build package manager + wget -O - https://github.com/freebsd/pkg/archive/${__FreeBSDPkg}.tar.gz | tar -C $__RootfsDir/tmp -zxf - + cd $__RootfsDir/tmp/pkg-${__FreeBSDPkg} + # needed for install to succeed + mkdir -p $__RootfsDir/host/etc + ./autogen.sh && ./configure --prefix=$__RootfsDir/host && make && make install + rm -rf $__RootfsDir/tmp/pkg-${__FreeBSDPkg} + # install packages we need. + INSTALL_AS_USER=$(whoami) $__RootfsDir/host/sbin/pkg -r $__RootfsDir -C $__RootfsDir/usr/local/etc/pkg.conf update + INSTALL_AS_USER=$(whoami) $__RootfsDir/host/sbin/pkg -r $__RootfsDir -C $__RootfsDir/usr/local/etc/pkg.conf install --yes $__FreeBSDPackages +elif [[ "$__CodeName" == "illumos" ]]; then + mkdir "$__RootfsDir/tmp" + pushd "$__RootfsDir/tmp" + JOBS="$(getconf _NPROCESSORS_ONLN)" + echo "Downloading sysroot." + wget -O - https://github.com/illumos/sysroot/releases/download/20181213-de6af22ae73b-v1/illumos-sysroot-i386-20181213-de6af22ae73b-v1.tar.gz | tar -C "$__RootfsDir" -xzf - + echo "Building binutils. Please wait.." + wget -O - https://ftp.gnu.org/gnu/binutils/binutils-2.33.1.tar.bz2 | tar -xjf - + mkdir build-binutils && cd build-binutils + ../binutils-2.33.1/configure --prefix="$__RootfsDir" --target="x86_64-sun-solaris2.10" --program-prefix="x86_64-illumos-" --with-sysroot="$__RootfsDir" + make -j "$JOBS" && make install && cd .. + echo "Building gcc. Please wait.." + wget -O - https://ftp.gnu.org/gnu/gcc/gcc-8.4.0/gcc-8.4.0.tar.xz | tar -xJf - + CFLAGS="-fPIC" + CXXFLAGS="-fPIC" + CXXFLAGS_FOR_TARGET="-fPIC" + CFLAGS_FOR_TARGET="-fPIC" + export CFLAGS CXXFLAGS CXXFLAGS_FOR_TARGET CFLAGS_FOR_TARGET + mkdir build-gcc && cd build-gcc + ../gcc-8.4.0/configure --prefix="$__RootfsDir" --target="x86_64-sun-solaris2.10" --program-prefix="x86_64-illumos-" --with-sysroot="$__RootfsDir" --with-gnu-as \ + --with-gnu-ld --disable-nls --disable-libgomp --disable-libquadmath --disable-libssp --disable-libvtv --disable-libcilkrts --disable-libada --disable-libsanitizer \ + --disable-libquadmath-support --disable-shared --enable-tls + make -j "$JOBS" && make install && cd .. + BaseUrl=https://pkgsrc.joyent.com + if [[ "$__UseMirror" == 1 ]]; then + BaseUrl=http://pkgsrc.smartos.skylime.net + fi + BaseUrl="$BaseUrl"/packages/SmartOS/2020Q1/x86_64/All + echo "Downloading dependencies." + read -ra array <<<"$__IllumosPackages" + for package in "${array[@]}"; do + echo "Installing $package..." + wget "$BaseUrl"/"$package".tgz + ar -x "$package".tgz + tar --skip-old-files -xzf "$package".tmp.tgz -C "$__RootfsDir" 2>/dev/null + done + echo "Cleaning up temporary files." + popd + rm -rf "$__RootfsDir"/{tmp,+*} + mkdir -p "$__RootfsDir"/usr/include/net + mkdir -p "$__RootfsDir"/usr/include/netpacket + wget -P "$__RootfsDir"/usr/include/net https://raw.githubusercontent.com/illumos/illumos-gate/master/usr/src/uts/common/io/bpf/net/bpf.h + wget -P "$__RootfsDir"/usr/include/net https://raw.githubusercontent.com/illumos/illumos-gate/master/usr/src/uts/common/io/bpf/net/dlt.h + wget -P "$__RootfsDir"/usr/include/netpacket https://raw.githubusercontent.com/illumos/illumos-gate/master/usr/src/uts/common/inet/sockmods/netpacket/packet.h + wget -P "$__RootfsDir"/usr/include/sys https://raw.githubusercontent.com/illumos/illumos-gate/master/usr/src/uts/common/sys/sdt.h +elif [[ -n $__CodeName ]]; then + qemu-debootstrap --arch $__UbuntuArch $__CodeName $__RootfsDir $__UbuntuRepo + cp $__CrossDir/$__BuildArch/sources.list.$__CodeName $__RootfsDir/etc/apt/sources.list + chroot $__RootfsDir apt-get update + chroot $__RootfsDir apt-get -f -y install + chroot $__RootfsDir apt-get -y install $__UbuntuPackages + chroot $__RootfsDir symlinks -cr /usr + + if [ $__SkipUnmount == 0 ]; then + umount $__RootfsDir/* || true + fi + + if [[ "$__BuildArch" == "arm" && "$__CodeName" == "trusty" ]]; then + pushd $__RootfsDir + patch -p1 < $__CrossDir/$__BuildArch/trusty.patch + patch -p1 < $__CrossDir/$__BuildArch/trusty-lttng-2.4.patch + popd + fi +elif [[ "$__Tizen" == "tizen" ]]; then + ROOTFS_DIR=$__RootfsDir $__CrossDir/$__BuildArch/tizen-build-rootfs.sh +else + echo "Unsupported target platform." + usage; + exit 1 +fi diff --git a/eng/common/cross/toolchain.cmake b/eng/common/cross/toolchain.cmake new file mode 100644 index 0000000000..137736c0a2 --- /dev/null +++ b/eng/common/cross/toolchain.cmake @@ -0,0 +1,235 @@ +set(CROSS_ROOTFS $ENV{ROOTFS_DIR}) + +set(TARGET_ARCH_NAME $ENV{TARGET_BUILD_ARCH}) +if(EXISTS ${CROSS_ROOTFS}/bin/freebsd-version) + set(CMAKE_SYSTEM_NAME FreeBSD) +elseif(EXISTS ${CROSS_ROOTFS}/usr/platform/i86pc) + set(CMAKE_SYSTEM_NAME SunOS) + set(ILLUMOS 1) +else() + set(CMAKE_SYSTEM_NAME Linux) +endif() +set(CMAKE_SYSTEM_VERSION 1) + +if(TARGET_ARCH_NAME STREQUAL "armel") + set(CMAKE_SYSTEM_PROCESSOR armv7l) + set(TOOLCHAIN "arm-linux-gnueabi") + if("$ENV{__DistroRid}" MATCHES "tizen.*") + set(TIZEN_TOOLCHAIN "armv7l-tizen-linux-gnueabi/9.2.0") + endif() +elseif(TARGET_ARCH_NAME STREQUAL "arm") + set(CMAKE_SYSTEM_PROCESSOR armv7l) + if(EXISTS ${CROSS_ROOTFS}/usr/lib/gcc/armv7-alpine-linux-musleabihf) + set(TOOLCHAIN "armv7-alpine-linux-musleabihf") + elseif(EXISTS ${CROSS_ROOTFS}/usr/lib/gcc/armv6-alpine-linux-musleabihf) + set(TOOLCHAIN "armv6-alpine-linux-musleabihf") + else() + set(TOOLCHAIN "arm-linux-gnueabihf") + endif() +elseif(TARGET_ARCH_NAME STREQUAL "arm64") + set(CMAKE_SYSTEM_PROCESSOR aarch64) + if(EXISTS ${CROSS_ROOTFS}/usr/lib/gcc/aarch64-alpine-linux-musl) + set(TOOLCHAIN "aarch64-alpine-linux-musl") + else() + set(TOOLCHAIN "aarch64-linux-gnu") + endif() + if("$ENV{__DistroRid}" MATCHES "tizen.*") + set(TIZEN_TOOLCHAIN "aarch64-tizen-linux-gnu/9.2.0") + endif() +elseif(TARGET_ARCH_NAME STREQUAL "x86") + set(CMAKE_SYSTEM_PROCESSOR i686) + set(TOOLCHAIN "i686-linux-gnu") +elseif (CMAKE_SYSTEM_NAME STREQUAL "FreeBSD") + set(CMAKE_SYSTEM_PROCESSOR "x86_64") + set(triple "x86_64-unknown-freebsd11") +elseif (ILLUMOS) + set(CMAKE_SYSTEM_PROCESSOR "x86_64") + set(TOOLCHAIN "x86_64-illumos") +else() + message(FATAL_ERROR "Arch is ${TARGET_ARCH_NAME}. Only armel, arm, arm64 and x86 are supported!") +endif() + +if(DEFINED ENV{TOOLCHAIN}) + set(TOOLCHAIN $ENV{TOOLCHAIN}) +endif() + +# Specify include paths +if(DEFINED TIZEN_TOOLCHAIN) + if(TARGET_ARCH_NAME STREQUAL "armel") + include_directories(SYSTEM ${CROSS_ROOTFS}/usr/lib/gcc/${TIZEN_TOOLCHAIN}/include/c++/) + include_directories(SYSTEM ${CROSS_ROOTFS}/usr/lib/gcc/${TIZEN_TOOLCHAIN}/include/c++/armv7l-tizen-linux-gnueabi) + endif() + if(TARGET_ARCH_NAME STREQUAL "arm64") + include_directories(SYSTEM ${CROSS_ROOTFS}/usr/lib64/gcc/${TIZEN_TOOLCHAIN}/include/c++/) + include_directories(SYSTEM ${CROSS_ROOTFS}/usr/lib64/gcc/${TIZEN_TOOLCHAIN}/include/c++/aarch64-tizen-linux-gnu) + endif() +endif() + +if("$ENV{__DistroRid}" MATCHES "android.*") + if(TARGET_ARCH_NAME STREQUAL "arm") + set(ANDROID_ABI armeabi-v7a) + elseif(TARGET_ARCH_NAME STREQUAL "arm64") + set(ANDROID_ABI arm64-v8a) + endif() + + # extract platform number required by the NDK's toolchain + string(REGEX REPLACE ".*\\.([0-9]+)-.*" "\\1" ANDROID_PLATFORM "$ENV{__DistroRid}") + + set(ANDROID_TOOLCHAIN clang) + set(FEATURE_EVENT_TRACE 0) # disable event trace as there is no lttng-ust package in termux repository + set(CMAKE_SYSTEM_LIBRARY_PATH "${CROSS_ROOTFS}/usr/lib") + set(CMAKE_SYSTEM_INCLUDE_PATH "${CROSS_ROOTFS}/usr/include") + + # include official NDK toolchain script + include(${CROSS_ROOTFS}/../build/cmake/android.toolchain.cmake) +elseif(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD") + # we cross-compile by instructing clang + set(CMAKE_C_COMPILER_TARGET ${triple}) + set(CMAKE_CXX_COMPILER_TARGET ${triple}) + set(CMAKE_ASM_COMPILER_TARGET ${triple}) + set(CMAKE_SYSROOT "${CROSS_ROOTFS}") +elseif(ILLUMOS) + set(CMAKE_SYSROOT "${CROSS_ROOTFS}") + + include_directories(SYSTEM ${CROSS_ROOTFS}/include) + + set(TOOLSET_PREFIX ${TOOLCHAIN}-) + function(locate_toolchain_exec exec var) + string(TOUPPER ${exec} EXEC_UPPERCASE) + if(NOT "$ENV{CLR_${EXEC_UPPERCASE}}" STREQUAL "") + set(${var} "$ENV{CLR_${EXEC_UPPERCASE}}" PARENT_SCOPE) + return() + endif() + + find_program(EXEC_LOCATION_${exec} + NAMES + "${TOOLSET_PREFIX}${exec}${CLR_CMAKE_COMPILER_FILE_NAME_VERSION}" + "${TOOLSET_PREFIX}${exec}") + + if (EXEC_LOCATION_${exec} STREQUAL "EXEC_LOCATION_${exec}-NOTFOUND") + message(FATAL_ERROR "Unable to find toolchain executable. Name: ${exec}, Prefix: ${TOOLSET_PREFIX}.") + endif() + set(${var} ${EXEC_LOCATION_${exec}} PARENT_SCOPE) + endfunction() + + set(CMAKE_SYSTEM_PREFIX_PATH "${CROSS_ROOTFS}") + + locate_toolchain_exec(gcc CMAKE_C_COMPILER) + locate_toolchain_exec(g++ CMAKE_CXX_COMPILER) + + set(CMAKE_C_STANDARD_LIBRARIES "${CMAKE_C_STANDARD_LIBRARIES} -lssp") + set(CMAKE_CXX_STANDARD_LIBRARIES "${CMAKE_CXX_STANDARD_LIBRARIES} -lssp") +else() + set(CMAKE_SYSROOT "${CROSS_ROOTFS}") + + set(CMAKE_C_COMPILER_EXTERNAL_TOOLCHAIN "${CROSS_ROOTFS}/usr") + set(CMAKE_CXX_COMPILER_EXTERNAL_TOOLCHAIN "${CROSS_ROOTFS}/usr") + set(CMAKE_ASM_COMPILER_EXTERNAL_TOOLCHAIN "${CROSS_ROOTFS}/usr") +endif() + +# Specify link flags + +function(add_toolchain_linker_flag Flag) + set(Config "${ARGV1}") + set(CONFIG_SUFFIX "") + if (NOT Config STREQUAL "") + set(CONFIG_SUFFIX "_${Config}") + endif() + set("CMAKE_EXE_LINKER_FLAGS${CONFIG_SUFFIX}" "${CMAKE_EXE_LINKER_FLAGS${CONFIG_SUFFIX}} ${Flag}" PARENT_SCOPE) + set("CMAKE_SHARED_LINKER_FLAGS${CONFIG_SUFFIX}" "${CMAKE_SHARED_LINKER_FLAGS${CONFIG_SUFFIX}} ${Flag}" PARENT_SCOPE) +endfunction() + + +if(TARGET_ARCH_NAME STREQUAL "armel") + if(DEFINED TIZEN_TOOLCHAIN) # For Tizen only + add_toolchain_linker_flag("-B${CROSS_ROOTFS}/usr/lib/gcc/${TIZEN_TOOLCHAIN}") + add_toolchain_linker_flag("-L${CROSS_ROOTFS}/lib") + add_toolchain_linker_flag("-L${CROSS_ROOTFS}/usr/lib") + add_toolchain_linker_flag("-L${CROSS_ROOTFS}/usr/lib/gcc/${TIZEN_TOOLCHAIN}") + endif() +elseif(TARGET_ARCH_NAME STREQUAL "arm64") + if(DEFINED TIZEN_TOOLCHAIN) # For Tizen only + add_toolchain_linker_flag("-B${CROSS_ROOTFS}/usr/lib64/gcc/${TIZEN_TOOLCHAIN}") + add_toolchain_linker_flag("-L${CROSS_ROOTFS}/lib64") + add_toolchain_linker_flag("-L${CROSS_ROOTFS}/usr/lib64") + add_toolchain_linker_flag("-L${CROSS_ROOTFS}/usr/lib64/gcc/${TIZEN_TOOLCHAIN}") + + add_toolchain_linker_flag("-Wl,--rpath-link=${CROSS_ROOTFS}/lib64") + add_toolchain_linker_flag("-Wl,--rpath-link=${CROSS_ROOTFS}/usr/lib64") + add_toolchain_linker_flag("-Wl,--rpath-link=${CROSS_ROOTFS}/usr/lib64/gcc/${TIZEN_TOOLCHAIN}") + endif() +elseif(TARGET_ARCH_NAME STREQUAL "x86") + add_toolchain_linker_flag(-m32) +elseif(ILLUMOS) + add_toolchain_linker_flag("-L${CROSS_ROOTFS}/lib/amd64") + add_toolchain_linker_flag("-L${CROSS_ROOTFS}/usr/amd64/lib") +endif() + +# Specify compile options + +if((TARGET_ARCH_NAME MATCHES "^(arm|armel|arm64)$" AND NOT "$ENV{__DistroRid}" MATCHES "android.*") OR ILLUMOS) + set(CMAKE_C_COMPILER_TARGET ${TOOLCHAIN}) + set(CMAKE_CXX_COMPILER_TARGET ${TOOLCHAIN}) + set(CMAKE_ASM_COMPILER_TARGET ${TOOLCHAIN}) +endif() + +if(TARGET_ARCH_NAME MATCHES "^(arm|armel)$") + add_compile_options(-mthumb) + if (NOT DEFINED CLR_ARM_FPU_TYPE) + set (CLR_ARM_FPU_TYPE vfpv3) + endif (NOT DEFINED CLR_ARM_FPU_TYPE) + + add_compile_options (-mfpu=${CLR_ARM_FPU_TYPE}) + if (NOT DEFINED CLR_ARM_FPU_CAPABILITY) + set (CLR_ARM_FPU_CAPABILITY 0x7) + endif (NOT DEFINED CLR_ARM_FPU_CAPABILITY) + + add_definitions (-DCLR_ARM_FPU_CAPABILITY=${CLR_ARM_FPU_CAPABILITY}) + + if(TARGET_ARCH_NAME STREQUAL "armel") + add_compile_options(-mfloat-abi=softfp) + endif() +elseif(TARGET_ARCH_NAME STREQUAL "x86") + add_compile_options(-m32) + add_compile_options(-Wno-error=unused-command-line-argument) +endif() + +if(DEFINED TIZEN_TOOLCHAIN) + if(TARGET_ARCH_NAME MATCHES "^(armel|arm64)$") + add_compile_options(-Wno-deprecated-declarations) # compile-time option + add_compile_options(-D__extern_always_inline=inline) # compile-time option + endif() +endif() + +# Set LLDB include and library paths for builds that need lldb. +if(TARGET_ARCH_NAME MATCHES "^(arm|armel|x86)$") + if(TARGET_ARCH_NAME STREQUAL "x86") + set(LLVM_CROSS_DIR "$ENV{LLVM_CROSS_HOME}") + else() # arm/armel case + set(LLVM_CROSS_DIR "$ENV{LLVM_ARM_HOME}") + endif() + if(LLVM_CROSS_DIR) + set(WITH_LLDB_LIBS "${LLVM_CROSS_DIR}/lib/" CACHE STRING "") + set(WITH_LLDB_INCLUDES "${LLVM_CROSS_DIR}/include" CACHE STRING "") + set(LLDB_H "${WITH_LLDB_INCLUDES}" CACHE STRING "") + set(LLDB "${LLVM_CROSS_DIR}/lib/liblldb.so" CACHE STRING "") + else() + if(TARGET_ARCH_NAME STREQUAL "x86") + set(WITH_LLDB_LIBS "${CROSS_ROOTFS}/usr/lib/i386-linux-gnu" CACHE STRING "") + set(CHECK_LLVM_DIR "${CROSS_ROOTFS}/usr/lib/llvm-3.8/include") + if(EXISTS "${CHECK_LLVM_DIR}" AND IS_DIRECTORY "${CHECK_LLVM_DIR}") + set(WITH_LLDB_INCLUDES "${CHECK_LLVM_DIR}") + else() + set(WITH_LLDB_INCLUDES "${CROSS_ROOTFS}/usr/lib/llvm-3.6/include") + endif() + else() # arm/armel case + set(WITH_LLDB_LIBS "${CROSS_ROOTFS}/usr/lib/${TOOLCHAIN}" CACHE STRING "") + set(WITH_LLDB_INCLUDES "${CROSS_ROOTFS}/usr/lib/llvm-3.6/include" CACHE STRING "") + endif() + endif() +endif() + +set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) +set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) +set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) +set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY) diff --git a/eng/common/darc-init.ps1 b/eng/common/darc-init.ps1 new file mode 100644 index 0000000000..435e764134 --- /dev/null +++ b/eng/common/darc-init.ps1 @@ -0,0 +1,47 @@ +param ( + $darcVersion = $null, + $versionEndpoint = 'https://maestro-prod.westus2.cloudapp.azure.com/api/assets/darc-version?api-version=2019-01-16', + $verbosity = 'minimal', + $toolpath = $null +) + +. $PSScriptRoot\tools.ps1 + +function InstallDarcCli ($darcVersion, $toolpath) { + $darcCliPackageName = 'microsoft.dotnet.darc' + + $dotnetRoot = InitializeDotNetCli -install:$true + $dotnet = "$dotnetRoot\dotnet.exe" + $toolList = & "$dotnet" tool list -g + + if ($toolList -like "*$darcCliPackageName*") { + & "$dotnet" tool uninstall $darcCliPackageName -g + } + + # If the user didn't explicitly specify the darc version, + # query the Maestro API for the correct version of darc to install. + if (-not $darcVersion) { + $darcVersion = $(Invoke-WebRequest -Uri $versionEndpoint -UseBasicParsing).Content + } + + $arcadeServicesSource = 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json' + + Write-Host "Installing Darc CLI version $darcVersion..." + Write-Host 'You may need to restart your command window if this is the first dotnet tool you have installed.' + if (-not $toolpath) { + Write-Host "'$dotnet' tool install $darcCliPackageName --version $darcVersion --add-source '$arcadeServicesSource' -v $verbosity -g" + & "$dotnet" tool install $darcCliPackageName --version $darcVersion --add-source "$arcadeServicesSource" -v $verbosity -g + }else { + Write-Host "'$dotnet' tool install $darcCliPackageName --version $darcVersion --add-source '$arcadeServicesSource' -v $verbosity --tool-path '$toolpath'" + & "$dotnet" tool install $darcCliPackageName --version $darcVersion --add-source "$arcadeServicesSource" -v $verbosity --tool-path "$toolpath" + } +} + +try { + InstallDarcCli $darcVersion $toolpath +} +catch { + Write-Host $_.ScriptStackTrace + Write-PipelineTelemetryError -Category 'Darc' -Message $_ + ExitWithExitCode 1 +} \ No newline at end of file diff --git a/eng/common/darc-init.sh b/eng/common/darc-init.sh new file mode 100755 index 0000000000..d981d7bbf3 --- /dev/null +++ b/eng/common/darc-init.sh @@ -0,0 +1,82 @@ +#!/usr/bin/env bash + +source="${BASH_SOURCE[0]}" +darcVersion='' +versionEndpoint='https://maestro-prod.westus2.cloudapp.azure.com/api/assets/darc-version?api-version=2019-01-16' +verbosity='minimal' + +while [[ $# > 0 ]]; do + opt="$(echo "$1" | awk '{print tolower($0)}')" + case "$opt" in + --darcversion) + darcVersion=$2 + shift + ;; + --versionendpoint) + versionEndpoint=$2 + shift + ;; + --verbosity) + verbosity=$2 + shift + ;; + --toolpath) + toolpath=$2 + shift + ;; + *) + echo "Invalid argument: $1" + usage + exit 1 + ;; + esac + + shift +done + +# resolve $source until the file is no longer a symlink +while [[ -h "$source" ]]; do + scriptroot="$( cd -P "$( dirname "$source" )" && pwd )" + source="$(readlink "$source")" + # if $source was a relative symlink, we need to resolve it relative to the path where the + # symlink file was located + [[ $source != /* ]] && source="$scriptroot/$source" +done +scriptroot="$( cd -P "$( dirname "$source" )" && pwd )" + +. "$scriptroot/tools.sh" + +if [ -z "$darcVersion" ]; then + darcVersion=$(curl -X GET "$versionEndpoint" -H "accept: text/plain") +fi + +function InstallDarcCli { + local darc_cli_package_name="microsoft.dotnet.darc" + + InitializeDotNetCli + local dotnet_root=$_InitializeDotNetCli + + if [ -z "$toolpath" ]; then + local tool_list=$($dotnet_root/dotnet tool list -g) + if [[ $tool_list = *$darc_cli_package_name* ]]; then + echo $($dotnet_root/dotnet tool uninstall $darc_cli_package_name -g) + fi + else + local tool_list=$($dotnet_root/dotnet tool list --tool-path "$toolpath") + if [[ $tool_list = *$darc_cli_package_name* ]]; then + echo $($dotnet_root/dotnet tool uninstall $darc_cli_package_name --tool-path "$toolpath") + fi + fi + + local arcadeServicesSource="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json" + + echo "Installing Darc CLI version $darcVersion..." + echo "You may need to restart your command shell if this is the first dotnet tool you have installed." + if [ -z "$toolpath" ]; then + echo $($dotnet_root/dotnet tool install $darc_cli_package_name --version $darcVersion --add-source "$arcadeServicesSource" -v $verbosity -g) + else + echo $($dotnet_root/dotnet tool install $darc_cli_package_name --version $darcVersion --add-source "$arcadeServicesSource" -v $verbosity --tool-path "$toolpath") + fi +} + +InstallDarcCli diff --git a/eng/common/dotnet-install-scripts/dotnet-install.ps1 b/eng/common/dotnet-install-scripts/dotnet-install.ps1 new file mode 100644 index 0000000000..f63b533f25 --- /dev/null +++ b/eng/common/dotnet-install-scripts/dotnet-install.ps1 @@ -0,0 +1,774 @@ +# +# Copyright (c) .NET Foundation and contributors. All rights reserved. +# Licensed under the MIT license. See LICENSE file in the project root for full license information. +# + +# Copied from https://dot.net/v1/dotnet-install.ps1 on 8/26/2020 + +<# +.SYNOPSIS + Installs dotnet cli +.DESCRIPTION + Installs dotnet cli. If dotnet installation already exists in the given directory + it will update it only if the requested version differs from the one already installed. +.PARAMETER Channel + Default: LTS + Download from the Channel specified. Possible values: + - Current - most current release + - LTS - most current supported release + - 2-part version in a format A.B - represents a specific release + examples: 2.0, 1.0 + - Branch name + examples: release/2.0.0, Master + Note: The version parameter overrides the channel parameter. +.PARAMETER Version + Default: latest + Represents a build version on specific channel. Possible values: + - latest - most latest build on specific channel + - coherent - most latest coherent build on specific channel + coherent applies only to SDK downloads + - 3-part version in a format A.B.C - represents specific version of build + examples: 2.0.0-preview2-006120, 1.1.0 +.PARAMETER InstallDir + Default: %LocalAppData%\Microsoft\dotnet + Path to where to install dotnet. Note that binaries will be placed directly in a given directory. +.PARAMETER Architecture + Default: - this value represents currently running OS architecture + Architecture of dotnet binaries to be installed. + Possible values are: , amd64, x64, x86, arm64, arm +.PARAMETER SharedRuntime + This parameter is obsolete and may be removed in a future version of this script. + The recommended alternative is '-Runtime dotnet'. + Installs just the shared runtime bits, not the entire SDK. +.PARAMETER Runtime + Installs just a shared runtime, not the entire SDK. + Possible values: + - dotnet - the Microsoft.NETCore.App shared runtime + - aspnetcore - the Microsoft.AspNetCore.App shared runtime + - windowsdesktop - the Microsoft.WindowsDesktop.App shared runtime +.PARAMETER DryRun + If set it will not perform installation but instead display what command line to use to consistently install + currently requested version of dotnet cli. In example if you specify version 'latest' it will display a link + with specific version so that this command can be used deterministicly in a build script. + It also displays binaries location if you prefer to install or download it yourself. +.PARAMETER NoPath + By default this script will set environment variable PATH for the current process to the binaries folder inside installation folder. + If set it will display binaries location but not set any environment variable. +.PARAMETER Verbose + Displays diagnostics information. +.PARAMETER AzureFeed + Default: https://dotnetcli.azureedge.net/dotnet + This parameter typically is not changed by the user. + It allows changing the URL for the Azure feed used by this installer. +.PARAMETER UncachedFeed + This parameter typically is not changed by the user. + It allows changing the URL for the Uncached feed used by this installer. +.PARAMETER FeedCredential + Used as a query string to append to the Azure feed. + It allows changing the URL to use non-public blob storage accounts. +.PARAMETER ProxyAddress + If set, the installer will use the proxy when making web requests +.PARAMETER ProxyUseDefaultCredentials + Default: false + Use default credentials, when using proxy address. +.PARAMETER ProxyBypassList + If set with ProxyAddress, will provide the list of comma separated urls that will bypass the proxy +.PARAMETER SkipNonVersionedFiles + Default: false + Skips installing non-versioned files if they already exist, such as dotnet.exe. +.PARAMETER NoCdn + Disable downloading from the Azure CDN, and use the uncached feed directly. +.PARAMETER JSonFile + Determines the SDK version from a user specified global.json file + Note: global.json must have a value for 'SDK:Version' +#> +[cmdletbinding()] +param( + [string]$Channel="LTS", + [string]$Version="Latest", + [string]$JSonFile, + [string]$InstallDir="", + [string]$Architecture="", + [ValidateSet("dotnet", "aspnetcore", "windowsdesktop", IgnoreCase = $false)] + [string]$Runtime, + [Obsolete("This parameter may be removed in a future version of this script. The recommended alternative is '-Runtime dotnet'.")] + [switch]$SharedRuntime, + [switch]$DryRun, + [switch]$NoPath, + [string]$AzureFeed="https://dotnetcli.azureedge.net/dotnet", + [string]$UncachedFeed="https://dotnetcli.blob.core.windows.net/dotnet", + [string]$FeedCredential, + [string]$ProxyAddress, + [switch]$ProxyUseDefaultCredentials, + [string[]]$ProxyBypassList=@(), + [switch]$SkipNonVersionedFiles, + [switch]$NoCdn +) + +Set-StrictMode -Version Latest +$ErrorActionPreference="Stop" +$ProgressPreference="SilentlyContinue" + +if ($NoCdn) { + $AzureFeed = $UncachedFeed +} + +$BinFolderRelativePath="" + +if ($SharedRuntime -and (-not $Runtime)) { + $Runtime = "dotnet" +} + +# example path with regex: shared/1.0.0-beta-12345/somepath +$VersionRegEx="/\d+\.\d+[^/]+/" +$OverrideNonVersionedFiles = !$SkipNonVersionedFiles + +function Say($str) { + try + { + Write-Host "dotnet-install: $str" + } + catch + { + # Some platforms cannot utilize Write-Host (Azure Functions, for instance). Fall back to Write-Output + Write-Output "dotnet-install: $str" + } +} + +function Say-Verbose($str) { + try + { + Write-Verbose "dotnet-install: $str" + } + catch + { + # Some platforms cannot utilize Write-Verbose (Azure Functions, for instance). Fall back to Write-Output + Write-Output "dotnet-install: $str" + } +} + +function Say-Invocation($Invocation) { + $command = $Invocation.MyCommand; + $args = (($Invocation.BoundParameters.Keys | foreach { "-$_ `"$($Invocation.BoundParameters[$_])`"" }) -join " ") + Say-Verbose "$command $args" +} + +function Invoke-With-Retry([ScriptBlock]$ScriptBlock, [int]$MaxAttempts = 3, [int]$SecondsBetweenAttempts = 1) { + $Attempts = 0 + + while ($true) { + try { + return $ScriptBlock.Invoke() + } + catch { + $Attempts++ + if ($Attempts -lt $MaxAttempts) { + Start-Sleep $SecondsBetweenAttempts + } + else { + throw + } + } + } +} + +function Get-Machine-Architecture() { + Say-Invocation $MyInvocation + + # On PS x86, PROCESSOR_ARCHITECTURE reports x86 even on x64 systems. + # To get the correct architecture, we need to use PROCESSOR_ARCHITEW6432. + # PS x64 doesn't define this, so we fall back to PROCESSOR_ARCHITECTURE. + # Possible values: amd64, x64, x86, arm64, arm + + if( $ENV:PROCESSOR_ARCHITEW6432 -ne $null ) + { + return $ENV:PROCESSOR_ARCHITEW6432 + } + + return $ENV:PROCESSOR_ARCHITECTURE +} + +function Get-CLIArchitecture-From-Architecture([string]$Architecture) { + Say-Invocation $MyInvocation + + switch ($Architecture.ToLower()) { + { $_ -eq "" } { return Get-CLIArchitecture-From-Architecture $(Get-Machine-Architecture) } + { ($_ -eq "amd64") -or ($_ -eq "x64") } { return "x64" } + { $_ -eq "x86" } { return "x86" } + { $_ -eq "arm" } { return "arm" } + { $_ -eq "arm64" } { return "arm64" } + default { throw "Architecture not supported. If you think this is a bug, report it at https://github.com/dotnet/sdk/issues" } + } +} + +# The version text returned from the feeds is a 1-line or 2-line string: +# For the SDK and the dotnet runtime (2 lines): +# Line 1: # commit_hash +# Line 2: # 4-part version +# For the aspnetcore runtime (1 line): +# Line 1: # 4-part version +function Get-Version-Info-From-Version-Text([string]$VersionText) { + Say-Invocation $MyInvocation + + $Data = -split $VersionText + + $VersionInfo = @{ + CommitHash = $(if ($Data.Count -gt 1) { $Data[0] }) + Version = $Data[-1] # last line is always the version number. + } + return $VersionInfo +} + +function Load-Assembly([string] $Assembly) { + try { + Add-Type -Assembly $Assembly | Out-Null + } + catch { + # On Nano Server, Powershell Core Edition is used. Add-Type is unable to resolve base class assemblies because they are not GAC'd. + # Loading the base class assemblies is not unnecessary as the types will automatically get resolved. + } +} + +function GetHTTPResponse([Uri] $Uri) +{ + Invoke-With-Retry( + { + + $HttpClient = $null + + try { + # HttpClient is used vs Invoke-WebRequest in order to support Nano Server which doesn't support the Invoke-WebRequest cmdlet. + Load-Assembly -Assembly System.Net.Http + + if(-not $ProxyAddress) { + try { + # Despite no proxy being explicitly specified, we may still be behind a default proxy + $DefaultProxy = [System.Net.WebRequest]::DefaultWebProxy; + if($DefaultProxy -and (-not $DefaultProxy.IsBypassed($Uri))) { + $ProxyAddress = $DefaultProxy.GetProxy($Uri).OriginalString + $ProxyUseDefaultCredentials = $true + } + } catch { + # Eat the exception and move forward as the above code is an attempt + # at resolving the DefaultProxy that may not have been a problem. + $ProxyAddress = $null + Say-Verbose("Exception ignored: $_.Exception.Message - moving forward...") + } + } + + if($ProxyAddress) { + $HttpClientHandler = New-Object System.Net.Http.HttpClientHandler + $HttpClientHandler.Proxy = New-Object System.Net.WebProxy -Property @{ + Address=$ProxyAddress; + UseDefaultCredentials=$ProxyUseDefaultCredentials; + BypassList = $ProxyBypassList; + } + $HttpClient = New-Object System.Net.Http.HttpClient -ArgumentList $HttpClientHandler + } + else { + + $HttpClient = New-Object System.Net.Http.HttpClient + } + # Default timeout for HttpClient is 100s. For a 50 MB download this assumes 500 KB/s average, any less will time out + # 20 minutes allows it to work over much slower connections. + $HttpClient.Timeout = New-TimeSpan -Minutes 20 + $Response = $HttpClient.GetAsync("${Uri}${FeedCredential}").Result + if (($Response -eq $null) -or (-not ($Response.IsSuccessStatusCode))) { + # The feed credential is potentially sensitive info. Do not log FeedCredential to console output. + $ErrorMsg = "Failed to download $Uri." + if ($Response -ne $null) { + $ErrorMsg += " $Response" + } + + throw $ErrorMsg + } + + return $Response + } + finally { + if ($HttpClient -ne $null) { + $HttpClient.Dispose() + } + } + }) +} + +function Get-Latest-Version-Info([string]$AzureFeed, [string]$Channel, [bool]$Coherent) { + Say-Invocation $MyInvocation + + $VersionFileUrl = $null + if ($Runtime -eq "dotnet") { + $VersionFileUrl = "$UncachedFeed/Runtime/$Channel/latest.version" + } + elseif ($Runtime -eq "aspnetcore") { + $VersionFileUrl = "$UncachedFeed/aspnetcore/Runtime/$Channel/latest.version" + } + # Currently, the WindowsDesktop runtime is manufactured with the .Net core runtime + elseif ($Runtime -eq "windowsdesktop") { + $VersionFileUrl = "$UncachedFeed/Runtime/$Channel/latest.version" + } + elseif (-not $Runtime) { + if ($Coherent) { + $VersionFileUrl = "$UncachedFeed/Sdk/$Channel/latest.coherent.version" + } + else { + $VersionFileUrl = "$UncachedFeed/Sdk/$Channel/latest.version" + } + } + else { + throw "Invalid value for `$Runtime" + } + try { + $Response = GetHTTPResponse -Uri $VersionFileUrl + } + catch { + throw "Could not resolve version information." + } + $StringContent = $Response.Content.ReadAsStringAsync().Result + + switch ($Response.Content.Headers.ContentType) { + { ($_ -eq "application/octet-stream") } { $VersionText = $StringContent } + { ($_ -eq "text/plain") } { $VersionText = $StringContent } + { ($_ -eq "text/plain; charset=UTF-8") } { $VersionText = $StringContent } + default { throw "``$Response.Content.Headers.ContentType`` is an unknown .version file content type." } + } + + $VersionInfo = Get-Version-Info-From-Version-Text $VersionText + + return $VersionInfo +} + +function Parse-Jsonfile-For-Version([string]$JSonFile) { + Say-Invocation $MyInvocation + + If (-Not (Test-Path $JSonFile)) { + throw "Unable to find '$JSonFile'" + } + try { + $JSonContent = Get-Content($JSonFile) -Raw | ConvertFrom-Json | Select-Object -expand "sdk" -ErrorAction SilentlyContinue + } + catch { + throw "Json file unreadable: '$JSonFile'" + } + if ($JSonContent) { + try { + $JSonContent.PSObject.Properties | ForEach-Object { + $PropertyName = $_.Name + if ($PropertyName -eq "version") { + $Version = $_.Value + Say-Verbose "Version = $Version" + } + } + } + catch { + throw "Unable to parse the SDK node in '$JSonFile'" + } + } + else { + throw "Unable to find the SDK node in '$JSonFile'" + } + If ($Version -eq $null) { + throw "Unable to find the SDK:version node in '$JSonFile'" + } + return $Version +} + +function Get-Specific-Version-From-Version([string]$AzureFeed, [string]$Channel, [string]$Version, [string]$JSonFile) { + Say-Invocation $MyInvocation + + if (-not $JSonFile) { + switch ($Version.ToLower()) { + { $_ -eq "latest" } { + $LatestVersionInfo = Get-Latest-Version-Info -AzureFeed $AzureFeed -Channel $Channel -Coherent $False + return $LatestVersionInfo.Version + } + { $_ -eq "coherent" } { + $LatestVersionInfo = Get-Latest-Version-Info -AzureFeed $AzureFeed -Channel $Channel -Coherent $True + return $LatestVersionInfo.Version + } + default { return $Version } + } + } + else { + return Parse-Jsonfile-For-Version $JSonFile + } +} + +function Get-Download-Link([string]$AzureFeed, [string]$SpecificVersion, [string]$CLIArchitecture) { + Say-Invocation $MyInvocation + + # If anything fails in this lookup it will default to $SpecificVersion + $SpecificProductVersion = Get-Product-Version -AzureFeed $AzureFeed -SpecificVersion $SpecificVersion + + if ($Runtime -eq "dotnet") { + $PayloadURL = "$AzureFeed/Runtime/$SpecificVersion/dotnet-runtime-$SpecificProductVersion-win-$CLIArchitecture.zip" + } + elseif ($Runtime -eq "aspnetcore") { + $PayloadURL = "$AzureFeed/aspnetcore/Runtime/$SpecificVersion/aspnetcore-runtime-$SpecificProductVersion-win-$CLIArchitecture.zip" + } + elseif ($Runtime -eq "windowsdesktop") { + $PayloadURL = "$AzureFeed/Runtime/$SpecificVersion/windowsdesktop-runtime-$SpecificProductVersion-win-$CLIArchitecture.zip" + } + elseif (-not $Runtime) { + $PayloadURL = "$AzureFeed/Sdk/$SpecificVersion/dotnet-sdk-$SpecificProductVersion-win-$CLIArchitecture.zip" + } + else { + throw "Invalid value for `$Runtime" + } + + Say-Verbose "Constructed primary named payload URL: $PayloadURL" + + return $PayloadURL, $SpecificProductVersion +} + +function Get-LegacyDownload-Link([string]$AzureFeed, [string]$SpecificVersion, [string]$CLIArchitecture) { + Say-Invocation $MyInvocation + + if (-not $Runtime) { + $PayloadURL = "$AzureFeed/Sdk/$SpecificVersion/dotnet-dev-win-$CLIArchitecture.$SpecificVersion.zip" + } + elseif ($Runtime -eq "dotnet") { + $PayloadURL = "$AzureFeed/Runtime/$SpecificVersion/dotnet-win-$CLIArchitecture.$SpecificVersion.zip" + } + else { + return $null + } + + Say-Verbose "Constructed legacy named payload URL: $PayloadURL" + + return $PayloadURL +} + +function Get-Product-Version([string]$AzureFeed, [string]$SpecificVersion) { + Say-Invocation $MyInvocation + + if ($Runtime -eq "dotnet") { + $ProductVersionTxtURL = "$AzureFeed/Runtime/$SpecificVersion/productVersion.txt" + } + elseif ($Runtime -eq "aspnetcore") { + $ProductVersionTxtURL = "$AzureFeed/aspnetcore/Runtime/$SpecificVersion/productVersion.txt" + } + elseif ($Runtime -eq "windowsdesktop") { + $ProductVersionTxtURL = "$AzureFeed/Runtime/$SpecificVersion/productVersion.txt" + } + elseif (-not $Runtime) { + $ProductVersionTxtURL = "$AzureFeed/Sdk/$SpecificVersion/productVersion.txt" + } + else { + throw "Invalid value specified for `$Runtime" + } + + Say-Verbose "Checking for existence of $ProductVersionTxtURL" + + try { + $productVersionResponse = GetHTTPResponse($productVersionTxtUrl) + + if ($productVersionResponse.StatusCode -eq 200) { + $productVersion = $productVersionResponse.Content.ReadAsStringAsync().Result.Trim() + if ($productVersion -ne $SpecificVersion) + { + Say "Using alternate version $productVersion found in $ProductVersionTxtURL" + } + + return $productVersion + } + else { + Say-Verbose "Got StatusCode $($productVersionResponse.StatusCode) trying to get productVersion.txt at $productVersionTxtUrl, so using default value of $SpecificVersion" + $productVersion = $SpecificVersion + } + } catch { + Say-Verbose "Could not read productVersion.txt at $productVersionTxtUrl, so using default value of $SpecificVersion" + $productVersion = $SpecificVersion + } + + return $productVersion +} + +function Get-User-Share-Path() { + Say-Invocation $MyInvocation + + $InstallRoot = $env:DOTNET_INSTALL_DIR + if (!$InstallRoot) { + $InstallRoot = "$env:LocalAppData\Microsoft\dotnet" + } + return $InstallRoot +} + +function Resolve-Installation-Path([string]$InstallDir) { + Say-Invocation $MyInvocation + + if ($InstallDir -eq "") { + return Get-User-Share-Path + } + return $InstallDir +} + +function Is-Dotnet-Package-Installed([string]$InstallRoot, [string]$RelativePathToPackage, [string]$SpecificVersion) { + Say-Invocation $MyInvocation + + $DotnetPackagePath = Join-Path -Path $InstallRoot -ChildPath $RelativePathToPackage | Join-Path -ChildPath $SpecificVersion + Say-Verbose "Is-Dotnet-Package-Installed: DotnetPackagePath=$DotnetPackagePath" + return Test-Path $DotnetPackagePath -PathType Container +} + +function Get-Absolute-Path([string]$RelativeOrAbsolutePath) { + # Too much spam + # Say-Invocation $MyInvocation + + return $ExecutionContext.SessionState.Path.GetUnresolvedProviderPathFromPSPath($RelativeOrAbsolutePath) +} + +function Get-Path-Prefix-With-Version($path) { + $match = [regex]::match($path, $VersionRegEx) + if ($match.Success) { + return $entry.FullName.Substring(0, $match.Index + $match.Length) + } + + return $null +} + +function Get-List-Of-Directories-And-Versions-To-Unpack-From-Dotnet-Package([System.IO.Compression.ZipArchive]$Zip, [string]$OutPath) { + Say-Invocation $MyInvocation + + $ret = @() + foreach ($entry in $Zip.Entries) { + $dir = Get-Path-Prefix-With-Version $entry.FullName + if ($dir -ne $null) { + $path = Get-Absolute-Path $(Join-Path -Path $OutPath -ChildPath $dir) + if (-Not (Test-Path $path -PathType Container)) { + $ret += $dir + } + } + } + + $ret = $ret | Sort-Object | Get-Unique + + $values = ($ret | foreach { "$_" }) -join ";" + Say-Verbose "Directories to unpack: $values" + + return $ret +} + +# Example zip content and extraction algorithm: +# Rule: files if extracted are always being extracted to the same relative path locally +# .\ +# a.exe # file does not exist locally, extract +# b.dll # file exists locally, override only if $OverrideFiles set +# aaa\ # same rules as for files +# ... +# abc\1.0.0\ # directory contains version and exists locally +# ... # do not extract content under versioned part +# abc\asd\ # same rules as for files +# ... +# def\ghi\1.0.1\ # directory contains version and does not exist locally +# ... # extract content +function Extract-Dotnet-Package([string]$ZipPath, [string]$OutPath) { + Say-Invocation $MyInvocation + + Load-Assembly -Assembly System.IO.Compression.FileSystem + Set-Variable -Name Zip + try { + $Zip = [System.IO.Compression.ZipFile]::OpenRead($ZipPath) + + $DirectoriesToUnpack = Get-List-Of-Directories-And-Versions-To-Unpack-From-Dotnet-Package -Zip $Zip -OutPath $OutPath + + foreach ($entry in $Zip.Entries) { + $PathWithVersion = Get-Path-Prefix-With-Version $entry.FullName + if (($PathWithVersion -eq $null) -Or ($DirectoriesToUnpack -contains $PathWithVersion)) { + $DestinationPath = Get-Absolute-Path $(Join-Path -Path $OutPath -ChildPath $entry.FullName) + $DestinationDir = Split-Path -Parent $DestinationPath + $OverrideFiles=$OverrideNonVersionedFiles -Or (-Not (Test-Path $DestinationPath)) + if ((-Not $DestinationPath.EndsWith("\")) -And $OverrideFiles) { + New-Item -ItemType Directory -Force -Path $DestinationDir | Out-Null + [System.IO.Compression.ZipFileExtensions]::ExtractToFile($entry, $DestinationPath, $OverrideNonVersionedFiles) + } + } + } + } + finally { + if ($Zip -ne $null) { + $Zip.Dispose() + } + } +} + +function DownloadFile($Source, [string]$OutPath) { + if ($Source -notlike "http*") { + # Using System.IO.Path.GetFullPath to get the current directory + # does not work in this context - $pwd gives the current directory + if (![System.IO.Path]::IsPathRooted($Source)) { + $Source = $(Join-Path -Path $pwd -ChildPath $Source) + } + $Source = Get-Absolute-Path $Source + Say "Copying file from $Source to $OutPath" + Copy-Item $Source $OutPath + return + } + + $Stream = $null + + try { + $Response = GetHTTPResponse -Uri $Source + $Stream = $Response.Content.ReadAsStreamAsync().Result + $File = [System.IO.File]::Create($OutPath) + $Stream.CopyTo($File) + $File.Close() + } + finally { + if ($Stream -ne $null) { + $Stream.Dispose() + } + } +} + +function Prepend-Sdk-InstallRoot-To-Path([string]$InstallRoot, [string]$BinFolderRelativePath) { + $BinPath = Get-Absolute-Path $(Join-Path -Path $InstallRoot -ChildPath $BinFolderRelativePath) + if (-Not $NoPath) { + $SuffixedBinPath = "$BinPath;" + if (-Not $env:path.Contains($SuffixedBinPath)) { + Say "Adding to current process PATH: `"$BinPath`". Note: This change will not be visible if PowerShell was run as a child process." + $env:path = $SuffixedBinPath + $env:path + } else { + Say-Verbose "Current process PATH already contains `"$BinPath`"" + } + } + else { + Say "Binaries of dotnet can be found in $BinPath" + } +} + +$CLIArchitecture = Get-CLIArchitecture-From-Architecture $Architecture +$SpecificVersion = Get-Specific-Version-From-Version -AzureFeed $AzureFeed -Channel $Channel -Version $Version -JSonFile $JSonFile +$DownloadLink, $EffectiveVersion = Get-Download-Link -AzureFeed $AzureFeed -SpecificVersion $SpecificVersion -CLIArchitecture $CLIArchitecture +$LegacyDownloadLink = Get-LegacyDownload-Link -AzureFeed $AzureFeed -SpecificVersion $SpecificVersion -CLIArchitecture $CLIArchitecture + +$InstallRoot = Resolve-Installation-Path $InstallDir +Say-Verbose "InstallRoot: $InstallRoot" +$ScriptName = $MyInvocation.MyCommand.Name + +if ($DryRun) { + Say "Payload URLs:" + Say "Primary named payload URL: $DownloadLink" + if ($LegacyDownloadLink) { + Say "Legacy named payload URL: $LegacyDownloadLink" + } + $RepeatableCommand = ".\$ScriptName -Version `"$SpecificVersion`" -InstallDir `"$InstallRoot`" -Architecture `"$CLIArchitecture`"" + if ($Runtime -eq "dotnet") { + $RepeatableCommand+=" -Runtime `"dotnet`"" + } + elseif ($Runtime -eq "aspnetcore") { + $RepeatableCommand+=" -Runtime `"aspnetcore`"" + } + foreach ($key in $MyInvocation.BoundParameters.Keys) { + if (-not (@("Architecture","Channel","DryRun","InstallDir","Runtime","SharedRuntime","Version") -contains $key)) { + $RepeatableCommand+=" -$key `"$($MyInvocation.BoundParameters[$key])`"" + } + } + Say "Repeatable invocation: $RepeatableCommand" + exit 0 +} + +if ($Runtime -eq "dotnet") { + $assetName = ".NET Core Runtime" + $dotnetPackageRelativePath = "shared\Microsoft.NETCore.App" +} +elseif ($Runtime -eq "aspnetcore") { + $assetName = "ASP.NET Core Runtime" + $dotnetPackageRelativePath = "shared\Microsoft.AspNetCore.App" +} +elseif ($Runtime -eq "windowsdesktop") { + $assetName = ".NET Core Windows Desktop Runtime" + $dotnetPackageRelativePath = "shared\Microsoft.WindowsDesktop.App" +} +elseif (-not $Runtime) { + $assetName = ".NET Core SDK" + $dotnetPackageRelativePath = "sdk" +} +else { + throw "Invalid value for `$Runtime" +} + +if ($SpecificVersion -ne $EffectiveVersion) +{ + Say "Performing installation checks for effective version: $EffectiveVersion" + $SpecificVersion = $EffectiveVersion +} + +# Check if the SDK version is already installed. +$isAssetInstalled = Is-Dotnet-Package-Installed -InstallRoot $InstallRoot -RelativePathToPackage $dotnetPackageRelativePath -SpecificVersion $SpecificVersion +if ($isAssetInstalled) { + Say "$assetName version $SpecificVersion is already installed." + Prepend-Sdk-InstallRoot-To-Path -InstallRoot $InstallRoot -BinFolderRelativePath $BinFolderRelativePath + exit 0 +} + +New-Item -ItemType Directory -Force -Path $InstallRoot | Out-Null + +$installDrive = $((Get-Item $InstallRoot).PSDrive.Name); +$diskInfo = Get-PSDrive -Name $installDrive +if ($diskInfo.Free / 1MB -le 100) { + Say "There is not enough disk space on drive ${installDrive}:" + exit 0 +} + +$ZipPath = [System.IO.Path]::combine([System.IO.Path]::GetTempPath(), [System.IO.Path]::GetRandomFileName()) +Say-Verbose "Zip path: $ZipPath" + +$DownloadFailed = $false +Say "Downloading link: $DownloadLink" +try { + DownloadFile -Source $DownloadLink -OutPath $ZipPath +} +catch { + Say "Cannot download: $DownloadLink" + if ($LegacyDownloadLink) { + $DownloadLink = $LegacyDownloadLink + $ZipPath = [System.IO.Path]::combine([System.IO.Path]::GetTempPath(), [System.IO.Path]::GetRandomFileName()) + Say-Verbose "Legacy zip path: $ZipPath" + Say "Downloading legacy link: $DownloadLink" + try { + DownloadFile -Source $DownloadLink -OutPath $ZipPath + } + catch { + Say "Cannot download: $DownloadLink" + $DownloadFailed = $true + } + } + else { + $DownloadFailed = $true + } +} + +if ($DownloadFailed) { + throw "Could not find/download: `"$assetName`" with version = $SpecificVersion`nRefer to: https://aka.ms/dotnet-os-lifecycle for information on .NET Core support" +} + +Say "Extracting zip from $DownloadLink" +Extract-Dotnet-Package -ZipPath $ZipPath -OutPath $InstallRoot + +# Check if the SDK version is installed; if not, fail the installation. +$isAssetInstalled = $false + +# if the version contains "RTM" or "servicing"; check if a 'release-type' SDK version is installed. +if ($SpecificVersion -Match "rtm" -or $SpecificVersion -Match "servicing") { + $ReleaseVersion = $SpecificVersion.Split("-")[0] + Say-Verbose "Checking installation: version = $ReleaseVersion" + $isAssetInstalled = Is-Dotnet-Package-Installed -InstallRoot $InstallRoot -RelativePathToPackage $dotnetPackageRelativePath -SpecificVersion $ReleaseVersion +} + +# Check if the SDK version is installed. +if (!$isAssetInstalled) { + Say-Verbose "Checking installation: version = $SpecificVersion" + $isAssetInstalled = Is-Dotnet-Package-Installed -InstallRoot $InstallRoot -RelativePathToPackage $dotnetPackageRelativePath -SpecificVersion $SpecificVersion +} + +if (!$isAssetInstalled) { + throw "`"$assetName`" with version = $SpecificVersion failed to install with an unknown error." +} + +Remove-Item $ZipPath + +Prepend-Sdk-InstallRoot-To-Path -InstallRoot $InstallRoot -BinFolderRelativePath $BinFolderRelativePath + +Say "Installation finished" +exit 0 \ No newline at end of file diff --git a/eng/common/dotnet-install-scripts/dotnet-install.sh b/eng/common/dotnet-install-scripts/dotnet-install.sh new file mode 100755 index 0000000000..92161141f6 --- /dev/null +++ b/eng/common/dotnet-install-scripts/dotnet-install.sh @@ -0,0 +1,1133 @@ +#!/usr/bin/env bash +# Copyright (c) .NET Foundation and contributors. All rights reserved. +# Licensed under the MIT license. See LICENSE file in the project root for full license information. +# + +# Stop script on NZEC +set -e +# Stop script if unbound variable found (use ${var:-} if intentional) +set -u +# By default cmd1 | cmd2 returns exit code of cmd2 regardless of cmd1 success +# This is causing it to fail +set -o pipefail + +# Use in the the functions: eval $invocation +invocation='say_verbose "Calling: ${yellow:-}${FUNCNAME[0]} ${green:-}$*${normal:-}"' + +# standard output may be used as a return value in the functions +# we need a way to write text on the screen in the functions so that +# it won't interfere with the return value. +# Exposing stream 3 as a pipe to standard output of the script itself +exec 3>&1 + +# Setup some colors to use. These need to work in fairly limited shells, like the Ubuntu Docker container where there are only 8 colors. +# See if stdout is a terminal +if [ -t 1 ] && command -v tput > /dev/null; then + # see if it supports colors + ncolors=$(tput colors) + if [ -n "$ncolors" ] && [ $ncolors -ge 8 ]; then + bold="$(tput bold || echo)" + normal="$(tput sgr0 || echo)" + black="$(tput setaf 0 || echo)" + red="$(tput setaf 1 || echo)" + green="$(tput setaf 2 || echo)" + yellow="$(tput setaf 3 || echo)" + blue="$(tput setaf 4 || echo)" + magenta="$(tput setaf 5 || echo)" + cyan="$(tput setaf 6 || echo)" + white="$(tput setaf 7 || echo)" + fi +fi + +say_warning() { + printf "%b\n" "${yellow:-}dotnet_install: Warning: $1${normal:-}" +} + +say_err() { + printf "%b\n" "${red:-}dotnet_install: Error: $1${normal:-}" >&2 +} + +say() { + # using stream 3 (defined in the beginning) to not interfere with stdout of functions + # which may be used as return value + printf "%b\n" "${cyan:-}dotnet-install:${normal:-} $1" >&3 +} + +say_verbose() { + if [ "$verbose" = true ]; then + say "$1" + fi +} + +# This platform list is finite - if the SDK/Runtime has supported Linux distribution-specific assets, +# then and only then should the Linux distribution appear in this list. +# Adding a Linux distribution to this list does not imply distribution-specific support. +get_legacy_os_name_from_platform() { + eval $invocation + + platform="$1" + case "$platform" in + "centos.7") + echo "centos" + return 0 + ;; + "debian.8") + echo "debian" + return 0 + ;; + "debian.9") + echo "debian.9" + return 0 + ;; + "fedora.23") + echo "fedora.23" + return 0 + ;; + "fedora.24") + echo "fedora.24" + return 0 + ;; + "fedora.27") + echo "fedora.27" + return 0 + ;; + "fedora.28") + echo "fedora.28" + return 0 + ;; + "opensuse.13.2") + echo "opensuse.13.2" + return 0 + ;; + "opensuse.42.1") + echo "opensuse.42.1" + return 0 + ;; + "opensuse.42.3") + echo "opensuse.42.3" + return 0 + ;; + "rhel.7"*) + echo "rhel" + return 0 + ;; + "ubuntu.14.04") + echo "ubuntu" + return 0 + ;; + "ubuntu.16.04") + echo "ubuntu.16.04" + return 0 + ;; + "ubuntu.16.10") + echo "ubuntu.16.10" + return 0 + ;; + "ubuntu.18.04") + echo "ubuntu.18.04" + return 0 + ;; + "alpine.3.4.3") + echo "alpine" + return 0 + ;; + esac + return 1 +} + +get_linux_platform_name() { + eval $invocation + + if [ -n "$runtime_id" ]; then + echo "${runtime_id%-*}" + return 0 + else + if [ -e /etc/os-release ]; then + . /etc/os-release + echo "$ID${VERSION_ID:+.${VERSION_ID}}" + return 0 + elif [ -e /etc/redhat-release ]; then + local redhatRelease=$(&1 || true) | grep -q musl +} + +get_current_os_name() { + eval $invocation + + local uname=$(uname) + if [ "$uname" = "Darwin" ]; then + echo "osx" + return 0 + elif [ "$uname" = "FreeBSD" ]; then + echo "freebsd" + return 0 + elif [ "$uname" = "Linux" ]; then + local linux_platform_name + linux_platform_name="$(get_linux_platform_name)" || { echo "linux" && return 0 ; } + + if [ "$linux_platform_name" = "rhel.6" ]; then + echo $linux_platform_name + return 0 + elif is_musl_based_distro; then + echo "linux-musl" + return 0 + else + echo "linux" + return 0 + fi + fi + + say_err "OS name could not be detected: UName = $uname" + return 1 +} + +get_legacy_os_name() { + eval $invocation + + local uname=$(uname) + if [ "$uname" = "Darwin" ]; then + echo "osx" + return 0 + elif [ -n "$runtime_id" ]; then + echo $(get_legacy_os_name_from_platform "${runtime_id%-*}" || echo "${runtime_id%-*}") + return 0 + else + if [ -e /etc/os-release ]; then + . /etc/os-release + os=$(get_legacy_os_name_from_platform "$ID${VERSION_ID:+.${VERSION_ID}}" || echo "") + if [ -n "$os" ]; then + echo "$os" + return 0 + fi + fi + fi + + say_verbose "Distribution specific OS name and version could not be detected: UName = $uname" + return 1 +} + +machine_has() { + eval $invocation + + hash "$1" > /dev/null 2>&1 + return $? +} + + +check_min_reqs() { + local hasMinimum=false + if machine_has "curl"; then + hasMinimum=true + elif machine_has "wget"; then + hasMinimum=true + fi + + if [ "$hasMinimum" = "false" ]; then + say_err "curl (recommended) or wget are required to download dotnet. Install missing prerequisite to proceed." + return 1 + fi + return 0 +} + +check_pre_reqs() { + eval $invocation + + if [ "${DOTNET_INSTALL_SKIP_PREREQS:-}" = "1" ]; then + return 0 + fi + + if [ "$(uname)" = "Linux" ]; then + if is_musl_based_distro; then + if ! command -v scanelf > /dev/null; then + say_warning "scanelf not found, please install pax-utils package." + return 0 + fi + LDCONFIG_COMMAND="scanelf --ldpath -BF '%f'" + [ -z "$($LDCONFIG_COMMAND 2>/dev/null | grep libintl)" ] && say_warning "Unable to locate libintl. Probable prerequisite missing; install libintl (or gettext)." + else + if [ ! -x "$(command -v ldconfig)" ]; then + say_verbose "ldconfig is not in PATH, trying /sbin/ldconfig." + LDCONFIG_COMMAND="/sbin/ldconfig" + else + LDCONFIG_COMMAND="ldconfig" + fi + local librarypath=${LD_LIBRARY_PATH:-} + LDCONFIG_COMMAND="$LDCONFIG_COMMAND -NXv ${librarypath//:/ }" + fi + + [ -z "$($LDCONFIG_COMMAND 2>/dev/null | grep zlib)" ] && say_warning "Unable to locate zlib. Probable prerequisite missing; install zlib." + [ -z "$($LDCONFIG_COMMAND 2>/dev/null | grep ssl)" ] && say_warning "Unable to locate libssl. Probable prerequisite missing; install libssl." + [ -z "$($LDCONFIG_COMMAND 2>/dev/null | grep libicu)" ] && say_warning "Unable to locate libicu. Probable prerequisite missing; install libicu." + [ -z "$($LDCONFIG_COMMAND 2>/dev/null | grep lttng)" ] && say_warning "Unable to locate liblttng. Probable prerequisite missing; install libcurl." + [ -z "$($LDCONFIG_COMMAND 2>/dev/null | grep libcurl)" ] && say_warning "Unable to locate libcurl. Probable prerequisite missing; install libcurl." + fi + + return 0 +} + +# args: +# input - $1 +to_lowercase() { + #eval $invocation + + echo "$1" | tr '[:upper:]' '[:lower:]' + return 0 +} + +# args: +# input - $1 +remove_trailing_slash() { + #eval $invocation + + local input="${1:-}" + echo "${input%/}" + return 0 +} + +# args: +# input - $1 +remove_beginning_slash() { + #eval $invocation + + local input="${1:-}" + echo "${input#/}" + return 0 +} + +# args: +# root_path - $1 +# child_path - $2 - this parameter can be empty +combine_paths() { + eval $invocation + + # TODO: Consider making it work with any number of paths. For now: + if [ ! -z "${3:-}" ]; then + say_err "combine_paths: Function takes two parameters." + return 1 + fi + + local root_path="$(remove_trailing_slash "$1")" + local child_path="$(remove_beginning_slash "${2:-}")" + say_verbose "combine_paths: root_path=$root_path" + say_verbose "combine_paths: child_path=$child_path" + echo "$root_path/$child_path" + return 0 +} + +get_machine_architecture() { + eval $invocation + + if command -v uname > /dev/null; then + CPUName=$(uname -m) + case $CPUName in + armv7l) + echo "arm" + return 0 + ;; + aarch64) + echo "arm64" + return 0 + ;; + esac + fi + + # Always default to 'x64' + echo "x64" + return 0 +} + +# args: +# architecture - $1 +get_normalized_architecture_from_architecture() { + eval $invocation + + local architecture="$(to_lowercase "$1")" + case "$architecture" in + \) + echo "$(get_normalized_architecture_from_architecture "$(get_machine_architecture)")" + return 0 + ;; + amd64|x64) + echo "x64" + return 0 + ;; + arm) + echo "arm" + return 0 + ;; + arm64) + echo "arm64" + return 0 + ;; + esac + + say_err "Architecture \`$architecture\` not supported. If you think this is a bug, report it at https://github.com/dotnet/sdk/issues" + return 1 +} + +# The version text returned from the feeds is a 1-line or 2-line string: +# For the SDK and the dotnet runtime (2 lines): +# Line 1: # commit_hash +# Line 2: # 4-part version +# For the aspnetcore runtime (1 line): +# Line 1: # 4-part version + +# args: +# version_text - stdin +get_version_from_version_info() { + eval $invocation + + cat | tail -n 1 | sed 's/\r$//' + return 0 +} + +# args: +# install_root - $1 +# relative_path_to_package - $2 +# specific_version - $3 +is_dotnet_package_installed() { + eval $invocation + + local install_root="$1" + local relative_path_to_package="$2" + local specific_version="${3//[$'\t\r\n']}" + + local dotnet_package_path="$(combine_paths "$(combine_paths "$install_root" "$relative_path_to_package")" "$specific_version")" + say_verbose "is_dotnet_package_installed: dotnet_package_path=$dotnet_package_path" + + if [ -d "$dotnet_package_path" ]; then + return 0 + else + return 1 + fi +} + +# args: +# azure_feed - $1 +# channel - $2 +# normalized_architecture - $3 +# coherent - $4 +get_latest_version_info() { + eval $invocation + + local azure_feed="$1" + local channel="$2" + local normalized_architecture="$3" + local coherent="$4" + + local version_file_url=null + if [[ "$runtime" == "dotnet" ]]; then + version_file_url="$uncached_feed/Runtime/$channel/latest.version" + elif [[ "$runtime" == "aspnetcore" ]]; then + version_file_url="$uncached_feed/aspnetcore/Runtime/$channel/latest.version" + elif [ -z "$runtime" ]; then + if [ "$coherent" = true ]; then + version_file_url="$uncached_feed/Sdk/$channel/latest.coherent.version" + else + version_file_url="$uncached_feed/Sdk/$channel/latest.version" + fi + else + say_err "Invalid value for \$runtime" + return 1 + fi + say_verbose "get_latest_version_info: latest url: $version_file_url" + + download "$version_file_url" + return $? +} + +# args: +# json_file - $1 +parse_jsonfile_for_version() { + eval $invocation + + local json_file="$1" + if [ ! -f "$json_file" ]; then + say_err "Unable to find \`$json_file\`" + return 1 + fi + + sdk_section=$(cat $json_file | awk '/"sdk"/,/}/') + if [ -z "$sdk_section" ]; then + say_err "Unable to parse the SDK node in \`$json_file\`" + return 1 + fi + + sdk_list=$(echo $sdk_section | awk -F"[{}]" '{print $2}') + sdk_list=${sdk_list//[\" ]/} + sdk_list=${sdk_list//,/$'\n'} + sdk_list="$(echo -e "${sdk_list}" | tr -d '[[:space:]]')" + + local version_info="" + while read -r line; do + IFS=: + while read -r key value; do + if [[ "$key" == "version" ]]; then + version_info=$value + fi + done <<< "$line" + done <<< "$sdk_list" + if [ -z "$version_info" ]; then + say_err "Unable to find the SDK:version node in \`$json_file\`" + return 1 + fi + + unset IFS; + echo "$version_info" + return 0 +} + +# args: +# azure_feed - $1 +# channel - $2 +# normalized_architecture - $3 +# version - $4 +# json_file - $5 +get_specific_version_from_version() { + eval $invocation + + local azure_feed="$1" + local channel="$2" + local normalized_architecture="$3" + local version="$(to_lowercase "$4")" + local json_file="$5" + + if [ -z "$json_file" ]; then + case "$version" in + latest) + local version_info + version_info="$(get_latest_version_info "$azure_feed" "$channel" "$normalized_architecture" false)" || return 1 + say_verbose "get_specific_version_from_version: version_info=$version_info" + echo "$version_info" | get_version_from_version_info + return 0 + ;; + coherent) + local version_info + version_info="$(get_latest_version_info "$azure_feed" "$channel" "$normalized_architecture" true)" || return 1 + say_verbose "get_specific_version_from_version: version_info=$version_info" + echo "$version_info" | get_version_from_version_info + return 0 + ;; + *) + echo "$version" + return 0 + ;; + esac + else + local version_info + version_info="$(parse_jsonfile_for_version "$json_file")" || return 1 + echo "$version_info" + return 0 + fi +} + +# args: +# azure_feed - $1 +# channel - $2 +# normalized_architecture - $3 +# specific_version - $4 +construct_download_link() { + eval $invocation + + local azure_feed="$1" + local channel="$2" + local normalized_architecture="$3" + local specific_version="${4//[$'\t\r\n']}" + local specific_product_version="$(get_specific_product_version "$1" "$4")" + + local osname + osname="$(get_current_os_name)" || return 1 + + local download_link=null + if [[ "$runtime" == "dotnet" ]]; then + download_link="$azure_feed/Runtime/$specific_version/dotnet-runtime-$specific_product_version-$osname-$normalized_architecture.tar.gz" + elif [[ "$runtime" == "aspnetcore" ]]; then + download_link="$azure_feed/aspnetcore/Runtime/$specific_version/aspnetcore-runtime-$specific_product_version-$osname-$normalized_architecture.tar.gz" + elif [ -z "$runtime" ]; then + download_link="$azure_feed/Sdk/$specific_version/dotnet-sdk-$specific_product_version-$osname-$normalized_architecture.tar.gz" + else + return 1 + fi + + echo "$download_link" + return 0 +} + +# args: +# azure_feed - $1 +# specific_version - $2 +get_specific_product_version() { + # If we find a 'productVersion.txt' at the root of any folder, we'll use its contents + # to resolve the version of what's in the folder, superseding the specified version. + eval $invocation + + local azure_feed="$1" + local specific_version="${2//[$'\t\r\n']}" + local specific_product_version=$specific_version + + local download_link=null + if [[ "$runtime" == "dotnet" ]]; then + download_link="$azure_feed/Runtime/$specific_version/productVersion.txt${feed_credential}" + elif [[ "$runtime" == "aspnetcore" ]]; then + download_link="$azure_feed/aspnetcore/Runtime/$specific_version/productVersion.txt${feed_credential}" + elif [ -z "$runtime" ]; then + download_link="$azure_feed/Sdk/$specific_version/productVersion.txt${feed_credential}" + else + return 1 + fi + + specific_product_version=$(curl -s --fail "$download_link") + if [ $? -ne 0 ] + then + specific_product_version=$(wget -qO- "$download_link") + if [ $? -ne 0 ] + then + specific_product_version=$specific_version + fi + fi + specific_product_version="${specific_product_version//[$'\t\r\n']}" + + echo "$specific_product_version" + return 0 +} + +# args: +# azure_feed - $1 +# channel - $2 +# normalized_architecture - $3 +# specific_version - $4 +construct_legacy_download_link() { + eval $invocation + + local azure_feed="$1" + local channel="$2" + local normalized_architecture="$3" + local specific_version="${4//[$'\t\r\n']}" + + local distro_specific_osname + distro_specific_osname="$(get_legacy_os_name)" || return 1 + + local legacy_download_link=null + if [[ "$runtime" == "dotnet" ]]; then + legacy_download_link="$azure_feed/Runtime/$specific_version/dotnet-$distro_specific_osname-$normalized_architecture.$specific_version.tar.gz" + elif [ -z "$runtime" ]; then + legacy_download_link="$azure_feed/Sdk/$specific_version/dotnet-dev-$distro_specific_osname-$normalized_architecture.$specific_version.tar.gz" + else + return 1 + fi + + echo "$legacy_download_link" + return 0 +} + +get_user_install_path() { + eval $invocation + + if [ ! -z "${DOTNET_INSTALL_DIR:-}" ]; then + echo "$DOTNET_INSTALL_DIR" + else + echo "$HOME/.dotnet" + fi + return 0 +} + +# args: +# install_dir - $1 +resolve_installation_path() { + eval $invocation + + local install_dir=$1 + if [ "$install_dir" = "" ]; then + local user_install_path="$(get_user_install_path)" + say_verbose "resolve_installation_path: user_install_path=$user_install_path" + echo "$user_install_path" + return 0 + fi + + echo "$install_dir" + return 0 +} + +# args: +# relative_or_absolute_path - $1 +get_absolute_path() { + eval $invocation + + local relative_or_absolute_path=$1 + echo "$(cd "$(dirname "$1")" && pwd -P)/$(basename "$1")" + return 0 +} + +# args: +# input_files - stdin +# root_path - $1 +# out_path - $2 +# override - $3 +copy_files_or_dirs_from_list() { + eval $invocation + + local root_path="$(remove_trailing_slash "$1")" + local out_path="$(remove_trailing_slash "$2")" + local override="$3" + local osname="$(get_current_os_name)" + local override_switch=$( + if [ "$override" = false ]; then + if [ "$osname" = "linux-musl" ]; then + printf -- "-u"; + else + printf -- "-n"; + fi + fi) + + cat | uniq | while read -r file_path; do + local path="$(remove_beginning_slash "${file_path#$root_path}")" + local target="$out_path/$path" + if [ "$override" = true ] || (! ([ -d "$target" ] || [ -e "$target" ])); then + mkdir -p "$out_path/$(dirname "$path")" + if [ -d "$target" ]; then + rm -rf "$target" + fi + cp -R $override_switch "$root_path/$path" "$target" + fi + done +} + +# args: +# zip_path - $1 +# out_path - $2 +extract_dotnet_package() { + eval $invocation + + local zip_path="$1" + local out_path="$2" + + local temp_out_path="$(mktemp -d "$temporary_file_template")" + + local failed=false + tar -xzf "$zip_path" -C "$temp_out_path" > /dev/null || failed=true + + local folders_with_version_regex='^.*/[0-9]+\.[0-9]+[^/]+/' + find "$temp_out_path" -type f | grep -Eo "$folders_with_version_regex" | sort | copy_files_or_dirs_from_list "$temp_out_path" "$out_path" false + find "$temp_out_path" -type f | grep -Ev "$folders_with_version_regex" | copy_files_or_dirs_from_list "$temp_out_path" "$out_path" "$override_non_versioned_files" + + rm -rf "$temp_out_path" + + if [ "$failed" = true ]; then + say_err "Extraction failed" + return 1 + fi +} + +# args: +# remote_path - $1 +# [out_path] - $2 - stdout if not provided +download() { + eval $invocation + + local remote_path="$1" + local out_path="${2:-}" + + if [[ "$remote_path" != "http"* ]]; then + cp "$remote_path" "$out_path" + return $? + fi + + local failed=false + if machine_has "curl"; then + downloadcurl "$remote_path" "$out_path" || failed=true + elif machine_has "wget"; then + downloadwget "$remote_path" "$out_path" || failed=true + else + failed=true + fi + if [ "$failed" = true ]; then + say_verbose "Download failed: $remote_path" + return 1 + fi + return 0 +} + +downloadcurl() { + eval $invocation + local remote_path="$1" + local out_path="${2:-}" + + # Append feed_credential as late as possible before calling curl to avoid logging feed_credential + remote_path="${remote_path}${feed_credential}" + + local curl_options="--retry 20 --retry-delay 2 --connect-timeout 15 -sSL -f --create-dirs " + local failed=false + if [ -z "$out_path" ]; then + curl $curl_options "$remote_path" || failed=true + else + curl $curl_options -o "$out_path" "$remote_path" || failed=true + fi + if [ "$failed" = true ]; then + say_verbose "Curl download failed" + return 1 + fi + return 0 +} + +downloadwget() { + eval $invocation + local remote_path="$1" + local out_path="${2:-}" + + # Append feed_credential as late as possible before calling wget to avoid logging feed_credential + remote_path="${remote_path}${feed_credential}" + local wget_options="--tries 20 --waitretry 2 --connect-timeout 15 " + local failed=false + if [ -z "$out_path" ]; then + wget -q $wget_options -O - "$remote_path" || failed=true + else + wget $wget_options -O "$out_path" "$remote_path" || failed=true + fi + if [ "$failed" = true ]; then + say_verbose "Wget download failed" + return 1 + fi + return 0 +} + +calculate_vars() { + eval $invocation + valid_legacy_download_link=true + + normalized_architecture="$(get_normalized_architecture_from_architecture "$architecture")" + say_verbose "normalized_architecture=$normalized_architecture" + + specific_version="$(get_specific_version_from_version "$azure_feed" "$channel" "$normalized_architecture" "$version" "$json_file")" + specific_product_version="$(get_specific_product_version "$azure_feed" "$specific_version")" + say_verbose "specific_version=$specific_version" + if [ -z "$specific_version" ]; then + say_err "Could not resolve version information." + return 1 + fi + + download_link="$(construct_download_link "$azure_feed" "$channel" "$normalized_architecture" "$specific_version")" + say_verbose "Constructed primary named payload URL: $download_link" + + legacy_download_link="$(construct_legacy_download_link "$azure_feed" "$channel" "$normalized_architecture" "$specific_version")" || valid_legacy_download_link=false + + if [ "$valid_legacy_download_link" = true ]; then + say_verbose "Constructed legacy named payload URL: $legacy_download_link" + else + say_verbose "Cound not construct a legacy_download_link; omitting..." + fi + + install_root="$(resolve_installation_path "$install_dir")" + say_verbose "InstallRoot: $install_root" +} + +install_dotnet() { + eval $invocation + local download_failed=false + local asset_name='' + local asset_relative_path='' + + if [[ "$runtime" == "dotnet" ]]; then + asset_relative_path="shared/Microsoft.NETCore.App" + asset_name=".NET Core Runtime" + elif [[ "$runtime" == "aspnetcore" ]]; then + asset_relative_path="shared/Microsoft.AspNetCore.App" + asset_name="ASP.NET Core Runtime" + elif [ -z "$runtime" ]; then + asset_relative_path="sdk" + asset_name=".NET Core SDK" + else + say_err "Invalid value for \$runtime" + return 1 + fi + + # Check if the SDK version is already installed. + if is_dotnet_package_installed "$install_root" "$asset_relative_path" "$specific_version"; then + say "$asset_name version $specific_version is already installed." + return 0 + fi + + mkdir -p "$install_root" + zip_path="$(mktemp "$temporary_file_template")" + say_verbose "Zip path: $zip_path" + + say "Downloading link: $download_link" + + # Failures are normal in the non-legacy case for ultimately legacy downloads. + # Do not output to stderr, since output to stderr is considered an error. + download "$download_link" "$zip_path" 2>&1 || download_failed=true + + # if the download fails, download the legacy_download_link + if [ "$download_failed" = true ]; then + say "Cannot download: $download_link" + + if [ "$valid_legacy_download_link" = true ]; then + download_failed=false + download_link="$legacy_download_link" + zip_path="$(mktemp "$temporary_file_template")" + say_verbose "Legacy zip path: $zip_path" + say "Downloading legacy link: $download_link" + download "$download_link" "$zip_path" 2>&1 || download_failed=true + + if [ "$download_failed" = true ]; then + say "Cannot download: $download_link" + fi + fi + fi + + if [ "$download_failed" = true ]; then + say_err "Could not find/download: \`$asset_name\` with version = $specific_version" + say_err "Refer to: https://aka.ms/dotnet-os-lifecycle for information on .NET Core support" + return 1 + fi + + say "Extracting zip from $download_link" + extract_dotnet_package "$zip_path" "$install_root" + + # Check if the SDK version is installed; if not, fail the installation. + # if the version contains "RTM" or "servicing"; check if a 'release-type' SDK version is installed. + if [[ $specific_version == *"rtm"* || $specific_version == *"servicing"* ]]; then + IFS='-' + read -ra verArr <<< "$specific_version" + release_version="${verArr[0]}" + unset IFS; + say_verbose "Checking installation: version = $release_version" + if is_dotnet_package_installed "$install_root" "$asset_relative_path" "$release_version"; then + return 0 + fi + fi + + # Check if the standard SDK version is installed. + say_verbose "Checking installation: version = $specific_product_version" + if is_dotnet_package_installed "$install_root" "$asset_relative_path" "$specific_product_version"; then + return 0 + fi + + say_err "\`$asset_name\` with version = $specific_product_version failed to install with an unknown error." + return 1 +} + +args=("$@") + +local_version_file_relative_path="/.version" +bin_folder_relative_path="" +temporary_file_template="${TMPDIR:-/tmp}/dotnet.XXXXXXXXX" + +channel="LTS" +version="Latest" +json_file="" +install_dir="" +architecture="" +dry_run=false +no_path=false +no_cdn=false +azure_feed="https://dotnetcli.azureedge.net/dotnet" +uncached_feed="https://dotnetcli.blob.core.windows.net/dotnet" +feed_credential="" +verbose=false +runtime="" +runtime_id="" +override_non_versioned_files=true +non_dynamic_parameters="" + +while [ $# -ne 0 ] +do + name="$1" + case "$name" in + -c|--channel|-[Cc]hannel) + shift + channel="$1" + ;; + -v|--version|-[Vv]ersion) + shift + version="$1" + ;; + -i|--install-dir|-[Ii]nstall[Dd]ir) + shift + install_dir="$1" + ;; + --arch|--architecture|-[Aa]rch|-[Aa]rchitecture) + shift + architecture="$1" + ;; + --shared-runtime|-[Ss]hared[Rr]untime) + say_warning "The --shared-runtime flag is obsolete and may be removed in a future version of this script. The recommended usage is to specify '--runtime dotnet'." + if [ -z "$runtime" ]; then + runtime="dotnet" + fi + ;; + --runtime|-[Rr]untime) + shift + runtime="$1" + if [[ "$runtime" != "dotnet" ]] && [[ "$runtime" != "aspnetcore" ]]; then + say_err "Unsupported value for --runtime: '$1'. Valid values are 'dotnet' and 'aspnetcore'." + if [[ "$runtime" == "windowsdesktop" ]]; then + say_err "WindowsDesktop archives are manufactured for Windows platforms only." + fi + exit 1 + fi + ;; + --dry-run|-[Dd]ry[Rr]un) + dry_run=true + ;; + --no-path|-[Nn]o[Pp]ath) + no_path=true + non_dynamic_parameters+=" $name" + ;; + --verbose|-[Vv]erbose) + verbose=true + non_dynamic_parameters+=" $name" + ;; + --no-cdn|-[Nn]o[Cc]dn) + no_cdn=true + non_dynamic_parameters+=" $name" + ;; + --azure-feed|-[Aa]zure[Ff]eed) + shift + azure_feed="$1" + non_dynamic_parameters+=" $name "\""$1"\""" + ;; + --uncached-feed|-[Uu]ncached[Ff]eed) + shift + uncached_feed="$1" + non_dynamic_parameters+=" $name "\""$1"\""" + ;; + --feed-credential|-[Ff]eed[Cc]redential) + shift + feed_credential="$1" + non_dynamic_parameters+=" $name "\""$1"\""" + ;; + --runtime-id|-[Rr]untime[Ii]d) + shift + runtime_id="$1" + non_dynamic_parameters+=" $name "\""$1"\""" + ;; + --jsonfile|-[Jj][Ss]on[Ff]ile) + shift + json_file="$1" + ;; + --skip-non-versioned-files|-[Ss]kip[Nn]on[Vv]ersioned[Ff]iles) + override_non_versioned_files=false + non_dynamic_parameters+=" $name" + ;; + -?|--?|-h|--help|-[Hh]elp) + script_name="$(basename "$0")" + echo ".NET Tools Installer" + echo "Usage: $script_name [-c|--channel ] [-v|--version ] [-p|--prefix ]" + echo " $script_name -h|-?|--help" + echo "" + echo "$script_name is a simple command line interface for obtaining dotnet cli." + echo "" + echo "Options:" + echo " -c,--channel Download from the channel specified, Defaults to \`$channel\`." + echo " -Channel" + echo " Possible values:" + echo " - Current - most current release" + echo " - LTS - most current supported release" + echo " - 2-part version in a format A.B - represents a specific release" + echo " examples: 2.0; 1.0" + echo " - Branch name" + echo " examples: release/2.0.0; Master" + echo " Note: The version parameter overrides the channel parameter." + echo " -v,--version Use specific VERSION, Defaults to \`$version\`." + echo " -Version" + echo " Possible values:" + echo " - latest - most latest build on specific channel" + echo " - coherent - most latest coherent build on specific channel" + echo " coherent applies only to SDK downloads" + echo " - 3-part version in a format A.B.C - represents specific version of build" + echo " examples: 2.0.0-preview2-006120; 1.1.0" + echo " -i,--install-dir Install under specified location (see Install Location below)" + echo " -InstallDir" + echo " --architecture Architecture of dotnet binaries to be installed, Defaults to \`$architecture\`." + echo " --arch,-Architecture,-Arch" + echo " Possible values: x64, arm, and arm64" + echo " --runtime Installs a shared runtime only, without the SDK." + echo " -Runtime" + echo " Possible values:" + echo " - dotnet - the Microsoft.NETCore.App shared runtime" + echo " - aspnetcore - the Microsoft.AspNetCore.App shared runtime" + echo " --dry-run,-DryRun Do not perform installation. Display download link." + echo " --no-path, -NoPath Do not set PATH for the current process." + echo " --verbose,-Verbose Display diagnostics information." + echo " --azure-feed,-AzureFeed Azure feed location. Defaults to $azure_feed, This parameter typically is not changed by the user." + echo " --uncached-feed,-UncachedFeed Uncached feed location. This parameter typically is not changed by the user." + echo " --feed-credential,-FeedCredential Azure feed shared access token. This parameter typically is not specified." + echo " --skip-non-versioned-files Skips non-versioned files if they already exist, such as the dotnet executable." + echo " -SkipNonVersionedFiles" + echo " --no-cdn,-NoCdn Disable downloading from the Azure CDN, and use the uncached feed directly." + echo " --jsonfile Determines the SDK version from a user specified global.json file." + echo " Note: global.json must have a value for 'SDK:Version'" + echo " --runtime-id Installs the .NET Tools for the given platform (use linux-x64 for portable linux)." + echo " -RuntimeId" + echo " -?,--?,-h,--help,-Help Shows this help message" + echo "" + echo "Obsolete parameters:" + echo " --shared-runtime The recommended alternative is '--runtime dotnet'." + echo " This parameter is obsolete and may be removed in a future version of this script." + echo " Installs just the shared runtime bits, not the entire SDK." + echo "" + echo "Install Location:" + echo " Location is chosen in following order:" + echo " - --install-dir option" + echo " - Environmental variable DOTNET_INSTALL_DIR" + echo " - $HOME/.dotnet" + exit 0 + ;; + *) + say_err "Unknown argument \`$name\`" + exit 1 + ;; + esac + + shift +done + +if [ "$no_cdn" = true ]; then + azure_feed="$uncached_feed" +fi + +check_min_reqs +calculate_vars +script_name=$(basename "$0") + +if [ "$dry_run" = true ]; then + say "Payload URLs:" + say "Primary named payload URL: $download_link" + if [ "$valid_legacy_download_link" = true ]; then + say "Legacy named payload URL: $legacy_download_link" + fi + repeatable_command="./$script_name --version "\""$specific_version"\"" --install-dir "\""$install_root"\"" --architecture "\""$normalized_architecture"\""" + if [[ "$runtime" == "dotnet" ]]; then + repeatable_command+=" --runtime "\""dotnet"\""" + elif [[ "$runtime" == "aspnetcore" ]]; then + repeatable_command+=" --runtime "\""aspnetcore"\""" + fi + repeatable_command+="$non_dynamic_parameters" + say "Repeatable invocation: $repeatable_command" + exit 0 +fi + +check_pre_reqs +install_dotnet + +bin_path="$(get_absolute_path "$(combine_paths "$install_root" "$bin_folder_relative_path")")" +if [ "$no_path" = false ]; then + say "Adding to current process PATH: \`$bin_path\`. Note: This change will be visible only when sourcing script." + export PATH="$bin_path":"$PATH" +else + say "Binaries of dotnet can be found in $bin_path" +fi + +say "Installation finished successfully." diff --git a/eng/common/dotnet-install.cmd b/eng/common/dotnet-install.cmd new file mode 100644 index 0000000000..b1c2642e76 --- /dev/null +++ b/eng/common/dotnet-install.cmd @@ -0,0 +1,2 @@ +@echo off +powershell -ExecutionPolicy ByPass -NoProfile -command "& """%~dp0dotnet-install.ps1""" %*" \ No newline at end of file diff --git a/eng/common/dotnet-install.ps1 b/eng/common/dotnet-install.ps1 new file mode 100644 index 0000000000..811f0f717f --- /dev/null +++ b/eng/common/dotnet-install.ps1 @@ -0,0 +1,28 @@ +[CmdletBinding(PositionalBinding=$false)] +Param( + [string] $verbosity = 'minimal', + [string] $architecture = '', + [string] $version = 'Latest', + [string] $runtime = 'dotnet', + [string] $RuntimeSourceFeed = '', + [string] $RuntimeSourceFeedKey = '' +) + +. $PSScriptRoot\tools.ps1 + +$dotnetRoot = Join-Path $RepoRoot '.dotnet' + +$installdir = $dotnetRoot +try { + if ($architecture -and $architecture.Trim() -eq 'x86') { + $installdir = Join-Path $installdir 'x86' + } + InstallDotNet $installdir $version $architecture $runtime $true -RuntimeSourceFeed $RuntimeSourceFeed -RuntimeSourceFeedKey $RuntimeSourceFeedKey +} +catch { + Write-Host $_.ScriptStackTrace + Write-PipelineTelemetryError -Category 'InitializeToolset' -Message $_ + ExitWithExitCode 1 +} + +ExitWithExitCode 0 diff --git a/eng/common/dotnet-install.sh b/eng/common/dotnet-install.sh new file mode 100755 index 0000000000..ead6a1d9a2 --- /dev/null +++ b/eng/common/dotnet-install.sh @@ -0,0 +1,89 @@ +#!/usr/bin/env bash + +source="${BASH_SOURCE[0]}" +# resolve $source until the file is no longer a symlink +while [[ -h "$source" ]]; do + scriptroot="$( cd -P "$( dirname "$source" )" && pwd )" + source="$(readlink "$source")" + # if $source was a relative symlink, we need to resolve it relative to the path where the + # symlink file was located + [[ $source != /* ]] && source="$scriptroot/$source" +done +scriptroot="$( cd -P "$( dirname "$source" )" && pwd )" + +. "$scriptroot/tools.sh" + +version='Latest' +architecture='' +runtime='dotnet' +runtimeSourceFeed='' +runtimeSourceFeedKey='' +while [[ $# > 0 ]]; do + opt="$(echo "$1" | awk '{print tolower($0)}')" + case "$opt" in + -version|-v) + shift + version="$1" + ;; + -architecture|-a) + shift + architecture="$1" + ;; + -runtime|-r) + shift + runtime="$1" + ;; + -runtimesourcefeed) + shift + runtimeSourceFeed="$1" + ;; + -runtimesourcefeedkey) + shift + runtimeSourceFeedKey="$1" + ;; + *) + Write-PipelineTelemetryError -Category 'Build' -Message "Invalid argument: $1" + exit 1 + ;; + esac + shift +done + +# Use uname to determine what the CPU is. +cpuname=$(uname -p) +# Some Linux platforms report unknown for platform, but the arch for machine. +if [[ "$cpuname" == "unknown" ]]; then + cpuname=$(uname -m) +fi + +case $cpuname in + aarch64) + buildarch=arm64 + ;; + amd64|x86_64) + buildarch=x64 + ;; + armv*l) + buildarch=arm + ;; + i686) + buildarch=x86 + ;; + *) + echo "Unknown CPU $cpuname detected, treating it as x64" + buildarch=x64 + ;; +esac + +dotnetRoot="$repo_root/.dotnet" +if [[ $architecture != "" ]] && [[ $architecture != $buildarch ]]; then + dotnetRoot="$dotnetRoot/$architecture" +fi + +InstallDotNet $dotnetRoot $version "$architecture" $runtime true $runtimeSourceFeed $runtimeSourceFeedKey || { + local exit_code=$? + Write-PipelineTelemetryError -Category 'InitializeToolset' -Message "dotnet-install.sh failed (exit code '$exit_code')." >&2 + ExitWithExitCode $exit_code +} + +ExitWithExitCode 0 diff --git a/eng/common/enable-cross-org-publishing.ps1 b/eng/common/enable-cross-org-publishing.ps1 new file mode 100644 index 0000000000..da09da4f1f --- /dev/null +++ b/eng/common/enable-cross-org-publishing.ps1 @@ -0,0 +1,13 @@ +param( + [string] $token +) + + +. $PSScriptRoot\pipeline-logging-functions.ps1 + +# Write-PipelineSetVariable will no-op if a variable named $ci is not defined +# Since this script is only ever called in AzDO builds, just universally set it +$ci = $true + +Write-PipelineSetVariable -Name 'VSS_NUGET_ACCESSTOKEN' -Value $token -IsMultiJobVariable $false +Write-PipelineSetVariable -Name 'VSS_NUGET_URI_PREFIXES' -Value 'https://dnceng.pkgs.visualstudio.com/;https://pkgs.dev.azure.com/dnceng/;https://devdiv.pkgs.visualstudio.com/;https://pkgs.dev.azure.com/devdiv/' -IsMultiJobVariable $false diff --git a/eng/common/generate-graph-files.ps1 b/eng/common/generate-graph-files.ps1 new file mode 100644 index 0000000000..0728b1a8b5 --- /dev/null +++ b/eng/common/generate-graph-files.ps1 @@ -0,0 +1,86 @@ +Param( + [Parameter(Mandatory=$true)][string] $barToken, # Token generated at https://maestro-prod.westus2.cloudapp.azure.com/Account/Tokens + [Parameter(Mandatory=$true)][string] $gitHubPat, # GitHub personal access token from https://github.com/settings/tokens (no auth scopes needed) + [Parameter(Mandatory=$true)][string] $azdoPat, # Azure Dev Ops tokens from https://dev.azure.com/dnceng/_details/security/tokens (code read scope needed) + [Parameter(Mandatory=$true)][string] $outputFolder, # Where the graphviz.txt file will be created + [string] $darcVersion, # darc's version + [string] $graphvizVersion = '2.38', # GraphViz version + [switch] $includeToolset # Whether the graph should include toolset dependencies or not. i.e. arcade, optimization. For more about + # toolset dependencies see https://github.com/dotnet/arcade/blob/master/Documentation/Darc.md#toolset-vs-product-dependencies +) + +function CheckExitCode ([string]$stage) +{ + $exitCode = $LASTEXITCODE + if ($exitCode -ne 0) { + Write-PipelineTelemetryError -Category 'Arcade' -Message "Something failed in stage: '$stage'. Check for errors above. Exiting now..." + ExitWithExitCode $exitCode + } +} + +try { + $ErrorActionPreference = 'Stop' + . $PSScriptRoot\tools.ps1 + + Import-Module -Name (Join-Path $PSScriptRoot 'native\CommonLibrary.psm1') + + Push-Location $PSScriptRoot + + Write-Host 'Installing darc...' + . .\darc-init.ps1 -darcVersion $darcVersion + CheckExitCode 'Running darc-init' + + $engCommonBaseDir = Join-Path $PSScriptRoot 'native\' + $graphvizInstallDir = CommonLibrary\Get-NativeInstallDirectory + $nativeToolBaseUri = 'https://netcorenativeassets.blob.core.windows.net/resource-packages/external' + $installBin = Join-Path $graphvizInstallDir 'bin' + + Write-Host 'Installing dot...' + .\native\install-tool.ps1 -ToolName graphviz -InstallPath $installBin -BaseUri $nativeToolBaseUri -CommonLibraryDirectory $engCommonBaseDir -Version $graphvizVersion -Verbose + + $darcExe = "$env:USERPROFILE\.dotnet\tools" + $darcExe = Resolve-Path "$darcExe\darc.exe" + + Create-Directory $outputFolder + + # Generate 3 graph descriptions: + # 1. Flat with coherency information + # 2. Graphviz (dot) file + # 3. Standard dependency graph + $graphVizFilePath = "$outputFolder\graphviz.txt" + $graphVizImageFilePath = "$outputFolder\graph.png" + $normalGraphFilePath = "$outputFolder\graph-full.txt" + $flatGraphFilePath = "$outputFolder\graph-flat.txt" + $baseOptions = @( '--github-pat', "$gitHubPat", '--azdev-pat', "$azdoPat", '--password', "$barToken" ) + + if ($includeToolset) { + Write-Host 'Toolsets will be included in the graph...' + $baseOptions += @( '--include-toolset' ) + } + + Write-Host 'Generating standard dependency graph...' + & "$darcExe" get-dependency-graph @baseOptions --output-file $normalGraphFilePath + CheckExitCode 'Generating normal dependency graph' + + Write-Host 'Generating flat dependency graph and graphviz file...' + & "$darcExe" get-dependency-graph @baseOptions --flat --coherency --graphviz $graphVizFilePath --output-file $flatGraphFilePath + CheckExitCode 'Generating flat and graphviz dependency graph' + + Write-Host "Generating graph image $graphVizFilePath" + $dotFilePath = Join-Path $installBin "graphviz\$graphvizVersion\release\bin\dot.exe" + & "$dotFilePath" -Tpng -o"$graphVizImageFilePath" "$graphVizFilePath" + CheckExitCode 'Generating graphviz image' + + Write-Host "'$graphVizFilePath', '$flatGraphFilePath', '$normalGraphFilePath' and '$graphVizImageFilePath' created!" +} +catch { + if (!$includeToolset) { + Write-Host 'This might be a toolset repo which includes only toolset dependencies. ' -NoNewline -ForegroundColor Yellow + Write-Host 'Since -includeToolset is not set there is no graph to create. Include -includeToolset and try again...' -ForegroundColor Yellow + } + Write-Host $_.ScriptStackTrace + Write-PipelineTelemetryError -Category 'Arcade' -Message $_ + ExitWithExitCode 1 +} finally { + Pop-Location +} \ No newline at end of file diff --git a/eng/common/helixpublish.proj b/eng/common/helixpublish.proj new file mode 100644 index 0000000000..d7f185856e --- /dev/null +++ b/eng/common/helixpublish.proj @@ -0,0 +1,26 @@ + + + + msbuild + + + + + %(Identity) + + + + + + $(WorkItemDirectory) + $(WorkItemCommand) + $(WorkItemTimeout) + + + + + + + + + diff --git a/eng/common/init-tools-native.cmd b/eng/common/init-tools-native.cmd new file mode 100644 index 0000000000..438cd548c4 --- /dev/null +++ b/eng/common/init-tools-native.cmd @@ -0,0 +1,3 @@ +@echo off +powershell -NoProfile -NoLogo -ExecutionPolicy ByPass -command "& """%~dp0init-tools-native.ps1""" %*" +exit /b %ErrorLevel% \ No newline at end of file diff --git a/eng/common/init-tools-native.ps1 b/eng/common/init-tools-native.ps1 new file mode 100644 index 0000000000..db830c00a6 --- /dev/null +++ b/eng/common/init-tools-native.ps1 @@ -0,0 +1,152 @@ +<# +.SYNOPSIS +Entry point script for installing native tools + +.DESCRIPTION +Reads $RepoRoot\global.json file to determine native assets to install +and executes installers for those tools + +.PARAMETER BaseUri +Base file directory or Url from which to acquire tool archives + +.PARAMETER InstallDirectory +Directory to install native toolset. This is a command-line override for the default +Install directory precedence order: +- InstallDirectory command-line override +- NETCOREENG_INSTALL_DIRECTORY environment variable +- (default) %USERPROFILE%/.netcoreeng/native + +.PARAMETER Clean +Switch specifying to not install anything, but cleanup native asset folders + +.PARAMETER Force +Clean and then install tools + +.PARAMETER DownloadRetries +Total number of retry attempts + +.PARAMETER RetryWaitTimeInSeconds +Wait time between retry attempts in seconds + +.PARAMETER GlobalJsonFile +File path to global.json file + +.NOTES +#> +[CmdletBinding(PositionalBinding=$false)] +Param ( + [string] $BaseUri = 'https://netcorenativeassets.blob.core.windows.net/resource-packages/external', + [string] $InstallDirectory, + [switch] $Clean = $False, + [switch] $Force = $False, + [int] $DownloadRetries = 5, + [int] $RetryWaitTimeInSeconds = 30, + [string] $GlobalJsonFile +) + +if (!$GlobalJsonFile) { + $GlobalJsonFile = Join-Path (Get-Item $PSScriptRoot).Parent.Parent.FullName 'global.json' +} + +Set-StrictMode -version 2.0 +$ErrorActionPreference='Stop' + +. $PSScriptRoot\pipeline-logging-functions.ps1 +Import-Module -Name (Join-Path $PSScriptRoot 'native\CommonLibrary.psm1') + +try { + # Define verbose switch if undefined + $Verbose = $VerbosePreference -Eq 'Continue' + + $EngCommonBaseDir = Join-Path $PSScriptRoot 'native\' + $NativeBaseDir = $InstallDirectory + if (!$NativeBaseDir) { + $NativeBaseDir = CommonLibrary\Get-NativeInstallDirectory + } + $Env:CommonLibrary_NativeInstallDir = $NativeBaseDir + $InstallBin = Join-Path $NativeBaseDir 'bin' + $InstallerPath = Join-Path $EngCommonBaseDir 'install-tool.ps1' + + # Process tools list + Write-Host "Processing $GlobalJsonFile" + If (-Not (Test-Path $GlobalJsonFile)) { + Write-Host "Unable to find '$GlobalJsonFile'" + exit 0 + } + $NativeTools = Get-Content($GlobalJsonFile) -Raw | + ConvertFrom-Json | + Select-Object -Expand 'native-tools' -ErrorAction SilentlyContinue + if ($NativeTools) { + $NativeTools.PSObject.Properties | ForEach-Object { + $ToolName = $_.Name + $ToolVersion = $_.Value + $LocalInstallerArguments = @{ ToolName = "$ToolName" } + $LocalInstallerArguments += @{ InstallPath = "$InstallBin" } + $LocalInstallerArguments += @{ BaseUri = "$BaseUri" } + $LocalInstallerArguments += @{ CommonLibraryDirectory = "$EngCommonBaseDir" } + $LocalInstallerArguments += @{ Version = "$ToolVersion" } + + if ($Verbose) { + $LocalInstallerArguments += @{ Verbose = $True } + } + if (Get-Variable 'Force' -ErrorAction 'SilentlyContinue') { + if($Force) { + $LocalInstallerArguments += @{ Force = $True } + } + } + if ($Clean) { + $LocalInstallerArguments += @{ Clean = $True } + } + + Write-Verbose "Installing $ToolName version $ToolVersion" + Write-Verbose "Executing '$InstallerPath $($LocalInstallerArguments.Keys.ForEach({"-$_ '$($LocalInstallerArguments.$_)'"}) -join ' ')'" + & $InstallerPath @LocalInstallerArguments + if ($LASTEXITCODE -Ne "0") { + $errMsg = "$ToolName installation failed" + if ((Get-Variable 'DoNotAbortNativeToolsInstallationOnFailure' -ErrorAction 'SilentlyContinue') -and $DoNotAbortNativeToolsInstallationOnFailure) { + $showNativeToolsWarning = $true + if ((Get-Variable 'DoNotDisplayNativeToolsInstallationWarnings' -ErrorAction 'SilentlyContinue') -and $DoNotDisplayNativeToolsInstallationWarnings) { + $showNativeToolsWarning = $false + } + if ($showNativeToolsWarning) { + Write-Warning $errMsg + } + $toolInstallationFailure = $true + } else { + # We cannot change this to Write-PipelineTelemetryError because of https://github.com/dotnet/arcade/issues/4482 + Write-Host $errMsg + exit 1 + } + } + } + + if ((Get-Variable 'toolInstallationFailure' -ErrorAction 'SilentlyContinue') -and $toolInstallationFailure) { + # We cannot change this to Write-PipelineTelemetryError because of https://github.com/dotnet/arcade/issues/4482 + Write-Host 'Native tools bootstrap failed' + exit 1 + } + } + else { + Write-Host 'No native tools defined in global.json' + exit 0 + } + + if ($Clean) { + exit 0 + } + if (Test-Path $InstallBin) { + Write-Host 'Native tools are available from ' (Convert-Path -Path $InstallBin) + Write-Host "##vso[task.prependpath]$(Convert-Path -Path $InstallBin)" + return $InstallBin + } + else { + Write-PipelineTelemetryError -Category 'NativeToolsBootstrap' -Message 'Native tools install directory does not exist, installation failed' + exit 1 + } + exit 0 +} +catch { + Write-Host $_.ScriptStackTrace + Write-PipelineTelemetryError -Category 'NativeToolsBootstrap' -Message $_ + ExitWithExitCode 1 +} diff --git a/eng/common/init-tools-native.sh b/eng/common/init-tools-native.sh new file mode 100755 index 0000000000..29fc5db8ae --- /dev/null +++ b/eng/common/init-tools-native.sh @@ -0,0 +1,173 @@ +#!/usr/bin/env bash + +source="${BASH_SOURCE[0]}" +scriptroot="$( cd -P "$( dirname "$source" )" && pwd )" + +base_uri='https://netcorenativeassets.blob.core.windows.net/resource-packages/external' +install_directory='' +clean=false +force=false +download_retries=5 +retry_wait_time_seconds=30 +global_json_file="$(dirname "$(dirname "${scriptroot}")")/global.json" +declare -A native_assets + +. $scriptroot/pipeline-logging-functions.sh +. $scriptroot/native/common-library.sh + +while (($# > 0)); do + lowerI="$(echo $1 | awk '{print tolower($0)}')" + case $lowerI in + --baseuri) + base_uri=$2 + shift 2 + ;; + --installdirectory) + install_directory=$2 + shift 2 + ;; + --clean) + clean=true + shift 1 + ;; + --force) + force=true + shift 1 + ;; + --donotabortonfailure) + donotabortonfailure=true + shift 1 + ;; + --donotdisplaywarnings) + donotdisplaywarnings=true + shift 1 + ;; + --downloadretries) + download_retries=$2 + shift 2 + ;; + --retrywaittimeseconds) + retry_wait_time_seconds=$2 + shift 2 + ;; + --help) + echo "Common settings:" + echo " --installdirectory Directory to install native toolset." + echo " This is a command-line override for the default" + echo " Install directory precedence order:" + echo " - InstallDirectory command-line override" + echo " - NETCOREENG_INSTALL_DIRECTORY environment variable" + echo " - (default) %USERPROFILE%/.netcoreeng/native" + echo "" + echo " --clean Switch specifying not to install anything, but cleanup native asset folders" + echo " --donotabortonfailure Switch specifiying whether to abort native tools installation on failure" + echo " --donotdisplaywarnings Switch specifiying whether to display warnings during native tools installation on failure" + echo " --force Clean and then install tools" + echo " --help Print help and exit" + echo "" + echo "Advanced settings:" + echo " --baseuri Base URI for where to download native tools from" + echo " --downloadretries Number of times a download should be attempted" + echo " --retrywaittimeseconds Wait time between download attempts" + echo "" + exit 0 + ;; + esac +done + +function ReadGlobalJsonNativeTools { + # Get the native-tools section from the global.json. + local native_tools_section=$(cat $global_json_file | awk '/"native-tools"/,/}/') + # Only extract the contents of the object. + local native_tools_list=$(echo $native_tools_section | awk -F"[{}]" '{print $2}') + native_tools_list=${native_tools_list//[\" ]/} + native_tools_list=$( echo "$native_tools_list" | sed 's/\s//g' | sed 's/,/\n/g' ) + + local old_IFS=$IFS + while read -r line; do + # Lines are of the form: 'tool:version' + IFS=: + while read -r key value; do + native_assets[$key]=$value + done <<< "$line" + done <<< "$native_tools_list" + IFS=$old_IFS + + return 0; +} + +native_base_dir=$install_directory +if [[ -z $install_directory ]]; then + native_base_dir=$(GetNativeInstallDirectory) +fi + +install_bin="${native_base_dir}/bin" +installed_any=false + +ReadGlobalJsonNativeTools + +if [[ ${#native_assets[@]} -eq 0 ]]; then + echo "No native tools defined in global.json" + exit 0; +else + native_installer_dir="$scriptroot/native" + for tool in "${!native_assets[@]}" + do + tool_version=${native_assets[$tool]} + installer_path="$native_installer_dir/install-$tool.sh" + installer_command="$installer_path" + installer_command+=" --baseuri $base_uri" + installer_command+=" --installpath $install_bin" + installer_command+=" --version $tool_version" + echo $installer_command + + if [[ $force = true ]]; then + installer_command+=" --force" + fi + + if [[ $clean = true ]]; then + installer_command+=" --clean" + fi + + if [[ -a $installer_path ]]; then + $installer_command + if [[ $? != 0 ]]; then + if [[ $donotabortonfailure = true ]]; then + if [[ $donotdisplaywarnings != true ]]; then + Write-PipelineTelemetryError -category 'NativeToolsBootstrap' "Execution Failed" + fi + else + Write-PipelineTelemetryError -category 'NativeToolsBootstrap' "Execution Failed" + exit 1 + fi + else + $installed_any = true + fi + else + if [[ $donotabortonfailure == true ]]; then + if [[ $donotdisplaywarnings != true ]]; then + Write-PipelineTelemetryError -category 'NativeToolsBootstrap' "Execution Failed: no install script" + fi + else + Write-PipelineTelemetryError -category 'NativeToolsBootstrap' "Execution Failed: no install script" + exit 1 + fi + fi + done +fi + +if [[ $clean = true ]]; then + exit 0 +fi + +if [[ -d $install_bin ]]; then + echo "Native tools are available from $install_bin" + echo "##vso[task.prependpath]$install_bin" +else + if [[ $installed_any = true ]]; then + Write-PipelineTelemetryError -category 'NativeToolsBootstrap' "Native tools install directory does not exist, installation failed" + exit 1 + fi +fi + +exit 0 diff --git a/eng/common/internal-feed-operations.ps1 b/eng/common/internal-feed-operations.ps1 new file mode 100644 index 0000000000..b8f6529fdc --- /dev/null +++ b/eng/common/internal-feed-operations.ps1 @@ -0,0 +1,134 @@ +param( + [Parameter(Mandatory=$true)][string] $Operation, + [string] $AuthToken, + [string] $CommitSha, + [string] $RepoName, + [switch] $IsFeedPrivate +) + +$ErrorActionPreference = 'Stop' +Set-StrictMode -Version 2.0 +. $PSScriptRoot\tools.ps1 + +# Sets VSS_NUGET_EXTERNAL_FEED_ENDPOINTS based on the "darc-int-*" feeds defined in NuGet.config. This is needed +# in build agents by CredProvider to authenticate the restore requests to internal feeds as specified in +# https://github.com/microsoft/artifacts-credprovider/blob/0f53327cd12fd893d8627d7b08a2171bf5852a41/README.md#environment-variables. This should ONLY be called from identified +# internal builds +function SetupCredProvider { + param( + [string] $AuthToken + ) + + # Install the Cred Provider NuGet plugin + Write-Host 'Setting up Cred Provider NuGet plugin in the agent...' + Write-Host "Getting 'installcredprovider.ps1' from 'https://github.com/microsoft/artifacts-credprovider'..." + + $url = 'https://raw.githubusercontent.com/microsoft/artifacts-credprovider/master/helpers/installcredprovider.ps1' + + Write-Host "Writing the contents of 'installcredprovider.ps1' locally..." + Invoke-WebRequest $url -OutFile installcredprovider.ps1 + + Write-Host 'Installing plugin...' + .\installcredprovider.ps1 -Force + + Write-Host "Deleting local copy of 'installcredprovider.ps1'..." + Remove-Item .\installcredprovider.ps1 + + if (-Not("$env:USERPROFILE\.nuget\plugins\netcore")) { + Write-PipelineTelemetryError -Category 'Arcade' -Message 'CredProvider plugin was not installed correctly!' + ExitWithExitCode 1 + } + else { + Write-Host 'CredProvider plugin was installed correctly!' + } + + # Then, we set the 'VSS_NUGET_EXTERNAL_FEED_ENDPOINTS' environment variable to restore from the stable + # feeds successfully + + $nugetConfigPath = "$RepoRoot\NuGet.config" + + if (-Not (Test-Path -Path $nugetConfigPath)) { + Write-PipelineTelemetryError -Category 'Build' -Message 'NuGet.config file not found in repo root!' + ExitWithExitCode 1 + } + + $endpoints = New-Object System.Collections.ArrayList + $nugetConfigPackageSources = Select-Xml -Path $nugetConfigPath -XPath "//packageSources/add[contains(@key, 'darc-int-')]/@value" | foreach{$_.Node.Value} + + if (($nugetConfigPackageSources | Measure-Object).Count -gt 0 ) { + foreach ($stableRestoreResource in $nugetConfigPackageSources) { + $trimmedResource = ([string]$stableRestoreResource).Trim() + [void]$endpoints.Add(@{endpoint="$trimmedResource"; password="$AuthToken"}) + } + } + + if (($endpoints | Measure-Object).Count -gt 0) { + # [SuppressMessage("Microsoft.Security", "CS002:SecretInNextLine", Justification="Endpoint code example with no real credentials.")] + # Create the JSON object. It should look like '{"endpointCredentials": [{"endpoint":"http://example.index.json", "username":"optional", "password":"accesstoken"}]}' + $endpointCredentials = @{endpointCredentials=$endpoints} | ConvertTo-Json -Compress + + # Create the environment variables the AzDo way + Write-LoggingCommand -Area 'task' -Event 'setvariable' -Data $endpointCredentials -Properties @{ + 'variable' = 'VSS_NUGET_EXTERNAL_FEED_ENDPOINTS' + 'issecret' = 'false' + } + + # We don't want sessions cached since we will be updating the endpoints quite frequently + Write-LoggingCommand -Area 'task' -Event 'setvariable' -Data 'False' -Properties @{ + 'variable' = 'NUGET_CREDENTIALPROVIDER_SESSIONTOKENCACHE_ENABLED' + 'issecret' = 'false' + } + } + else + { + Write-Host 'No internal endpoints found in NuGet.config' + } +} + +#Workaround for https://github.com/microsoft/msbuild/issues/4430 +function InstallDotNetSdkAndRestoreArcade { + $dotnetTempDir = "$RepoRoot\dotnet" + $dotnetSdkVersion="2.1.507" # After experimentation we know this version works when restoring the SDK (compared to 3.0.*) + $dotnet = "$dotnetTempDir\dotnet.exe" + $restoreProjPath = "$PSScriptRoot\restore.proj" + + Write-Host "Installing dotnet SDK version $dotnetSdkVersion to restore Arcade SDK..." + InstallDotNetSdk "$dotnetTempDir" "$dotnetSdkVersion" + + '' | Out-File "$restoreProjPath" + + & $dotnet restore $restoreProjPath + + Write-Host 'Arcade SDK restored!' + + if (Test-Path -Path $restoreProjPath) { + Remove-Item $restoreProjPath + } + + if (Test-Path -Path $dotnetTempDir) { + Remove-Item $dotnetTempDir -Recurse + } +} + +try { + Push-Location $PSScriptRoot + + if ($Operation -like 'setup') { + SetupCredProvider $AuthToken + } + elseif ($Operation -like 'install-restore') { + InstallDotNetSdkAndRestoreArcade + } + else { + Write-PipelineTelemetryError -Category 'Arcade' -Message "Unknown operation '$Operation'!" + ExitWithExitCode 1 + } +} +catch { + Write-Host $_.ScriptStackTrace + Write-PipelineTelemetryError -Category 'Arcade' -Message $_ + ExitWithExitCode 1 +} +finally { + Pop-Location +} diff --git a/eng/common/internal-feed-operations.sh b/eng/common/internal-feed-operations.sh new file mode 100755 index 0000000000..9ed225e7e5 --- /dev/null +++ b/eng/common/internal-feed-operations.sh @@ -0,0 +1,143 @@ +#!/usr/bin/env bash + +set -e + +# Sets VSS_NUGET_EXTERNAL_FEED_ENDPOINTS based on the "darc-int-*" feeds defined in NuGet.config. This is needed +# in build agents by CredProvider to authenticate the restore requests to internal feeds as specified in +# https://github.com/microsoft/artifacts-credprovider/blob/0f53327cd12fd893d8627d7b08a2171bf5852a41/README.md#environment-variables. +# This should ONLY be called from identified internal builds +function SetupCredProvider { + local authToken=$1 + + # Install the Cred Provider NuGet plugin + echo "Setting up Cred Provider NuGet plugin in the agent..."... + echo "Getting 'installcredprovider.ps1' from 'https://github.com/microsoft/artifacts-credprovider'..." + + local url="https://raw.githubusercontent.com/microsoft/artifacts-credprovider/master/helpers/installcredprovider.sh" + + echo "Writing the contents of 'installcredprovider.ps1' locally..." + local installcredproviderPath="installcredprovider.sh" + if command -v curl > /dev/null; then + curl $url > "$installcredproviderPath" + else + wget -q -O "$installcredproviderPath" "$url" + fi + + echo "Installing plugin..." + . "$installcredproviderPath" + + echo "Deleting local copy of 'installcredprovider.sh'..." + rm installcredprovider.sh + + if [ ! -d "$HOME/.nuget/plugins" ]; then + Write-PipelineTelemetryError -category 'Build' 'CredProvider plugin was not installed correctly!' + ExitWithExitCode 1 + else + echo "CredProvider plugin was installed correctly!" + fi + + # Then, we set the 'VSS_NUGET_EXTERNAL_FEED_ENDPOINTS' environment variable to restore from the stable + # feeds successfully + + local nugetConfigPath="$repo_root/NuGet.config" + + if [ ! "$nugetConfigPath" ]; then + Write-PipelineTelemetryError -category 'Build' "NuGet.config file not found in repo's root!" + ExitWithExitCode 1 + fi + + local endpoints='[' + local nugetConfigPackageValues=`cat "$nugetConfigPath" | grep "key=\"darc-int-"` + local pattern="value=\"(.*)\"" + + for value in $nugetConfigPackageValues + do + if [[ $value =~ $pattern ]]; then + local endpoint="${BASH_REMATCH[1]}" + endpoints+="{\"endpoint\": \"$endpoint\", \"password\": \"$authToken\"}," + fi + done + + endpoints=${endpoints%?} + endpoints+=']' + + if [ ${#endpoints} -gt 2 ]; then + # [SuppressMessage("Microsoft.Security", "CS002:SecretInNextLine", Justification="Endpoint code example with no real credentials.")] + # Create the JSON object. It should look like '{"endpointCredentials": [{"endpoint":"http://example.index.json", "username":"optional", "password":"accesstoken"}]}' + local endpointCredentials="{\"endpointCredentials\": "$endpoints"}" + + echo "##vso[task.setvariable variable=VSS_NUGET_EXTERNAL_FEED_ENDPOINTS]$endpointCredentials" + echo "##vso[task.setvariable variable=NUGET_CREDENTIALPROVIDER_SESSIONTOKENCACHE_ENABLED]False" + else + echo "No internal endpoints found in NuGet.config" + fi +} + +# Workaround for https://github.com/microsoft/msbuild/issues/4430 +function InstallDotNetSdkAndRestoreArcade { + local dotnetTempDir="$repo_root/dotnet" + local dotnetSdkVersion="2.1.507" # After experimentation we know this version works when restoring the SDK (compared to 3.0.*) + local restoreProjPath="$repo_root/eng/common/restore.proj" + + echo "Installing dotnet SDK version $dotnetSdkVersion to restore Arcade SDK..." + echo "" > "$restoreProjPath" + + InstallDotNetSdk "$dotnetTempDir" "$dotnetSdkVersion" + + local res=`$dotnetTempDir/dotnet restore $restoreProjPath` + echo "Arcade SDK restored!" + + # Cleanup + if [ "$restoreProjPath" ]; then + rm "$restoreProjPath" + fi + + if [ "$dotnetTempDir" ]; then + rm -r $dotnetTempDir + fi +} + +source="${BASH_SOURCE[0]}" +operation='' +authToken='' +repoName='' + +while [[ $# > 0 ]]; do + opt="$(echo "$1" | awk '{print tolower($0)}')" + case "$opt" in + --operation) + operation=$2 + shift + ;; + --authtoken) + authToken=$2 + shift + ;; + *) + echo "Invalid argument: $1" + usage + exit 1 + ;; + esac + + shift +done + +while [[ -h "$source" ]]; do + scriptroot="$( cd -P "$( dirname "$source" )" && pwd )" + source="$(readlink "$source")" + # if $source was a relative symlink, we need to resolve it relative to the path where the + # symlink file was located + [[ $source != /* ]] && source="$scriptroot/$source" +done +scriptroot="$( cd -P "$( dirname "$source" )" && pwd )" + +. "$scriptroot/tools.sh" + +if [ "$operation" = "setup" ]; then + SetupCredProvider $authToken +elif [ "$operation" = "install-restore" ]; then + InstallDotNetSdkAndRestoreArcade +else + echo "Unknown operation '$operation'!" +fi diff --git a/eng/common/internal/Directory.Build.props b/eng/common/internal/Directory.Build.props new file mode 100644 index 0000000000..dbf99d82a5 --- /dev/null +++ b/eng/common/internal/Directory.Build.props @@ -0,0 +1,4 @@ + + + + diff --git a/eng/common/internal/Tools.csproj b/eng/common/internal/Tools.csproj new file mode 100644 index 0000000000..f46d5efe2e --- /dev/null +++ b/eng/common/internal/Tools.csproj @@ -0,0 +1,28 @@ + + + + + net472 + false + false + + + + + + + + + + + https://devdiv.pkgs.visualstudio.com/_packaging/dotnet-core-internal-tooling/nuget/v3/index.json; + + + $(RestoreSources); + https://devdiv.pkgs.visualstudio.com/_packaging/VS/nuget/v3/index.json; + + + + + + diff --git a/eng/common/msbuild.ps1 b/eng/common/msbuild.ps1 new file mode 100644 index 0000000000..c640123000 --- /dev/null +++ b/eng/common/msbuild.ps1 @@ -0,0 +1,26 @@ +[CmdletBinding(PositionalBinding=$false)] +Param( + [string] $verbosity = 'minimal', + [bool] $warnAsError = $true, + [bool] $nodeReuse = $true, + [switch] $ci, + [switch] $prepareMachine, + [Parameter(ValueFromRemainingArguments=$true)][String[]]$extraArgs +) + +. $PSScriptRoot\tools.ps1 + +try { + if ($ci) { + $nodeReuse = $false + } + + MSBuild @extraArgs +} +catch { + Write-Host $_.ScriptStackTrace + Write-PipelineTelemetryError -Category 'Build' -Message $_ + ExitWithExitCode 1 +} + +ExitWithExitCode 0 \ No newline at end of file diff --git a/eng/common/msbuild.sh b/eng/common/msbuild.sh new file mode 100755 index 0000000000..8160cd5a59 --- /dev/null +++ b/eng/common/msbuild.sh @@ -0,0 +1,58 @@ +#!/usr/bin/env bash + +source="${BASH_SOURCE[0]}" + +# resolve $source until the file is no longer a symlink +while [[ -h "$source" ]]; do + scriptroot="$( cd -P "$( dirname "$source" )" && pwd )" + source="$(readlink "$source")" + # if $source was a relative symlink, we need to resolve it relative to the path where the + # symlink file was located + [[ $source != /* ]] && source="$scriptroot/$source" +done +scriptroot="$( cd -P "$( dirname "$source" )" && pwd )" + +verbosity='minimal' +warn_as_error=true +node_reuse=true +prepare_machine=false +extra_args='' + +while (($# > 0)); do + lowerI="$(echo $1 | awk '{print tolower($0)}')" + case $lowerI in + --verbosity) + verbosity=$2 + shift 2 + ;; + --warnaserror) + warn_as_error=$2 + shift 2 + ;; + --nodereuse) + node_reuse=$2 + shift 2 + ;; + --ci) + ci=true + shift 1 + ;; + --preparemachine) + prepare_machine=true + shift 1 + ;; + *) + extra_args="$extra_args $1" + shift 1 + ;; + esac +done + +. "$scriptroot/tools.sh" + +if [[ "$ci" == true ]]; then + node_reuse=false +fi + +MSBuild $extra_args +ExitWithExitCode 0 diff --git a/eng/common/native/CommonLibrary.psm1 b/eng/common/native/CommonLibrary.psm1 new file mode 100644 index 0000000000..d7d1a65109 --- /dev/null +++ b/eng/common/native/CommonLibrary.psm1 @@ -0,0 +1,399 @@ +<# +.SYNOPSIS +Helper module to install an archive to a directory + +.DESCRIPTION +Helper module to download and extract an archive to a specified directory + +.PARAMETER Uri +Uri of artifact to download + +.PARAMETER InstallDirectory +Directory to extract artifact contents to + +.PARAMETER Force +Force download / extraction if file or contents already exist. Default = False + +.PARAMETER DownloadRetries +Total number of retry attempts. Default = 5 + +.PARAMETER RetryWaitTimeInSeconds +Wait time between retry attempts in seconds. Default = 30 + +.NOTES +Returns False if download or extraction fail, True otherwise +#> +function DownloadAndExtract { + [CmdletBinding(PositionalBinding=$false)] + Param ( + [Parameter(Mandatory=$True)] + [string] $Uri, + [Parameter(Mandatory=$True)] + [string] $InstallDirectory, + [switch] $Force = $False, + [int] $DownloadRetries = 5, + [int] $RetryWaitTimeInSeconds = 30 + ) + # Define verbose switch if undefined + $Verbose = $VerbosePreference -Eq "Continue" + + $TempToolPath = CommonLibrary\Get-TempPathFilename -Path $Uri + + # Download native tool + $DownloadStatus = CommonLibrary\Get-File -Uri $Uri ` + -Path $TempToolPath ` + -DownloadRetries $DownloadRetries ` + -RetryWaitTimeInSeconds $RetryWaitTimeInSeconds ` + -Force:$Force ` + -Verbose:$Verbose + + if ($DownloadStatus -Eq $False) { + Write-Error "Download failed" + return $False + } + + # Extract native tool + $UnzipStatus = CommonLibrary\Expand-Zip -ZipPath $TempToolPath ` + -OutputDirectory $InstallDirectory ` + -Force:$Force ` + -Verbose:$Verbose + + if ($UnzipStatus -Eq $False) { + # Retry Download one more time with Force=true + $DownloadRetryStatus = CommonLibrary\Get-File -Uri $Uri ` + -Path $TempToolPath ` + -DownloadRetries 1 ` + -RetryWaitTimeInSeconds $RetryWaitTimeInSeconds ` + -Force:$True ` + -Verbose:$Verbose + + if ($DownloadRetryStatus -Eq $False) { + Write-Error "Last attempt of download failed as well" + return $False + } + + # Retry unzip again one more time with Force=true + $UnzipRetryStatus = CommonLibrary\Expand-Zip -ZipPath $TempToolPath ` + -OutputDirectory $InstallDirectory ` + -Force:$True ` + -Verbose:$Verbose + if ($UnzipRetryStatus -Eq $False) + { + Write-Error "Last attempt of unzip failed as well" + # Clean up partial zips and extracts + if (Test-Path $TempToolPath) { + Remove-Item $TempToolPath -Force + } + if (Test-Path $InstallDirectory) { + Remove-Item $InstallDirectory -Force -Recurse + } + return $False + } + } + + return $True +} + +<# +.SYNOPSIS +Download a file, retry on failure + +.DESCRIPTION +Download specified file and retry if attempt fails + +.PARAMETER Uri +Uri of file to download. If Uri is a local path, the file will be copied instead of downloaded + +.PARAMETER Path +Path to download or copy uri file to + +.PARAMETER Force +Overwrite existing file if present. Default = False + +.PARAMETER DownloadRetries +Total number of retry attempts. Default = 5 + +.PARAMETER RetryWaitTimeInSeconds +Wait time between retry attempts in seconds Default = 30 + +#> +function Get-File { + [CmdletBinding(PositionalBinding=$false)] + Param ( + [Parameter(Mandatory=$True)] + [string] $Uri, + [Parameter(Mandatory=$True)] + [string] $Path, + [int] $DownloadRetries = 5, + [int] $RetryWaitTimeInSeconds = 30, + [switch] $Force = $False + ) + $Attempt = 0 + + if ($Force) { + if (Test-Path $Path) { + Remove-Item $Path -Force + } + } + if (Test-Path $Path) { + Write-Host "File '$Path' already exists, skipping download" + return $True + } + + $DownloadDirectory = Split-Path -ErrorAction Ignore -Path "$Path" -Parent + if (-Not (Test-Path $DownloadDirectory)) { + New-Item -path $DownloadDirectory -force -itemType "Directory" | Out-Null + } + + $TempPath = "$Path.tmp" + if (Test-Path -IsValid -Path $Uri) { + Write-Verbose "'$Uri' is a file path, copying temporarily to '$TempPath'" + Copy-Item -Path $Uri -Destination $TempPath + Write-Verbose "Moving temporary file to '$Path'" + Move-Item -Path $TempPath -Destination $Path + return $? + } + else { + Write-Verbose "Downloading $Uri" + # Don't display the console progress UI - it's a huge perf hit + $ProgressPreference = 'SilentlyContinue' + while($Attempt -Lt $DownloadRetries) + { + try { + Invoke-WebRequest -UseBasicParsing -Uri $Uri -OutFile $TempPath + Write-Verbose "Downloaded to temporary location '$TempPath'" + Move-Item -Path $TempPath -Destination $Path + Write-Verbose "Moved temporary file to '$Path'" + return $True + } + catch { + $Attempt++ + if ($Attempt -Lt $DownloadRetries) { + $AttemptsLeft = $DownloadRetries - $Attempt + Write-Warning "Download failed, $AttemptsLeft attempts remaining, will retry in $RetryWaitTimeInSeconds seconds" + Start-Sleep -Seconds $RetryWaitTimeInSeconds + } + else { + Write-Error $_ + Write-Error $_.Exception + } + } + } + } + + return $False +} + +<# +.SYNOPSIS +Generate a shim for a native tool + +.DESCRIPTION +Creates a wrapper script (shim) that passes arguments forward to native tool assembly + +.PARAMETER ShimName +The name of the shim + +.PARAMETER ShimDirectory +The directory where shims are stored + +.PARAMETER ToolFilePath +Path to file that shim forwards to + +.PARAMETER Force +Replace shim if already present. Default = False + +.NOTES +Returns $True if generating shim succeeds, $False otherwise +#> +function New-ScriptShim { + [CmdletBinding(PositionalBinding=$false)] + Param ( + [Parameter(Mandatory=$True)] + [string] $ShimName, + [Parameter(Mandatory=$True)] + [string] $ShimDirectory, + [Parameter(Mandatory=$True)] + [string] $ToolFilePath, + [Parameter(Mandatory=$True)] + [string] $BaseUri, + [switch] $Force + ) + try { + Write-Verbose "Generating '$ShimName' shim" + + if (-Not (Test-Path $ToolFilePath)){ + Write-Error "Specified tool file path '$ToolFilePath' does not exist" + return $False + } + + # WinShimmer is a small .NET Framework program that creates .exe shims to bootstrapped programs + # Many of the checks for installed programs expect a .exe extension for Windows tools, rather + # than a .bat or .cmd file. + # Source: https://github.com/dotnet/arcade/tree/master/src/WinShimmer + if (-Not (Test-Path "$ShimDirectory\WinShimmer\winshimmer.exe")) { + $InstallStatus = DownloadAndExtract -Uri "$BaseUri/windows/winshimmer/WinShimmer.zip" ` + -InstallDirectory $ShimDirectory\WinShimmer ` + -Force:$Force ` + -DownloadRetries 2 ` + -RetryWaitTimeInSeconds 5 ` + -Verbose:$Verbose + } + + if ((Test-Path (Join-Path $ShimDirectory "$ShimName.exe"))) { + Write-Host "$ShimName.exe already exists; replacing..." + Remove-Item (Join-Path $ShimDirectory "$ShimName.exe") + } + + & "$ShimDirectory\WinShimmer\winshimmer.exe" $ShimName $ToolFilePath $ShimDirectory + return $True + } + catch { + Write-Host $_ + Write-Host $_.Exception + return $False + } +} + +<# +.SYNOPSIS +Returns the machine architecture of the host machine + +.NOTES +Returns 'x64' on 64 bit machines + Returns 'x86' on 32 bit machines +#> +function Get-MachineArchitecture { + $ProcessorArchitecture = $Env:PROCESSOR_ARCHITECTURE + $ProcessorArchitectureW6432 = $Env:PROCESSOR_ARCHITEW6432 + if($ProcessorArchitecture -Eq "X86") + { + if(($ProcessorArchitectureW6432 -Eq "") -Or + ($ProcessorArchitectureW6432 -Eq "X86")) { + return "x86" + } + $ProcessorArchitecture = $ProcessorArchitectureW6432 + } + if (($ProcessorArchitecture -Eq "AMD64") -Or + ($ProcessorArchitecture -Eq "IA64") -Or + ($ProcessorArchitecture -Eq "ARM64")) { + return "x64" + } + return "x86" +} + +<# +.SYNOPSIS +Get the name of a temporary folder under the native install directory +#> +function Get-TempDirectory { + return Join-Path (Get-NativeInstallDirectory) "temp/" +} + +function Get-TempPathFilename { + [CmdletBinding(PositionalBinding=$false)] + Param ( + [Parameter(Mandatory=$True)] + [string] $Path + ) + $TempDir = CommonLibrary\Get-TempDirectory + $TempFilename = Split-Path $Path -leaf + $TempPath = Join-Path $TempDir $TempFilename + return $TempPath +} + +<# +.SYNOPSIS +Returns the base directory to use for native tool installation + +.NOTES +Returns the value of the NETCOREENG_INSTALL_DIRECTORY if that environment variable +is set, or otherwise returns an install directory under the %USERPROFILE% +#> +function Get-NativeInstallDirectory { + $InstallDir = $Env:NETCOREENG_INSTALL_DIRECTORY + if (!$InstallDir) { + $InstallDir = Join-Path $Env:USERPROFILE ".netcoreeng/native/" + } + return $InstallDir +} + +<# +.SYNOPSIS +Unzip an archive + +.DESCRIPTION +Powershell module to unzip an archive to a specified directory + +.PARAMETER ZipPath (Required) +Path to archive to unzip + +.PARAMETER OutputDirectory (Required) +Output directory for archive contents + +.PARAMETER Force +Overwrite output directory contents if they already exist + +.NOTES +- Returns True and does not perform an extraction if output directory already exists but Overwrite is not True. +- Returns True if unzip operation is successful +- Returns False if Overwrite is True and it is unable to remove contents of OutputDirectory +- Returns False if unable to extract zip archive +#> +function Expand-Zip { + [CmdletBinding(PositionalBinding=$false)] + Param ( + [Parameter(Mandatory=$True)] + [string] $ZipPath, + [Parameter(Mandatory=$True)] + [string] $OutputDirectory, + [switch] $Force + ) + + Write-Verbose "Extracting '$ZipPath' to '$OutputDirectory'" + try { + if ((Test-Path $OutputDirectory) -And (-Not $Force)) { + Write-Host "Directory '$OutputDirectory' already exists, skipping extract" + return $True + } + if (Test-Path $OutputDirectory) { + Write-Verbose "'Force' is 'True', but '$OutputDirectory' exists, removing directory" + Remove-Item $OutputDirectory -Force -Recurse + if ($? -Eq $False) { + Write-Error "Unable to remove '$OutputDirectory'" + return $False + } + } + + $TempOutputDirectory = Join-Path "$(Split-Path -Parent $OutputDirectory)" "$(Split-Path -Leaf $OutputDirectory).tmp" + if (Test-Path $TempOutputDirectory) { + Remove-Item $TempOutputDirectory -Force -Recurse + } + New-Item -Path $TempOutputDirectory -Force -ItemType "Directory" | Out-Null + + Add-Type -assembly "system.io.compression.filesystem" + [io.compression.zipfile]::ExtractToDirectory("$ZipPath", "$TempOutputDirectory") + if ($? -Eq $False) { + Write-Error "Unable to extract '$ZipPath'" + return $False + } + + Move-Item -Path $TempOutputDirectory -Destination $OutputDirectory + } + catch { + Write-Host $_ + Write-Host $_.Exception + + return $False + } + return $True +} + +export-modulemember -function DownloadAndExtract +export-modulemember -function Expand-Zip +export-modulemember -function Get-File +export-modulemember -function Get-MachineArchitecture +export-modulemember -function Get-NativeInstallDirectory +export-modulemember -function Get-TempDirectory +export-modulemember -function Get-TempPathFilename +export-modulemember -function New-ScriptShim diff --git a/eng/common/native/common-library.sh b/eng/common/native/common-library.sh new file mode 100755 index 0000000000..bf272dcf55 --- /dev/null +++ b/eng/common/native/common-library.sh @@ -0,0 +1,168 @@ +#!/usr/bin/env bash + +function GetNativeInstallDirectory { + local install_dir + + if [[ -z $NETCOREENG_INSTALL_DIRECTORY ]]; then + install_dir=$HOME/.netcoreeng/native/ + else + install_dir=$NETCOREENG_INSTALL_DIRECTORY + fi + + echo $install_dir + return 0 +} + +function GetTempDirectory { + + echo $(GetNativeInstallDirectory)temp/ + return 0 +} + +function ExpandZip { + local zip_path=$1 + local output_directory=$2 + local force=${3:-false} + + echo "Extracting $zip_path to $output_directory" + if [[ -d $output_directory ]] && [[ $force = false ]]; then + echo "Directory '$output_directory' already exists, skipping extract" + return 0 + fi + + if [[ -d $output_directory ]]; then + echo "'Force flag enabled, but '$output_directory' exists. Removing directory" + rm -rf $output_directory + if [[ $? != 0 ]]; then + Write-PipelineTelemetryError -category 'NativeToolsBootstrap' "Unable to remove '$output_directory'" + return 1 + fi + fi + + echo "Creating directory: '$output_directory'" + mkdir -p $output_directory + + echo "Extracting archive" + tar -xf $zip_path -C $output_directory + if [[ $? != 0 ]]; then + Write-PipelineTelemetryError -category 'NativeToolsBootstrap' "Unable to extract '$zip_path'" + return 1 + fi + + return 0 +} + +function GetCurrentOS { + local unameOut="$(uname -s)" + case $unameOut in + Linux*) echo "Linux";; + Darwin*) echo "MacOS";; + esac + return 0 +} + +function GetFile { + local uri=$1 + local path=$2 + local force=${3:-false} + local download_retries=${4:-5} + local retry_wait_time_seconds=${5:-30} + + if [[ -f $path ]]; then + if [[ $force = false ]]; then + echo "File '$path' already exists. Skipping download" + return 0 + else + rm -rf $path + fi + fi + + if [[ -f $uri ]]; then + echo "'$uri' is a file path, copying file to '$path'" + cp $uri $path + return $? + fi + + echo "Downloading $uri" + # Use curl if available, otherwise use wget + if command -v curl > /dev/null; then + curl "$uri" -sSL --retry $download_retries --retry-delay $retry_wait_time_seconds --create-dirs -o "$path" --fail + else + wget -q -O "$path" "$uri" --tries="$download_retries" + fi + + return $? +} + +function GetTempPathFileName { + local path=$1 + + local temp_dir=$(GetTempDirectory) + local temp_file_name=$(basename $path) + echo $temp_dir$temp_file_name + return 0 +} + +function DownloadAndExtract { + local uri=$1 + local installDir=$2 + local force=${3:-false} + local download_retries=${4:-5} + local retry_wait_time_seconds=${5:-30} + + local temp_tool_path=$(GetTempPathFileName $uri) + + echo "downloading to: $temp_tool_path" + + # Download file + GetFile "$uri" "$temp_tool_path" $force $download_retries $retry_wait_time_seconds + if [[ $? != 0 ]]; then + Write-PipelineTelemetryError -category 'NativeToolsBootstrap' "Failed to download '$uri' to '$temp_tool_path'." + return 1 + fi + + # Extract File + echo "extracting from $temp_tool_path to $installDir" + ExpandZip "$temp_tool_path" "$installDir" $force $download_retries $retry_wait_time_seconds + if [[ $? != 0 ]]; then + Write-PipelineTelemetryError -category 'NativeToolsBootstrap' "Failed to extract '$temp_tool_path' to '$installDir'." + return 1 + fi + + return 0 +} + +function NewScriptShim { + local shimpath=$1 + local tool_file_path=$2 + local force=${3:-false} + + echo "Generating '$shimpath' shim" + if [[ -f $shimpath ]]; then + if [[ $force = false ]]; then + echo "File '$shimpath' already exists." >&2 + return 1 + else + rm -rf $shimpath + fi + fi + + if [[ ! -f $tool_file_path ]]; then + Write-PipelineTelemetryError -category 'NativeToolsBootstrap' "Specified tool file path:'$tool_file_path' does not exist" + return 1 + fi + + local shim_contents=$'#!/usr/bin/env bash\n' + shim_contents+="SHIMARGS="$'$1\n' + shim_contents+="$tool_file_path"$' $SHIMARGS\n' + + # Write shim file + echo "$shim_contents" > $shimpath + + chmod +x $shimpath + + echo "Finished generating shim '$shimpath'" + + return $? +} + diff --git a/eng/common/native/find-native-compiler.sh b/eng/common/native/find-native-compiler.sh new file mode 100755 index 0000000000..aed19d07d5 --- /dev/null +++ b/eng/common/native/find-native-compiler.sh @@ -0,0 +1,121 @@ +#!/usr/bin/env bash +# +# This file locates the native compiler with the given name and version and sets the environment variables to locate it. +# + +source="${BASH_SOURCE[0]}" + +# resolve $SOURCE until the file is no longer a symlink +while [[ -h $source ]]; do + scriptroot="$( cd -P "$( dirname "$source" )" && pwd )" + source="$(readlink "$source")" + + # if $source was a relative symlink, we need to resolve it relative to the path where the + # symlink file was located + [[ $source != /* ]] && source="$scriptroot/$source" +done +scriptroot="$( cd -P "$( dirname "$source" )" && pwd )" + +if [ $# -lt 0 ] +then + echo "Usage..." + echo "find-native-compiler.sh " + echo "Specify the name of compiler (clang or gcc)." + echo "Specify the major version of compiler." + echo "Specify the minor version of compiler." + exit 1 +fi + +. $scriptroot/../pipeline-logging-functions.sh + +compiler="$1" +cxxCompiler="$compiler++" +majorVersion="$2" +minorVersion="$3" + +if [ "$compiler" = "gcc" ]; then cxxCompiler="g++"; fi + +check_version_exists() { + desired_version=-1 + + # Set up the environment to be used for building with the desired compiler. + if command -v "$compiler-$1.$2" > /dev/null; then + desired_version="-$1.$2" + elif command -v "$compiler$1$2" > /dev/null; then + desired_version="$1$2" + elif command -v "$compiler-$1$2" > /dev/null; then + desired_version="-$1$2" + fi + + echo "$desired_version" +} + +if [ -z "$CLR_CC" ]; then + + # Set default versions + if [ -z "$majorVersion" ]; then + # note: gcc (all versions) and clang versions higher than 6 do not have minor version in file name, if it is zero. + if [ "$compiler" = "clang" ]; then versions=( 9 8 7 6.0 5.0 4.0 3.9 3.8 3.7 3.6 3.5 ) + elif [ "$compiler" = "gcc" ]; then versions=( 9 8 7 6 5 4.9 ); fi + + for version in "${versions[@]}"; do + parts=(${version//./ }) + desired_version="$(check_version_exists "${parts[0]}" "${parts[1]}")" + if [ "$desired_version" != "-1" ]; then majorVersion="${parts[0]}"; break; fi + done + + if [ -z "$majorVersion" ]; then + if command -v "$compiler" > /dev/null; then + if [ "$(uname)" != "Darwin" ]; then + Write-PipelineTelemetryError -category "Build" -type "warning" "Specific version of $compiler not found, falling back to use the one in PATH." + fi + export CC="$(command -v "$compiler")" + export CXX="$(command -v "$cxxCompiler")" + else + Write-PipelineTelemetryError -category "Build" "No usable version of $compiler found." + exit 1 + fi + else + if [ "$compiler" = "clang" ] && [ "$majorVersion" -lt 5 ]; then + if [ "$build_arch" = "arm" ] || [ "$build_arch" = "armel" ]; then + if command -v "$compiler" > /dev/null; then + Write-PipelineTelemetryError -category "Build" -type "warning" "Found clang version $majorVersion which is not supported on arm/armel architectures, falling back to use clang from PATH." + export CC="$(command -v "$compiler")" + export CXX="$(command -v "$cxxCompiler")" + else + Write-PipelineTelemetryError -category "Build" "Found clang version $majorVersion which is not supported on arm/armel architectures, and there is no clang in PATH." + exit 1 + fi + fi + fi + fi + else + desired_version="$(check_version_exists "$majorVersion" "$minorVersion")" + if [ "$desired_version" = "-1" ]; then + Write-PipelineTelemetryError -category "Build" "Could not find specific version of $compiler: $majorVersion $minorVersion." + exit 1 + fi + fi + + if [ -z "$CC" ]; then + export CC="$(command -v "$compiler$desired_version")" + export CXX="$(command -v "$cxxCompiler$desired_version")" + if [ -z "$CXX" ]; then export CXX="$(command -v "$cxxCompiler")"; fi + fi +else + if [ ! -f "$CLR_CC" ]; then + Write-PipelineTelemetryError -category "Build" "CLR_CC is set but path '$CLR_CC' does not exist" + exit 1 + fi + export CC="$CLR_CC" + export CXX="$CLR_CXX" +fi + +if [ -z "$CC" ]; then + Write-PipelineTelemetryError -category "Build" "Unable to find $compiler." + exit 1 +fi + +export CCC_CC="$CC" +export CCC_CXX="$CXX" +export SCAN_BUILD_COMMAND="$(command -v "scan-build$desired_version")" diff --git a/eng/common/native/install-cmake-test.sh b/eng/common/native/install-cmake-test.sh new file mode 100755 index 0000000000..12339a4076 --- /dev/null +++ b/eng/common/native/install-cmake-test.sh @@ -0,0 +1,117 @@ +#!/usr/bin/env bash + +source="${BASH_SOURCE[0]}" +scriptroot="$( cd -P "$( dirname "$source" )" && pwd )" + +. $scriptroot/common-library.sh + +base_uri= +install_path= +version= +clean=false +force=false +download_retries=5 +retry_wait_time_seconds=30 + +while (($# > 0)); do + lowerI="$(echo $1 | awk '{print tolower($0)}')" + case $lowerI in + --baseuri) + base_uri=$2 + shift 2 + ;; + --installpath) + install_path=$2 + shift 2 + ;; + --version) + version=$2 + shift 2 + ;; + --clean) + clean=true + shift 1 + ;; + --force) + force=true + shift 1 + ;; + --downloadretries) + download_retries=$2 + shift 2 + ;; + --retrywaittimeseconds) + retry_wait_time_seconds=$2 + shift 2 + ;; + --help) + echo "Common settings:" + echo " --baseuri Base file directory or Url wrom which to acquire tool archives" + echo " --installpath Base directory to install native tool to" + echo " --clean Don't install the tool, just clean up the current install of the tool" + echo " --force Force install of tools even if they previously exist" + echo " --help Print help and exit" + echo "" + echo "Advanced settings:" + echo " --downloadretries Total number of retry attempts" + echo " --retrywaittimeseconds Wait time between retry attempts in seconds" + echo "" + exit 0 + ;; + esac +done + +tool_name="cmake-test" +tool_os=$(GetCurrentOS) +tool_folder=$(echo $tool_os | awk '{print tolower($0)}') +tool_arch="x86_64" +tool_name_moniker="$tool_name-$version-$tool_os-$tool_arch" +tool_install_directory="$install_path/$tool_name/$version" +tool_file_path="$tool_install_directory/$tool_name_moniker/bin/$tool_name" +shim_path="$install_path/$tool_name.sh" +uri="${base_uri}/$tool_folder/$tool_name/$tool_name_moniker.tar.gz" + +# Clean up tool and installers +if [[ $clean = true ]]; then + echo "Cleaning $tool_install_directory" + if [[ -d $tool_install_directory ]]; then + rm -rf $tool_install_directory + fi + + echo "Cleaning $shim_path" + if [[ -f $shim_path ]]; then + rm -rf $shim_path + fi + + tool_temp_path=$(GetTempPathFileName $uri) + echo "Cleaning $tool_temp_path" + if [[ -f $tool_temp_path ]]; then + rm -rf $tool_temp_path + fi + + exit 0 +fi + +# Install tool +if [[ -f $tool_file_path ]] && [[ $force = false ]]; then + echo "$tool_name ($version) already exists, skipping install" + exit 0 +fi + +DownloadAndExtract $uri $tool_install_directory $force $download_retries $retry_wait_time_seconds + +if [[ $? != 0 ]]; then + Write-PipelineTelemetryError -category 'NativeToolsBootstrap' 'Installation failed' + exit 1 +fi + +# Generate Shim +# Always rewrite shims so that we are referencing the expected version +NewScriptShim $shim_path $tool_file_path true + +if [[ $? != 0 ]]; then + Write-PipelineTelemetryError -category 'NativeToolsBootstrap' 'Shim generation failed' + exit 1 +fi + +exit 0 \ No newline at end of file diff --git a/eng/common/native/install-cmake.sh b/eng/common/native/install-cmake.sh new file mode 100755 index 0000000000..18041be876 --- /dev/null +++ b/eng/common/native/install-cmake.sh @@ -0,0 +1,117 @@ +#!/usr/bin/env bash + +source="${BASH_SOURCE[0]}" +scriptroot="$( cd -P "$( dirname "$source" )" && pwd )" + +. $scriptroot/common-library.sh + +base_uri= +install_path= +version= +clean=false +force=false +download_retries=5 +retry_wait_time_seconds=30 + +while (($# > 0)); do + lowerI="$(echo $1 | awk '{print tolower($0)}')" + case $lowerI in + --baseuri) + base_uri=$2 + shift 2 + ;; + --installpath) + install_path=$2 + shift 2 + ;; + --version) + version=$2 + shift 2 + ;; + --clean) + clean=true + shift 1 + ;; + --force) + force=true + shift 1 + ;; + --downloadretries) + download_retries=$2 + shift 2 + ;; + --retrywaittimeseconds) + retry_wait_time_seconds=$2 + shift 2 + ;; + --help) + echo "Common settings:" + echo " --baseuri Base file directory or Url wrom which to acquire tool archives" + echo " --installpath Base directory to install native tool to" + echo " --clean Don't install the tool, just clean up the current install of the tool" + echo " --force Force install of tools even if they previously exist" + echo " --help Print help and exit" + echo "" + echo "Advanced settings:" + echo " --downloadretries Total number of retry attempts" + echo " --retrywaittimeseconds Wait time between retry attempts in seconds" + echo "" + exit 0 + ;; + esac +done + +tool_name="cmake" +tool_os=$(GetCurrentOS) +tool_folder=$(echo $tool_os | awk '{print tolower($0)}') +tool_arch="x86_64" +tool_name_moniker="$tool_name-$version-$tool_os-$tool_arch" +tool_install_directory="$install_path/$tool_name/$version" +tool_file_path="$tool_install_directory/$tool_name_moniker/bin/$tool_name" +shim_path="$install_path/$tool_name.sh" +uri="${base_uri}/$tool_folder/$tool_name/$tool_name_moniker.tar.gz" + +# Clean up tool and installers +if [[ $clean = true ]]; then + echo "Cleaning $tool_install_directory" + if [[ -d $tool_install_directory ]]; then + rm -rf $tool_install_directory + fi + + echo "Cleaning $shim_path" + if [[ -f $shim_path ]]; then + rm -rf $shim_path + fi + + tool_temp_path=$(GetTempPathFileName $uri) + echo "Cleaning $tool_temp_path" + if [[ -f $tool_temp_path ]]; then + rm -rf $tool_temp_path + fi + + exit 0 +fi + +# Install tool +if [[ -f $tool_file_path ]] && [[ $force = false ]]; then + echo "$tool_name ($version) already exists, skipping install" + exit 0 +fi + +DownloadAndExtract $uri $tool_install_directory $force $download_retries $retry_wait_time_seconds + +if [[ $? != 0 ]]; then + Write-PipelineTelemetryError -category 'NativeToolsBootstrap' 'Installation failed' + exit 1 +fi + +# Generate Shim +# Always rewrite shims so that we are referencing the expected version +NewScriptShim $shim_path $tool_file_path true + +if [[ $? != 0 ]]; then + Write-PipelineTelemetryError -category 'NativeToolsBootstrap' 'Shim generation failed' + exit 1 +fi + +exit 0 \ No newline at end of file diff --git a/eng/common/native/install-tool.ps1 b/eng/common/native/install-tool.ps1 new file mode 100644 index 0000000000..f397e1c75d --- /dev/null +++ b/eng/common/native/install-tool.ps1 @@ -0,0 +1,132 @@ +<# +.SYNOPSIS +Install native tool + +.DESCRIPTION +Install cmake native tool from Azure blob storage + +.PARAMETER InstallPath +Base directory to install native tool to + +.PARAMETER BaseUri +Base file directory or Url from which to acquire tool archives + +.PARAMETER CommonLibraryDirectory +Path to folder containing common library modules + +.PARAMETER Force +Force install of tools even if they previously exist + +.PARAMETER Clean +Don't install the tool, just clean up the current install of the tool + +.PARAMETER DownloadRetries +Total number of retry attempts + +.PARAMETER RetryWaitTimeInSeconds +Wait time between retry attempts in seconds + +.NOTES +Returns 0 if install succeeds, 1 otherwise +#> +[CmdletBinding(PositionalBinding=$false)] +Param ( + [Parameter(Mandatory=$True)] + [string] $ToolName, + [Parameter(Mandatory=$True)] + [string] $InstallPath, + [Parameter(Mandatory=$True)] + [string] $BaseUri, + [Parameter(Mandatory=$True)] + [string] $Version, + [string] $CommonLibraryDirectory = $PSScriptRoot, + [switch] $Force = $False, + [switch] $Clean = $False, + [int] $DownloadRetries = 5, + [int] $RetryWaitTimeInSeconds = 30 +) + +. $PSScriptRoot\..\pipeline-logging-functions.ps1 + +# Import common library modules +Import-Module -Name (Join-Path $CommonLibraryDirectory "CommonLibrary.psm1") + +try { + # Define verbose switch if undefined + $Verbose = $VerbosePreference -Eq "Continue" + + $Arch = CommonLibrary\Get-MachineArchitecture + $ToolOs = "win64" + if($Arch -Eq "x32") { + $ToolOs = "win32" + } + $ToolNameMoniker = "$ToolName-$Version-$ToolOs-$Arch" + $ToolInstallDirectory = Join-Path $InstallPath "$ToolName\$Version\" + $Uri = "$BaseUri/windows/$ToolName/$ToolNameMoniker.zip" + $ShimPath = Join-Path $InstallPath "$ToolName.exe" + + if ($Clean) { + Write-Host "Cleaning $ToolInstallDirectory" + if (Test-Path $ToolInstallDirectory) { + Remove-Item $ToolInstallDirectory -Force -Recurse + } + Write-Host "Cleaning $ShimPath" + if (Test-Path $ShimPath) { + Remove-Item $ShimPath -Force + } + $ToolTempPath = CommonLibrary\Get-TempPathFilename -Path $Uri + Write-Host "Cleaning $ToolTempPath" + if (Test-Path $ToolTempPath) { + Remove-Item $ToolTempPath -Force + } + exit 0 + } + + # Install tool + if ((Test-Path $ToolInstallDirectory) -And (-Not $Force)) { + Write-Verbose "$ToolName ($Version) already exists, skipping install" + } + else { + $InstallStatus = CommonLibrary\DownloadAndExtract -Uri $Uri ` + -InstallDirectory $ToolInstallDirectory ` + -Force:$Force ` + -DownloadRetries $DownloadRetries ` + -RetryWaitTimeInSeconds $RetryWaitTimeInSeconds ` + -Verbose:$Verbose + + if ($InstallStatus -Eq $False) { + Write-PipelineTelemetryError "Installation failed" -Category "NativeToolsetBootstrapping" + exit 1 + } + } + + $ToolFilePath = Get-ChildItem $ToolInstallDirectory -Recurse -Filter "$ToolName.exe" | % { $_.FullName } + if (@($ToolFilePath).Length -Gt 1) { + Write-Error "There are multiple copies of $ToolName in $($ToolInstallDirectory): `n$(@($ToolFilePath | out-string))" + exit 1 + } elseif (@($ToolFilePath).Length -Lt 1) { + Write-Host "$ToolName was not found in $ToolFilePath." + exit 1 + } + + # Generate shim + # Always rewrite shims so that we are referencing the expected version + $GenerateShimStatus = CommonLibrary\New-ScriptShim -ShimName $ToolName ` + -ShimDirectory $InstallPath ` + -ToolFilePath "$ToolFilePath" ` + -BaseUri $BaseUri ` + -Force:$Force ` + -Verbose:$Verbose + + if ($GenerateShimStatus -Eq $False) { + Write-PipelineTelemetryError "Generate shim failed" -Category "NativeToolsetBootstrapping" + return 1 + } + + exit 0 +} +catch { + Write-Host $_.ScriptStackTrace + Write-PipelineTelemetryError -Category "NativeToolsetBootstrapping" -Message $_ + exit 1 +} diff --git a/eng/common/performance/blazor_perf.proj b/eng/common/performance/blazor_perf.proj new file mode 100644 index 0000000000..3b25359c43 --- /dev/null +++ b/eng/common/performance/blazor_perf.proj @@ -0,0 +1,30 @@ + + + python3 + $(HelixPreCommands);chmod +x $HELIX_WORKITEM_PAYLOAD/SOD/SizeOnDisk + + + + + %(Identity) + + + + + %HELIX_CORRELATION_PAYLOAD%\performance\src\scenarios\ + $(ScenarioDirectory)blazor\ + + + $HELIX_CORRELATION_PAYLOAD/performance/src/scenarios/ + $(ScenarioDirectory)blazor/ + + + + + $(WorkItemDirectory) + cd $(BlazorDirectory);$(Python) pre.py publish --msbuild %27/p:_TrimmerDumpDependencies=true%27 --msbuild-static AdditionalMonoLinkerOptions=%27"%24(AdditionalMonoLinkerOptions) --dump-dependencies"%27 --binlog %27./traces/blazor_publish.binlog%27 + $(Python) test.py sod --scenario-name "%(Identity)" + $(Python) post.py + + + \ No newline at end of file diff --git a/eng/common/performance/crossgen_perf.proj b/eng/common/performance/crossgen_perf.proj new file mode 100644 index 0000000000..4264920382 --- /dev/null +++ b/eng/common/performance/crossgen_perf.proj @@ -0,0 +1,69 @@ + + + + + %(Identity) + + + + + + py -3 + $(HelixPreCommands) + %HELIX_CORRELATION_PAYLOAD%\Core_Root + %HELIX_CORRELATION_PAYLOAD%\performance\src\scenarios\ + $(ScenarioDirectory)crossgen\ + $(ScenarioDirectory)crossgen2\ + + + python3 + $(HelixPreCommands);chmod +x $HELIX_WORKITEM_PAYLOAD/startup/Startup;chmod +x $HELIX_WORKITEM_PAYLOAD/startup/perfcollect;sudo apt update + $HELIX_CORRELATION_PAYLOAD/Core_Root + $HELIX_CORRELATION_PAYLOAD/performance/src/scenarios/ + $(ScenarioDirectory)crossgen/ + $(ScenarioDirectory)crossgen2/ + + + + + + + + + + + + + + + + $(WorkItemDirectory) + $(Python) $(CrossgenDirectory)test.py crossgen --core-root $(CoreRoot) --test-name %(Identity) + + + + + + $(WorkItemDirectory) + $(Python) $(Crossgen2Directory)test.py crossgen2 --core-root $(CoreRoot) --single %(Identity) + + + + + + + 4:00 + + + + 4:00 + + + $(WorkItemDirectory) + $(Python) $(Crossgen2Directory)test.py crossgen2 --core-root $(CoreRoot) --composite $(Crossgen2Directory)framework-r2r.dll.rsp + 1:00 + + + \ No newline at end of file diff --git a/eng/common/performance/microbenchmarks.proj b/eng/common/performance/microbenchmarks.proj new file mode 100644 index 0000000000..94b6efbc92 --- /dev/null +++ b/eng/common/performance/microbenchmarks.proj @@ -0,0 +1,144 @@ + + + + %HELIX_CORRELATION_PAYLOAD%\performance\scripts\benchmarks_ci.py --csproj %HELIX_CORRELATION_PAYLOAD%\performance\$(TargetCsproj) + --dotnet-versions %DOTNET_VERSION% --cli-source-info args --cli-branch %PERFLAB_BRANCH% --cli-commit-sha %PERFLAB_HASH% --cli-repository https://github.com/%PERFLAB_REPO% --cli-source-timestamp %PERFLAB_BUILDTIMESTAMP% + py -3 + %HELIX_CORRELATION_PAYLOAD%\Core_Root\CoreRun.exe + %HELIX_CORRELATION_PAYLOAD%\Baseline_Core_Root\CoreRun.exe + + $(HelixPreCommands);call %HELIX_CORRELATION_PAYLOAD%\performance\tools\machine-setup.cmd;set PYTHONPATH=%HELIX_WORKITEM_PAYLOAD%\scripts%3B%HELIX_WORKITEM_PAYLOAD% + %HELIX_CORRELATION_PAYLOAD%\artifacts\BenchmarkDotNet.Artifacts + %HELIX_CORRELATION_PAYLOAD%\artifacts\BenchmarkDotNet.Artifacts_Baseline + %HELIX_CORRELATION_PAYLOAD%\performance\src\tools\ResultsComparer\ResultsComparer.csproj + %HELIX_CORRELATION_PAYLOAD%\performance\tools\dotnet\$(Architecture)\dotnet.exe + %25%25 + %HELIX_WORKITEM_ROOT%\testResults.xml + + + + $HELIX_CORRELATION_PAYLOAD + $(BaseDirectory)/performance + + + + $HELIX_WORKITEM_PAYLOAD + $(BaseDirectory) + + + + $(PerformanceDirectory)/scripts/benchmarks_ci.py --csproj $(PerformanceDirectory)/$(TargetCsproj) + --dotnet-versions $DOTNET_VERSION --cli-source-info args --cli-branch $PERFLAB_BRANCH --cli-commit-sha $PERFLAB_HASH --cli-repository https://github.com/$PERFLAB_REPO --cli-source-timestamp $PERFLAB_BUILDTIMESTAMP + python3 + $(BaseDirectory)/Core_Root/corerun + $(BaseDirectory)/Baseline_Core_Root/corerun + $(HelixPreCommands);chmod +x $(PerformanceDirectory)/tools/machine-setup.sh;. $(PerformanceDirectory)/tools/machine-setup.sh + $(BaseDirectory)/artifacts/BenchmarkDotNet.Artifacts + $(BaseDirectory)/artifacts/BenchmarkDotNet.Artifacts_Baseline + $(PerformanceDirectory)/src/tools/ResultsComparer/ResultsComparer.csproj + $(PerformanceDirectory)/tools/dotnet/$(Architecture)/dotnet + %25 + $HELIX_WORKITEM_ROOT/testResults.xml + + + + $(CliArguments) --wasm + + + + --corerun %HELIX_CORRELATION_PAYLOAD%\dotnet-mono\shared\Microsoft.NETCore.App\6.0.0\corerun.exe + + + --corerun $(BaseDirectory)/dotnet-mono/shared/Microsoft.NETCore.App/6.0.0/corerun + + + + --corerun $(CoreRun) + + + + --corerun $(BaselineCoreRun) + + + + $(Python) $(WorkItemCommand) --incremental no --architecture $(Architecture) -f $(_Framework) $(PerfLabArguments) + + + + $(WorkItemCommand) $(CliArguments) + + + + 2:30 + 0:15 + + + + + %(Identity) + + + + + 30 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + false + + + + + + $(WorkItemDirectory) + $(WorkItemCommand) --bdn-artifacts $(BaselineArtifactsDirectory) --bdn-arguments="--anyCategories $(BDNCategories) $(ExtraBenchmarkDotNetArguments) $(BaselineCoreRunArgument) --partition-count $(PartitionCount) --partition-index %(HelixWorkItem.Index)" + $(WorkItemCommand) --bdn-artifacts $(ArtifactsDirectory) --bdn-arguments="--anyCategories $(BDNCategories) $(ExtraBenchmarkDotNetArguments) $(CoreRunArgument) --partition-count $(PartitionCount) --partition-index %(HelixWorkItem.Index)" + $(DotnetExe) run -f $(_Framework) -p $(ResultsComparer) --base $(BaselineArtifactsDirectory) --diff $(ArtifactsDirectory) --threshold 2$(Percent) --xml $(XMLResults);$(FinalCommand) + $(WorkItemTimeout) + + + + + + $(WorkItemDirectory) + $(WorkItemCommand) --bdn-artifacts $(BaselineArtifactsDirectory) --bdn-arguments="--anyCategories $(BDNCategories) $(ExtraBenchmarkDotNetArguments) $(BaselineCoreRunArgument)" + $(WorkItemCommand) --bdn-artifacts $(ArtifactsDirectory) --bdn-arguments="--anyCategories $(BDNCategories) $(ExtraBenchmarkDotNetArguments) $(CoreRunArgument)" + $(DotnetExe) run -f $(_Framework) -p $(ResultsComparer) --base $(BaselineArtifactsDirectory) --diff $(ArtifactsDirectory) --threshold 2$(Percent) --xml $(XMLResults) + 4:00 + + + \ No newline at end of file diff --git a/eng/common/performance/performance-setup.ps1 b/eng/common/performance/performance-setup.ps1 new file mode 100644 index 0000000000..656c0bd902 --- /dev/null +++ b/eng/common/performance/performance-setup.ps1 @@ -0,0 +1,147 @@ +Param( + [string] $SourceDirectory=$env:BUILD_SOURCESDIRECTORY, + [string] $CoreRootDirectory, + [string] $BaselineCoreRootDirectory, + [string] $Architecture="x64", + [string] $Framework="net5.0", + [string] $CompilationMode="Tiered", + [string] $Repository=$env:BUILD_REPOSITORY_NAME, + [string] $Branch=$env:BUILD_SOURCEBRANCH, + [string] $CommitSha=$env:BUILD_SOURCEVERSION, + [string] $BuildNumber=$env:BUILD_BUILDNUMBER, + [string] $RunCategories="Libraries Runtime", + [string] $Csproj="src\benchmarks\micro\MicroBenchmarks.csproj", + [string] $Kind="micro", + [switch] $LLVM, + [switch] $MonoInterpreter, + [switch] $MonoAOT, + [switch] $Internal, + [switch] $Compare, + [string] $MonoDotnet="", + [string] $Configurations="CompilationMode=$CompilationMode RunKind=$Kind" +) + +$RunFromPerformanceRepo = ($Repository -eq "dotnet/performance") -or ($Repository -eq "dotnet-performance") +$UseCoreRun = ($CoreRootDirectory -ne [string]::Empty) +$UseBaselineCoreRun = ($BaselineCoreRootDirectory -ne [string]::Empty) + +$PayloadDirectory = (Join-Path $SourceDirectory "Payload") +$PerformanceDirectory = (Join-Path $PayloadDirectory "performance") +$WorkItemDirectory = (Join-Path $SourceDirectory "workitem") +$ExtraBenchmarkDotNetArguments = "--iterationCount 1 --warmupCount 0 --invocationCount 1 --unrollFactor 1 --strategy ColdStart --stopOnFirstError true" +$Creator = $env:BUILD_DEFINITIONNAME +$PerfLabArguments = "" +$HelixSourcePrefix = "pr" + +$Queue = "Windows.10.Amd64.ClientRS4.DevEx.15.8.Open" + +# TODO: Implement a better logic to determine if Framework is .NET Core or >= .NET 5. +if ($Framework.StartsWith("netcoreapp") -or ($Framework -eq "net5.0")) { + $Queue = "Windows.10.Amd64.ClientRS5.Open" +} + +if ($Compare) { + $Queue = "Windows.10.Amd64.19H1.Tiger.Perf.Open" + $PerfLabArguments = "" + $ExtraBenchmarkDotNetArguments = "" +} + +if ($Internal) { + $Queue = "Windows.10.Amd64.19H1.Tiger.Perf" + $PerfLabArguments = "--upload-to-perflab-container" + $ExtraBenchmarkDotNetArguments = "" + $Creator = "" + $HelixSourcePrefix = "official" +} + +if($MonoInterpreter) +{ + $ExtraBenchmarkDotNetArguments = "--category-exclusion-filter NoInterpreter" +} + +if($MonoDotnet -ne "") +{ + $Configurations += " LLVM=$LLVM MonoInterpreter=$MonoInterpreter MonoAOT=$MonoAOT" + if($ExtraBenchmarkDotNetArguments -eq "") + { + #FIX ME: We need to block these tests as they don't run on mono for now + $ExtraBenchmarkDotNetArguments = "--exclusion-filter *Perf_Image* *Perf_NamedPipeStream*" + } + else + { + #FIX ME: We need to block these tests as they don't run on mono for now + $ExtraBenchmarkDotNetArguments += " --exclusion-filter *Perf_Image* *Perf_NamedPipeStream*" + } +} + +# FIX ME: This is a workaround until we get this from the actual pipeline +$CommonSetupArguments="--channel master --queue $Queue --build-number $BuildNumber --build-configs $Configurations --architecture $Architecture" +$SetupArguments = "--repository https://github.com/$Repository --branch $Branch --get-perf-hash --commit-sha $CommitSha $CommonSetupArguments" + + +#This grabs the LKG version number of dotnet and passes it to our scripts +$VersionJSON = Get-Content global.json | ConvertFrom-Json +$DotNetVersion = $VersionJSON.tools.dotnet +$SetupArguments = "--dotnet-versions $DotNetVersion $SetupArguments" + + +if ($RunFromPerformanceRepo) { + $SetupArguments = "--perf-hash $CommitSha $CommonSetupArguments" + + robocopy $SourceDirectory $PerformanceDirectory /E /XD $PayloadDirectory $SourceDirectory\artifacts $SourceDirectory\.git +} +else { + git clone --branch master --depth 1 --quiet https://github.com/dotnet/performance $PerformanceDirectory +} + +if($MonoDotnet -ne "") +{ + $UsingMono = "true" + $MonoDotnetPath = (Join-Path $PayloadDirectory "dotnet-mono") + Move-Item -Path $MonoDotnet -Destination $MonoDotnetPath +} + +if ($UseCoreRun) { + $NewCoreRoot = (Join-Path $PayloadDirectory "Core_Root") + Move-Item -Path $CoreRootDirectory -Destination $NewCoreRoot +} +if ($UseBaselineCoreRun) { + $NewBaselineCoreRoot = (Join-Path $PayloadDirectory "Baseline_Core_Root") + Move-Item -Path $BaselineCoreRootDirectory -Destination $NewBaselineCoreRoot +} + +$DocsDir = (Join-Path $PerformanceDirectory "docs") +robocopy $DocsDir $WorkItemDirectory + +# Set variables that we will need to have in future steps +$ci = $true + +. "$PSScriptRoot\..\pipeline-logging-functions.ps1" + +# Directories +Write-PipelineSetVariable -Name 'PayloadDirectory' -Value "$PayloadDirectory" -IsMultiJobVariable $false +Write-PipelineSetVariable -Name 'PerformanceDirectory' -Value "$PerformanceDirectory" -IsMultiJobVariable $false +Write-PipelineSetVariable -Name 'WorkItemDirectory' -Value "$WorkItemDirectory" -IsMultiJobVariable $false + +# Script Arguments +Write-PipelineSetVariable -Name 'Python' -Value "py -3" -IsMultiJobVariable $false +Write-PipelineSetVariable -Name 'ExtraBenchmarkDotNetArguments' -Value "$ExtraBenchmarkDotNetArguments" -IsMultiJobVariable $false +Write-PipelineSetVariable -Name 'SetupArguments' -Value "$SetupArguments" -IsMultiJobVariable $false +Write-PipelineSetVariable -Name 'PerfLabArguments' -Value "$PerfLabArguments" -IsMultiJobVariable $false +Write-PipelineSetVariable -Name 'BDNCategories' -Value "$RunCategories" -IsMultiJobVariable $false +Write-PipelineSetVariable -Name 'TargetCsproj' -Value "$Csproj" -IsMultiJobVariable $false +Write-PipelineSetVariable -Name 'Kind' -Value "$Kind" -IsMultiJobVariable $false +Write-PipelineSetVariable -Name 'Architecture' -Value "$Architecture" -IsMultiJobVariable $false +Write-PipelineSetVariable -Name 'UseCoreRun' -Value "$UseCoreRun" -IsMultiJobVariable $false +Write-PipelineSetVariable -Name 'UseBaselineCoreRun' -Value "$UseBaselineCoreRun" -IsMultiJobVariable $false +Write-PipelineSetVariable -Name 'RunFromPerfRepo' -Value "$RunFromPerformanceRepo" -IsMultiJobVariable $false +Write-PipelineSetVariable -Name 'Compare' -Value "$Compare" -IsMultiJobVariable $false +Write-PipelineSetVariable -Name 'MonoDotnet' -Value "$UsingMono" -IsMultiJobVariable $false + +# Helix Arguments +Write-PipelineSetVariable -Name 'Creator' -Value "$Creator" -IsMultiJobVariable $false +Write-PipelineSetVariable -Name 'Queue' -Value "$Queue" -IsMultiJobVariable $false +Write-PipelineSetVariable -Name 'HelixSourcePrefix' -Value "$HelixSourcePrefix" -IsMultiJobVariable $false +Write-PipelineSetVariable -Name '_BuildConfig' -Value "$Architecture.$Kind.$Framework" -IsMultiJobVariable $false + +exit 0 \ No newline at end of file diff --git a/eng/common/performance/performance-setup.sh b/eng/common/performance/performance-setup.sh new file mode 100755 index 0000000000..806e56c612 --- /dev/null +++ b/eng/common/performance/performance-setup.sh @@ -0,0 +1,289 @@ +#!/usr/bin/env bash + +source_directory=$BUILD_SOURCESDIRECTORY +core_root_directory= +baseline_core_root_directory= +architecture=x64 +framework=net5.0 +compilation_mode=tiered +repository=$BUILD_REPOSITORY_NAME +branch=$BUILD_SOURCEBRANCH +commit_sha=$BUILD_SOURCEVERSION +build_number=$BUILD_BUILDNUMBER +internal=false +compare=false +mono_dotnet= +kind="micro" +llvm=false +monointerpreter=false +monoaot=false +run_categories="Libraries Runtime" +csproj="src\benchmarks\micro\MicroBenchmarks.csproj" +configurations="CompliationMode=$compilation_mode RunKind=$kind" +run_from_perf_repo=false +use_core_run=true +use_baseline_core_run=true +using_mono=false +wasm_runtime_loc= +using_wasm=false +use_latest_dotnet=false + +while (($# > 0)); do + lowerI="$(echo $1 | awk '{print tolower($0)}')" + case $lowerI in + --sourcedirectory) + source_directory=$2 + shift 2 + ;; + --corerootdirectory) + core_root_directory=$2 + shift 2 + ;; + --baselinecorerootdirectory) + baseline_core_root_directory=$2 + shift 2 + ;; + --architecture) + architecture=$2 + shift 2 + ;; + --framework) + framework=$2 + shift 2 + ;; + --compilationmode) + compilation_mode=$2 + shift 2 + ;; + --repository) + repository=$2 + shift 2 + ;; + --branch) + branch=$2 + shift 2 + ;; + --commitsha) + commit_sha=$2 + shift 2 + ;; + --buildnumber) + build_number=$2 + shift 2 + ;; + --kind) + kind=$2 + configurations="CompilationMode=$compilation_mode RunKind=$kind" + shift 2 + ;; + --runcategories) + run_categories=$2 + shift 2 + ;; + --csproj) + csproj=$2 + shift 2 + ;; + --internal) + internal=true + shift 1 + ;; + --llvm) + llvm=true + shift 1 + ;; + --monointerpreter) + monointerpreter=true + shift 1 + ;; + --monoaot) + monoaot=true + shift 1 + ;; + --monodotnet) + mono_dotnet=$2 + shift 2 + ;; + --wasm) + wasm_runtime_loc=$2 + shift 2 + ;; + --compare) + compare=true + shift 1 + ;; + --configurations) + configurations=$2 + shift 2 + ;; + --latestdotnet) + use_latest_dotnet=true + shift 1 + ;; + *) + echo "Common settings:" + echo " --corerootdirectory Directory where Core_Root exists, if running perf testing with --corerun" + echo " --architecture Architecture of the testing being run" + echo " --configurations List of key=value pairs that will be passed to perf testing infrastructure." + echo " ex: --configurations \"CompilationMode=Tiered OptimzationLevel=PGO\"" + echo " --help Print help and exit" + echo "" + echo "Advanced settings:" + echo " --framework The framework to run, if not running in master" + echo " --compliationmode The compilation mode if not passing --configurations" + echo " --sourcedirectory The directory of the sources. Defaults to env:BUILD_SOURCESDIRECTORY" + echo " --repository The name of the repository in the / format. Defaults to env:BUILD_REPOSITORY_NAME" + echo " --branch The name of the branch. Defaults to env:BUILD_SOURCEBRANCH" + echo " --commitsha The commit sha1 to run against. Defaults to env:BUILD_SOURCEVERSION" + echo " --buildnumber The build number currently running. Defaults to env:BUILD_BUILDNUMBER" + echo " --csproj The relative path to the benchmark csproj whose tests should be run. Defaults to src\benchmarks\micro\MicroBenchmarks.csproj" + echo " --kind Related to csproj. The kind of benchmarks that should be run. Defaults to micro" + echo " --runcategories Related to csproj. Categories of benchmarks to run. Defaults to \"coreclr corefx\"" + echo " --internal If the benchmarks are running as an official job." + echo " --monodotnet Pass the path to the mono dotnet for mono performance testing." + echo " --wasm Path to the unpacked wasm runtime pack." + echo " --latestdotnet --dotnet-versions will not be specified. --dotnet-versions defaults to LKG version in global.json " + echo "" + exit 0 + ;; + esac +done + +if [ "$repository" == "dotnet/performance" ] || [ "$repository" == "dotnet-performance" ]; then + run_from_perf_repo=true +fi + +if [ -z "$configurations" ]; then + configurations="CompilationMode=$compilation_mode" +fi + +if [ -z "$core_root_directory" ]; then + use_core_run=false +fi + +if [ -z "$baseline_core_root_directory" ]; then + use_baseline_core_run=false +fi + +payload_directory=$source_directory/Payload +performance_directory=$payload_directory/performance +workitem_directory=$source_directory/workitem +extra_benchmark_dotnet_arguments="--iterationCount 1 --warmupCount 0 --invocationCount 1 --unrollFactor 1 --strategy ColdStart --stopOnFirstError true" +perflab_arguments= +queue=Ubuntu.1804.Amd64.Open +creator=$BUILD_DEFINITIONNAME +helix_source_prefix="pr" + +if [[ "$compare" == true ]]; then + extra_benchmark_dotnet_arguments= + perflab_arguments= + + # No open queues for arm64 + if [[ "$architecture" = "arm64" ]]; then + echo "Compare not available for arm64" + exit 1 + fi + + queue=Ubuntu.1804.Amd64.Tiger.Perf.Open +fi + +if [[ "$internal" == true ]]; then + perflab_arguments="--upload-to-perflab-container" + helix_source_prefix="official" + creator= + extra_benchmark_dotnet_arguments= + + if [[ "$architecture" = "arm64" ]]; then + queue=Ubuntu.1804.Arm64.Perf + else + queue=Ubuntu.1804.Amd64.Tiger.Perf + fi +fi + +if [[ "$mono_dotnet" != "" ]] && [[ "$monointerpreter" == "false" ]]; then + configurations="$configurations LLVM=$llvm MonoInterpreter=$monointerpreter MonoAOT=$monoaot" + extra_benchmark_dotnet_arguments="$extra_benchmark_dotnet_arguments --category-exclusion-filter NoMono" +fi + +if [[ "$wasm_runtime_loc" != "" ]]; then + configurations="CompilationMode=wasm RunKind=$kind" + extra_benchmark_dotnet_arguments="$extra_benchmark_dotnet_arguments --category-exclusion-filter NoInterpreter NoWASM NoMono" +fi + +if [[ "$mono_dotnet" != "" ]] && [[ "$monointerpreter" == "true" ]]; then + extra_benchmark_dotnet_arguments="$extra_benchmark_dotnet_arguments --category-exclusion-filter NoInterpreter NoMono" +fi + +common_setup_arguments="--channel master --queue $queue --build-number $build_number --build-configs $configurations --architecture $architecture" +setup_arguments="--repository https://github.com/$repository --branch $branch --get-perf-hash --commit-sha $commit_sha $common_setup_arguments" + + +if [[ "$use_latest_dotnet" = false ]]; then + # Get the tools section from the global.json. + # This grabs the LKG version number of dotnet and passes it to our scripts + dotnet_version=`cat global.json | python3 -c 'import json,sys;obj=json.load(sys.stdin);print(obj["tools"]["dotnet"])'` + setup_arguments="--dotnet-versions $dotnet_version $setup_arguments" +fi + +if [[ "$run_from_perf_repo" = true ]]; then + payload_directory= + workitem_directory=$source_directory + performance_directory=$workitem_directory + setup_arguments="--perf-hash $commit_sha $common_setup_arguments" +else + git clone --branch master --depth 1 --quiet https://github.com/dotnet/performance $performance_directory + + docs_directory=$performance_directory/docs + mv $docs_directory $workitem_directory +fi + +if [[ "$wasm_runtime_loc" != "" ]]; then + using_wasm=true + wasm_dotnet_path=$payload_directory/dotnet-wasm + mv $wasm_runtime_loc $wasm_dotnet_path + extra_benchmark_dotnet_arguments="$extra_benchmark_dotnet_arguments --wasmMainJS \$HELIX_CORRELATION_PAYLOAD/dotnet-wasm/runtime-test.js --wasmEngine /home/helixbot/.jsvu/v8 --customRuntimePack \$HELIX_CORRELATION_PAYLOAD/dotnet-wasm" +fi + +if [[ "$mono_dotnet" != "" ]]; then + using_mono=true + mono_dotnet_path=$payload_directory/dotnet-mono + mv $mono_dotnet $mono_dotnet_path +fi + +if [[ "$use_core_run" = true ]]; then + new_core_root=$payload_directory/Core_Root + mv $core_root_directory $new_core_root +fi + +if [[ "$use_baseline_core_run" = true ]]; then + new_baseline_core_root=$payload_directory/Baseline_Core_Root + mv $baseline_core_root_directory $new_baseline_core_root +fi + +ci=true + +_script_dir=$(pwd)/eng/common +. "$_script_dir/pipeline-logging-functions.sh" + +# Make sure all of our variables are available for future steps +Write-PipelineSetVariable -name "UseCoreRun" -value "$use_core_run" -is_multi_job_variable false +Write-PipelineSetVariable -name "UseBaselineCoreRun" -value "$use_baseline_core_run" -is_multi_job_variable false +Write-PipelineSetVariable -name "Architecture" -value "$architecture" -is_multi_job_variable false +Write-PipelineSetVariable -name "PayloadDirectory" -value "$payload_directory" -is_multi_job_variable false +Write-PipelineSetVariable -name "PerformanceDirectory" -value "$performance_directory" -is_multi_job_variable false +Write-PipelineSetVariable -name "WorkItemDirectory" -value "$workitem_directory" -is_multi_job_variable false +Write-PipelineSetVariable -name "Queue" -value "$queue" -is_multi_job_variable false +Write-PipelineSetVariable -name "SetupArguments" -value "$setup_arguments" -is_multi_job_variable false +Write-PipelineSetVariable -name "Python" -value "python3" -is_multi_job_variable false +Write-PipelineSetVariable -name "PerfLabArguments" -value "$perflab_arguments" -is_multi_job_variable false +Write-PipelineSetVariable -name "ExtraBenchmarkDotNetArguments" -value "$extra_benchmark_dotnet_arguments" -is_multi_job_variable false +Write-PipelineSetVariable -name "BDNCategories" -value "$run_categories" -is_multi_job_variable false +Write-PipelineSetVariable -name "TargetCsproj" -value "$csproj" -is_multi_job_variable false +Write-PipelineSetVariable -name "RunFromPerfRepo" -value "$run_from_perf_repo" -is_multi_job_variable false +Write-PipelineSetVariable -name "Creator" -value "$creator" -is_multi_job_variable false +Write-PipelineSetVariable -name "HelixSourcePrefix" -value "$helix_source_prefix" -is_multi_job_variable false +Write-PipelineSetVariable -name "Kind" -value "$kind" -is_multi_job_variable false +Write-PipelineSetVariable -name "_BuildConfig" -value "$architecture.$kind.$framework" -is_multi_job_variable false +Write-PipelineSetVariable -name "Compare" -value "$compare" -is_multi_job_variable false +Write-PipelineSetVariable -name "MonoDotnet" -value "$using_mono" -is_multi_job_variable false +Write-PipelineSetVariable -name "WasmDotnet" -value "$using_wasm" -is_multi_job_variable false diff --git a/eng/common/pipeline-logging-functions.ps1 b/eng/common/pipeline-logging-functions.ps1 new file mode 100644 index 0000000000..8484451f3a --- /dev/null +++ b/eng/common/pipeline-logging-functions.ps1 @@ -0,0 +1,242 @@ +# Source for this file was taken from https://github.com/microsoft/azure-pipelines-task-lib/blob/11c9439d4af17e6475d9fe058e6b2e03914d17e6/powershell/VstsTaskSdk/LoggingCommandFunctions.ps1 and modified. + +# NOTE: You should not be calling these method directly as they are likely to change. Instead you should be calling the Write-Pipeline* functions defined in tools.ps1 + +$script:loggingCommandPrefix = '##vso[' +$script:loggingCommandEscapeMappings = @( # TODO: WHAT ABOUT "="? WHAT ABOUT "%"? + New-Object psobject -Property @{ Token = ';' ; Replacement = '%3B' } + New-Object psobject -Property @{ Token = "`r" ; Replacement = '%0D' } + New-Object psobject -Property @{ Token = "`n" ; Replacement = '%0A' } + New-Object psobject -Property @{ Token = "]" ; Replacement = '%5D' } +) +# TODO: BUG: Escape % ??? +# TODO: Add test to verify don't need to escape "=". + +# Specify "-Force" to force pipeline formatted output even if "$ci" is false or not set +function Write-PipelineTelemetryError { + [CmdletBinding()] + param( + [Parameter(Mandatory = $true)] + [string]$Category, + [Parameter(Mandatory = $true)] + [string]$Message, + [Parameter(Mandatory = $false)] + [string]$Type = 'error', + [string]$ErrCode, + [string]$SourcePath, + [string]$LineNumber, + [string]$ColumnNumber, + [switch]$AsOutput, + [switch]$Force) + + $PSBoundParameters.Remove('Category') | Out-Null + + if($Force -Or ((Test-Path variable:ci) -And $ci)) { + $Message = "(NETCORE_ENGINEERING_TELEMETRY=$Category) $Message" + } + $PSBoundParameters.Remove('Message') | Out-Null + $PSBoundParameters.Add('Message', $Message) + Write-PipelineTaskError @PSBoundParameters +} + +# Specify "-Force" to force pipeline formatted output even if "$ci" is false or not set +function Write-PipelineTaskError { + [CmdletBinding()] + param( + [Parameter(Mandatory = $true)] + [string]$Message, + [Parameter(Mandatory = $false)] + [string]$Type = 'error', + [string]$ErrCode, + [string]$SourcePath, + [string]$LineNumber, + [string]$ColumnNumber, + [switch]$AsOutput, + [switch]$Force + ) + + if(!$Force -And (-Not (Test-Path variable:ci) -Or !$ci)) { + if($Type -eq 'error') { + Write-Host $Message -ForegroundColor Red + return + } + elseif ($Type -eq 'warning') { + Write-Host $Message -ForegroundColor Yellow + return + } + } + + if(($Type -ne 'error') -and ($Type -ne 'warning')) { + Write-Host $Message + return + } + $PSBoundParameters.Remove('Force') | Out-Null + if(-not $PSBoundParameters.ContainsKey('Type')) { + $PSBoundParameters.Add('Type', 'error') + } + Write-LogIssue @PSBoundParameters + } + + function Write-PipelineSetVariable { + [CmdletBinding()] + param( + [Parameter(Mandatory = $true)] + [string]$Name, + [string]$Value, + [switch]$Secret, + [switch]$AsOutput, + [bool]$IsMultiJobVariable=$true) + + if((Test-Path variable:ci) -And $ci) { + Write-LoggingCommand -Area 'task' -Event 'setvariable' -Data $Value -Properties @{ + 'variable' = $Name + 'isSecret' = $Secret + 'isOutput' = $IsMultiJobVariable + } -AsOutput:$AsOutput + } + } + + function Write-PipelinePrependPath { + [CmdletBinding()] + param( + [Parameter(Mandatory=$true)] + [string]$Path, + [switch]$AsOutput) + + if((Test-Path variable:ci) -And $ci) { + Write-LoggingCommand -Area 'task' -Event 'prependpath' -Data $Path -AsOutput:$AsOutput + } + } + +<######################################## +# Private functions. +########################################> +function Format-LoggingCommandData { + [CmdletBinding()] + param([string]$Value, [switch]$Reverse) + + if (!$Value) { + return '' + } + + if (!$Reverse) { + foreach ($mapping in $script:loggingCommandEscapeMappings) { + $Value = $Value.Replace($mapping.Token, $mapping.Replacement) + } + } else { + for ($i = $script:loggingCommandEscapeMappings.Length - 1 ; $i -ge 0 ; $i--) { + $mapping = $script:loggingCommandEscapeMappings[$i] + $Value = $Value.Replace($mapping.Replacement, $mapping.Token) + } + } + + return $Value +} + +function Format-LoggingCommand { + [CmdletBinding()] + param( + [Parameter(Mandatory = $true)] + [string]$Area, + [Parameter(Mandatory = $true)] + [string]$Event, + [string]$Data, + [hashtable]$Properties) + + # Append the preamble. + [System.Text.StringBuilder]$sb = New-Object -TypeName System.Text.StringBuilder + $null = $sb.Append($script:loggingCommandPrefix).Append($Area).Append('.').Append($Event) + + # Append the properties. + if ($Properties) { + $first = $true + foreach ($key in $Properties.Keys) { + [string]$value = Format-LoggingCommandData $Properties[$key] + if ($value) { + if ($first) { + $null = $sb.Append(' ') + $first = $false + } else { + $null = $sb.Append(';') + } + + $null = $sb.Append("$key=$value") + } + } + } + + # Append the tail and output the value. + $Data = Format-LoggingCommandData $Data + $sb.Append(']').Append($Data).ToString() +} + +function Write-LoggingCommand { + [CmdletBinding(DefaultParameterSetName = 'Parameters')] + param( + [Parameter(Mandatory = $true, ParameterSetName = 'Parameters')] + [string]$Area, + [Parameter(Mandatory = $true, ParameterSetName = 'Parameters')] + [string]$Event, + [Parameter(ParameterSetName = 'Parameters')] + [string]$Data, + [Parameter(ParameterSetName = 'Parameters')] + [hashtable]$Properties, + [Parameter(Mandatory = $true, ParameterSetName = 'Object')] + $Command, + [switch]$AsOutput) + + if ($PSCmdlet.ParameterSetName -eq 'Object') { + Write-LoggingCommand -Area $Command.Area -Event $Command.Event -Data $Command.Data -Properties $Command.Properties -AsOutput:$AsOutput + return + } + + $command = Format-LoggingCommand -Area $Area -Event $Event -Data $Data -Properties $Properties + if ($AsOutput) { + $command + } else { + Write-Host $command + } +} + +function Write-LogIssue { + [CmdletBinding()] + param( + [ValidateSet('warning', 'error')] + [Parameter(Mandatory = $true)] + [string]$Type, + [string]$Message, + [string]$ErrCode, + [string]$SourcePath, + [string]$LineNumber, + [string]$ColumnNumber, + [switch]$AsOutput) + + $command = Format-LoggingCommand -Area 'task' -Event 'logissue' -Data $Message -Properties @{ + 'type' = $Type + 'code' = $ErrCode + 'sourcepath' = $SourcePath + 'linenumber' = $LineNumber + 'columnnumber' = $ColumnNumber + } + if ($AsOutput) { + return $command + } + + if ($Type -eq 'error') { + $foregroundColor = $host.PrivateData.ErrorForegroundColor + $backgroundColor = $host.PrivateData.ErrorBackgroundColor + if ($foregroundColor -isnot [System.ConsoleColor] -or $backgroundColor -isnot [System.ConsoleColor]) { + $foregroundColor = [System.ConsoleColor]::Red + $backgroundColor = [System.ConsoleColor]::Black + } + } else { + $foregroundColor = $host.PrivateData.WarningForegroundColor + $backgroundColor = $host.PrivateData.WarningBackgroundColor + if ($foregroundColor -isnot [System.ConsoleColor] -or $backgroundColor -isnot [System.ConsoleColor]) { + $foregroundColor = [System.ConsoleColor]::Yellow + $backgroundColor = [System.ConsoleColor]::Black + } + } + + Write-Host $command -ForegroundColor $foregroundColor -BackgroundColor $backgroundColor +} diff --git a/eng/common/pipeline-logging-functions.sh b/eng/common/pipeline-logging-functions.sh new file mode 100755 index 0000000000..6cd0a3400e --- /dev/null +++ b/eng/common/pipeline-logging-functions.sh @@ -0,0 +1,182 @@ +#!/usr/bin/env bash + +function Write-PipelineTelemetryError { + local telemetry_category='' + local force=false + local function_args=() + local message='' + while [[ $# -gt 0 ]]; do + opt="$(echo "${1/#--/-}" | awk '{print tolower($0)}')" + case "$opt" in + -category|-c) + telemetry_category=$2 + shift + ;; + -force|-f) + force=true + ;; + -*) + function_args+=("$1 $2") + shift + ;; + *) + message=$* + ;; + esac + shift + done + + if [[ $force != true ]] && [[ "$ci" != true ]]; then + echo "$message" >&2 + return + fi + + if [[ $force == true ]]; then + function_args+=("-force") + fi + message="(NETCORE_ENGINEERING_TELEMETRY=$telemetry_category) $message" + function_args+=("$message") + Write-PipelineTaskError ${function_args[@]} +} + +function Write-PipelineTaskError { + local message_type="error" + local sourcepath='' + local linenumber='' + local columnnumber='' + local error_code='' + local force=false + + while [[ $# -gt 0 ]]; do + opt="$(echo "${1/#--/-}" | awk '{print tolower($0)}')" + case "$opt" in + -type|-t) + message_type=$2 + shift + ;; + -sourcepath|-s) + sourcepath=$2 + shift + ;; + -linenumber|-ln) + linenumber=$2 + shift + ;; + -columnnumber|-cn) + columnnumber=$2 + shift + ;; + -errcode|-e) + error_code=$2 + shift + ;; + -force|-f) + force=true + ;; + *) + break + ;; + esac + + shift + done + + if [[ $force != true ]] && [[ "$ci" != true ]]; then + echo "$@" >&2 + return + fi + + local message="##vso[task.logissue" + + message="$message type=$message_type" + + if [ -n "$sourcepath" ]; then + message="$message;sourcepath=$sourcepath" + fi + + if [ -n "$linenumber" ]; then + message="$message;linenumber=$linenumber" + fi + + if [ -n "$columnnumber" ]; then + message="$message;columnnumber=$columnnumber" + fi + + if [ -n "$error_code" ]; then + message="$message;code=$error_code" + fi + + message="$message]$*" + echo "$message" +} + +function Write-PipelineSetVariable { + if [[ "$ci" != true ]]; then + return + fi + + local name='' + local value='' + local secret=false + local as_output=false + local is_multi_job_variable=true + + while [[ $# -gt 0 ]]; do + opt="$(echo "${1/#--/-}" | awk '{print tolower($0)}')" + case "$opt" in + -name|-n) + name=$2 + shift + ;; + -value|-v) + value=$2 + shift + ;; + -secret|-s) + secret=true + ;; + -as_output|-a) + as_output=true + ;; + -is_multi_job_variable|-i) + is_multi_job_variable=$2 + shift + ;; + esac + shift + done + + value=${value/;/%3B} + value=${value/\\r/%0D} + value=${value/\\n/%0A} + value=${value/]/%5D} + + local message="##vso[task.setvariable variable=$name;isSecret=$secret;isOutput=$is_multi_job_variable]$value" + + if [[ "$as_output" == true ]]; then + $message + else + echo "$message" + fi +} + +function Write-PipelinePrependPath { + local prepend_path='' + + while [[ $# -gt 0 ]]; do + opt="$(echo "${1/#--/-}" | awk '{print tolower($0)}')" + case "$opt" in + -path|-p) + prepend_path=$2 + shift + ;; + esac + shift + done + + export PATH="$prepend_path:$PATH" + + if [[ "$ci" == true ]]; then + echo "##vso[task.prependpath]$prepend_path" + fi +} \ No newline at end of file diff --git a/eng/common/post-build/add-build-to-channel.ps1 b/eng/common/post-build/add-build-to-channel.ps1 new file mode 100644 index 0000000000..de2d957922 --- /dev/null +++ b/eng/common/post-build/add-build-to-channel.ps1 @@ -0,0 +1,48 @@ +param( + [Parameter(Mandatory=$true)][int] $BuildId, + [Parameter(Mandatory=$true)][int] $ChannelId, + [Parameter(Mandatory=$true)][string] $MaestroApiAccessToken, + [Parameter(Mandatory=$false)][string] $MaestroApiEndPoint = 'https://maestro-prod.westus2.cloudapp.azure.com', + [Parameter(Mandatory=$false)][string] $MaestroApiVersion = '2019-01-16' +) + +try { + . $PSScriptRoot\post-build-utils.ps1 + + # Check that the channel we are going to promote the build to exist + $channelInfo = Get-MaestroChannel -ChannelId $ChannelId + + if (!$channelInfo) { + Write-PipelineTelemetryCategory -Category 'PromoteBuild' -Message "Channel with BAR ID $ChannelId was not found in BAR!" + ExitWithExitCode 1 + } + + # Get info about which channel(s) the build has already been promoted to + $buildInfo = Get-MaestroBuild -BuildId $BuildId + + if (!$buildInfo) { + Write-PipelineTelemetryError -Category 'PromoteBuild' -Message "Build with BAR ID $BuildId was not found in BAR!" + ExitWithExitCode 1 + } + + # Find whether the build is already assigned to the channel or not + if ($buildInfo.channels) { + foreach ($channel in $buildInfo.channels) { + if ($channel.Id -eq $ChannelId) { + Write-Host "The build with BAR ID $BuildId is already on channel $ChannelId!" + ExitWithExitCode 0 + } + } + } + + Write-Host "Promoting build '$BuildId' to channel '$ChannelId'." + + Assign-BuildToChannel -BuildId $BuildId -ChannelId $ChannelId + + Write-Host 'done.' +} +catch { + Write-Host $_ + Write-PipelineTelemetryError -Category 'PromoteBuild' -Message "There was an error while trying to promote build '$BuildId' to channel '$ChannelId'" + ExitWithExitCode 1 +} diff --git a/eng/common/post-build/check-channel-consistency.ps1 b/eng/common/post-build/check-channel-consistency.ps1 new file mode 100644 index 0000000000..63f3464c98 --- /dev/null +++ b/eng/common/post-build/check-channel-consistency.ps1 @@ -0,0 +1,40 @@ +param( + [Parameter(Mandatory=$true)][string] $PromoteToChannels, # List of channels that the build should be promoted to + [Parameter(Mandatory=$true)][array] $AvailableChannelIds # List of channel IDs available in the YAML implementation +) + +try { + . $PSScriptRoot\post-build-utils.ps1 + + if ($PromoteToChannels -eq "") { + Write-PipelineTaskError -Type 'warning' -Message "This build won't publish assets as it's not configured to any Maestro channel. If that wasn't intended use Darc to configure a default channel using add-default-channel for this branch or to promote it to a channel using add-build-to-channel. See https://github.com/dotnet/arcade/blob/master/Documentation/Darc.md#assigning-an-individual-build-to-a-channel for more info." + ExitWithExitCode 0 + } + + # Check that every channel that Maestro told to promote the build to + # is available in YAML + $PromoteToChannelsIds = $PromoteToChannels -split "\D" | Where-Object { $_ } + + $hasErrors = $false + + foreach ($id in $PromoteToChannelsIds) { + if (($id -ne 0) -and ($id -notin $AvailableChannelIds)) { + Write-PipelineTaskError -Message "Channel $id is not present in the post-build YAML configuration! This is an error scenario. Please contact @dnceng." + $hasErrors = $true + } + } + + # The `Write-PipelineTaskError` doesn't error the script and we might report several errors + # in the previous lines. The check below makes sure that we return an error state from the + # script if we reported any validation error + if ($hasErrors) { + ExitWithExitCode 1 + } + + Write-Host 'done.' +} +catch { + Write-Host $_ + Write-PipelineTelemetryError -Category 'CheckChannelConsistency' -Message "There was an error while trying to check consistency of Maestro default channels for the build and post-build YAML configuration." + ExitWithExitCode 1 +} diff --git a/eng/common/post-build/nuget-validation.ps1 b/eng/common/post-build/nuget-validation.ps1 new file mode 100644 index 0000000000..dab3534ab5 --- /dev/null +++ b/eng/common/post-build/nuget-validation.ps1 @@ -0,0 +1,24 @@ +# This script validates NuGet package metadata information using this +# tool: https://github.com/NuGet/NuGetGallery/tree/jver-verify/src/VerifyMicrosoftPackage + +param( + [Parameter(Mandatory=$true)][string] $PackagesPath, # Path to where the packages to be validated are + [Parameter(Mandatory=$true)][string] $ToolDestinationPath # Where the validation tool should be downloaded to +) + +try { + . $PSScriptRoot\post-build-utils.ps1 + + $url = 'https://raw.githubusercontent.com/NuGet/NuGetGallery/3e25ad135146676bcab0050a516939d9958bfa5d/src/VerifyMicrosoftPackage/verify.ps1' + + New-Item -ItemType 'directory' -Path ${ToolDestinationPath} -Force + + Invoke-WebRequest $url -OutFile ${ToolDestinationPath}\verify.ps1 + + & ${ToolDestinationPath}\verify.ps1 ${PackagesPath}\*.nupkg +} +catch { + Write-Host $_.ScriptStackTrace + Write-PipelineTelemetryError -Category 'NuGetValidation' -Message $_ + ExitWithExitCode 1 +} diff --git a/eng/common/post-build/post-build-utils.ps1 b/eng/common/post-build/post-build-utils.ps1 new file mode 100644 index 0000000000..7d49744795 --- /dev/null +++ b/eng/common/post-build/post-build-utils.ps1 @@ -0,0 +1,91 @@ +# Most of the functions in this file require the variables `MaestroApiEndPoint`, +# `MaestroApiVersion` and `MaestroApiAccessToken` to be globally available. + +$ErrorActionPreference = 'Stop' +Set-StrictMode -Version 2.0 + +# `tools.ps1` checks $ci to perform some actions. Since the post-build +# scripts don't necessarily execute in the same agent that run the +# build.ps1/sh script this variable isn't automatically set. +$ci = $true +$disableConfigureToolsetImport = $true +. $PSScriptRoot\..\tools.ps1 + +function Create-MaestroApiRequestHeaders([string]$ContentType = 'application/json') { + Validate-MaestroVars + + $headers = New-Object 'System.Collections.Generic.Dictionary[[String],[String]]' + $headers.Add('Accept', $ContentType) + $headers.Add('Authorization',"Bearer $MaestroApiAccessToken") + return $headers +} + +function Get-MaestroChannel([int]$ChannelId) { + Validate-MaestroVars + + $apiHeaders = Create-MaestroApiRequestHeaders + $apiEndpoint = "$MaestroApiEndPoint/api/channels/${ChannelId}?api-version=$MaestroApiVersion" + + $result = try { Invoke-WebRequest -Method Get -Uri $apiEndpoint -Headers $apiHeaders | ConvertFrom-Json } catch { Write-Host "Error: $_" } + return $result +} + +function Get-MaestroBuild([int]$BuildId) { + Validate-MaestroVars + + $apiHeaders = Create-MaestroApiRequestHeaders -AuthToken $MaestroApiAccessToken + $apiEndpoint = "$MaestroApiEndPoint/api/builds/${BuildId}?api-version=$MaestroApiVersion" + + $result = try { return Invoke-WebRequest -Method Get -Uri $apiEndpoint -Headers $apiHeaders | ConvertFrom-Json } catch { Write-Host "Error: $_" } + return $result +} + +function Get-MaestroSubscriptions([string]$SourceRepository, [int]$ChannelId) { + Validate-MaestroVars + + $SourceRepository = [System.Web.HttpUtility]::UrlEncode($SourceRepository) + $apiHeaders = Create-MaestroApiRequestHeaders -AuthToken $MaestroApiAccessToken + $apiEndpoint = "$MaestroApiEndPoint/api/subscriptions?sourceRepository=$SourceRepository&channelId=$ChannelId&api-version=$MaestroApiVersion" + + $result = try { Invoke-WebRequest -Method Get -Uri $apiEndpoint -Headers $apiHeaders | ConvertFrom-Json } catch { Write-Host "Error: $_" } + return $result +} + +function Assign-BuildToChannel([int]$BuildId, [int]$ChannelId) { + Validate-MaestroVars + + $apiHeaders = Create-MaestroApiRequestHeaders -AuthToken $MaestroApiAccessToken + $apiEndpoint = "$MaestroApiEndPoint/api/channels/${ChannelId}/builds/${BuildId}?api-version=$MaestroApiVersion" + Invoke-WebRequest -Method Post -Uri $apiEndpoint -Headers $apiHeaders | Out-Null +} + +function Trigger-Subscription([string]$SubscriptionId) { + Validate-MaestroVars + + $apiHeaders = Create-MaestroApiRequestHeaders -AuthToken $MaestroApiAccessToken + $apiEndpoint = "$MaestroApiEndPoint/api/subscriptions/$SubscriptionId/trigger?api-version=$MaestroApiVersion" + Invoke-WebRequest -Uri $apiEndpoint -Headers $apiHeaders -Method Post | Out-Null +} + +function Validate-MaestroVars { + try { + Get-Variable MaestroApiEndPoint -Scope Global | Out-Null + Get-Variable MaestroApiVersion -Scope Global | Out-Null + Get-Variable MaestroApiAccessToken -Scope Global | Out-Null + + if (!($MaestroApiEndPoint -Match '^http[s]?://maestro-(int|prod).westus2.cloudapp.azure.com$')) { + Write-PipelineTelemetryError -Category 'MaestroVars' -Message "MaestroApiEndPoint is not a valid Maestro URL. '$MaestroApiEndPoint'" + ExitWithExitCode 1 + } + + if (!($MaestroApiVersion -Match '^[0-9]{4}-[0-9]{2}-[0-9]{2}$')) { + Write-PipelineTelemetryError -Category 'MaestroVars' -Message "MaestroApiVersion does not match a version string in the format yyyy-MM-DD. '$MaestroApiVersion'" + ExitWithExitCode 1 + } + } + catch { + Write-PipelineTelemetryError -Category 'MaestroVars' -Message 'Error: Variables `MaestroApiEndPoint`, `MaestroApiVersion` and `MaestroApiAccessToken` are required while using this script.' + Write-Host $_ + ExitWithExitCode 1 + } +} diff --git a/eng/common/post-build/publish-using-darc.ps1 b/eng/common/post-build/publish-using-darc.ps1 new file mode 100644 index 0000000000..650b13b089 --- /dev/null +++ b/eng/common/post-build/publish-using-darc.ps1 @@ -0,0 +1,74 @@ +param( + [Parameter(Mandatory=$true)][int] $BuildId, + [Parameter(Mandatory=$true)][int] $PublishingInfraVersion, + [Parameter(Mandatory=$true)][string] $AzdoToken, + [Parameter(Mandatory=$true)][string] $MaestroToken, + [Parameter(Mandatory=$false)][string] $MaestroApiEndPoint = 'https://maestro-prod.westus2.cloudapp.azure.com', + [Parameter(Mandatory=$true)][string] $WaitPublishingFinish, + [Parameter(Mandatory=$false)][string] $EnableSourceLinkValidation, + [Parameter(Mandatory=$false)][string] $EnableSigningValidation, + [Parameter(Mandatory=$false)][string] $EnableNugetValidation, + [Parameter(Mandatory=$false)][string] $PublishInstallersAndChecksums, + [Parameter(Mandatory=$false)][string] $ArtifactsPublishingAdditionalParameters, + [Parameter(Mandatory=$false)][string] $SigningValidationAdditionalParameters +) + +try { + . $PSScriptRoot\post-build-utils.ps1 + # Hard coding darc version till the next arcade-services roll out, cos this version has required API changes for darc add-build-to-channel + $darc = Get-Darc "1.1.0-beta.20418.1" + + $optionalParams = [System.Collections.ArrayList]::new() + + if ("" -ne $ArtifactsPublishingAdditionalParameters) { + $optionalParams.Add("artifact-publishing-parameters") | Out-Null + $optionalParams.Add($ArtifactsPublishingAdditionalParameters) | Out-Null + } + + if ("false" -eq $WaitPublishingFinish) { + $optionalParams.Add("--no-wait") | Out-Null + } + + if ("false" -ne $PublishInstallersAndChecksums) { + $optionalParams.Add("--publish-installers-and-checksums") | Out-Null + } + + if ("true" -eq $EnableNugetValidation) { + $optionalParams.Add("--validate-nuget") | Out-Null + } + + if ("true" -eq $EnableSourceLinkValidation) { + $optionalParams.Add("--validate-sourcelinkchecksums") | Out-Null + } + + if ("true" -eq $EnableSigningValidation) { + $optionalParams.Add("--validate-signingchecksums") | Out-Null + + if ("" -ne $SigningValidationAdditionalParameters) { + $optionalParams.Add("--signing-validation-parameters") | Out-Null + $optionalParams.Add($SigningValidationAdditionalParameters) | Out-Null + } + } + + & $darc add-build-to-channel ` + --id $buildId ` + --publishing-infra-version $PublishingInfraVersion ` + --default-channels ` + --source-branch master ` + --azdev-pat $AzdoToken ` + --bar-uri $MaestroApiEndPoint ` + --password $MaestroToken ` + @optionalParams + + if ($LastExitCode -ne 0) { + Write-Host "Problems using Darc to promote build ${buildId} to default channels. Stopping execution..." + exit 1 + } + + Write-Host 'done.' +} +catch { + Write-Host $_ + Write-PipelineTelemetryError -Category 'PromoteBuild' -Message "There was an error while trying to publish build '$BuildId' to default channels." + ExitWithExitCode 1 +} diff --git a/eng/common/post-build/sourcelink-validation.ps1 b/eng/common/post-build/sourcelink-validation.ps1 new file mode 100644 index 0000000000..c7e7ae67d8 --- /dev/null +++ b/eng/common/post-build/sourcelink-validation.ps1 @@ -0,0 +1,276 @@ +param( + [Parameter(Mandatory=$true)][string] $InputPath, # Full path to directory where Symbols.NuGet packages to be checked are stored + [Parameter(Mandatory=$true)][string] $ExtractPath, # Full path to directory where the packages will be extracted during validation + [Parameter(Mandatory=$false)][string] $GHRepoName, # GitHub name of the repo including the Org. E.g., dotnet/arcade + [Parameter(Mandatory=$false)][string] $GHCommit, # GitHub commit SHA used to build the packages + [Parameter(Mandatory=$true)][string] $SourcelinkCliVersion # Version of SourceLink CLI to use +) + +. $PSScriptRoot\post-build-utils.ps1 + +# Cache/HashMap (File -> Exist flag) used to consult whether a file exist +# in the repository at a specific commit point. This is populated by inserting +# all files present in the repo at a specific commit point. +$global:RepoFiles = @{} + +# Maximum number of jobs to run in parallel +$MaxParallelJobs = 6 + +# Wait time between check for system load +$SecondsBetweenLoadChecks = 10 + +$ValidatePackage = { + param( + [string] $PackagePath # Full path to a Symbols.NuGet package + ) + + . $using:PSScriptRoot\..\tools.ps1 + + # Ensure input file exist + if (!(Test-Path $PackagePath)) { + Write-Host "Input file does not exist: $PackagePath" + return 1 + } + + # Extensions for which we'll look for SourceLink information + # For now we'll only care about Portable & Embedded PDBs + $RelevantExtensions = @('.dll', '.exe', '.pdb') + + Write-Host -NoNewLine 'Validating ' ([System.IO.Path]::GetFileName($PackagePath)) '...' + + $PackageId = [System.IO.Path]::GetFileNameWithoutExtension($PackagePath) + $ExtractPath = Join-Path -Path $using:ExtractPath -ChildPath $PackageId + $FailedFiles = 0 + + Add-Type -AssemblyName System.IO.Compression.FileSystem + + [System.IO.Directory]::CreateDirectory($ExtractPath) | Out-Null + + try { + $zip = [System.IO.Compression.ZipFile]::OpenRead($PackagePath) + + $zip.Entries | + Where-Object {$RelevantExtensions -contains [System.IO.Path]::GetExtension($_.Name)} | + ForEach-Object { + $FileName = $_.FullName + $Extension = [System.IO.Path]::GetExtension($_.Name) + $FakeName = -Join((New-Guid), $Extension) + $TargetFile = Join-Path -Path $ExtractPath -ChildPath $FakeName + + # We ignore resource DLLs + if ($FileName.EndsWith('.resources.dll')) { + return + } + + [System.IO.Compression.ZipFileExtensions]::ExtractToFile($_, $TargetFile, $true) + + $ValidateFile = { + param( + [string] $FullPath, # Full path to the module that has to be checked + [string] $RealPath, + [ref] $FailedFiles + ) + + $sourcelinkExe = "$env:USERPROFILE\.dotnet\tools" + $sourcelinkExe = Resolve-Path "$sourcelinkExe\sourcelink.exe" + $SourceLinkInfos = & $sourcelinkExe print-urls $FullPath | Out-String + + if ($LASTEXITCODE -eq 0 -and -not ([string]::IsNullOrEmpty($SourceLinkInfos))) { + $NumFailedLinks = 0 + + # We only care about Http addresses + $Matches = (Select-String '(http[s]?)(:\/\/)([^\s,]+)' -Input $SourceLinkInfos -AllMatches).Matches + + if ($Matches.Count -ne 0) { + $Matches.Value | + ForEach-Object { + $Link = $_ + $CommitUrl = "https://raw.githubusercontent.com/${using:GHRepoName}/${using:GHCommit}/" + + $FilePath = $Link.Replace($CommitUrl, "") + $Status = 200 + $Cache = $using:RepoFiles + + if ( !($Cache.ContainsKey($FilePath)) ) { + try { + $Uri = $Link -as [System.URI] + + # Only GitHub links are valid + if ($Uri.AbsoluteURI -ne $null -and ($Uri.Host -match 'github' -or $Uri.Host -match 'githubusercontent')) { + $Status = (Invoke-WebRequest -Uri $Link -UseBasicParsing -Method HEAD -TimeoutSec 5).StatusCode + } + else { + $Status = 0 + } + } + catch { + write-host $_ + $Status = 0 + } + } + + if ($Status -ne 200) { + if ($NumFailedLinks -eq 0) { + if ($FailedFiles.Value -eq 0) { + Write-Host + } + + Write-Host "`tFile $RealPath has broken links:" + } + + Write-Host "`t`tFailed to retrieve $Link" + + $NumFailedLinks++ + } + } + } + + if ($NumFailedLinks -ne 0) { + $FailedFiles.value++ + $global:LASTEXITCODE = 1 + } + } + } + + &$ValidateFile $TargetFile $FileName ([ref]$FailedFiles) + } + } + catch { + + } + finally { + $zip.Dispose() + } + + if ($FailedFiles -eq 0) { + Write-Host 'Passed.' + return [pscustomobject]@{ + result = 0 + packagePath = $PackagePath + } + } + else { + Write-PipelineTelemetryError -Category 'SourceLink' -Message "$PackagePath has broken SourceLink links." + return [pscustomobject]@{ + result = 1 + packagePath = $PackagePath + } + } +} + +function CheckJobResult( + $result, + $packagePath, + [ref]$ValidationFailures) { + if ($jobResult.result -ne '0') { + Write-PipelineTelemetryError -Category 'SourceLink' -Message "$packagePath has broken SourceLink links." + $ValidationFailures.Value++ + } +} + +function ValidateSourceLinkLinks { + if ($GHRepoName -ne '' -and !($GHRepoName -Match '^[^\s\/]+/[^\s\/]+$')) { + if (!($GHRepoName -Match '^[^\s-]+-[^\s]+$')) { + Write-PipelineTelemetryError -Category 'SourceLink' -Message "GHRepoName should be in the format / or -. '$GHRepoName'" + ExitWithExitCode 1 + } + else { + $GHRepoName = $GHRepoName -replace '^([^\s-]+)-([^\s]+)$', '$1/$2'; + } + } + + if ($GHCommit -ne '' -and !($GHCommit -Match '^[0-9a-fA-F]{40}$')) { + Write-PipelineTelemetryError -Category 'SourceLink' -Message "GHCommit should be a 40 chars hexadecimal string. '$GHCommit'" + ExitWithExitCode 1 + } + + if ($GHRepoName -ne '' -and $GHCommit -ne '') { + $RepoTreeURL = -Join('http://api.github.com/repos/', $GHRepoName, '/git/trees/', $GHCommit, '?recursive=1') + $CodeExtensions = @('.cs', '.vb', '.fs', '.fsi', '.fsx', '.fsscript') + + try { + # Retrieve the list of files in the repo at that particular commit point and store them in the RepoFiles hash + $Data = Invoke-WebRequest $RepoTreeURL -UseBasicParsing | ConvertFrom-Json | Select-Object -ExpandProperty tree + + foreach ($file in $Data) { + $Extension = [System.IO.Path]::GetExtension($file.path) + + if ($CodeExtensions.Contains($Extension)) { + $RepoFiles[$file.path] = 1 + } + } + } + catch { + Write-Host "Problems downloading the list of files from the repo. Url used: $RepoTreeURL . Execution will proceed without caching." + } + } + elseif ($GHRepoName -ne '' -or $GHCommit -ne '') { + Write-Host 'For using the http caching mechanism both GHRepoName and GHCommit should be informed.' + } + + if (Test-Path $ExtractPath) { + Remove-Item $ExtractPath -Force -Recurse -ErrorAction SilentlyContinue + } + + $ValidationFailures = 0 + + # Process each NuGet package in parallel + Get-ChildItem "$InputPath\*.symbols.nupkg" | + ForEach-Object { + Start-Job -ScriptBlock $ValidatePackage -ArgumentList $_.FullName | Out-Null + $NumJobs = @(Get-Job -State 'Running').Count + + while ($NumJobs -ge $MaxParallelJobs) { + Write-Host "There are $NumJobs validation jobs running right now. Waiting $SecondsBetweenLoadChecks seconds to check again." + sleep $SecondsBetweenLoadChecks + $NumJobs = @(Get-Job -State 'Running').Count + } + + foreach ($Job in @(Get-Job -State 'Completed')) { + $jobResult = Wait-Job -Id $Job.Id | Receive-Job + CheckJobResult $jobResult.result $jobResult.packagePath ([ref]$ValidationFailures) + Remove-Job -Id $Job.Id + } + } + + foreach ($Job in @(Get-Job)) { + $jobResult = Wait-Job -Id $Job.Id | Receive-Job + if ($jobResult -ne '0') { + $ValidationFailures++ + } + Remove-Job -Id $Job.Id + } + if ($ValidationFailures -gt 0) { + Write-PipelineTelemetryError -Category 'SourceLink' -Message "$ValidationFailures package(s) failed validation." + ExitWithExitCode 1 + } +} + +function InstallSourcelinkCli { + $sourcelinkCliPackageName = 'sourcelink' + + $dotnetRoot = InitializeDotNetCli -install:$true + $dotnet = "$dotnetRoot\dotnet.exe" + $toolList = & "$dotnet" tool list --global + + if (($toolList -like "*$sourcelinkCliPackageName*") -and ($toolList -like "*$sourcelinkCliVersion*")) { + Write-Host "SourceLink CLI version $sourcelinkCliVersion is already installed." + } + else { + Write-Host "Installing SourceLink CLI version $sourcelinkCliVersion..." + Write-Host 'You may need to restart your command window if this is the first dotnet tool you have installed.' + & "$dotnet" tool install $sourcelinkCliPackageName --version $sourcelinkCliVersion --verbosity "minimal" --global + } +} + +try { + InstallSourcelinkCli + + ValidateSourceLinkLinks +} +catch { + Write-Host $_.Exception + Write-Host $_.ScriptStackTrace + Write-PipelineTelemetryError -Category 'SourceLink' -Message $_ + ExitWithExitCode 1 +} diff --git a/eng/common/post-build/symbols-validation.ps1 b/eng/common/post-build/symbols-validation.ps1 new file mode 100644 index 0000000000..fcc6019b49 --- /dev/null +++ b/eng/common/post-build/symbols-validation.ps1 @@ -0,0 +1,268 @@ +param( + [Parameter(Mandatory=$true)][string] $InputPath, # Full path to directory where NuGet packages to be checked are stored + [Parameter(Mandatory=$true)][string] $ExtractPath, # Full path to directory where the packages will be extracted during validation + [Parameter(Mandatory=$true)][string] $DotnetSymbolVersion, # Version of dotnet symbol to use + [Parameter(Mandatory=$false)][switch] $ContinueOnError, # If we should keep checking symbols after an error + [Parameter(Mandatory=$false)][switch] $Clean # Clean extracted symbols directory after checking symbols +) + +# Maximum number of jobs to run in parallel +$MaxParallelJobs = 6 + +# Wait time between check for system load +$SecondsBetweenLoadChecks = 10 + +$CountMissingSymbols = { + param( + [string] $PackagePath # Path to a NuGet package + ) + + . $using:PSScriptRoot\..\tools.ps1 + + Add-Type -AssemblyName System.IO.Compression.FileSystem + + # Ensure input file exist + if (!(Test-Path $PackagePath)) { + Write-PipelineTaskError "Input file does not exist: $PackagePath" + return -2 + } + + # Extensions for which we'll look for symbols + $RelevantExtensions = @('.dll', '.exe', '.so', '.dylib') + + # How many files are missing symbol information + $MissingSymbols = 0 + + $PackageId = [System.IO.Path]::GetFileNameWithoutExtension($PackagePath) + $PackageGuid = New-Guid + $ExtractPath = Join-Path -Path $using:ExtractPath -ChildPath $PackageGuid + $SymbolsPath = Join-Path -Path $ExtractPath -ChildPath 'Symbols' + + try { + [System.IO.Compression.ZipFile]::ExtractToDirectory($PackagePath, $ExtractPath) + } + catch { + Write-Host "Something went wrong extracting $PackagePath" + Write-Host $_ + return [pscustomobject]@{ + result = -1 + packagePath = $PackagePath + } + } + + Get-ChildItem -Recurse $ExtractPath | + Where-Object {$RelevantExtensions -contains $_.Extension} | + ForEach-Object { + $FileName = $_.FullName + if ($FileName -Match '\\ref\\') { + Write-Host "`t Ignoring reference assembly file " $FileName + return + } + + $FirstMatchingSymbolDescriptionOrDefault = { + param( + [string] $FullPath, # Full path to the module that has to be checked + [string] $TargetServerParam, # Parameter to pass to `Symbol Tool` indicating the server to lookup for symbols + [string] $SymbolsPath + ) + + $FileName = [System.IO.Path]::GetFileName($FullPath) + $Extension = [System.IO.Path]::GetExtension($FullPath) + + # Those below are potential symbol files that the `dotnet symbol` might + # return. Which one will be returned depend on the type of file we are + # checking and which type of file was uploaded. + + # The file itself is returned + $SymbolPath = $SymbolsPath + '\' + $FileName + + # PDB file for the module + $PdbPath = $SymbolPath.Replace($Extension, '.pdb') + + # PDB file for R2R module (created by crossgen) + $NGenPdb = $SymbolPath.Replace($Extension, '.ni.pdb') + + # DBG file for a .so library + $SODbg = $SymbolPath.Replace($Extension, '.so.dbg') + + # DWARF file for a .dylib + $DylibDwarf = $SymbolPath.Replace($Extension, '.dylib.dwarf') + + $dotnetSymbolExe = "$env:USERPROFILE\.dotnet\tools" + $dotnetSymbolExe = Resolve-Path "$dotnetSymbolExe\dotnet-symbol.exe" + + & $dotnetSymbolExe --symbols --modules --windows-pdbs $TargetServerParam $FullPath -o $SymbolsPath | Out-Null + + if (Test-Path $PdbPath) { + return 'PDB' + } + elseif (Test-Path $NGenPdb) { + return 'NGen PDB' + } + elseif (Test-Path $SODbg) { + return 'DBG for SO' + } + elseif (Test-Path $DylibDwarf) { + return 'Dwarf for Dylib' + } + elseif (Test-Path $SymbolPath) { + return 'Module' + } + else { + return $null + } + } + + $SymbolsOnMSDL = & $FirstMatchingSymbolDescriptionOrDefault $FileName '--microsoft-symbol-server' $SymbolsPath + $SymbolsOnSymWeb = & $FirstMatchingSymbolDescriptionOrDefault $FileName '--internal-server' $SymbolsPath + + Write-Host -NoNewLine "`t Checking file " $FileName "... " + + if ($SymbolsOnMSDL -ne $null -and $SymbolsOnSymWeb -ne $null) { + Write-Host "Symbols found on MSDL ($SymbolsOnMSDL) and SymWeb ($SymbolsOnSymWeb)" + } + else { + $MissingSymbols++ + + if ($SymbolsOnMSDL -eq $null -and $SymbolsOnSymWeb -eq $null) { + Write-Host 'No symbols found on MSDL or SymWeb!' + } + else { + if ($SymbolsOnMSDL -eq $null) { + Write-Host 'No symbols found on MSDL!' + } + else { + Write-Host 'No symbols found on SymWeb!' + } + } + } + } + + if ($using:Clean) { + Remove-Item $ExtractPath -Recurse -Force + } + + Pop-Location + + return [pscustomobject]@{ + result = $MissingSymbols + packagePath = $PackagePath + } +} + +function CheckJobResult( + $result, + $packagePath, + [ref]$DupedSymbols, + [ref]$TotalFailures) { + if ($result -eq '-1') { + Write-PipelineTelemetryError -Category 'CheckSymbols' -Message "$packagePath has duplicated symbol files" + $DupedSymbols.Value++ + } + elseif ($jobResult.result -ne '0') { + Write-PipelineTelemetryError -Category 'CheckSymbols' -Message "Missing symbols for $result modules in the package $packagePath" + $TotalFailures.Value++ + } +} + +function CheckSymbolsAvailable { + if (Test-Path $ExtractPath) { + Remove-Item $ExtractPath -Force -Recurse -ErrorAction SilentlyContinue + } + + $TotalFailures = 0 + $DupedSymbols = 0 + + Get-ChildItem "$InputPath\*.nupkg" | + ForEach-Object { + $FileName = $_.Name + $FullName = $_.FullName + + # These packages from Arcade-Services include some native libraries that + # our current symbol uploader can't handle. Below is a workaround until + # we get issue: https://github.com/dotnet/arcade/issues/2457 sorted. + if ($FileName -Match 'Microsoft\.DotNet\.Darc\.') { + Write-Host "Ignoring Arcade-services file: $FileName" + Write-Host + return + } + elseif ($FileName -Match 'Microsoft\.DotNet\.Maestro\.Tasks\.') { + Write-Host "Ignoring Arcade-services file: $FileName" + Write-Host + return + } + + Write-Host "Validating $FileName " + + Start-Job -ScriptBlock $CountMissingSymbols -ArgumentList $FullName | Out-Null + + $NumJobs = @(Get-Job -State 'Running').Count + + while ($NumJobs -ge $MaxParallelJobs) { + Write-Host "There are $NumJobs validation jobs running right now. Waiting $SecondsBetweenLoadChecks seconds to check again." + sleep $SecondsBetweenLoadChecks + $NumJobs = @(Get-Job -State 'Running').Count + } + + foreach ($Job in @(Get-Job -State 'Completed')) { + $jobResult = Wait-Job -Id $Job.Id | Receive-Job + CheckJobResult $jobResult.result $jobResult.packagePath ([ref]$DupedSymbols) ([ref]$TotalFailures) + Remove-Job -Id $Job.Id + } + Write-Host + } + + foreach ($Job in @(Get-Job)) { + $jobResult = Wait-Job -Id $Job.Id | Receive-Job + CheckJobResult $jobResult.result $jobResult.packagePath ([ref]$DupedSymbols) ([ref]$TotalFailures) + } + + if ($TotalFailures -gt 0 -or $DupedSymbols -gt 0) { + if ($TotalFailures -gt 0) { + Write-PipelineTelemetryError -Category 'CheckSymbols' -Message "Symbols missing for $TotalFailures packages" + } + + if ($DupedSymbols -gt 0) { + Write-PipelineTelemetryError -Category 'CheckSymbols' -Message "$DupedSymbols packages had duplicated symbol files" + } + + ExitWithExitCode 1 + } + else { + Write-Host "All symbols validated!" + } +} + +function InstallDotnetSymbol { + $dotnetSymbolPackageName = 'dotnet-symbol' + + $dotnetRoot = InitializeDotNetCli -install:$true + $dotnet = "$dotnetRoot\dotnet.exe" + $toolList = & "$dotnet" tool list --global + + if (($toolList -like "*$dotnetSymbolPackageName*") -and ($toolList -like "*$dotnetSymbolVersion*")) { + Write-Host "dotnet-symbol version $dotnetSymbolVersion is already installed." + } + else { + Write-Host "Installing dotnet-symbol version $dotnetSymbolVersion..." + Write-Host 'You may need to restart your command window if this is the first dotnet tool you have installed.' + & "$dotnet" tool install $dotnetSymbolPackageName --version $dotnetSymbolVersion --verbosity "minimal" --global + } +} + +try { + . $PSScriptRoot\post-build-utils.ps1 + + InstallDotnetSymbol + + foreach ($Job in @(Get-Job)) { + Remove-Job -Id $Job.Id + } + + CheckSymbolsAvailable +} +catch { + Write-Host $_.ScriptStackTrace + Write-PipelineTelemetryError -Category 'CheckSymbols' -Message $_ + ExitWithExitCode 1 +} diff --git a/eng/common/post-build/trigger-subscriptions.ps1 b/eng/common/post-build/trigger-subscriptions.ps1 new file mode 100644 index 0000000000..55dea518ac --- /dev/null +++ b/eng/common/post-build/trigger-subscriptions.ps1 @@ -0,0 +1,64 @@ +param( + [Parameter(Mandatory=$true)][string] $SourceRepo, + [Parameter(Mandatory=$true)][int] $ChannelId, + [Parameter(Mandatory=$true)][string] $MaestroApiAccessToken, + [Parameter(Mandatory=$false)][string] $MaestroApiEndPoint = 'https://maestro-prod.westus2.cloudapp.azure.com', + [Parameter(Mandatory=$false)][string] $MaestroApiVersion = '2019-01-16' +) + +try { + . $PSScriptRoot\post-build-utils.ps1 + + # Get all the $SourceRepo subscriptions + $normalizedSourceRepo = $SourceRepo.Replace('dnceng@', '') + $subscriptions = Get-MaestroSubscriptions -SourceRepository $normalizedSourceRepo -ChannelId $ChannelId + + if (!$subscriptions) { + Write-PipelineTelemetryError -Category 'TriggerSubscriptions' -Message "No subscriptions found for source repo '$normalizedSourceRepo' in channel '$ChannelId'" + ExitWithExitCode 0 + } + + $subscriptionsToTrigger = New-Object System.Collections.Generic.List[string] + $failedTriggeredSubscription = $false + + # Get all enabled subscriptions that need dependency flow on 'everyBuild' + foreach ($subscription in $subscriptions) { + if ($subscription.enabled -and $subscription.policy.updateFrequency -like 'everyBuild' -and $subscription.channel.id -eq $ChannelId) { + Write-Host "Should trigger this subscription: ${$subscription.id}" + [void]$subscriptionsToTrigger.Add($subscription.id) + } + } + + foreach ($subscriptionToTrigger in $subscriptionsToTrigger) { + try { + Write-Host "Triggering subscription '$subscriptionToTrigger'." + + Trigger-Subscription -SubscriptionId $subscriptionToTrigger + + Write-Host 'done.' + } + catch + { + Write-Host "There was an error while triggering subscription '$subscriptionToTrigger'" + Write-Host $_ + Write-Host $_.ScriptStackTrace + $failedTriggeredSubscription = $true + } + } + + if ($subscriptionsToTrigger.Count -eq 0) { + Write-Host "No subscription matched source repo '$normalizedSourceRepo' and channel ID '$ChannelId'." + } + elseif ($failedTriggeredSubscription) { + Write-PipelineTelemetryError -Category 'TriggerSubscriptions' -Message 'At least one subscription failed to be triggered...' + ExitWithExitCode 1 + } + else { + Write-Host 'All subscriptions were triggered successfully!' + } +} +catch { + Write-Host $_.ScriptStackTrace + Write-PipelineTelemetryError -Category 'TriggerSubscriptions' -Message $_ + ExitWithExitCode 1 +} diff --git a/eng/common/sdk-task.ps1 b/eng/common/sdk-task.ps1 new file mode 100644 index 0000000000..e159c6f184 --- /dev/null +++ b/eng/common/sdk-task.ps1 @@ -0,0 +1,97 @@ +[CmdletBinding(PositionalBinding=$false)] +Param( + [string] $configuration = 'Debug', + [string] $task, + [string] $verbosity = 'minimal', + [string] $msbuildEngine = $null, + [switch] $restore, + [switch] $prepareMachine, + [switch] $help, + [Parameter(ValueFromRemainingArguments=$true)][String[]]$properties +) + +$ci = $true +$binaryLog = $true +$warnAsError = $true + +. $PSScriptRoot\tools.ps1 + +function Print-Usage() { + Write-Host "Common settings:" + Write-Host " -task Name of Arcade task (name of a project in SdkTasks directory of the Arcade SDK package)" + Write-Host " -restore Restore dependencies" + Write-Host " -verbosity Msbuild verbosity: q[uiet], m[inimal], n[ormal], d[etailed], and diag[nostic]" + Write-Host " -help Print help and exit" + Write-Host "" + + Write-Host "Advanced settings:" + Write-Host " -prepareMachine Prepare machine for CI run" + Write-Host " -msbuildEngine Msbuild engine to use to run build ('dotnet', 'vs', or unspecified)." + Write-Host "" + Write-Host "Command line arguments not listed above are passed thru to msbuild." +} + +function Build([string]$target) { + $logSuffix = if ($target -eq 'Execute') { '' } else { ".$target" } + $log = Join-Path $LogDir "$task$logSuffix.binlog" + $outputPath = Join-Path $ToolsetDir "$task\\" + + MSBuild $taskProject ` + /bl:$log ` + /t:$target ` + /p:Configuration=$configuration ` + /p:RepoRoot=$RepoRoot ` + /p:BaseIntermediateOutputPath=$outputPath ` + /v:$verbosity ` + @properties +} + +try { + if ($help -or (($null -ne $properties) -and ($properties.Contains('/help') -or $properties.Contains('/?')))) { + Print-Usage + exit 0 + } + + if ($task -eq "") { + Write-PipelineTelemetryError -Category 'Build' -Message "Missing required parameter '-task '" -ForegroundColor Red + Print-Usage + ExitWithExitCode 1 + } + + if( $msbuildEngine -eq "vs") { + # Ensure desktop MSBuild is available for sdk tasks. + if( -not ($GlobalJson.tools.PSObject.Properties.Name -contains "vs" )) { + $GlobalJson.tools | Add-Member -Name "vs" -Value (ConvertFrom-Json "{ `"version`": `"16.5`" }") -MemberType NoteProperty + } + if( -not ($GlobalJson.tools.PSObject.Properties.Name -match "xcopy-msbuild" )) { + $GlobalJson.tools | Add-Member -Name "xcopy-msbuild" -Value "16.5.0-alpha" -MemberType NoteProperty + } + if ($GlobalJson.tools."xcopy-msbuild".Trim() -ine "none") { + $xcopyMSBuildToolsFolder = InitializeXCopyMSBuild $GlobalJson.tools."xcopy-msbuild" -install $true + } + if ($xcopyMSBuildToolsFolder -eq $null) { + throw 'Unable to get xcopy downloadable version of msbuild' + } + + $global:_MSBuildExe = "$($xcopyMSBuildToolsFolder)\MSBuild\Current\Bin\MSBuild.exe" + } + + $taskProject = GetSdkTaskProject $task + if (!(Test-Path $taskProject)) { + Write-PipelineTelemetryError -Category 'Build' -Message "Unknown task: $task" -ForegroundColor Red + ExitWithExitCode 1 + } + + if ($restore) { + Build 'Restore' + } + + Build 'Execute' +} +catch { + Write-Host $_.ScriptStackTrace + Write-PipelineTelemetryError -Category 'Build' -Message $_ + ExitWithExitCode 1 +} + +ExitWithExitCode 0 diff --git a/eng/common/sdl/NuGet.config b/eng/common/sdl/NuGet.config new file mode 100644 index 0000000000..0c5451c114 --- /dev/null +++ b/eng/common/sdl/NuGet.config @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/eng/common/sdl/execute-all-sdl-tools.ps1 b/eng/common/sdl/execute-all-sdl-tools.ps1 new file mode 100644 index 0000000000..b681d797cd --- /dev/null +++ b/eng/common/sdl/execute-all-sdl-tools.ps1 @@ -0,0 +1,120 @@ +Param( + [string] $GuardianPackageName, # Required: the name of guardian CLI package (not needed if GuardianCliLocation is specified) + [string] $NugetPackageDirectory, # Required: directory where NuGet packages are installed (not needed if GuardianCliLocation is specified) + [string] $GuardianCliLocation, # Optional: Direct location of Guardian CLI executable if GuardianPackageName & NugetPackageDirectory are not specified + [string] $Repository=$env:BUILD_REPOSITORY_NAME, # Required: the name of the repository (e.g. dotnet/arcade) + [string] $BranchName=$env:BUILD_SOURCEBRANCH, # Optional: name of branch or version of gdn settings; defaults to master + [string] $SourceDirectory=$env:BUILD_SOURCESDIRECTORY, # Required: the directory where source files are located + [string] $ArtifactsDirectory = (Join-Path $env:BUILD_ARTIFACTSTAGINGDIRECTORY ('artifacts')), # Required: the directory where build artifacts are located + [string] $AzureDevOpsAccessToken, # Required: access token for dnceng; should be provided via KeyVault + [string[]] $SourceToolsList, # Optional: list of SDL tools to run on source code + [string[]] $ArtifactToolsList, # Optional: list of SDL tools to run on built artifacts + [bool] $TsaPublish=$False, # Optional: true will publish results to TSA; only set to true after onboarding to TSA; TSA is the automated framework used to upload test results as bugs. + [string] $TsaBranchName=$env:BUILD_SOURCEBRANCH, # Optional: required for TSA publish; defaults to $(Build.SourceBranchName); TSA is the automated framework used to upload test results as bugs. + [string] $TsaRepositoryName=$env:BUILD_REPOSITORY_NAME, # Optional: TSA repository name; will be generated automatically if not submitted; TSA is the automated framework used to upload test results as bugs. + [string] $BuildNumber=$env:BUILD_BUILDNUMBER, # Optional: required for TSA publish; defaults to $(Build.BuildNumber) + [bool] $UpdateBaseline=$False, # Optional: if true, will update the baseline in the repository; should only be run after fixing any issues which need to be fixed + [bool] $TsaOnboard=$False, # Optional: if true, will onboard the repository to TSA; should only be run once; TSA is the automated framework used to upload test results as bugs. + [string] $TsaInstanceUrl, # Optional: only needed if TsaOnboard or TsaPublish is true; the instance-url registered with TSA; TSA is the automated framework used to upload test results as bugs. + [string] $TsaCodebaseName, # Optional: only needed if TsaOnboard or TsaPublish is true; the name of the codebase registered with TSA; TSA is the automated framework used to upload test results as bugs. + [string] $TsaProjectName, # Optional: only needed if TsaOnboard or TsaPublish is true; the name of the project registered with TSA; TSA is the automated framework used to upload test results as bugs. + [string] $TsaNotificationEmail, # Optional: only needed if TsaOnboard is true; the email(s) which will receive notifications of TSA bug filings (e.g. alias@microsoft.com); TSA is the automated framework used to upload test results as bugs. + [string] $TsaCodebaseAdmin, # Optional: only needed if TsaOnboard is true; the aliases which are admins of the TSA codebase (e.g. DOMAIN\alias); TSA is the automated framework used to upload test results as bugs. + [string] $TsaBugAreaPath, # Optional: only needed if TsaOnboard is true; the area path where TSA will file bugs in AzDO; TSA is the automated framework used to upload test results as bugs. + [string] $TsaIterationPath, # Optional: only needed if TsaOnboard is true; the iteration path where TSA will file bugs in AzDO; TSA is the automated framework used to upload test results as bugs. + [string] $GuardianLoggerLevel='Standard', # Optional: the logger level for the Guardian CLI; options are Trace, Verbose, Standard, Warning, and Error + [string[]] $CrScanAdditionalRunConfigParams, # Optional: Additional Params to custom build a CredScan run config in the format @("xyz:abc","sdf:1") + [string[]] $PoliCheckAdditionalRunConfigParams, # Optional: Additional Params to custom build a Policheck run config in the format @("xyz:abc","sdf:1") + [bool] $BreakOnFailure=$False # Optional: Fail the build if there were errors during the run +) + +try { + $ErrorActionPreference = 'Stop' + Set-StrictMode -Version 2.0 + $disableConfigureToolsetImport = $true + $LASTEXITCODE = 0 + + # `tools.ps1` checks $ci to perform some actions. Since the SDL + # scripts don't necessarily execute in the same agent that run the + # build.ps1/sh script this variable isn't automatically set. + $ci = $true + . $PSScriptRoot\..\tools.ps1 + + #Replace repo names to the format of org/repo + if (!($Repository.contains('/'))) { + $RepoName = $Repository -replace '(.*?)-(.*)', '$1/$2'; + } + else{ + $RepoName = $Repository; + } + + if ($GuardianPackageName) { + $guardianCliLocation = Join-Path $NugetPackageDirectory (Join-Path $GuardianPackageName (Join-Path 'tools' 'guardian.cmd')) + } else { + $guardianCliLocation = $GuardianCliLocation + } + + $workingDirectory = (Split-Path $SourceDirectory -Parent) + $ValidPath = Test-Path $guardianCliLocation + + if ($ValidPath -eq $False) + { + Write-PipelineTelemetryError -Force -Category 'Sdl' -Message 'Invalid Guardian CLI Location.' + ExitWithExitCode 1 + } + + & $(Join-Path $PSScriptRoot 'init-sdl.ps1') -GuardianCliLocation $guardianCliLocation -Repository $RepoName -BranchName $BranchName -WorkingDirectory $workingDirectory -AzureDevOpsAccessToken $AzureDevOpsAccessToken -GuardianLoggerLevel $GuardianLoggerLevel + $gdnFolder = Join-Path $workingDirectory '.gdn' + + if ($TsaOnboard) { + if ($TsaCodebaseName -and $TsaNotificationEmail -and $TsaCodebaseAdmin -and $TsaBugAreaPath) { + Write-Host "$guardianCliLocation tsa-onboard --codebase-name `"$TsaCodebaseName`" --notification-alias `"$TsaNotificationEmail`" --codebase-admin `"$TsaCodebaseAdmin`" --instance-url `"$TsaInstanceUrl`" --project-name `"$TsaProjectName`" --area-path `"$TsaBugAreaPath`" --iteration-path `"$TsaIterationPath`" --working-directory $workingDirectory --logger-level $GuardianLoggerLevel" + & $guardianCliLocation tsa-onboard --codebase-name "$TsaCodebaseName" --notification-alias "$TsaNotificationEmail" --codebase-admin "$TsaCodebaseAdmin" --instance-url "$TsaInstanceUrl" --project-name "$TsaProjectName" --area-path "$TsaBugAreaPath" --iteration-path "$TsaIterationPath" --working-directory $workingDirectory --logger-level $GuardianLoggerLevel + if ($LASTEXITCODE -ne 0) { + Write-PipelineTelemetryError -Force -Category 'Sdl' -Message "Guardian tsa-onboard failed with exit code $LASTEXITCODE." + ExitWithExitCode $LASTEXITCODE + } + } else { + Write-PipelineTelemetryError -Force -Category 'Sdl' -Message 'Could not onboard to TSA -- not all required values ($TsaCodebaseName, $TsaNotificationEmail, $TsaCodebaseAdmin, $TsaBugAreaPath) were specified.' + ExitWithExitCode 1 + } + } + + if ($ArtifactToolsList -and $ArtifactToolsList.Count -gt 0) { + & $(Join-Path $PSScriptRoot 'run-sdl.ps1') -GuardianCliLocation $guardianCliLocation -WorkingDirectory $workingDirectory -TargetDirectory $ArtifactsDirectory -GdnFolder $gdnFolder -ToolsList $ArtifactToolsList -AzureDevOpsAccessToken $AzureDevOpsAccessToken -UpdateBaseline $UpdateBaseline -GuardianLoggerLevel $GuardianLoggerLevel -CrScanAdditionalRunConfigParams $CrScanAdditionalRunConfigParams -PoliCheckAdditionalRunConfigParams $PoliCheckAdditionalRunConfigParams + } + if ($SourceToolsList -and $SourceToolsList.Count -gt 0) { + & $(Join-Path $PSScriptRoot 'run-sdl.ps1') -GuardianCliLocation $guardianCliLocation -WorkingDirectory $workingDirectory -TargetDirectory $SourceDirectory -GdnFolder $gdnFolder -ToolsList $SourceToolsList -AzureDevOpsAccessToken $AzureDevOpsAccessToken -UpdateBaseline $UpdateBaseline -GuardianLoggerLevel $GuardianLoggerLevel -CrScanAdditionalRunConfigParams $CrScanAdditionalRunConfigParams -PoliCheckAdditionalRunConfigParams $PoliCheckAdditionalRunConfigParams + } + + if ($UpdateBaseline) { + & (Join-Path $PSScriptRoot 'push-gdn.ps1') -Repository $RepoName -BranchName $BranchName -GdnFolder $GdnFolder -AzureDevOpsAccessToken $AzureDevOpsAccessToken -PushReason 'Update baseline' + } + + if ($TsaPublish) { + if ($TsaBranchName -and $BuildNumber) { + if (-not $TsaRepositoryName) { + $TsaRepositoryName = "$($Repository)-$($BranchName)" + } + Write-Host "$guardianCliLocation tsa-publish --all-tools --repository-name `"$TsaRepositoryName`" --branch-name `"$TsaBranchName`" --build-number `"$BuildNumber`" --codebase-name `"$TsaCodebaseName`" --notification-alias `"$TsaNotificationEmail`" --codebase-admin `"$TsaCodebaseAdmin`" --instance-url `"$TsaInstanceUrl`" --project-name `"$TsaProjectName`" --area-path `"$TsaBugAreaPath`" --iteration-path `"$TsaIterationPath`" --working-directory $workingDirectory --logger-level $GuardianLoggerLevel" + & $guardianCliLocation tsa-publish --all-tools --repository-name "$TsaRepositoryName" --branch-name "$TsaBranchName" --build-number "$BuildNumber" --onboard $True --codebase-name "$TsaCodebaseName" --notification-alias "$TsaNotificationEmail" --codebase-admin "$TsaCodebaseAdmin" --instance-url "$TsaInstanceUrl" --project-name "$TsaProjectName" --area-path "$TsaBugAreaPath" --iteration-path "$TsaIterationPath" --working-directory $workingDirectory --logger-level $GuardianLoggerLevel + if ($LASTEXITCODE -ne 0) { + Write-PipelineTelemetryError -Force -Category 'Sdl' -Message "Guardian tsa-publish failed with exit code $LASTEXITCODE." + ExitWithExitCode $LASTEXITCODE + } + } else { + Write-PipelineTelemetryError -Force -Category 'Sdl' -Message 'Could not publish to TSA -- not all required values ($TsaBranchName, $BuildNumber) were specified.' + ExitWithExitCode 1 + } + } + + if ($BreakOnFailure) { + Write-Host "Failing the build in case of breaking results..." + & $guardianCliLocation break + } +} +catch { + Write-Host $_.ScriptStackTrace + Write-PipelineTelemetryError -Force -Category 'Sdl' -Message $_ + exit 1 +} diff --git a/eng/common/sdl/extract-artifact-packages.ps1 b/eng/common/sdl/extract-artifact-packages.ps1 new file mode 100644 index 0000000000..7f28d9c59e --- /dev/null +++ b/eng/common/sdl/extract-artifact-packages.ps1 @@ -0,0 +1,80 @@ +param( + [Parameter(Mandatory=$true)][string] $InputPath, # Full path to directory where artifact packages are stored + [Parameter(Mandatory=$true)][string] $ExtractPath # Full path to directory where the packages will be extracted +) + +$ErrorActionPreference = 'Stop' +Set-StrictMode -Version 2.0 + +$disableConfigureToolsetImport = $true + +function ExtractArtifacts { + if (!(Test-Path $InputPath)) { + Write-Host "Input Path does not exist: $InputPath" + ExitWithExitCode 0 + } + $Jobs = @() + Get-ChildItem "$InputPath\*.nupkg" | + ForEach-Object { + $Jobs += Start-Job -ScriptBlock $ExtractPackage -ArgumentList $_.FullName + } + + foreach ($Job in $Jobs) { + Wait-Job -Id $Job.Id | Receive-Job + } +} + +try { + # `tools.ps1` checks $ci to perform some actions. Since the SDL + # scripts don't necessarily execute in the same agent that run the + # build.ps1/sh script this variable isn't automatically set. + $ci = $true + . $PSScriptRoot\..\tools.ps1 + + $ExtractPackage = { + param( + [string] $PackagePath # Full path to a NuGet package + ) + + if (!(Test-Path $PackagePath)) { + Write-PipelineTelemetryError -Category 'Build' -Message "Input file does not exist: $PackagePath" + ExitWithExitCode 1 + } + + $RelevantExtensions = @('.dll', '.exe', '.pdb') + Write-Host -NoNewLine 'Extracting ' ([System.IO.Path]::GetFileName($PackagePath)) '...' + + $PackageId = [System.IO.Path]::GetFileNameWithoutExtension($PackagePath) + $ExtractPath = Join-Path -Path $using:ExtractPath -ChildPath $PackageId + + Add-Type -AssemblyName System.IO.Compression.FileSystem + + [System.IO.Directory]::CreateDirectory($ExtractPath); + + try { + $zip = [System.IO.Compression.ZipFile]::OpenRead($PackagePath) + + $zip.Entries | + Where-Object {$RelevantExtensions -contains [System.IO.Path]::GetExtension($_.Name)} | + ForEach-Object { + $TargetFile = Join-Path -Path $ExtractPath -ChildPath $_.Name + + [System.IO.Compression.ZipFileExtensions]::ExtractToFile($_, $TargetFile, $true) + } + } + catch { + Write-Host $_ + Write-PipelineTelemetryError -Force -Category 'Sdl' -Message $_ + ExitWithExitCode 1 + } + finally { + $zip.Dispose() + } + } + Measure-Command { ExtractArtifacts } +} +catch { + Write-Host $_ + Write-PipelineTelemetryError -Force -Category 'Sdl' -Message $_ + ExitWithExitCode 1 +} diff --git a/eng/common/sdl/init-sdl.ps1 b/eng/common/sdl/init-sdl.ps1 new file mode 100644 index 0000000000..a68bf0b88e --- /dev/null +++ b/eng/common/sdl/init-sdl.ps1 @@ -0,0 +1,67 @@ +Param( + [string] $GuardianCliLocation, + [string] $Repository, + [string] $BranchName='master', + [string] $WorkingDirectory, + [string] $AzureDevOpsAccessToken, + [string] $GuardianLoggerLevel='Standard' +) + +$ErrorActionPreference = 'Stop' +Set-StrictMode -Version 2.0 +$disableConfigureToolsetImport = $true +$LASTEXITCODE = 0 + +# `tools.ps1` checks $ci to perform some actions. Since the SDL +# scripts don't necessarily execute in the same agent that run the +# build.ps1/sh script this variable isn't automatically set. +$ci = $true +. $PSScriptRoot\..\tools.ps1 + +# Don't display the console progress UI - it's a huge perf hit +$ProgressPreference = 'SilentlyContinue' + +# Construct basic auth from AzDO access token; construct URI to the repository's gdn folder stored in that repository; construct location of zip file +$encodedPat = [Convert]::ToBase64String([System.Text.Encoding]::ASCII.GetBytes(":$AzureDevOpsAccessToken")) +$escapedRepository = [Uri]::EscapeDataString("/$Repository/$BranchName/.gdn") +$uri = "https://dev.azure.com/dnceng/internal/_apis/git/repositories/sdl-tool-cfg/Items?path=$escapedRepository&versionDescriptor[versionOptions]=0&`$format=zip&api-version=5.0" +$zipFile = "$WorkingDirectory/gdn.zip" + +Add-Type -AssemblyName System.IO.Compression.FileSystem +$gdnFolder = (Join-Path $WorkingDirectory '.gdn') +try { + # We try to download the zip; if the request fails (e.g. the file doesn't exist), we catch it and init guardian instead + Write-Host 'Downloading gdn folder from internal config repostiory...' + Invoke-WebRequest -Headers @{ "Accept"="application/zip"; "Authorization"="Basic $encodedPat" } -Uri $uri -OutFile $zipFile + if (Test-Path $gdnFolder) { + # Remove the gdn folder if it exists (it shouldn't unless there's too much caching; this is just in case) + Remove-Item -Force -Recurse $gdnFolder + } + [System.IO.Compression.ZipFile]::ExtractToDirectory($zipFile, $WorkingDirectory) + Write-Host $gdnFolder + ExitWithExitCode 0 +} catch [System.Net.WebException] { } # Catch and ignore webexception +try { + # if the folder does not exist, we'll do a guardian init and push it to the remote repository + Write-Host 'Initializing Guardian...' + Write-Host "$GuardianCliLocation init --working-directory $WorkingDirectory --logger-level $GuardianLoggerLevel" + & $GuardianCliLocation init --working-directory $WorkingDirectory --logger-level $GuardianLoggerLevel + if ($LASTEXITCODE -ne 0) { + Write-PipelineTelemetryError -Force -Category 'Build' -Message "Guardian init failed with exit code $LASTEXITCODE." + ExitWithExitCode $LASTEXITCODE + } + # We create the mainbaseline so it can be edited later + Write-Host "$GuardianCliLocation baseline --working-directory $WorkingDirectory --name mainbaseline" + & $GuardianCliLocation baseline --working-directory $WorkingDirectory --name mainbaseline + if ($LASTEXITCODE -ne 0) { + Write-PipelineTelemetryError -Force -Category 'Build' -Message "Guardian baseline failed with exit code $LASTEXITCODE." + ExitWithExitCode $LASTEXITCODE + } + & $(Join-Path $PSScriptRoot 'push-gdn.ps1') -Repository $Repository -BranchName $BranchName -GdnFolder $gdnFolder -AzureDevOpsAccessToken $AzureDevOpsAccessToken -PushReason 'Initialize gdn folder' + ExitWithExitCode 0 +} +catch { + Write-Host $_.ScriptStackTrace + Write-PipelineTelemetryError -Force -Category 'Sdl' -Message $_ + ExitWithExitCode 1 +} diff --git a/eng/common/sdl/packages.config b/eng/common/sdl/packages.config new file mode 100644 index 0000000000..968b39bef5 --- /dev/null +++ b/eng/common/sdl/packages.config @@ -0,0 +1,4 @@ + + + + diff --git a/eng/common/sdl/push-gdn.ps1 b/eng/common/sdl/push-gdn.ps1 new file mode 100644 index 0000000000..d8fd2d82a6 --- /dev/null +++ b/eng/common/sdl/push-gdn.ps1 @@ -0,0 +1,69 @@ +Param( + [string] $Repository, + [string] $BranchName='master', + [string] $GdnFolder, + [string] $AzureDevOpsAccessToken, + [string] $PushReason +) + +$ErrorActionPreference = 'Stop' +Set-StrictMode -Version 2.0 +$disableConfigureToolsetImport = $true +$LASTEXITCODE = 0 + +try { + # `tools.ps1` checks $ci to perform some actions. Since the SDL + # scripts don't necessarily execute in the same agent that run the + # build.ps1/sh script this variable isn't automatically set. + $ci = $true + . $PSScriptRoot\..\tools.ps1 + + # We create the temp directory where we'll store the sdl-config repository + $sdlDir = Join-Path $env:TEMP 'sdl' + if (Test-Path $sdlDir) { + Remove-Item -Force -Recurse $sdlDir + } + + Write-Host "git clone https://dnceng:`$AzureDevOpsAccessToken@dev.azure.com/dnceng/internal/_git/sdl-tool-cfg $sdlDir" + git clone https://dnceng:$AzureDevOpsAccessToken@dev.azure.com/dnceng/internal/_git/sdl-tool-cfg $sdlDir + if ($LASTEXITCODE -ne 0) { + Write-PipelineTelemetryError -Force -Category 'Sdl' -Message "Git clone failed with exit code $LASTEXITCODE." + ExitWithExitCode $LASTEXITCODE + } + # We copy the .gdn folder from our local run into the git repository so it can be committed + $sdlRepositoryFolder = Join-Path (Join-Path (Join-Path $sdlDir $Repository) $BranchName) '.gdn' + if (Get-Command Robocopy) { + Robocopy /S $GdnFolder $sdlRepositoryFolder + } else { + rsync -r $GdnFolder $sdlRepositoryFolder + } + # cd to the sdl-config directory so we can run git there + Push-Location $sdlDir + # git add . --> git commit --> git push + Write-Host 'git add .' + git add . + if ($LASTEXITCODE -ne 0) { + Write-PipelineTelemetryError -Force -Category 'Sdl' -Message "Git add failed with exit code $LASTEXITCODE." + ExitWithExitCode $LASTEXITCODE + } + Write-Host "git -c user.email=`"dn-bot@microsoft.com`" -c user.name=`"Dotnet Bot`" commit -m `"$PushReason for $Repository/$BranchName`"" + git -c user.email="dn-bot@microsoft.com" -c user.name="Dotnet Bot" commit -m "$PushReason for $Repository/$BranchName" + if ($LASTEXITCODE -ne 0) { + Write-PipelineTelemetryError -Force -Category 'Sdl' -Message "Git commit failed with exit code $LASTEXITCODE." + ExitWithExitCode $LASTEXITCODE + } + Write-Host 'git push' + git push + if ($LASTEXITCODE -ne 0) { + Write-PipelineTelemetryError -Force -Category 'Sdl' -Message "Git push failed with exit code $LASTEXITCODE." + ExitWithExitCode $LASTEXITCODE + } + + # Return to the original directory + Pop-Location +} +catch { + Write-Host $_.ScriptStackTrace + Write-PipelineTelemetryError -Category 'Sdl' -Message $_ + ExitWithExitCode 1 +} diff --git a/eng/common/sdl/run-sdl.ps1 b/eng/common/sdl/run-sdl.ps1 new file mode 100644 index 0000000000..fe95ab35aa --- /dev/null +++ b/eng/common/sdl/run-sdl.ps1 @@ -0,0 +1,73 @@ +Param( + [string] $GuardianCliLocation, + [string] $WorkingDirectory, + [string] $TargetDirectory, + [string] $GdnFolder, + [string[]] $ToolsList, + [string] $UpdateBaseline, + [string] $GuardianLoggerLevel='Standard', + [string[]] $CrScanAdditionalRunConfigParams, + [string[]] $PoliCheckAdditionalRunConfigParams +) + +$ErrorActionPreference = 'Stop' +Set-StrictMode -Version 2.0 +$disableConfigureToolsetImport = $true +$LASTEXITCODE = 0 + +try { + # `tools.ps1` checks $ci to perform some actions. Since the SDL + # scripts don't necessarily execute in the same agent that run the + # build.ps1/sh script this variable isn't automatically set. + $ci = $true + . $PSScriptRoot\..\tools.ps1 + + # We store config files in the r directory of .gdn + Write-Host $ToolsList + $gdnConfigPath = Join-Path $GdnFolder 'r' + $ValidPath = Test-Path $GuardianCliLocation + + if ($ValidPath -eq $False) + { + Write-PipelineTelemetryError -Force -Category 'Sdl' -Message "Invalid Guardian CLI Location." + ExitWithExitCode 1 + } + + $configParam = @('--config') + + foreach ($tool in $ToolsList) { + $gdnConfigFile = Join-Path $gdnConfigPath "$tool-configure.gdnconfig" + Write-Host $tool + # We have to manually configure tools that run on source to look at the source directory only + if ($tool -eq 'credscan') { + Write-Host "$GuardianCliLocation configure --working-directory $WorkingDirectory --tool $tool --output-path $gdnConfigFile --logger-level $GuardianLoggerLevel --noninteractive --force --args `" TargetDirectory < $TargetDirectory `" `" OutputType < pre `" $(If ($CrScanAdditionalRunConfigParams) {$CrScanAdditionalRunConfigParams})" + & $GuardianCliLocation configure --working-directory $WorkingDirectory --tool $tool --output-path $gdnConfigFile --logger-level $GuardianLoggerLevel --noninteractive --force --args " TargetDirectory < $TargetDirectory " "OutputType < pre" $(If ($CrScanAdditionalRunConfigParams) {$CrScanAdditionalRunConfigParams}) + if ($LASTEXITCODE -ne 0) { + Write-PipelineTelemetryError -Force -Category 'Sdl' -Message "Guardian configure for $tool failed with exit code $LASTEXITCODE." + ExitWithExitCode $LASTEXITCODE + } + } + if ($tool -eq 'policheck') { + Write-Host "$GuardianCliLocation configure --working-directory $WorkingDirectory --tool $tool --output-path $gdnConfigFile --logger-level $GuardianLoggerLevel --noninteractive --force --args `" Target < $TargetDirectory `" $(If ($PoliCheckAdditionalRunConfigParams) {$PoliCheckAdditionalRunConfigParams})" + & $GuardianCliLocation configure --working-directory $WorkingDirectory --tool $tool --output-path $gdnConfigFile --logger-level $GuardianLoggerLevel --noninteractive --force --args " Target < $TargetDirectory " $(If ($PoliCheckAdditionalRunConfigParams) {$PoliCheckAdditionalRunConfigParams}) + if ($LASTEXITCODE -ne 0) { + Write-PipelineTelemetryError -Force -Category 'Sdl' -Message "Guardian configure for $tool failed with exit code $LASTEXITCODE." + ExitWithExitCode $LASTEXITCODE + } + } + + $configParam+=$gdnConfigFile + } + + Write-Host "$GuardianCliLocation run --working-directory $WorkingDirectory --baseline mainbaseline --update-baseline $UpdateBaseline --logger-level $GuardianLoggerLevel $configParam" + & $GuardianCliLocation run --working-directory $WorkingDirectory --tool $tool --baseline mainbaseline --update-baseline $UpdateBaseline --logger-level $GuardianLoggerLevel $configParam + if ($LASTEXITCODE -ne 0) { + Write-PipelineTelemetryError -Force -Category 'Sdl' -Message "Guardian run for $ToolsList using $configParam failed with exit code $LASTEXITCODE." + ExitWithExitCode $LASTEXITCODE + } +} +catch { + Write-Host $_.ScriptStackTrace + Write-PipelineTelemetryError -Force -Category 'Sdl' -Message $_ + ExitWithExitCode 1 +} diff --git a/eng/common/templates/job/execute-sdl.yml b/eng/common/templates/job/execute-sdl.yml new file mode 100644 index 0000000000..c64c4f5686 --- /dev/null +++ b/eng/common/templates/job/execute-sdl.yml @@ -0,0 +1,91 @@ +parameters: + enable: 'false' # Whether the SDL validation job should execute or not + overrideParameters: '' # Optional: to override values for parameters. + additionalParameters: '' # Optional: parameters that need user specific values eg: '-SourceToolsList @("abc","def") -ArtifactToolsList @("ghi","jkl")' + # There is some sort of bug (has been reported) in Azure DevOps where if this parameter is named + # 'continueOnError', the parameter value is not correctly picked up. + # This can also be remedied by the caller (post-build.yml) if it does not use a nested parameter + sdlContinueOnError: false # optional: determines whether to continue the build if the step errors; + downloadArtifacts: true # optional: determines if the artifacts should be dowloaded + dependsOn: '' # Optional: dependencies of the job + artifactNames: '' # Optional: patterns supplied to DownloadBuildArtifacts + # Usage: + # artifactNames: + # - 'BlobArtifacts' + # - 'Artifacts_Windows_NT_Release' + +jobs: +- job: Run_SDL + dependsOn: ${{ parameters.dependsOn }} + displayName: Run SDL tool + condition: eq( ${{ parameters.enable }}, 'true') + variables: + - group: DotNet-VSTS-Bot + - name: AzDOProjectName + value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOProjectName'] ] + - name: AzDOPipelineId + value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOPipelineId'] ] + - name: AzDOBuildId + value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOBuildId'] ] + pool: + name: Hosted VS2017 + steps: + - checkout: self + clean: true + - ${{ if ne(parameters.downloadArtifacts, 'false')}}: + - ${{ if ne(parameters.artifactNames, '') }}: + - ${{ each artifactName in parameters.artifactNames }}: + - task: DownloadBuildArtifacts@0 + displayName: Download Build Artifacts + inputs: + buildType: specific + buildVersionToDownload: specific + project: $(AzDOProjectName) + pipeline: $(AzDOPipelineId) + buildId: $(AzDOBuildId) + artifactName: ${{ artifactName }} + downloadPath: $(Build.ArtifactStagingDirectory)\artifacts + - ${{ if eq(parameters.artifactNames, '') }}: + - task: DownloadBuildArtifacts@0 + displayName: Download Build Artifacts + inputs: + buildType: specific + buildVersionToDownload: specific + project: $(AzDOProjectName) + pipeline: $(AzDOPipelineId) + buildId: $(AzDOBuildId) + downloadType: specific files + itemPattern: "**" + downloadPath: $(Build.ArtifactStagingDirectory)\artifacts + - powershell: eng/common/sdl/extract-artifact-packages.ps1 + -InputPath $(Build.ArtifactStagingDirectory)\artifacts\BlobArtifacts + -ExtractPath $(Build.ArtifactStagingDirectory)\artifacts\BlobArtifacts + displayName: Extract Blob Artifacts + continueOnError: ${{ parameters.sdlContinueOnError }} + - powershell: eng/common/sdl/extract-artifact-packages.ps1 + -InputPath $(Build.ArtifactStagingDirectory)\artifacts\PackageArtifacts + -ExtractPath $(Build.ArtifactStagingDirectory)\artifacts\PackageArtifacts + displayName: Extract Package Artifacts + continueOnError: ${{ parameters.sdlContinueOnError }} + - task: NuGetToolInstaller@1 + displayName: 'Install NuGet.exe' + - task: NuGetCommand@2 + displayName: 'Install Guardian' + inputs: + restoreSolution: $(Build.SourcesDirectory)\eng\common\sdl\packages.config + feedsToUse: config + nugetConfigPath: $(Build.SourcesDirectory)\eng\common\sdl\NuGet.config + externalFeedCredentials: GuardianConnect + restoreDirectory: $(Build.SourcesDirectory)\.packages + - ${{ if ne(parameters.overrideParameters, '') }}: + - powershell: eng/common/sdl/execute-all-sdl-tools.ps1 ${{ parameters.overrideParameters }} + displayName: Execute SDL + continueOnError: ${{ parameters.sdlContinueOnError }} + - ${{ if eq(parameters.overrideParameters, '') }}: + - powershell: eng/common/sdl/execute-all-sdl-tools.ps1 + -GuardianPackageName Microsoft.Guardian.Cli.win10-x64.0.20.1 + -NugetPackageDirectory $(Build.SourcesDirectory)\.packages + -AzureDevOpsAccessToken $(dn-bot-dotnet-build-rw-code-rw) + ${{ parameters.additionalParameters }} + displayName: Execute SDL + continueOnError: ${{ parameters.sdlContinueOnError }} diff --git a/eng/common/templates/job/generate-graph-files.yml b/eng/common/templates/job/generate-graph-files.yml new file mode 100644 index 0000000000..e54ce956f9 --- /dev/null +++ b/eng/common/templates/job/generate-graph-files.yml @@ -0,0 +1,48 @@ +parameters: + # Optional: dependencies of the job + dependsOn: '' + + # Optional: A defined YAML pool - https://docs.microsoft.com/en-us/azure/devops/pipelines/yaml-schema?view=vsts&tabs=schema#pool + pool: {} + + # Optional: Include toolset dependencies in the generated graph files + includeToolset: false + +jobs: +- job: Generate_Graph_Files + + dependsOn: ${{ parameters.dependsOn }} + + displayName: Generate Graph Files + + pool: ${{ parameters.pool }} + + variables: + # Publish-Build-Assets provides: MaestroAccessToken, BotAccount-dotnet-maestro-bot-PAT + # DotNet-AllOrgs-Darc-Pats provides: dn-bot-devdiv-dnceng-rw-code-pat + - group: Publish-Build-Assets + - group: DotNet-AllOrgs-Darc-Pats + - name: _GraphArguments + value: -gitHubPat $(BotAccount-dotnet-maestro-bot-PAT) + -azdoPat $(dn-bot-devdiv-dnceng-rw-code-pat) + -barToken $(MaestroAccessToken) + -outputFolder '$(Build.StagingDirectory)/GraphFiles/' + - ${{ if ne(parameters.includeToolset, 'false') }}: + - name: _GraphArguments + value: ${{ variables._GraphArguments }} -includeToolset + + steps: + - task: PowerShell@2 + displayName: Generate Graph Files + inputs: + filePath: eng\common\generate-graph-files.ps1 + arguments: $(_GraphArguments) + continueOnError: true + - task: PublishBuildArtifacts@1 + displayName: Publish Graph to Artifacts + inputs: + PathtoPublish: '$(Build.StagingDirectory)/GraphFiles' + PublishLocation: Container + ArtifactName: GraphFiles + continueOnError: true + condition: always() diff --git a/eng/common/templates/job/job.yml b/eng/common/templates/job/job.yml new file mode 100644 index 0000000000..e78ed9a1c6 --- /dev/null +++ b/eng/common/templates/job/job.yml @@ -0,0 +1,242 @@ +# Internal resources (telemetry, microbuild) can only be accessed from non-public projects, +# and some (Microbuild) should only be applied to non-PR cases for internal builds. + +parameters: +# Job schema parameters - https://docs.microsoft.com/en-us/azure/devops/pipelines/yaml-schema?view=vsts&tabs=schema#job + cancelTimeoutInMinutes: '' + condition: '' + container: '' + continueOnError: false + dependsOn: '' + displayName: '' + pool: '' + steps: [] + strategy: '' + timeoutInMinutes: '' + variables: [] + workspace: '' + +# Job base template specific parameters + # See schema documentation - https://github.com/dotnet/arcade/blob/master/Documentation/AzureDevOps/TemplateSchema.md + artifacts: '' + enableMicrobuild: false + enablePublishBuildArtifacts: false + enablePublishBuildAssets: false + enablePublishTestResults: false + enablePublishUsingPipelines: false + useBuildManifest: false + mergeTestResults: false + testRunTitle: '' + name: '' + preSteps: [] + runAsPublic: false + +jobs: +- job: ${{ parameters.name }} + + ${{ if ne(parameters.cancelTimeoutInMinutes, '') }}: + cancelTimeoutInMinutes: ${{ parameters.cancelTimeoutInMinutes }} + + ${{ if ne(parameters.condition, '') }}: + condition: ${{ parameters.condition }} + + ${{ if ne(parameters.container, '') }}: + container: ${{ parameters.container }} + + ${{ if ne(parameters.continueOnError, '') }}: + continueOnError: ${{ parameters.continueOnError }} + + ${{ if ne(parameters.dependsOn, '') }}: + dependsOn: ${{ parameters.dependsOn }} + + ${{ if ne(parameters.displayName, '') }}: + displayName: ${{ parameters.displayName }} + + ${{ if ne(parameters.pool, '') }}: + pool: ${{ parameters.pool }} + + ${{ if ne(parameters.strategy, '') }}: + strategy: ${{ parameters.strategy }} + + ${{ if ne(parameters.timeoutInMinutes, '') }}: + timeoutInMinutes: ${{ parameters.timeoutInMinutes }} + + variables: + - ${{ if ne(parameters.enableTelemetry, 'false') }}: + - name: DOTNET_CLI_TELEMETRY_PROFILE + value: '$(Build.Repository.Uri)' + - ${{ if eq(parameters.enableRichCodeNavigation, 'true') }}: + - name: EnableRichCodeNavigation + value: 'true' + - ${{ each variable in parameters.variables }}: + # handle name-value variable syntax + # example: + # - name: [key] + # value: [value] + - ${{ if ne(variable.name, '') }}: + - name: ${{ variable.name }} + value: ${{ variable.value }} + + # handle variable groups + - ${{ if ne(variable.group, '') }}: + - group: ${{ variable.group }} + + # handle key-value variable syntax. + # example: + # - [key]: [value] + - ${{ if and(eq(variable.name, ''), eq(variable.group, '')) }}: + - ${{ each pair in variable }}: + - name: ${{ pair.key }} + value: ${{ pair.value }} + + # DotNet-HelixApi-Access provides 'HelixApiAccessToken' for internal builds + - ${{ if and(eq(parameters.enableTelemetry, 'true'), eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: + - group: DotNet-HelixApi-Access + + ${{ if ne(parameters.workspace, '') }}: + workspace: ${{ parameters.workspace }} + + steps: + - ${{ if ne(parameters.preSteps, '') }}: + - ${{ each preStep in parameters.preSteps }}: + - ${{ preStep }} + + - ${{ if and(eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: + - ${{ if eq(parameters.enableMicrobuild, 'true') }}: + - task: MicroBuildSigningPlugin@2 + displayName: Install MicroBuild plugin + inputs: + signType: $(_SignType) + zipSources: false + feedSource: https://dnceng.pkgs.visualstudio.com/_packaging/MicroBuildToolset/nuget/v3/index.json + env: + TeamName: $(_TeamName) + continueOnError: ${{ parameters.continueOnError }} + condition: and(succeeded(), in(variables['_SignType'], 'real', 'test'), eq(variables['Agent.Os'], 'Windows_NT')) + + - task: NuGetAuthenticate@0 + + - ${{ if or(eq(parameters.artifacts.download, 'true'), ne(parameters.artifacts.download, '')) }}: + - task: DownloadPipelineArtifact@2 + inputs: + buildType: current + artifactName: ${{ coalesce(parameters.artifacts.download.name, 'Artifacts_$(Agent.OS)_$(_BuildConfig)') }} + targetPath: ${{ coalesce(parameters.artifacts.download.path, 'artifacts') }} + itemPattern: ${{ coalesce(parameters.artifacts.download.pattern, '**') }} + + - ${{ each step in parameters.steps }}: + - ${{ step }} + + - ${{ if eq(parameters.enableRichCodeNavigation, true) }}: + - task: RichCodeNavIndexer@0 + displayName: RichCodeNav Upload + inputs: + languages: 'csharp' + environment: ${{ coalesce(parameters.richCodeNavigationEnvironment, 'prod') }} + richNavLogOutputDirectory: $(Build.SourcesDirectory)/artifacts/bin + continueOnError: true + + - ${{ if eq(parameters.enableMicrobuild, 'true') }}: + - ${{ if and(eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: + - task: MicroBuildCleanup@1 + displayName: Execute Microbuild cleanup tasks + condition: and(always(), in(variables['_SignType'], 'real', 'test'), eq(variables['Agent.Os'], 'Windows_NT')) + continueOnError: ${{ parameters.continueOnError }} + env: + TeamName: $(_TeamName) + + - ${{ if ne(parameters.artifacts.publish, '') }}: + - ${{ if or(eq(parameters.artifacts.publish.artifacts, 'true'), ne(parameters.artifacts.publish.artifacts, '')) }}: + - task: CopyFiles@2 + displayName: Gather binaries for publish to artifacts + inputs: + SourceFolder: 'artifacts/bin' + Contents: '**' + TargetFolder: '$(Build.ArtifactStagingDirectory)/artifacts/bin' + - task: CopyFiles@2 + displayName: Gather packages for publish to artifacts + inputs: + SourceFolder: 'artifacts/packages' + Contents: '**' + TargetFolder: '$(Build.ArtifactStagingDirectory)/artifacts/packages' + - task: PublishBuildArtifacts@1 + displayName: Publish pipeline artifacts + inputs: + PathtoPublish: '$(Build.ArtifactStagingDirectory)/artifacts' + PublishLocation: Container + ArtifactName: ${{ coalesce(parameters.artifacts.publish.artifacts.name , 'Artifacts_$(Agent.Os)_$(_BuildConfig)') }} + continueOnError: true + condition: always() + - ${{ if or(eq(parameters.artifacts.publish.logs, 'true'), ne(parameters.artifacts.publish.logs, '')) }}: + - publish: artifacts/log + artifact: ${{ coalesce(parameters.artifacts.publish.logs.name, 'Logs_Build_$(Agent.Os)_$(_BuildConfig)') }} + displayName: Publish logs + continueOnError: true + condition: always() + - ${{ if or(eq(parameters.artifacts.publish.manifests, 'true'), ne(parameters.artifacts.publish.manifests, '')) }}: + - ${{ if and(ne(parameters.enablePublishUsingPipelines, 'true'), eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: + - task: CopyFiles@2 + displayName: Gather Asset Manifests + inputs: + SourceFolder: '$(Build.SourcesDirectory)/artifacts/log/$(_BuildConfig)/AssetManifest' + TargetFolder: '$(Build.ArtifactStagingDirectory)/AssetManifests' + continueOnError: ${{ parameters.continueOnError }} + condition: and(succeeded(), eq(variables['_DotNetPublishToBlobFeed'], 'true')) + + - task: PublishBuildArtifacts@1 + displayName: Push Asset Manifests + inputs: + PathtoPublish: '$(Build.ArtifactStagingDirectory)/AssetManifests' + PublishLocation: Container + ArtifactName: AssetManifests + continueOnError: ${{ parameters.continueOnError }} + condition: and(succeeded(), eq(variables['_DotNetPublishToBlobFeed'], 'true')) + + - ${{ if ne(parameters.enablePublishBuildArtifacts, 'false') }}: + - task: PublishBuildArtifacts@1 + displayName: Publish Logs + inputs: + PathtoPublish: '$(Build.SourcesDirectory)/artifacts/log/$(_BuildConfig)' + PublishLocation: Container + ArtifactName: ${{ coalesce(parameters.enablePublishBuildArtifacts.artifactName, '$(Agent.Os)_$(Agent.JobName)' ) }} + continueOnError: true + condition: always() + + - ${{ if eq(parameters.enablePublishTestResults, 'true') }}: + - task: PublishTestResults@2 + displayName: Publish Test Results + inputs: + testResultsFormat: 'xUnit' + testResultsFiles: '*.xml' + searchFolder: '$(Build.SourcesDirectory)/artifacts/TestResults/$(_BuildConfig)' + testRunTitle: ${{ coalesce(parameters.testRunTitle, parameters.name, '$(System.JobName)') }}-xunit + mergeTestResults: ${{ parameters.mergeTestResults }} + continueOnError: true + condition: always() + + - ${{ if and(eq(parameters.enablePublishBuildAssets, true), ne(parameters.enablePublishUsingPipelines, 'true'), eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: + - task: CopyFiles@2 + displayName: Gather Asset Manifests + inputs: + SourceFolder: '$(Build.SourcesDirectory)/artifacts/log/$(_BuildConfig)/AssetManifest' + TargetFolder: '$(Build.StagingDirectory)/AssetManifests' + continueOnError: ${{ parameters.continueOnError }} + condition: and(succeeded(), eq(variables['_DotNetPublishToBlobFeed'], 'true')) + + - task: PublishBuildArtifacts@1 + displayName: Push Asset Manifests + inputs: + PathtoPublish: '$(Build.StagingDirectory)/AssetManifests' + PublishLocation: Container + ArtifactName: AssetManifests + continueOnError: ${{ parameters.continueOnError }} + condition: and(succeeded(), eq(variables['_DotNetPublishToBlobFeed'], 'true')) + + - ${{ if eq(parameters.useBuildManifest, true) }}: + - task: PublishBuildArtifacts@1 + displayName: Publish Build Manifest + inputs: + PathToPublish: '$(Build.SourcesDirectory)/artifacts/log/$(_BuildConfig)/manifest.props' + PublishLocation: Container + ArtifactName: BuildManifests + continueOnError: ${{ parameters.continueOnError }} diff --git a/eng/common/templates/job/performance.yml b/eng/common/templates/job/performance.yml new file mode 100644 index 0000000000..f877fd7a89 --- /dev/null +++ b/eng/common/templates/job/performance.yml @@ -0,0 +1,95 @@ +parameters: + steps: [] # optional -- any additional steps that need to happen before pulling down the performance repo and sending the performance benchmarks to helix (ie building your repo) + variables: [] # optional -- list of additional variables to send to the template + jobName: '' # required -- job name + displayName: '' # optional -- display name for the job. Will use jobName if not passed + pool: '' # required -- name of the Build pool + container: '' # required -- name of the container + osGroup: '' # required -- operating system for the job + extraSetupParameters: '' # optional -- extra arguments to pass to the setup script + frameworks: ['netcoreapp3.0'] # optional -- list of frameworks to run against + continueOnError: 'false' # optional -- determines whether to continue the build if the step errors + dependsOn: '' # optional -- dependencies of the job + timeoutInMinutes: 320 # optional -- timeout for the job + enableTelemetry: false # optional -- enable for telemetry + +jobs: +- template: ../jobs/jobs.yml + parameters: + dependsOn: ${{ parameters.dependsOn }} + enableTelemetry: ${{ parameters.enableTelemetry }} + enablePublishBuildArtifacts: true + continueOnError: ${{ parameters.continueOnError }} + + jobs: + - job: '${{ parameters.jobName }}' + + ${{ if ne(parameters.displayName, '') }}: + displayName: '${{ parameters.displayName }}' + ${{ if eq(parameters.displayName, '') }}: + displayName: '${{ parameters.jobName }}' + + timeoutInMinutes: ${{ parameters.timeoutInMinutes }} + + variables: + + - ${{ each variable in parameters.variables }}: + - ${{ if ne(variable.name, '') }}: + - name: ${{ variable.name }} + value: ${{ variable.value }} + - ${{ if ne(variable.group, '') }}: + - group: ${{ variable.group }} + + - IsInternal: '' + - HelixApiAccessToken: '' + - HelixPreCommand: '' + + - ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: + - ${{ if eq( parameters.osGroup, 'Windows_NT') }}: + - HelixPreCommand: 'set "PERFLAB_UPLOAD_TOKEN=$(PerfCommandUploadToken)"' + - IsInternal: -Internal + - ${{ if ne(parameters.osGroup, 'Windows_NT') }}: + - HelixPreCommand: 'export PERFLAB_UPLOAD_TOKEN="$(PerfCommandUploadTokenLinux)"' + - IsInternal: --internal + + - group: DotNet-HelixApi-Access + - group: dotnet-benchview + + workspace: + clean: all + pool: + ${{ parameters.pool }} + container: ${{ parameters.container }} + strategy: + matrix: + ${{ each framework in parameters.frameworks }}: + ${{ framework }}: + _Framework: ${{ framework }} + steps: + - checkout: self + clean: true + # Run all of the steps to setup repo + - ${{ each step in parameters.steps }}: + - ${{ step }} + - powershell: $(Build.SourcesDirectory)\eng\common\performance\performance-setup.ps1 $(IsInternal) -Framework $(_Framework) ${{ parameters.extraSetupParameters }} + displayName: Performance Setup (Windows) + condition: and(succeeded(), eq(variables['Agent.Os'], 'Windows_NT')) + continueOnError: ${{ parameters.continueOnError }} + - script: $(Build.SourcesDirectory)/eng/common/performance/performance-setup.sh $(IsInternal) --framework $(_Framework) ${{ parameters.extraSetupParameters }} + displayName: Performance Setup (Unix) + condition: and(succeeded(), ne(variables['Agent.Os'], 'Windows_NT')) + continueOnError: ${{ parameters.continueOnError }} + - script: $(Python) $(PerformanceDirectory)/scripts/ci_setup.py $(SetupArguments) + displayName: Run ci setup script + # Run perf testing in helix + - template: /eng/common/templates/steps/perf-send-to-helix.yml + parameters: + HelixSource: '$(HelixSourcePrefix)/$(Build.Repository.Name)/$(Build.SourceBranch)' # sources must start with pr/, official/, prodcon/, or agent/ + HelixType: 'test/performance/$(Kind)/$(_Framework)/$(Architecture)' + HelixAccessToken: $(HelixApiAccessToken) + HelixTargetQueues: $(Queue) + HelixPreCommands: $(HelixPreCommand) + Creator: $(Creator) + WorkItemTimeout: 4:00 # 4 hours + WorkItemDirectory: '$(WorkItemDirectory)' # WorkItemDirectory can not be empty, so we send it some docs to keep it happy + CorrelationPayloadDirectory: '$(PayloadDirectory)' # it gets checked out to a folder with shorter path than WorkItemDirectory so we can avoid file name too long exceptions \ No newline at end of file diff --git a/eng/common/templates/job/publish-build-assets.yml b/eng/common/templates/job/publish-build-assets.yml new file mode 100644 index 0000000000..d0c3cc2b3b --- /dev/null +++ b/eng/common/templates/job/publish-build-assets.yml @@ -0,0 +1,93 @@ +parameters: + configuration: 'Debug' + + # Optional: condition for the job to run + condition: '' + + # Optional: 'true' if future jobs should run even if this job fails + continueOnError: false + + # Optional: dependencies of the job + dependsOn: '' + + # Optional: Include PublishBuildArtifacts task + enablePublishBuildArtifacts: false + + # Optional: A defined YAML pool - https://docs.microsoft.com/en-us/azure/devops/pipelines/yaml-schema?view=vsts&tabs=schema#pool + pool: {} + + # Optional: should run as a public build even in the internal project + # if 'true', the build won't run any of the internal only steps, even if it is running in non-public projects. + runAsPublic: false + + # Optional: whether the build's artifacts will be published using release pipelines or direct feed publishing + publishUsingPipelines: false + +jobs: +- job: Asset_Registry_Publish + + dependsOn: ${{ parameters.dependsOn }} + + displayName: Publish to Build Asset Registry + + pool: ${{ parameters.pool }} + + variables: + - ${{ if and(eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: + - name: _BuildConfig + value: ${{ parameters.configuration }} + - group: Publish-Build-Assets + # Skip component governance and codesign validation for SDL. These jobs + # create no content. + - name: skipComponentGovernanceDetection + value: true + - name: runCodesignValidationInjection + value: false + + steps: + - ${{ if and(eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: + - task: DownloadBuildArtifacts@0 + displayName: Download artifact + inputs: + artifactName: AssetManifests + downloadPath: '$(Build.StagingDirectory)/Download' + condition: ${{ parameters.condition }} + continueOnError: ${{ parameters.continueOnError }} + + - ${{ if and(eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: + - task: NuGetAuthenticate@0 + + - task: PowerShell@2 + displayName: Publish Build Assets + inputs: + filePath: eng\common\sdk-task.ps1 + arguments: -task PublishBuildAssets -restore -msbuildEngine dotnet + /p:ManifestsPath='$(Build.StagingDirectory)/Download/AssetManifests' + /p:BuildAssetRegistryToken=$(MaestroAccessToken) + /p:MaestroApiEndpoint=https://maestro-prod.westus2.cloudapp.azure.com + /p:PublishUsingPipelines=${{ parameters.publishUsingPipelines }} + /p:Configuration=$(_BuildConfig) + /p:OfficialBuildId=$(Build.BuildNumber) + condition: ${{ parameters.condition }} + continueOnError: ${{ parameters.continueOnError }} + + - task: powershell@2 + displayName: Create ReleaseConfigs Artifact + inputs: + targetType: inline + script: | + Add-Content -Path "$(Build.StagingDirectory)/ReleaseConfigs.txt" -Value $(BARBuildId) + Add-Content -Path "$(Build.StagingDirectory)/ReleaseConfigs.txt" -Value "$(DefaultChannels)" + Add-Content -Path "$(Build.StagingDirectory)/ReleaseConfigs.txt" -Value $(IsStableBuild) + + - task: PublishBuildArtifacts@1 + displayName: Publish ReleaseConfigs Artifact + inputs: + PathtoPublish: '$(Build.StagingDirectory)/ReleaseConfigs.txt' + PublishLocation: Container + ArtifactName: ReleaseConfigs + + - ${{ if eq(parameters.enablePublishBuildArtifacts, 'true') }}: + - template: /eng/common/templates/steps/publish-logs.yml + parameters: + JobLabel: 'Publish_Artifacts_Logs' diff --git a/eng/common/templates/jobs/jobs.yml b/eng/common/templates/jobs/jobs.yml new file mode 100644 index 0000000000..c08225a9a9 --- /dev/null +++ b/eng/common/templates/jobs/jobs.yml @@ -0,0 +1,72 @@ +parameters: + # See schema documentation in /Documentation/AzureDevOps/TemplateSchema.md + continueOnError: false + + # Optional: Include PublishBuildArtifacts task + enablePublishBuildArtifacts: false + + # Optional: Enable publishing using release pipelines + enablePublishUsingPipelines: false + + graphFileGeneration: + # Optional: Enable generating the graph files at the end of the build + enabled: false + # Optional: Include toolset dependencies in the generated graph files + includeToolset: false + + # Required: A collection of jobs to run - https://docs.microsoft.com/en-us/azure/devops/pipelines/yaml-schema?view=vsts&tabs=schema#job + jobs: [] + + # Optional: Override automatically derived dependsOn value for "publish build assets" job + publishBuildAssetsDependsOn: '' + + # Optional: should run as a public build even in the internal project + # if 'true', the build won't run any of the internal only steps, even if it is running in non-public projects. + runAsPublic: false + +# Internal resources (telemetry, microbuild) can only be accessed from non-public projects, +# and some (Microbuild) should only be applied to non-PR cases for internal builds. + +jobs: +- ${{ each job in parameters.jobs }}: + - template: ../job/job.yml + parameters: + # pass along parameters + ${{ each parameter in parameters }}: + ${{ if ne(parameter.key, 'jobs') }}: + ${{ parameter.key }}: ${{ parameter.value }} + + # pass along job properties + ${{ each property in job }}: + ${{ if ne(property.key, 'job') }}: + ${{ property.key }}: ${{ property.value }} + + name: ${{ job.job }} + +- ${{ if and(eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: + - ${{ if or(eq(parameters.enablePublishBuildAssets, true), eq(parameters.artifacts.publish.manifests, 'true'), ne(parameters.artifacts.publish.manifests, '')) }}: + - template: ../job/publish-build-assets.yml + parameters: + continueOnError: ${{ parameters.continueOnError }} + dependsOn: + - ${{ if ne(parameters.publishBuildAssetsDependsOn, '') }}: + - ${{ each job in parameters.publishBuildAssetsDependsOn }}: + - ${{ job.job }} + - ${{ if eq(parameters.publishBuildAssetsDependsOn, '') }}: + - ${{ each job in parameters.jobs }}: + - ${{ job.job }} + pool: + vmImage: vs2017-win2016 + runAsPublic: ${{ parameters.runAsPublic }} + publishUsingPipelines: ${{ parameters.enablePublishUsingPipelines }} + enablePublishBuildArtifacts: ${{ parameters.enablePublishBuildArtifacts }} + + - ${{ if eq(parameters.graphFileGeneration.enabled, true) }}: + - template: ../job/generate-graph-files.yml + parameters: + continueOnError: ${{ parameters.continueOnError }} + includeToolset: ${{ parameters.graphFileGeneration.includeToolset }} + dependsOn: + - Asset_Registry_Publish + pool: + vmImage: vs2017-win2016 diff --git a/eng/common/templates/phases/base.yml b/eng/common/templates/phases/base.yml new file mode 100644 index 0000000000..0123cf43b1 --- /dev/null +++ b/eng/common/templates/phases/base.yml @@ -0,0 +1,130 @@ +parameters: + # Optional: Clean sources before building + clean: true + + # Optional: Git fetch depth + fetchDepth: '' + + # Optional: name of the phase (not specifying phase name may cause name collisions) + name: '' + # Optional: display name of the phase + displayName: '' + + # Optional: condition for the job to run + condition: '' + + # Optional: dependencies of the phase + dependsOn: '' + + # Required: A defined YAML queue + queue: {} + + # Required: build steps + steps: [] + + # Optional: variables + variables: {} + + # Optional: should run as a public build even in the internal project + # if 'true', the build won't run any of the internal only steps, even if it is running in non-public projects. + runAsPublic: false + + ## Telemetry variables + + # Optional: enable sending telemetry + # if 'true', these "variables" must be specified in the variables object or as part of the queue matrix + # _HelixBuildConfig - differentiate between Debug, Release, other + # _HelixSource - Example: build/product + # _HelixType - Example: official/dotnet/arcade/$(Build.SourceBranch) + enableTelemetry: false + + # Optional: Enable installing Microbuild plugin + # if 'true', these "variables" must be specified in the variables object or as part of the queue matrix + # _TeamName - the name of your team + # _SignType - 'test' or 'real' + enableMicrobuild: false + +# Internal resources (telemetry, microbuild) can only be accessed from non-public projects, +# and some (Microbuild) should only be applied to non-PR cases for internal builds. + +phases: +- phase: ${{ parameters.name }} + + ${{ if ne(parameters.displayName, '') }}: + displayName: ${{ parameters.displayName }} + + ${{ if ne(parameters.condition, '') }}: + condition: ${{ parameters.condition }} + + ${{ if ne(parameters.dependsOn, '') }}: + dependsOn: ${{ parameters.dependsOn }} + + queue: ${{ parameters.queue }} + + ${{ if ne(parameters.variables, '') }}: + variables: + ${{ insert }}: ${{ parameters.variables }} + + steps: + - checkout: self + clean: ${{ parameters.clean }} + ${{ if ne(parameters.fetchDepth, '') }}: + fetchDepth: ${{ parameters.fetchDepth }} + + - ${{ if eq(parameters.enableTelemetry, 'true') }}: + - template: /eng/common/templates/steps/telemetry-start.yml + parameters: + buildConfig: $(_HelixBuildConfig) + helixSource: $(_HelixSource) + helixType: $(_HelixType) + runAsPublic: ${{ parameters.runAsPublic }} + + - ${{ if eq(parameters.enableMicrobuild, 'true') }}: + # Internal only resource, and Microbuild signing shouldn't be applied to PRs. + - ${{ if and(eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: + - task: MicroBuildSigningPlugin@2 + displayName: Install MicroBuild plugin + inputs: + signType: $(_SignType) + zipSources: false + feedSource: https://dnceng.pkgs.visualstudio.com/_packaging/MicroBuildToolset/nuget/v3/index.json + + env: + TeamName: $(_TeamName) + continueOnError: false + condition: and(succeeded(), in(variables['_SignType'], 'real', 'test'), eq(variables['Agent.Os'], 'Windows_NT')) + + # Run provided build steps + - ${{ parameters.steps }} + + - ${{ if eq(parameters.enableMicrobuild, 'true') }}: + # Internal only resources + - ${{ if and(eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: + - task: MicroBuildCleanup@1 + displayName: Execute Microbuild cleanup tasks + condition: and(always(), in(variables['_SignType'], 'real', 'test'), eq(variables['Agent.Os'], 'Windows_NT')) + env: + TeamName: $(_TeamName) + + - ${{ if eq(parameters.enableTelemetry, 'true') }}: + - template: /eng/common/templates/steps/telemetry-end.yml + parameters: + helixSource: $(_HelixSource) + helixType: $(_HelixType) + + - ${{ if and(eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: + - task: CopyFiles@2 + displayName: Gather Asset Manifests + inputs: + SourceFolder: '$(Build.SourcesDirectory)/artifacts/log/$(_BuildConfig)/AssetManifest' + TargetFolder: '$(Build.StagingDirectory)/AssetManifests' + continueOnError: false + condition: and(succeeded(), eq(variables['_DotNetPublishToBlobFeed'], 'true')) + - task: PublishBuildArtifacts@1 + displayName: Push Asset Manifests + inputs: + PathtoPublish: '$(Build.StagingDirectory)/AssetManifests' + PublishLocation: Container + ArtifactName: AssetManifests + continueOnError: false + condition: and(succeeded(), eq(variables['_DotNetPublishToBlobFeed'], 'true')) diff --git a/eng/common/templates/phases/publish-build-assets.yml b/eng/common/templates/phases/publish-build-assets.yml new file mode 100644 index 0000000000..a0a8074282 --- /dev/null +++ b/eng/common/templates/phases/publish-build-assets.yml @@ -0,0 +1,51 @@ +parameters: + dependsOn: '' + queue: {} + configuration: 'Debug' + condition: succeeded() + continueOnError: false + runAsPublic: false + publishUsingPipelines: false +phases: + - phase: Asset_Registry_Publish + displayName: Publish to Build Asset Registry + dependsOn: ${{ parameters.dependsOn }} + queue: ${{ parameters.queue }} + variables: + _BuildConfig: ${{ parameters.configuration }} + steps: + - ${{ if and(eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: + - task: DownloadBuildArtifacts@0 + displayName: Download artifact + inputs: + artifactName: AssetManifests + downloadPath: '$(Build.StagingDirectory)/Download' + condition: ${{ parameters.condition }} + continueOnError: ${{ parameters.continueOnError }} + - task: AzureKeyVault@1 + inputs: + azureSubscription: 'DotNet-Engineering-Services_KeyVault' + KeyVaultName: EngKeyVault + SecretsFilter: 'MaestroAccessToken' + condition: ${{ parameters.condition }} + continueOnError: ${{ parameters.continueOnError }} + - task: PowerShell@2 + displayName: Publish Build Assets + inputs: + filePath: eng\common\sdk-task.ps1 + arguments: -task PublishBuildAssets -restore -msbuildEngine dotnet + /p:ManifestsPath='$(Build.StagingDirectory)/Download/AssetManifests' + /p:BuildAssetRegistryToken=$(MaestroAccessToken) + /p:MaestroApiEndpoint=https://maestro-prod.westus2.cloudapp.azure.com + /p:PublishUsingPipelines=${{ parameters.publishUsingPipelines }} + /p:Configuration=$(_BuildConfig) + condition: ${{ parameters.condition }} + continueOnError: ${{ parameters.continueOnError }} + - task: PublishBuildArtifacts@1 + displayName: Publish Logs to VSTS + inputs: + PathtoPublish: '$(Build.SourcesDirectory)/artifacts/log/$(_BuildConfig)' + PublishLocation: Container + ArtifactName: $(Agent.Os)_Asset_Registry_Publish + continueOnError: true + condition: always() diff --git a/eng/common/templates/post-build/channels/generic-internal-channel.yml b/eng/common/templates/post-build/channels/generic-internal-channel.yml new file mode 100644 index 0000000000..7ae5255921 --- /dev/null +++ b/eng/common/templates/post-build/channels/generic-internal-channel.yml @@ -0,0 +1,182 @@ +parameters: + BARBuildId: '' + PromoteToChannelIds: '' + artifactsPublishingAdditionalParameters: '' + dependsOn: + - Validate + publishInstallersAndChecksums: true + symbolPublishingAdditionalParameters: '' + stageName: '' + channelName: '' + channelId: '' + transportFeed: '' + shippingFeed: '' + symbolsFeed: '' + +stages: +- stage: ${{ parameters.stageName }} + dependsOn: ${{ parameters.dependsOn }} + variables: + - template: ../common-variables.yml + displayName: ${{ parameters.channelName }} Publishing + jobs: + - template: ../setup-maestro-vars.yml + parameters: + BARBuildId: ${{ parameters.BARBuildId }} + PromoteToChannelIds: ${{ parameters.PromoteToChannelIds }} + + - job: publish_symbols + displayName: Symbol Publishing + dependsOn: setupMaestroVars + condition: contains(dependencies.setupMaestroVars.outputs['setReleaseVars.TargetChannels'], format('[{0}]', ${{ parameters.channelId }} )) + variables: + - group: DotNet-Symbol-Server-Pats + - name: AzDOProjectName + value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOProjectName'] ] + - name: AzDOPipelineId + value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOPipelineId'] ] + - name: AzDOBuildId + value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOBuildId'] ] + pool: + vmImage: 'windows-2019' + steps: + # This is necessary whenever we want to publish/restore to an AzDO private feed + - task: NuGetAuthenticate@0 + displayName: 'Authenticate to AzDO Feeds' + + - task: DownloadBuildArtifacts@0 + displayName: Download Build Assets + continueOnError: true + inputs: + buildType: specific + buildVersionToDownload: specific + project: $(AzDOProjectName) + pipeline: $(AzDOPipelineId) + buildId: $(AzDOBuildId) + downloadType: 'specific' + itemPattern: | + PdbArtifacts/** + BlobArtifacts/** + downloadPath: '$(Build.ArtifactStagingDirectory)' + + # This is necessary whenever we want to publish/restore to an AzDO private feed + # Since sdk-task.ps1 tries to restore packages we need to do this authentication here + # otherwise it'll complain about accessing a private feed. + - task: NuGetAuthenticate@0 + displayName: 'Authenticate to AzDO Feeds' + + - task: PowerShell@2 + displayName: Enable cross-org publishing + inputs: + filePath: eng\common\enable-cross-org-publishing.ps1 + arguments: -token $(dn-bot-dnceng-artifact-feeds-rw) + + - task: PowerShell@2 + displayName: Publish + inputs: + filePath: eng\common\sdk-task.ps1 + arguments: -task PublishToSymbolServers -restore -msbuildEngine dotnet + /p:DotNetSymbolServerTokenMsdl=$(microsoft-symbol-server-pat) + /p:DotNetSymbolServerTokenSymWeb=$(symweb-symbol-server-pat) + /p:PDBArtifactsDirectory='$(Build.ArtifactStagingDirectory)/PDBArtifacts/' + /p:BlobBasePath='$(Build.ArtifactStagingDirectory)/BlobArtifacts/' + /p:SymbolPublishingExclusionsFile='$(Build.SourcesDirectory)/eng/SymbolPublishingExclusionsFile.txt' + /p:Configuration=Release + /p:PublishToMSDL=false + ${{ parameters.symbolPublishingAdditionalParameters }} + + - template: ../../steps/publish-logs.yml + parameters: + StageLabel: '${{ parameters.stageName }}' + JobLabel: 'SymbolPublishing' + + - job: publish_assets + displayName: Publish Assets + dependsOn: setupMaestroVars + timeoutInMinutes: 120 + variables: + - name: BARBuildId + value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.BARBuildId'] ] + - name: IsStableBuild + value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.IsStableBuild'] ] + - name: AzDOProjectName + value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOProjectName'] ] + - name: AzDOPipelineId + value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOPipelineId'] ] + - name: AzDOBuildId + value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOBuildId'] ] + condition: contains(dependencies.setupMaestroVars.outputs['setReleaseVars.TargetChannels'], format('[{0}]', ${{ parameters.channelId }} )) + pool: + vmImage: 'windows-2019' + steps: + - task: DownloadBuildArtifacts@0 + displayName: Download Build Assets + continueOnError: true + inputs: + buildType: specific + buildVersionToDownload: specific + project: $(AzDOProjectName) + pipeline: $(AzDOPipelineId) + buildId: $(AzDOBuildId) + downloadType: 'specific' + itemPattern: | + PackageArtifacts/** + BlobArtifacts/** + AssetManifests/** + downloadPath: '$(Build.ArtifactStagingDirectory)' + + - task: NuGetToolInstaller@1 + displayName: 'Install NuGet.exe' + + # This is necessary whenever we want to publish/restore to an AzDO private feed + - task: NuGetAuthenticate@0 + displayName: 'Authenticate to AzDO Feeds' + + - task: PowerShell@2 + displayName: Enable cross-org publishing + inputs: + filePath: eng\common\enable-cross-org-publishing.ps1 + arguments: -token $(dn-bot-dnceng-artifact-feeds-rw) + + - task: PowerShell@2 + displayName: Publish Assets + inputs: + filePath: eng\common\sdk-task.ps1 + arguments: -task PublishArtifactsInManifest -restore -msbuildEngine dotnet + /p:PublishingInfraVersion=2 + /p:IsStableBuild=$(IsStableBuild) + /p:IsInternalBuild=$(IsInternalBuild) + /p:RepositoryName=$(Build.Repository.Name) + /p:CommitSha=$(Build.SourceVersion) + /p:NugetPath=$(NuGetExeToolPath) + /p:AzdoTargetFeedPAT='$(dn-bot-dnceng-universal-packages-rw)' + /p:AzureStorageTargetFeedPAT='$(dotnetfeed-storage-access-key-1)' + /p:BARBuildId=$(BARBuildId) + /p:MaestroApiEndpoint='$(MaestroApiEndPoint)' + /p:BuildAssetRegistryToken='$(MaestroApiAccessToken)' + /p:ManifestsBasePath='$(Build.ArtifactStagingDirectory)/AssetManifests/' + /p:BlobBasePath='$(Build.ArtifactStagingDirectory)/BlobArtifacts/' + /p:PackageBasePath='$(Build.ArtifactStagingDirectory)/PackageArtifacts/' + /p:Configuration=Release + /p:PublishInstallersAndChecksums=${{ parameters.publishInstallersAndChecksums }} + /p:ChecksumsTargetStaticFeed=$(InternalChecksumsBlobFeedUrl) + /p:ChecksumsAzureAccountKey=$(InternalChecksumsBlobFeedKey) + /p:InstallersTargetStaticFeed=$(InternalInstallersBlobFeedUrl) + /p:InstallersAzureAccountKey=$(InternalInstallersBlobFeedKey) + /p:AzureDevOpsStaticShippingFeed='${{ parameters.shippingFeed }}' + /p:AzureDevOpsStaticShippingFeedKey='$(dn-bot-dnceng-artifact-feeds-rw)' + /p:AzureDevOpsStaticTransportFeed='${{ parameters.transportFeed }}' + /p:AzureDevOpsStaticTransportFeedKey='$(dn-bot-dnceng-artifact-feeds-rw)' + /p:AzureDevOpsStaticSymbolsFeed='${{ parameters.symbolsFeed }}' + /p:AzureDevOpsStaticSymbolsFeedKey='$(dn-bot-dnceng-artifact-feeds-rw)' + /p:PublishToMSDL=false + ${{ parameters.artifactsPublishingAdditionalParameters }} + + - template: ../../steps/publish-logs.yml + parameters: + StageLabel: '${{ parameters.stageName }}' + JobLabel: 'AssetsPublishing' + + - template: ../../steps/add-build-to-channel.yml + parameters: + ChannelId: ${{ parameters.channelId }} diff --git a/eng/common/templates/post-build/channels/generic-public-channel.yml b/eng/common/templates/post-build/channels/generic-public-channel.yml new file mode 100644 index 0000000000..6cf39dbb29 --- /dev/null +++ b/eng/common/templates/post-build/channels/generic-public-channel.yml @@ -0,0 +1,184 @@ +parameters: + BARBuildId: '' + PromoteToChannelIds: '' + artifactsPublishingAdditionalParameters: '' + dependsOn: + - Validate + publishInstallersAndChecksums: true + symbolPublishingAdditionalParameters: '' + stageName: '' + channelName: '' + channelId: '' + transportFeed: '' + shippingFeed: '' + symbolsFeed: '' + # If the channel name is empty, no links will be generated + akaMSChannelName: '' + +stages: +- stage: ${{ parameters.stageName }} + dependsOn: ${{ parameters.dependsOn }} + variables: + - template: ../common-variables.yml + displayName: ${{ parameters.channelName }} Publishing + jobs: + - template: ../setup-maestro-vars.yml + parameters: + BARBuildId: ${{ parameters.BARBuildId }} + PromoteToChannelIds: ${{ parameters.PromoteToChannelIds }} + + - job: publish_symbols + displayName: Symbol Publishing + dependsOn: setupMaestroVars + condition: contains(dependencies.setupMaestroVars.outputs['setReleaseVars.TargetChannels'], format('[{0}]', ${{ parameters.channelId }} )) + variables: + - group: DotNet-Symbol-Server-Pats + - name: AzDOProjectName + value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOProjectName'] ] + - name: AzDOPipelineId + value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOPipelineId'] ] + - name: AzDOBuildId + value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOBuildId'] ] + pool: + vmImage: 'windows-2019' + steps: + - task: DownloadBuildArtifacts@0 + displayName: Download Build Assets + continueOnError: true + inputs: + buildType: specific + buildVersionToDownload: specific + project: $(AzDOProjectName) + pipeline: $(AzDOPipelineId) + buildId: $(AzDOBuildId) + downloadType: 'specific' + itemPattern: | + PdbArtifacts/** + BlobArtifacts/** + downloadPath: '$(Build.ArtifactStagingDirectory)' + + # This is necessary whenever we want to publish/restore to an AzDO private feed + # Since sdk-task.ps1 tries to restore packages we need to do this authentication here + # otherwise it'll complain about accessing a private feed. + - task: NuGetAuthenticate@0 + displayName: 'Authenticate to AzDO Feeds' + + - task: PowerShell@2 + displayName: Enable cross-org publishing + inputs: + filePath: eng\common\enable-cross-org-publishing.ps1 + arguments: -token $(dn-bot-dnceng-artifact-feeds-rw) + + - task: PowerShell@2 + displayName: Publish + inputs: + filePath: eng\common\sdk-task.ps1 + arguments: -task PublishToSymbolServers -restore -msbuildEngine dotnet + /p:DotNetSymbolServerTokenMsdl=$(microsoft-symbol-server-pat) + /p:DotNetSymbolServerTokenSymWeb=$(symweb-symbol-server-pat) + /p:PDBArtifactsDirectory='$(Build.ArtifactStagingDirectory)/PDBArtifacts/' + /p:BlobBasePath='$(Build.ArtifactStagingDirectory)/BlobArtifacts/' + /p:SymbolPublishingExclusionsFile='$(Build.SourcesDirectory)/eng/SymbolPublishingExclusionsFile.txt' + /p:Configuration=Release + ${{ parameters.symbolPublishingAdditionalParameters }} + + - template: ../../steps/publish-logs.yml + parameters: + StageLabel: '${{ parameters.stageName }}' + JobLabel: 'SymbolPublishing' + + - job: publish_assets + displayName: Publish Assets + dependsOn: setupMaestroVars + timeoutInMinutes: 120 + variables: + - name: BARBuildId + value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.BARBuildId'] ] + - name: IsStableBuild + value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.IsStableBuild'] ] + - name: AzDOProjectName + value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOProjectName'] ] + - name: AzDOPipelineId + value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOPipelineId'] ] + - name: AzDOBuildId + value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOBuildId'] ] + - name: ArtifactsCategory + value: ${{ coalesce(variables._DotNetArtifactsCategory, '.NETCore') }} + condition: contains(dependencies.setupMaestroVars.outputs['setReleaseVars.TargetChannels'], format('[{0}]', ${{ parameters.channelId }} )) + pool: + vmImage: 'windows-2019' + steps: + - task: DownloadBuildArtifacts@0 + displayName: Download Build Assets + continueOnError: true + inputs: + buildType: specific + buildVersionToDownload: specific + project: $(AzDOProjectName) + pipeline: $(AzDOPipelineId) + buildId: $(AzDOBuildId) + downloadType: 'specific' + itemPattern: | + PackageArtifacts/** + BlobArtifacts/** + AssetManifests/** + downloadPath: '$(Build.ArtifactStagingDirectory)' + + - task: NuGetToolInstaller@1 + displayName: 'Install NuGet.exe' + + # This is necessary whenever we want to publish/restore to an AzDO private feed + - task: NuGetAuthenticate@0 + displayName: 'Authenticate to AzDO Feeds' + + - task: PowerShell@2 + displayName: Enable cross-org publishing + inputs: + filePath: eng\common\enable-cross-org-publishing.ps1 + arguments: -token $(dn-bot-dnceng-artifact-feeds-rw) + + - task: PowerShell@2 + displayName: Publish Assets + inputs: + filePath: eng\common\sdk-task.ps1 + arguments: -task PublishArtifactsInManifest -restore -msbuildEngine dotnet + /p:PublishingInfraVersion=2 + /p:ArtifactsCategory=$(ArtifactsCategory) + /p:IsStableBuild=$(IsStableBuild) + /p:IsInternalBuild=$(IsInternalBuild) + /p:RepositoryName=$(Build.Repository.Name) + /p:CommitSha=$(Build.SourceVersion) + /p:NugetPath=$(NuGetExeToolPath) + /p:AzdoTargetFeedPAT='$(dn-bot-dnceng-universal-packages-rw)' + /p:AzureStorageTargetFeedPAT='$(dotnetfeed-storage-access-key-1)' + /p:BARBuildId=$(BARBuildId) + /p:MaestroApiEndpoint='$(MaestroApiEndPoint)' + /p:BuildAssetRegistryToken='$(MaestroApiAccessToken)' + /p:ManifestsBasePath='$(Build.ArtifactStagingDirectory)/AssetManifests/' + /p:BlobBasePath='$(Build.ArtifactStagingDirectory)/BlobArtifacts/' + /p:PackageBasePath='$(Build.ArtifactStagingDirectory)/PackageArtifacts/' + /p:Configuration=Release + /p:PublishInstallersAndChecksums=${{ parameters.publishInstallersAndChecksums }} + /p:InstallersTargetStaticFeed=$(InstallersBlobFeedUrl) + /p:InstallersAzureAccountKey=$(dotnetcli-storage-key) + /p:ChecksumsTargetStaticFeed=$(ChecksumsBlobFeedUrl) + /p:ChecksumsAzureAccountKey=$(dotnetclichecksums-storage-key) + /p:AzureDevOpsStaticShippingFeed='${{ parameters.shippingFeed }}' + /p:AzureDevOpsStaticShippingFeedKey='$(dn-bot-dnceng-artifact-feeds-rw)' + /p:AzureDevOpsStaticTransportFeed='${{ parameters.transportFeed }}' + /p:AzureDevOpsStaticTransportFeedKey='$(dn-bot-dnceng-artifact-feeds-rw)' + /p:AzureDevOpsStaticSymbolsFeed='${{ parameters.symbolsFeed }}' + /p:AzureDevOpsStaticSymbolsFeedKey='$(dn-bot-dnceng-artifact-feeds-rw)' + /p:LatestLinkShortUrlPrefix=dotnet/'${{ parameters.akaMSChannelName }}' + /p:AkaMSClientId=$(akams-client-id) + /p:AkaMSClientSecret=$(akams-client-secret) + ${{ parameters.artifactsPublishingAdditionalParameters }} + + - template: ../../steps/publish-logs.yml + parameters: + StageLabel: '${{ parameters.stageName }}' + JobLabel: 'AssetsPublishing' + + - template: ../../steps/add-build-to-channel.yml + parameters: + ChannelId: ${{ parameters.channelId }} diff --git a/eng/common/templates/post-build/common-variables.yml b/eng/common/templates/post-build/common-variables.yml new file mode 100644 index 0000000000..c99fd75037 --- /dev/null +++ b/eng/common/templates/post-build/common-variables.yml @@ -0,0 +1,99 @@ +variables: + - group: AzureDevOps-Artifact-Feeds-Pats + - group: DotNet-Blob-Feed + - group: DotNet-DotNetCli-Storage + - group: DotNet-MSRC-Storage + - group: Publish-Build-Assets + + # .NET Core 3.1 Dev + - name: PublicDevRelease_31_Channel_Id + value: 128 + + # .NET 5 Dev + - name: Net_5_Dev_Channel_Id + value: 131 + + # .NET Eng - Validation + - name: Net_Eng_Validation_Channel_Id + value: 9 + + # .NET Eng - Latest + - name: Net_Eng_Latest_Channel_Id + value: 2 + + # .NET 3 Eng - Validation + - name: NET_3_Eng_Validation_Channel_Id + value: 390 + + # .NET 3 Eng + - name: NetCore_3_Tools_Channel_Id + value: 344 + + # .NET Core 3.0 Internal Servicing + - name: InternalServicing_30_Channel_Id + value: 184 + + # .NET Core 3.0 Release + - name: PublicRelease_30_Channel_Id + value: 19 + + # .NET Core 3.1 Release + - name: PublicRelease_31_Channel_Id + value: 129 + + # General Testing + - name: GeneralTesting_Channel_Id + value: 529 + + # .NET Core 3.1 Blazor Features + - name: NetCore_31_Blazor_Features_Channel_Id + value: 531 + + # .NET Core Experimental + - name: NetCore_Experimental_Channel_Id + value: 562 + + # Whether the build is internal or not + - name: IsInternalBuild + value: ${{ and(ne(variables['System.TeamProject'], 'public'), contains(variables['Build.SourceBranch'], 'internal')) }} + + # Default Maestro++ API Endpoint and API Version + - name: MaestroApiEndPoint + value: "https://maestro-prod.westus2.cloudapp.azure.com" + - name: MaestroApiAccessToken + value: $(MaestroAccessToken) + - name: MaestroApiVersion + value: "2020-02-20" + + - name: SourceLinkCLIVersion + value: 3.0.0 + - name: SymbolToolVersion + value: 1.0.1 + + # Feed Configurations + # These should include the suffix "/index.json" + + # Default locations for Installers and checksums + # Public Locations + - name: ChecksumsBlobFeedUrl + value: https://dotnetclichecksums.blob.core.windows.net/dotnet/index.json + - name: InstallersBlobFeedUrl + value: https://dotnetcli.blob.core.windows.net/dotnet/index.json + + # Private Locations + - name: InternalChecksumsBlobFeedUrl + value: https://dotnetclichecksumsmsrc.blob.core.windows.net/dotnet/index.json + - name: InternalChecksumsBlobFeedKey + value: $(dotnetclichecksumsmsrc-storage-key) + + - name: InternalInstallersBlobFeedUrl + value: https://dotnetclimsrc.blob.core.windows.net/dotnet/index.json + - name: InternalInstallersBlobFeedKey + value: $(dotnetclimsrc-access-key) + + # Skip component governance and codesign validation for SDL. These jobs + # create no content. + - name: skipComponentGovernanceDetection + value: true + - name: runCodesignValidationInjection + value: false diff --git a/eng/common/templates/post-build/post-build.yml b/eng/common/templates/post-build/post-build.yml new file mode 100644 index 0000000000..df06f5371e --- /dev/null +++ b/eng/common/templates/post-build/post-build.yml @@ -0,0 +1,605 @@ +parameters: + # Which publishing infra should be used. THIS SHOULD MATCH THE VERSION ON THE BUILD MANIFEST. + # Publishing V2 accepts optionally outlining the publishing stages - default is inline. + # Publishing V3 DOES NOT accept inlining the publishing stages. + publishingInfraVersion: 2 + # When set to true the publishing templates from the repo will be used + # otherwise Darc add-build-to-channel will be used to trigger the promotion pipeline + inline: true + + # Only used if inline==false. When set to true will stall the current build until + # the Promotion Pipeline build finishes. Otherwise, the current build will continue + # execution concurrently with the promotion build. + waitPublishingFinish: true + + BARBuildId: '' + PromoteToChannelIds: '' + + enableSourceLinkValidation: false + enableSigningValidation: true + enableSymbolValidation: false + enableNugetValidation: true + publishInstallersAndChecksums: true + SDLValidationParameters: + enable: false + continueOnError: false + params: '' + artifactNames: '' + downloadArtifacts: true + + # These parameters let the user customize the call to sdk-task.ps1 for publishing + # symbols & general artifacts as well as for signing validation + symbolPublishingAdditionalParameters: '' + artifactsPublishingAdditionalParameters: '' + signingValidationAdditionalParameters: '' + useBuildManifest: false + + # Which stages should finish execution before post-build stages start + validateDependsOn: + - build + publishDependsOn: + - Validate + + # Channel ID's instantiated in this file. + # When adding a new channel implementation the call to `check-channel-consistency.ps1` + # needs to be updated with the new channel ID + NetEngLatestChannelId: 2 + NetEngValidationChannelId: 9 + NetDev5ChannelId: 131 + NetDev6ChannelId: 1296 + GeneralTestingChannelId: 529 + NETCoreToolingDevChannelId: 548 + NETCoreToolingReleaseChannelId: 549 + NETInternalToolingChannelId: 551 + NETCoreExperimentalChannelId: 562 + NetEngServicesIntChannelId: 678 + NetEngServicesProdChannelId: 679 + Net5Preview8ChannelId: 1155 + Net5RC1ChannelId: 1157 + Net5RC2ChannelId: 1329 + NetCoreSDK313xxChannelId: 759 + NetCoreSDK313xxInternalChannelId: 760 + NetCoreSDK314xxChannelId: 921 + NetCoreSDK314xxInternalChannelId: 922 + VS166ChannelId: 1010 + VS167ChannelId: 1011 + VS168ChannelId: 1154 + VSMasterChannelId: 1012 + +stages: +- stage: Validate + dependsOn: ${{ parameters.validateDependsOn }} + displayName: Validate Build Assets + variables: + - template: common-variables.yml + jobs: + - template: setup-maestro-vars.yml + parameters: + BARBuildId: ${{ parameters.BARBuildId }} + PromoteToChannelIds: ${{ parameters.PromoteToChannelIds }} + + - job: + displayName: Post-build Checks + dependsOn: setupMaestroVars + variables: + - name: TargetChannels + value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.TargetChannels'] ] + pool: + vmImage: 'windows-2019' + steps: + - task: PowerShell@2 + displayName: Maestro Channels Consistency + inputs: + filePath: $(Build.SourcesDirectory)/eng/common/post-build/check-channel-consistency.ps1 + arguments: -PromoteToChannels "$(TargetChannels)" + -AvailableChannelIds ${{parameters.NetEngLatestChannelId}},${{parameters.NetEngValidationChannelId}},${{parameters.NetDev5ChannelId}},${{parameters.NetDev6ChannelId}},${{parameters.GeneralTestingChannelId}},${{parameters.NETCoreToolingDevChannelId}},${{parameters.NETCoreToolingReleaseChannelId}},${{parameters.NETInternalToolingChannelId}},${{parameters.NETCoreExperimentalChannelId}},${{parameters.NetEngServicesIntChannelId}},${{parameters.NetEngServicesProdChannelId}},${{parameters.Net5Preview8ChannelId}},${{parameters.Net5RC1ChannelId}},${{parameters.Net5RC2ChannelId}},${{parameters.NetCoreSDK313xxChannelId}},${{parameters.NetCoreSDK313xxInternalChannelId}},${{parameters.NetCoreSDK314xxChannelId}},${{parameters.NetCoreSDK314xxInternalChannelId}},${{parameters.VS166ChannelId}},${{parameters.VS167ChannelId}},${{parameters.VS168ChannelId}},${{parameters.VSMasterChannelId}} + + - job: + displayName: NuGet Validation + dependsOn: setupMaestroVars + condition: eq( ${{ parameters.enableNugetValidation }}, 'true') + pool: + vmImage: 'windows-2019' + variables: + - name: AzDOProjectName + value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOProjectName'] ] + - name: AzDOPipelineId + value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOPipelineId'] ] + - name: AzDOBuildId + value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOBuildId'] ] + steps: + - task: DownloadBuildArtifacts@0 + displayName: Download Package Artifacts + inputs: + buildType: specific + buildVersionToDownload: specific + project: $(AzDOProjectName) + pipeline: $(AzDOPipelineId) + buildId: $(AzDOBuildId) + artifactName: PackageArtifacts + + - task: PowerShell@2 + displayName: Validate + inputs: + filePath: $(Build.SourcesDirectory)/eng/common/post-build/nuget-validation.ps1 + arguments: -PackagesPath $(Build.ArtifactStagingDirectory)/PackageArtifacts/ + -ToolDestinationPath $(Agent.BuildDirectory)/Extract/ + + - job: + displayName: Signing Validation + dependsOn: setupMaestroVars + condition: eq( ${{ parameters.enableSigningValidation }}, 'true') + variables: + - template: common-variables.yml + - name: AzDOProjectName + value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOProjectName'] ] + - name: AzDOPipelineId + value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOPipelineId'] ] + - name: AzDOBuildId + value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOBuildId'] ] + pool: + vmImage: 'windows-2019' + steps: + - ${{ if eq(parameters.useBuildManifest, true) }}: + - task: DownloadBuildArtifacts@0 + displayName: Download build manifest + inputs: + buildType: specific + buildVersionToDownload: specific + project: $(AzDOProjectName) + pipeline: $(AzDOPipelineId) + buildId: $(AzDOBuildId) + artifactName: BuildManifests + - task: DownloadBuildArtifacts@0 + displayName: Download Package Artifacts + inputs: + buildType: specific + buildVersionToDownload: specific + project: $(AzDOProjectName) + pipeline: $(AzDOPipelineId) + buildId: $(AzDOBuildId) + artifactName: PackageArtifacts + + # This is necessary whenever we want to publish/restore to an AzDO private feed + # Since sdk-task.ps1 tries to restore packages we need to do this authentication here + # otherwise it'll complain about accessing a private feed. + - task: NuGetAuthenticate@0 + displayName: 'Authenticate to AzDO Feeds' + + - task: PowerShell@2 + displayName: Enable cross-org publishing + inputs: + filePath: eng\common\enable-cross-org-publishing.ps1 + arguments: -token $(dn-bot-dnceng-artifact-feeds-rw) + + # Signing validation will optionally work with the buildmanifest file which is downloaded from + # Azure DevOps above. + - task: PowerShell@2 + displayName: Validate + inputs: + filePath: eng\common\sdk-task.ps1 + arguments: -task SigningValidation -restore -msbuildEngine vs + /p:PackageBasePath='$(Build.ArtifactStagingDirectory)/PackageArtifacts' + /p:SignCheckExclusionsFile='$(Build.SourcesDirectory)/eng/SignCheckExclusionsFile.txt' + ${{ parameters.signingValidationAdditionalParameters }} + + - template: ../steps/publish-logs.yml + parameters: + StageLabel: 'Validation' + JobLabel: 'Signing' + + - job: + displayName: SourceLink Validation + dependsOn: setupMaestroVars + condition: eq( ${{ parameters.enableSourceLinkValidation }}, 'true') + variables: + - template: common-variables.yml + - name: AzDOProjectName + value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOProjectName'] ] + - name: AzDOPipelineId + value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOPipelineId'] ] + - name: AzDOBuildId + value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOBuildId'] ] + pool: + vmImage: 'windows-2019' + steps: + - task: DownloadBuildArtifacts@0 + displayName: Download Blob Artifacts + inputs: + buildType: specific + buildVersionToDownload: specific + project: $(AzDOProjectName) + pipeline: $(AzDOPipelineId) + buildId: $(AzDOBuildId) + artifactName: BlobArtifacts + + - task: PowerShell@2 + displayName: Validate + inputs: + filePath: $(Build.SourcesDirectory)/eng/common/post-build/sourcelink-validation.ps1 + arguments: -InputPath $(Build.ArtifactStagingDirectory)/BlobArtifacts/ + -ExtractPath $(Agent.BuildDirectory)/Extract/ + -GHRepoName $(Build.Repository.Name) + -GHCommit $(Build.SourceVersion) + -SourcelinkCliVersion $(SourceLinkCLIVersion) + continueOnError: true + + - template: /eng/common/templates/job/execute-sdl.yml + parameters: + enable: ${{ parameters.SDLValidationParameters.enable }} + dependsOn: setupMaestroVars + additionalParameters: ${{ parameters.SDLValidationParameters.params }} + continueOnError: ${{ parameters.SDLValidationParameters.continueOnError }} + artifactNames: ${{ parameters.SDLValidationParameters.artifactNames }} + downloadArtifacts: ${{ parameters.SDLValidationParameters.downloadArtifacts }} + +- ${{ if or(ge(parameters.publishingInfraVersion, 3), eq(parameters.inline, 'false')) }}: + - stage: publish_using_darc + dependsOn: Validate + displayName: Publish using Darc + variables: + - template: common-variables.yml + jobs: + - template: setup-maestro-vars.yml + parameters: + BARBuildId: ${{ parameters.BARBuildId }} + PromoteToChannelIds: ${{ parameters.PromoteToChannelIds }} + + - job: + displayName: Publish Using Darc + dependsOn: setupMaestroVars + variables: + - name: BARBuildId + value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.BARBuildId'] ] + pool: + vmImage: 'windows-2019' + steps: + - task: PowerShell@2 + displayName: Publish Using Darc + inputs: + filePath: $(Build.SourcesDirectory)/eng/common/post-build/publish-using-darc.ps1 + arguments: -BuildId $(BARBuildId) + -PublishingInfraVersion ${{ parameters.PublishingInfraVersion }} + -AzdoToken '$(publishing-dnceng-devdiv-code-r-build-re)' + -MaestroToken '$(MaestroApiAccessToken)' + -WaitPublishingFinish ${{ parameters.waitPublishingFinish }} + -PublishInstallersAndChecksums ${{ parameters.publishInstallersAndChecksums }} + +- ${{ if and(le(parameters.publishingInfraVersion, 2), eq(parameters.inline, 'true')) }}: + - template: \eng\common\templates\post-build\channels\generic-public-channel.yml + parameters: + BARBuildId: ${{ parameters.BARBuildId }} + PromoteToChannelIds: ${{ parameters.PromoteToChannelIds }} + artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }} + dependsOn: ${{ parameters.publishDependsOn }} + publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }} + symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }} + stageName: 'NetCore_Dev5_Publish' + channelName: '.NET 5 Dev' + akaMSChannelName: 'net5/dev' + channelId: ${{ parameters.NetDev5ChannelId }} + transportFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet5-transport/nuget/v3/index.json' + shippingFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet5/nuget/v3/index.json' + symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet5-symbols/nuget/v3/index.json' + + - template: \eng\common\templates\post-build\channels\generic-public-channel.yml + parameters: + BARBuildId: ${{ parameters.BARBuildId }} + PromoteToChannelIds: ${{ parameters.PromoteToChannelIds }} + artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }} + dependsOn: ${{ parameters.publishDependsOn }} + publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }} + symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }} + stageName: 'NetCore_Dev6_Publish' + channelName: '.NET 6 Dev' + akaMSChannelName: 'net6/dev' + channelId: ${{ parameters.NetDev6ChannelId }} + transportFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet6-transport/nuget/v3/index.json' + shippingFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet6/nuget/v3/index.json' + symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet6-symbols/nuget/v3/index.json' + + - template: \eng\common\templates\post-build\channels\generic-internal-channel.yml + parameters: + BARBuildId: ${{ parameters.BARBuildId }} + PromoteToChannelIds: ${{ parameters.PromoteToChannelIds }} + artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }} + dependsOn: ${{ parameters.publishDependsOn }} + publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }} + symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }} + stageName: 'Net5_Preview8_Publish' + channelName: '.NET 5 Preview 8' + akaMSChannelName: 'net5/preview8' + channelId: ${{ parameters.Net5Preview8ChannelId }} + transportFeed: 'https://pkgs.dev.azure.com/dnceng/internal/_packaging/dotnet5-internal-transport/nuget/v3/index.json' + shippingFeed: 'https://pkgs.dev.azure.com/dnceng/internal/_packaging/dotnet5-internal/nuget/v3/index.json' + symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/internal/_packaging/dotnet5-internal-symbols/nuget/v3/index.json' + + - template: \eng\common\templates\post-build\channels\generic-public-channel.yml + parameters: + BARBuildId: ${{ parameters.BARBuildId }} + PromoteToChannelIds: ${{ parameters.PromoteToChannelIds }} + artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }} + dependsOn: ${{ parameters.publishDependsOn }} + publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }} + symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }} + stageName: 'Net5_RC1_Publish' + channelName: '.NET 5 RC 1' + akaMSChannelName: 'net5/rc1' + channelId: ${{ parameters.Net5RC1ChannelId }} + transportFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet5-transport/nuget/v3/index.json' + shippingFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet5/nuget/v3/index.json' + symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet5-symbols/nuget/v3/index.json' + + - template: \eng\common\templates\post-build\channels\generic-public-channel.yml + parameters: + BARBuildId: ${{ parameters.BARBuildId }} + PromoteToChannelIds: ${{ parameters.PromoteToChannelIds }} + artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }} + dependsOn: ${{ parameters.publishDependsOn }} + publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }} + symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }} + stageName: 'Net5_RC2_Publish' + channelName: '.NET 5 RC 2' + akaMSChannelName: 'net5/rc2' + channelId: ${{ parameters.Net5RC2ChannelId }} + transportFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet5-transport/nuget/v3/index.json' + shippingFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet5/nuget/v3/index.json' + symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet5-symbols/nuget/v3/index.json' + + - template: \eng\common\templates\post-build\channels\generic-public-channel.yml + parameters: + BARBuildId: ${{ parameters.BARBuildId }} + PromoteToChannelIds: ${{ parameters.PromoteToChannelIds }} + artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }} + dependsOn: ${{ parameters.publishDependsOn }} + publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }} + symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }} + stageName: 'Net_Eng_Latest_Publish' + channelName: '.NET Eng - Latest' + akaMSChannelName: 'eng/daily' + channelId: ${{ parameters.NetEngLatestChannelId }} + transportFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json' + shippingFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json' + symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng-symbols/nuget/v3/index.json' + + - template: \eng\common\templates\post-build\channels\generic-public-channel.yml + parameters: + BARBuildId: ${{ parameters.BARBuildId }} + PromoteToChannelIds: ${{ parameters.PromoteToChannelIds }} + artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }} + dependsOn: ${{ parameters.publishDependsOn }} + publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }} + symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }} + stageName: 'Net_Eng_Validation_Publish' + channelName: '.NET Eng - Validation' + akaMSChannelName: 'eng/validation' + channelId: ${{ parameters.NetEngValidationChannelId }} + transportFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json' + shippingFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json' + symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng-symbols/nuget/v3/index.json' + + - template: \eng\common\templates\post-build\channels\generic-public-channel.yml + parameters: + BARBuildId: ${{ parameters.BARBuildId }} + PromoteToChannelIds: ${{ parameters.PromoteToChannelIds }} + artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }} + dependsOn: ${{ parameters.publishDependsOn }} + publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }} + symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }} + stageName: 'General_Testing_Publish' + channelName: 'General Testing' + akaMSChannelName: 'generaltesting' + channelId: ${{ parameters.GeneralTestingChannelId }} + transportFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/general-testing/nuget/v3/index.json' + shippingFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/general-testing/nuget/v3/index.json' + symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/general-testing-symbols/nuget/v3/index.json' + + - template: \eng\common\templates\post-build\channels\generic-public-channel.yml + parameters: + BARBuildId: ${{ parameters.BARBuildId }} + PromoteToChannelIds: ${{ parameters.PromoteToChannelIds }} + artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }} + dependsOn: ${{ parameters.publishDependsOn }} + publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }} + symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }} + stageName: 'NETCore_Tooling_Dev_Publishing' + channelName: '.NET Core Tooling Dev' + channelId: ${{ parameters.NETCoreToolingDevChannelId }} + transportFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json' + shippingFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json' + symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools-symbols/nuget/v3/index.json' + + - template: \eng\common\templates\post-build\channels\generic-public-channel.yml + parameters: + BARBuildId: ${{ parameters.BARBuildId }} + PromoteToChannelIds: ${{ parameters.PromoteToChannelIds }} + artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }} + dependsOn: ${{ parameters.publishDependsOn }} + publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }} + symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }} + stageName: 'NETCore_Tooling_Release_Publishing' + channelName: '.NET Core Tooling Release' + channelId: ${{ parameters.NETCoreToolingReleaseChannelId }} + transportFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json' + shippingFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json' + symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools-symbols/nuget/v3/index.json' + + - template: \eng\common\templates\post-build\channels\generic-internal-channel.yml + parameters: + BARBuildId: ${{ parameters.BARBuildId }} + PromoteToChannelIds: ${{ parameters.PromoteToChannelIds }} + artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }} + dependsOn: ${{ parameters.publishDependsOn }} + publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }} + symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }} + stageName: 'NET_Internal_Tooling_Publishing' + channelName: '.NET Internal Tooling' + channelId: ${{ parameters.NETInternalToolingChannelId }} + transportFeed: 'https://pkgs.dev.azure.com/dnceng/internal/_packaging/dotnet-tools-internal/nuget/v3/index.json' + shippingFeed: 'https://pkgs.dev.azure.com/dnceng/internal/_packaging/dotnet-tools-internal/nuget/v3/index.json' + symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/internal/_packaging/dotnet-tools-internal-symbols/nuget/v3/index.json' + + - template: \eng\common\templates\post-build\channels\generic-public-channel.yml + parameters: + BARBuildId: ${{ parameters.BARBuildId }} + PromoteToChannelIds: ${{ parameters.PromoteToChannelIds }} + artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }} + dependsOn: ${{ parameters.publishDependsOn }} + publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }} + symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }} + stageName: 'NETCore_Experimental_Publishing' + channelName: '.NET Core Experimental' + channelId: ${{ parameters.NETCoreExperimentalChannelId }} + transportFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-experimental/nuget/v3/index.json' + shippingFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-experimental/nuget/v3/index.json' + symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-experimental-symbols/nuget/v3/index.json' + + - template: \eng\common\templates\post-build\channels\generic-public-channel.yml + parameters: + BARBuildId: ${{ parameters.BARBuildId }} + PromoteToChannelIds: ${{ parameters.PromoteToChannelIds }} + artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }} + dependsOn: ${{ parameters.publishDependsOn }} + publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }} + symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }} + stageName: 'Net_Eng_Services_Int_Publish' + channelName: '.NET Eng Services - Int' + channelId: ${{ parameters.NetEngServicesIntChannelId }} + transportFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json' + shippingFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json' + symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng-symbols/nuget/v3/index.json' + + - template: \eng\common\templates\post-build\channels\generic-public-channel.yml + parameters: + BARBuildId: ${{ parameters.BARBuildId }} + PromoteToChannelIds: ${{ parameters.PromoteToChannelIds }} + artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }} + dependsOn: ${{ parameters.publishDependsOn }} + publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }} + symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }} + stageName: 'Net_Eng_Services_Prod_Publish' + channelName: '.NET Eng Services - Prod' + channelId: ${{ parameters.NetEngServicesProdChannelId }} + transportFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json' + shippingFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json' + symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng-symbols/nuget/v3/index.json' + + - template: \eng\common\templates\post-build\channels\generic-public-channel.yml + parameters: + BARBuildId: ${{ parameters.BARBuildId }} + PromoteToChannelIds: ${{ parameters.PromoteToChannelIds }} + artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }} + dependsOn: ${{ parameters.publishDependsOn }} + publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }} + symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }} + stageName: 'NETCore_SDK_314xx_Publishing' + channelName: '.NET Core SDK 3.1.4xx' + channelId: ${{ parameters.NetCoreSDK314xxChannelId }} + transportFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3.1-transport/nuget/v3/index.json' + shippingFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3.1/nuget/v3/index.json' + symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3.1-symbols/nuget/v3/index.json' + + - template: \eng\common\templates\post-build\channels\generic-internal-channel.yml + parameters: + BARBuildId: ${{ parameters.BARBuildId }} + PromoteToChannelIds: ${{ parameters.PromoteToChannelIds }} + artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }} + dependsOn: ${{ parameters.publishDependsOn }} + publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }} + symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }} + stageName: 'NETCore_SDK_314xx_Internal_Publishing' + channelName: '.NET Core SDK 3.1.4xx Internal' + channelId: ${{ parameters.NetCoreSDK314xxInternalChannelId }} + transportFeed: 'https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3.1-internal-transport/nuget/v3/index.json' + shippingFeed: 'https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3.1-internal/nuget/v3/index.json' + symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3.1-internal-symbols/nuget/v3/index.json' + + - template: \eng\common\templates\post-build\channels\generic-public-channel.yml + parameters: + BARBuildId: ${{ parameters.BARBuildId }} + PromoteToChannelIds: ${{ parameters.PromoteToChannelIds }} + artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }} + dependsOn: ${{ parameters.publishDependsOn }} + publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }} + symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }} + stageName: 'NETCore_SDK_313xx_Publishing' + channelName: '.NET Core SDK 3.1.3xx' + channelId: ${{ parameters.NetCoreSDK313xxChannelId }} + transportFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3.1-transport/nuget/v3/index.json' + shippingFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3.1/nuget/v3/index.json' + symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3.1-symbols/nuget/v3/index.json' + + - template: \eng\common\templates\post-build\channels\generic-internal-channel.yml + parameters: + BARBuildId: ${{ parameters.BARBuildId }} + PromoteToChannelIds: ${{ parameters.PromoteToChannelIds }} + artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }} + dependsOn: ${{ parameters.publishDependsOn }} + publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }} + symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }} + stageName: 'NETCore_SDK_313xx_Internal_Publishing' + channelName: '.NET Core SDK 3.1.3xx Internal' + channelId: ${{ parameters.NetCoreSDK313xxInternalChannelId }} + transportFeed: 'https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3.1-internal-transport/nuget/v3/index.json' + shippingFeed: 'https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3.1-internal/nuget/v3/index.json' + symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3.1-internal-symbols/nuget/v3/index.json' + + - template: \eng\common\templates\post-build\channels\generic-public-channel.yml + parameters: + BARBuildId: ${{ parameters.BARBuildId }} + PromoteToChannelIds: ${{ parameters.PromoteToChannelIds }} + artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }} + dependsOn: ${{ parameters.publishDependsOn }} + publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }} + symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }} + stageName: 'VS16_6_Publishing' + channelName: 'VS 16.6' + channelId: ${{ parameters.VS166ChannelId }} + transportFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools-transport/nuget/v3/index.json' + shippingFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json' + symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools-symbols/nuget/v3/index.json' + + - template: \eng\common\templates\post-build\channels\generic-public-channel.yml + parameters: + BARBuildId: ${{ parameters.BARBuildId }} + PromoteToChannelIds: ${{ parameters.PromoteToChannelIds }} + artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }} + dependsOn: ${{ parameters.publishDependsOn }} + publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }} + symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }} + stageName: 'VS16_7_Publishing' + channelName: 'VS 16.7' + channelId: ${{ parameters.VS167ChannelId }} + transportFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools-transport/nuget/v3/index.json' + shippingFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json' + symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools-symbols/nuget/v3/index.json' + + - template: \eng\common\templates\post-build\channels\generic-public-channel.yml + parameters: + BARBuildId: ${{ parameters.BARBuildId }} + PromoteToChannelIds: ${{ parameters.PromoteToChannelIds }} + artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }} + dependsOn: ${{ parameters.publishDependsOn }} + publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }} + symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }} + stageName: 'VS16_8_Publishing' + channelName: 'VS 16.8' + channelId: ${{ parameters.VS168ChannelId }} + transportFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools-transport/nuget/v3/index.json' + shippingFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json' + symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools-symbols/nuget/v3/index.json' + + - template: \eng\common\templates\post-build\channels\generic-public-channel.yml + parameters: + BARBuildId: ${{ parameters.BARBuildId }} + PromoteToChannelIds: ${{ parameters.PromoteToChannelIds }} + artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }} + dependsOn: ${{ parameters.publishDependsOn }} + publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }} + symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }} + stageName: 'VS_Master_Publishing' + channelName: 'VS Master' + channelId: ${{ parameters.VSMasterChannelId }} + transportFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools-transport/nuget/v3/index.json' + shippingFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json' + symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools-symbols/nuget/v3/index.json' diff --git a/eng/common/templates/post-build/setup-maestro-vars.yml b/eng/common/templates/post-build/setup-maestro-vars.yml new file mode 100644 index 0000000000..d0cbfb6c6f --- /dev/null +++ b/eng/common/templates/post-build/setup-maestro-vars.yml @@ -0,0 +1,77 @@ +parameters: + BARBuildId: '' + PromoteToChannelIds: '' + +jobs: +- job: setupMaestroVars + displayName: Setup Maestro Vars + variables: + - template: common-variables.yml + pool: + vmImage: 'windows-2019' + steps: + - checkout: none + + - ${{ if eq(coalesce(parameters.PromoteToChannelIds, 0), 0) }}: + - task: DownloadBuildArtifacts@0 + displayName: Download Release Configs + inputs: + buildType: current + artifactName: ReleaseConfigs + + - task: PowerShell@2 + name: setReleaseVars + displayName: Set Release Configs Vars + inputs: + targetType: inline + script: | + try { + if (!$Env:PromoteToMaestroChannels -or $Env:PromoteToMaestroChannels.Trim() -eq '') { + $Content = Get-Content $(Build.StagingDirectory)/ReleaseConfigs/ReleaseConfigs.txt + + $BarId = $Content | Select -Index 0 + $Channels = $Content | Select -Index 1 + $IsStableBuild = $Content | Select -Index 2 + + $AzureDevOpsProject = $Env:System_TeamProject + $AzureDevOpsBuildDefinitionId = $Env:System_DefinitionId + $AzureDevOpsBuildId = $Env:Build_BuildId + } + else { + $buildApiEndpoint = "${Env:MaestroApiEndPoint}/api/builds/${Env:BARBuildId}?api-version=${Env:MaestroApiVersion}" + + $apiHeaders = New-Object 'System.Collections.Generic.Dictionary[[String],[String]]' + $apiHeaders.Add('Accept', 'application/json') + $apiHeaders.Add('Authorization',"Bearer ${Env:MAESTRO_API_TOKEN}") + + $buildInfo = try { Invoke-WebRequest -Method Get -Uri $buildApiEndpoint -Headers $apiHeaders | ConvertFrom-Json } catch { Write-Host "Error: $_" } + + $BarId = $Env:BARBuildId + $Channels = $Env:PromoteToMaestroChannels -split "," + $Channels = $Channels -join "][" + $Channels = "[$Channels]" + + $IsStableBuild = $buildInfo.stable + $AzureDevOpsProject = $buildInfo.azureDevOpsProject + $AzureDevOpsBuildDefinitionId = $buildInfo.azureDevOpsBuildDefinitionId + $AzureDevOpsBuildId = $buildInfo.azureDevOpsBuildId + } + + Write-Host "##vso[task.setvariable variable=BARBuildId;isOutput=true]$BarId" + Write-Host "##vso[task.setvariable variable=TargetChannels;isOutput=true]$Channels" + Write-Host "##vso[task.setvariable variable=IsStableBuild;isOutput=true]$IsStableBuild" + + Write-Host "##vso[task.setvariable variable=AzDOProjectName;isOutput=true]$AzureDevOpsProject" + Write-Host "##vso[task.setvariable variable=AzDOPipelineId;isOutput=true]$AzureDevOpsBuildDefinitionId" + Write-Host "##vso[task.setvariable variable=AzDOBuildId;isOutput=true]$AzureDevOpsBuildId" + } + catch { + Write-Host $_ + Write-Host $_.Exception + Write-Host $_.ScriptStackTrace + exit 1 + } + env: + MAESTRO_API_TOKEN: $(MaestroApiAccessToken) + BARBuildId: ${{ parameters.BARBuildId }} + PromoteToMaestroChannels: ${{ parameters.PromoteToChannelIds }} diff --git a/eng/common/templates/post-build/trigger-subscription.yml b/eng/common/templates/post-build/trigger-subscription.yml new file mode 100644 index 0000000000..da669030da --- /dev/null +++ b/eng/common/templates/post-build/trigger-subscription.yml @@ -0,0 +1,13 @@ +parameters: + ChannelId: 0 + +steps: +- task: PowerShell@2 + displayName: Triggering subscriptions + inputs: + filePath: $(Build.SourcesDirectory)/eng/common/post-build/trigger-subscriptions.ps1 + arguments: -SourceRepo $(Build.Repository.Uri) + -ChannelId ${{ parameters.ChannelId }} + -MaestroApiAccessToken $(MaestroAccessToken) + -MaestroApiEndPoint $(MaestroApiEndPoint) + -MaestroApiVersion $(MaestroApiVersion) diff --git a/eng/common/templates/steps/add-build-to-channel.yml b/eng/common/templates/steps/add-build-to-channel.yml new file mode 100644 index 0000000000..f67a210d62 --- /dev/null +++ b/eng/common/templates/steps/add-build-to-channel.yml @@ -0,0 +1,13 @@ +parameters: + ChannelId: 0 + +steps: +- task: PowerShell@2 + displayName: Add Build to Channel + inputs: + filePath: $(Build.SourcesDirectory)/eng/common/post-build/add-build-to-channel.ps1 + arguments: -BuildId $(BARBuildId) + -ChannelId ${{ parameters.ChannelId }} + -MaestroApiAccessToken $(MaestroApiAccessToken) + -MaestroApiEndPoint $(MaestroApiEndPoint) + -MaestroApiVersion $(MaestroApiVersion) diff --git a/eng/common/templates/steps/build-reason.yml b/eng/common/templates/steps/build-reason.yml new file mode 100644 index 0000000000..eba58109b5 --- /dev/null +++ b/eng/common/templates/steps/build-reason.yml @@ -0,0 +1,12 @@ +# build-reason.yml +# Description: runs steps if build.reason condition is valid. conditions is a string of valid build reasons +# to include steps (',' separated). +parameters: + conditions: '' + steps: [] + +steps: + - ${{ if and( not(startsWith(parameters.conditions, 'not')), contains(parameters.conditions, variables['build.reason'])) }}: + - ${{ parameters.steps }} + - ${{ if and( startsWith(parameters.conditions, 'not'), not(contains(parameters.conditions, variables['build.reason']))) }}: + - ${{ parameters.steps }} diff --git a/eng/common/templates/steps/perf-send-to-helix.yml b/eng/common/templates/steps/perf-send-to-helix.yml new file mode 100644 index 0000000000..e003fe2ef2 --- /dev/null +++ b/eng/common/templates/steps/perf-send-to-helix.yml @@ -0,0 +1,68 @@ +# Please remember to update the documentation if you make changes to these parameters! +parameters: + ProjectFile: '' # required -- project file that specifies the helix workitems + HelixSource: 'pr/default' # required -- sources must start with pr/, official/, prodcon/, or agent/ + HelixType: 'tests/default/' # required -- Helix telemetry which identifies what type of data this is; should include "test" for clarity and must end in '/' + HelixBuild: $(Build.BuildNumber) # required -- the build number Helix will use to identify this -- automatically set to the AzDO build number + HelixTargetQueues: '' # required -- semicolon delimited list of Helix queues to test on; see https://helix.dot.net/ for a list of queues + HelixAccessToken: '' # required -- access token to make Helix API requests; should be provided by the appropriate variable group + HelixPreCommands: '' # optional -- commands to run before Helix work item execution + HelixPostCommands: '' # optional -- commands to run after Helix work item execution + WorkItemDirectory: '' # optional -- a payload directory to zip up and send to Helix; requires WorkItemCommand; incompatible with XUnitProjects + CorrelationPayloadDirectory: '' # optional -- a directory to zip up and send to Helix as a correlation payload + IncludeDotNetCli: false # optional -- true will download a version of the .NET CLI onto the Helix machine as a correlation payload; requires DotNetCliPackageType and DotNetCliVersion + DotNetCliPackageType: '' # optional -- either 'sdk' or 'runtime'; determines whether the sdk or runtime will be sent to Helix; see https://raw.githubusercontent.com/dotnet/core/master/release-notes/releases.json + DotNetCliVersion: '' # optional -- version of the CLI to send to Helix; based on this: https://raw.githubusercontent.com/dotnet/core/master/release-notes/releases.json + EnableXUnitReporter: false # optional -- true enables XUnit result reporting to Mission Control + WaitForWorkItemCompletion: true # optional -- true will make the task wait until work items have been completed and fail the build if work items fail. False is "fire and forget." + Creator: '' # optional -- if the build is external, use this to specify who is sending the job + DisplayNamePrefix: 'Send job to Helix' # optional -- rename the beginning of the displayName of the steps in AzDO + condition: succeeded() # optional -- condition for step to execute; defaults to succeeded() + continueOnError: false # optional -- determines whether to continue the build if the step errors; defaults to false + + +steps: + - powershell: $(Build.SourcesDirectory)\eng\common\msbuild.ps1 $(Build.SourcesDirectory)\eng\common\performance\${{ parameters.ProjectFile }} /restore /t:Test /bl:$(Build.SourcesDirectory)\artifacts\log\$env:BuildConfig\SendToHelix.binlog + displayName: ${{ parameters.DisplayNamePrefix }} (Windows) + env: + BuildConfig: $(_BuildConfig) + HelixSource: ${{ parameters.HelixSource }} + HelixType: ${{ parameters.HelixType }} + HelixBuild: ${{ parameters.HelixBuild }} + HelixTargetQueues: ${{ parameters.HelixTargetQueues }} + HelixAccessToken: ${{ parameters.HelixAccessToken }} + HelixPreCommands: ${{ parameters.HelixPreCommands }} + HelixPostCommands: ${{ parameters.HelixPostCommands }} + WorkItemDirectory: ${{ parameters.WorkItemDirectory }} + CorrelationPayloadDirectory: ${{ parameters.CorrelationPayloadDirectory }} + IncludeDotNetCli: ${{ parameters.IncludeDotNetCli }} + DotNetCliPackageType: ${{ parameters.DotNetCliPackageType }} + DotNetCliVersion: ${{ parameters.DotNetCliVersion }} + EnableXUnitReporter: ${{ parameters.EnableXUnitReporter }} + WaitForWorkItemCompletion: ${{ parameters.WaitForWorkItemCompletion }} + Creator: ${{ parameters.Creator }} + SYSTEM_ACCESSTOKEN: $(System.AccessToken) + condition: and(${{ parameters.condition }}, eq(variables['Agent.Os'], 'Windows_NT')) + continueOnError: ${{ parameters.continueOnError }} + - script: $BUILD_SOURCESDIRECTORY/eng/common/msbuild.sh $BUILD_SOURCESDIRECTORY/eng/common/performance/${{ parameters.ProjectFile }} /restore /t:Test /bl:$BUILD_SOURCESDIRECTORY/artifacts/log/$BuildConfig/SendToHelix.binlog + displayName: ${{ parameters.DisplayNamePrefix }} (Unix) + env: + BuildConfig: $(_BuildConfig) + HelixSource: ${{ parameters.HelixSource }} + HelixType: ${{ parameters.HelixType }} + HelixBuild: ${{ parameters.HelixBuild }} + HelixTargetQueues: ${{ parameters.HelixTargetQueues }} + HelixAccessToken: ${{ parameters.HelixAccessToken }} + HelixPreCommands: ${{ parameters.HelixPreCommands }} + HelixPostCommands: ${{ parameters.HelixPostCommands }} + WorkItemDirectory: ${{ parameters.WorkItemDirectory }} + CorrelationPayloadDirectory: ${{ parameters.CorrelationPayloadDirectory }} + IncludeDotNetCli: ${{ parameters.IncludeDotNetCli }} + DotNetCliPackageType: ${{ parameters.DotNetCliPackageType }} + DotNetCliVersion: ${{ parameters.DotNetCliVersion }} + EnableXUnitReporter: ${{ parameters.EnableXUnitReporter }} + WaitForWorkItemCompletion: ${{ parameters.WaitForWorkItemCompletion }} + Creator: ${{ parameters.Creator }} + SYSTEM_ACCESSTOKEN: $(System.AccessToken) + condition: and(${{ parameters.condition }}, ne(variables['Agent.Os'], 'Windows_NT')) + continueOnError: ${{ parameters.continueOnError }} diff --git a/eng/common/templates/steps/publish-logs.yml b/eng/common/templates/steps/publish-logs.yml new file mode 100644 index 0000000000..88f238f36b --- /dev/null +++ b/eng/common/templates/steps/publish-logs.yml @@ -0,0 +1,23 @@ +parameters: + StageLabel: '' + JobLabel: '' + +steps: +- task: Powershell@2 + displayName: Prepare Binlogs to Upload + inputs: + targetType: inline + script: | + New-Item -ItemType Directory $(Build.SourcesDirectory)/PostBuildLogs/${{parameters.StageLabel}}/${{parameters.JobLabel}}/ + Move-Item -Path $(Build.SourcesDirectory)/artifacts/log/Debug/* $(Build.SourcesDirectory)/PostBuildLogs/${{parameters.StageLabel}}/${{parameters.JobLabel}}/ + continueOnError: true + condition: always() + +- task: PublishBuildArtifacts@1 + displayName: Publish Logs + inputs: + PathtoPublish: '$(Build.SourcesDirectory)/PostBuildLogs' + PublishLocation: Container + ArtifactName: PostBuildLogs + continueOnError: true + condition: always() diff --git a/eng/common/templates/steps/run-on-unix.yml b/eng/common/templates/steps/run-on-unix.yml new file mode 100644 index 0000000000..e1733814f6 --- /dev/null +++ b/eng/common/templates/steps/run-on-unix.yml @@ -0,0 +1,7 @@ +parameters: + agentOs: '' + steps: [] + +steps: +- ${{ if ne(parameters.agentOs, 'Windows_NT') }}: + - ${{ parameters.steps }} diff --git a/eng/common/templates/steps/run-on-windows.yml b/eng/common/templates/steps/run-on-windows.yml new file mode 100644 index 0000000000..73e7e9c275 --- /dev/null +++ b/eng/common/templates/steps/run-on-windows.yml @@ -0,0 +1,7 @@ +parameters: + agentOs: '' + steps: [] + +steps: +- ${{ if eq(parameters.agentOs, 'Windows_NT') }}: + - ${{ parameters.steps }} diff --git a/eng/common/templates/steps/run-script-ifequalelse.yml b/eng/common/templates/steps/run-script-ifequalelse.yml new file mode 100644 index 0000000000..3d1242f558 --- /dev/null +++ b/eng/common/templates/steps/run-script-ifequalelse.yml @@ -0,0 +1,33 @@ +parameters: + # if parameter1 equals parameter 2, run 'ifScript' command, else run 'elsescript' command + parameter1: '' + parameter2: '' + ifScript: '' + elseScript: '' + + # name of script step + name: Script + + # display name of script step + displayName: If-Equal-Else Script + + # environment + env: {} + + # conditional expression for step execution + condition: '' + +steps: +- ${{ if and(ne(parameters.ifScript, ''), eq(parameters.parameter1, parameters.parameter2)) }}: + - script: ${{ parameters.ifScript }} + name: ${{ parameters.name }} + displayName: ${{ parameters.displayName }} + env: ${{ parameters.env }} + condition: ${{ parameters.condition }} + +- ${{ if and(ne(parameters.elseScript, ''), ne(parameters.parameter1, parameters.parameter2)) }}: + - script: ${{ parameters.elseScript }} + name: ${{ parameters.name }} + displayName: ${{ parameters.displayName }} + env: ${{ parameters.env }} + condition: ${{ parameters.condition }} \ No newline at end of file diff --git a/eng/common/templates/steps/send-to-helix.yml b/eng/common/templates/steps/send-to-helix.yml new file mode 100644 index 0000000000..5eceb48725 --- /dev/null +++ b/eng/common/templates/steps/send-to-helix.yml @@ -0,0 +1,94 @@ +# Please remember to update the documentation if you make changes to these parameters! +parameters: + HelixSource: 'pr/default' # required -- sources must start with pr/, official/, prodcon/, or agent/ + HelixType: 'tests/default/' # required -- Helix telemetry which identifies what type of data this is; should include "test" for clarity and must end in '/' + HelixBuild: $(Build.BuildNumber) # required -- the build number Helix will use to identify this -- automatically set to the AzDO build number + HelixTargetQueues: '' # required -- semicolon delimited list of Helix queues to test on; see https://helix.dot.net/ for a list of queues + HelixAccessToken: '' # required -- access token to make Helix API requests; should be provided by the appropriate variable group + HelixConfiguration: '' # optional -- additional property attached to a job + HelixPreCommands: '' # optional -- commands to run before Helix work item execution + HelixPostCommands: '' # optional -- commands to run after Helix work item execution + WorkItemDirectory: '' # optional -- a payload directory to zip up and send to Helix; requires WorkItemCommand; incompatible with XUnitProjects + WorkItemCommand: '' # optional -- a command to execute on the payload; requires WorkItemDirectory; incompatible with XUnitProjects + WorkItemTimeout: '' # optional -- a timeout in TimeSpan.Parse-ready value (e.g. 00:02:00) for the work item command; requires WorkItemDirectory; incompatible with XUnitProjects + CorrelationPayloadDirectory: '' # optional -- a directory to zip up and send to Helix as a correlation payload + XUnitProjects: '' # optional -- semicolon delimited list of XUnitProjects to parse and send to Helix; requires XUnitRuntimeTargetFramework, XUnitPublishTargetFramework, XUnitRunnerVersion, and IncludeDotNetCli=true + XUnitWorkItemTimeout: '' # optional -- the workitem timeout in seconds for all workitems created from the xUnit projects specified by XUnitProjects + XUnitPublishTargetFramework: '' # optional -- framework to use to publish your xUnit projects + XUnitRuntimeTargetFramework: '' # optional -- framework to use for the xUnit console runner + XUnitRunnerVersion: '' # optional -- version of the xUnit nuget package you wish to use on Helix; required for XUnitProjects + IncludeDotNetCli: false # optional -- true will download a version of the .NET CLI onto the Helix machine as a correlation payload; requires DotNetCliPackageType and DotNetCliVersion + DotNetCliPackageType: '' # optional -- either 'sdk' or 'runtime'; determines whether the sdk or runtime will be sent to Helix; see https://raw.githubusercontent.com/dotnet/core/master/release-notes/releases-index.json + DotNetCliVersion: '' # optional -- version of the CLI to send to Helix; based on this: https://raw.githubusercontent.com/dotnet/core/master/release-notes/releases-index.json + EnableXUnitReporter: false # optional -- true enables XUnit result reporting to Mission Control + WaitForWorkItemCompletion: true # optional -- true will make the task wait until work items have been completed and fail the build if work items fail. False is "fire and forget." + IsExternal: false # [DEPRECATED] -- doesn't do anything, jobs are external if HelixAccessToken is empty and Creator is set + HelixBaseUri: 'https://helix.dot.net/' # optional -- sets the Helix API base URI (allows targeting int) + Creator: '' # optional -- if the build is external, use this to specify who is sending the job + DisplayNamePrefix: 'Run Tests' # optional -- rename the beginning of the displayName of the steps in AzDO + condition: succeeded() # optional -- condition for step to execute; defaults to succeeded() + continueOnError: false # optional -- determines whether to continue the build if the step errors; defaults to false + +steps: + - powershell: 'powershell "$env:BUILD_SOURCESDIRECTORY\eng\common\msbuild.ps1 $env:BUILD_SOURCESDIRECTORY\eng\common\helixpublish.proj /restore /t:Test /bl:$env:BUILD_SOURCESDIRECTORY\artifacts\log\$env:BuildConfig\SendToHelix.binlog"' + displayName: ${{ parameters.DisplayNamePrefix }} (Windows) + env: + BuildConfig: $(_BuildConfig) + HelixSource: ${{ parameters.HelixSource }} + HelixType: ${{ parameters.HelixType }} + HelixBuild: ${{ parameters.HelixBuild }} + HelixConfiguration: ${{ parameters.HelixConfiguration }} + HelixTargetQueues: ${{ parameters.HelixTargetQueues }} + HelixAccessToken: ${{ parameters.HelixAccessToken }} + HelixPreCommands: ${{ parameters.HelixPreCommands }} + HelixPostCommands: ${{ parameters.HelixPostCommands }} + WorkItemDirectory: ${{ parameters.WorkItemDirectory }} + WorkItemCommand: ${{ parameters.WorkItemCommand }} + WorkItemTimeout: ${{ parameters.WorkItemTimeout }} + CorrelationPayloadDirectory: ${{ parameters.CorrelationPayloadDirectory }} + XUnitProjects: ${{ parameters.XUnitProjects }} + XUnitWorkItemTimeout: ${{ parameters.XUnitWorkItemTimeout }} + XUnitPublishTargetFramework: ${{ parameters.XUnitPublishTargetFramework }} + XUnitRuntimeTargetFramework: ${{ parameters.XUnitRuntimeTargetFramework }} + XUnitRunnerVersion: ${{ parameters.XUnitRunnerVersion }} + IncludeDotNetCli: ${{ parameters.IncludeDotNetCli }} + DotNetCliPackageType: ${{ parameters.DotNetCliPackageType }} + DotNetCliVersion: ${{ parameters.DotNetCliVersion }} + EnableXUnitReporter: ${{ parameters.EnableXUnitReporter }} + WaitForWorkItemCompletion: ${{ parameters.WaitForWorkItemCompletion }} + HelixBaseUri: ${{ parameters.HelixBaseUri }} + Creator: ${{ parameters.Creator }} + SYSTEM_ACCESSTOKEN: $(System.AccessToken) + condition: and(${{ parameters.condition }}, eq(variables['Agent.Os'], 'Windows_NT')) + continueOnError: ${{ parameters.continueOnError }} + - script: $BUILD_SOURCESDIRECTORY/eng/common/msbuild.sh $BUILD_SOURCESDIRECTORY/eng/common/helixpublish.proj /restore /t:Test /bl:$BUILD_SOURCESDIRECTORY/artifacts/log/$BuildConfig/SendToHelix.binlog + displayName: ${{ parameters.DisplayNamePrefix }} (Unix) + env: + BuildConfig: $(_BuildConfig) + HelixSource: ${{ parameters.HelixSource }} + HelixType: ${{ parameters.HelixType }} + HelixBuild: ${{ parameters.HelixBuild }} + HelixConfiguration: ${{ parameters.HelixConfiguration }} + HelixTargetQueues: ${{ parameters.HelixTargetQueues }} + HelixAccessToken: ${{ parameters.HelixAccessToken }} + HelixPreCommands: ${{ parameters.HelixPreCommands }} + HelixPostCommands: ${{ parameters.HelixPostCommands }} + WorkItemDirectory: ${{ parameters.WorkItemDirectory }} + WorkItemCommand: ${{ parameters.WorkItemCommand }} + WorkItemTimeout: ${{ parameters.WorkItemTimeout }} + CorrelationPayloadDirectory: ${{ parameters.CorrelationPayloadDirectory }} + XUnitProjects: ${{ parameters.XUnitProjects }} + XUnitWorkItemTimeout: ${{ parameters.XUnitWorkItemTimeout }} + XUnitPublishTargetFramework: ${{ parameters.XUnitPublishTargetFramework }} + XUnitRuntimeTargetFramework: ${{ parameters.XUnitRuntimeTargetFramework }} + XUnitRunnerVersion: ${{ parameters.XUnitRunnerVersion }} + IncludeDotNetCli: ${{ parameters.IncludeDotNetCli }} + DotNetCliPackageType: ${{ parameters.DotNetCliPackageType }} + DotNetCliVersion: ${{ parameters.DotNetCliVersion }} + EnableXUnitReporter: ${{ parameters.EnableXUnitReporter }} + WaitForWorkItemCompletion: ${{ parameters.WaitForWorkItemCompletion }} + HelixBaseUri: ${{ parameters.HelixBaseUri }} + Creator: ${{ parameters.Creator }} + SYSTEM_ACCESSTOKEN: $(System.AccessToken) + condition: and(${{ parameters.condition }}, ne(variables['Agent.Os'], 'Windows_NT')) + continueOnError: ${{ parameters.continueOnError }} diff --git a/eng/common/templates/steps/telemetry-end.yml b/eng/common/templates/steps/telemetry-end.yml new file mode 100644 index 0000000000..fadc04ca1b --- /dev/null +++ b/eng/common/templates/steps/telemetry-end.yml @@ -0,0 +1,102 @@ +parameters: + maxRetries: 5 + retryDelay: 10 # in seconds + +steps: +- bash: | + if [ "$AGENT_JOBSTATUS" = "Succeeded" ] || [ "$AGENT_JOBSTATUS" = "PartiallySucceeded" ]; then + errorCount=0 + else + errorCount=1 + fi + warningCount=0 + + curlStatus=1 + retryCount=0 + # retry loop to harden against spotty telemetry connections + # we don't retry successes and 4xx client errors + until [[ $curlStatus -eq 0 || ( $curlStatus -ge 400 && $curlStatus -le 499 ) || $retryCount -ge $MaxRetries ]] + do + if [ $retryCount -gt 0 ]; then + echo "Failed to send telemetry to Helix; waiting $RetryDelay seconds before retrying..." + sleep $RetryDelay + fi + + # create a temporary file for curl output + res=`mktemp` + + curlResult=` + curl --verbose --output $res --write-out "%{http_code}"\ + -H 'Content-Type: application/json' \ + -H "X-Helix-Job-Token: $Helix_JobToken" \ + -H 'Content-Length: 0' \ + -X POST -G "https://helix.dot.net/api/2018-03-14/telemetry/job/build/$Helix_WorkItemId/finish" \ + --data-urlencode "errorCount=$errorCount" \ + --data-urlencode "warningCount=$warningCount"` + curlStatus=$? + + if [ $curlStatus -eq 0 ]; then + if [ $curlResult -gt 299 ] || [ $curlResult -lt 200 ]; then + curlStatus=$curlResult + fi + fi + + let retryCount++ + done + + if [ $curlStatus -ne 0 ]; then + echo "Failed to Send Build Finish information after $retryCount retries" + vstsLogOutput="vso[task.logissue type=error;sourcepath=templates/steps/telemetry-end.yml;code=1;]Failed to Send Build Finish information: $curlStatus" + echo "##$vstsLogOutput" + exit 1 + fi + displayName: Send Unix Build End Telemetry + env: + # defined via VSTS variables in start-job.sh + Helix_JobToken: $(Helix_JobToken) + Helix_WorkItemId: $(Helix_WorkItemId) + MaxRetries: ${{ parameters.maxRetries }} + RetryDelay: ${{ parameters.retryDelay }} + condition: and(always(), ne(variables['Agent.Os'], 'Windows_NT')) +- powershell: | + if (($env:Agent_JobStatus -eq 'Succeeded') -or ($env:Agent_JobStatus -eq 'PartiallySucceeded')) { + $ErrorCount = 0 + } else { + $ErrorCount = 1 + } + $WarningCount = 0 + + # Basic retry loop to harden against server flakiness + $retryCount = 0 + while ($retryCount -lt $env:MaxRetries) { + try { + Invoke-RestMethod -Uri "https://helix.dot.net/api/2018-03-14/telemetry/job/build/$env:Helix_WorkItemId/finish?errorCount=$ErrorCount&warningCount=$WarningCount" -Method Post -ContentType "application/json" -Body "" ` + -Headers @{ 'X-Helix-Job-Token'=$env:Helix_JobToken } + break + } + catch { + $statusCode = $_.Exception.Response.StatusCode.value__ + if ($statusCode -ge 400 -and $statusCode -le 499) { + Write-Host "##vso[task.logissue]error Failed to send telemetry to Helix (status code $statusCode); not retrying (4xx client error)" + Write-Host "##vso[task.logissue]error ", $_.Exception.GetType().FullName, $_.Exception.Message + exit 1 + } + Write-Host "Failed to send telemetry to Helix (status code $statusCode); waiting $env:RetryDelay seconds before retrying..." + $retryCount++ + sleep $env:RetryDelay + continue + } + } + + if ($retryCount -ge $env:MaxRetries) { + Write-Host "##vso[task.logissue]error Failed to send telemetry to Helix after $retryCount retries." + exit 1 + } + displayName: Send Windows Build End Telemetry + env: + # defined via VSTS variables in start-job.ps1 + Helix_JobToken: $(Helix_JobToken) + Helix_WorkItemId: $(Helix_WorkItemId) + MaxRetries: ${{ parameters.maxRetries }} + RetryDelay: ${{ parameters.retryDelay }} + condition: and(always(),eq(variables['Agent.Os'], 'Windows_NT')) diff --git a/eng/common/templates/steps/telemetry-start.yml b/eng/common/templates/steps/telemetry-start.yml new file mode 100644 index 0000000000..32c01ef0b5 --- /dev/null +++ b/eng/common/templates/steps/telemetry-start.yml @@ -0,0 +1,241 @@ +parameters: + helixSource: 'undefined_defaulted_in_telemetry.yml' + helixType: 'undefined_defaulted_in_telemetry.yml' + buildConfig: '' + runAsPublic: false + maxRetries: 5 + retryDelay: 10 # in seconds + +steps: +- ${{ if and(eq(parameters.runAsPublic, 'false'), not(eq(variables['System.TeamProject'], 'public'))) }}: + - task: AzureKeyVault@1 + inputs: + azureSubscription: 'HelixProd_KeyVault' + KeyVaultName: HelixProdKV + SecretsFilter: 'HelixApiAccessToken' + condition: always() +- bash: | + # create a temporary file + jobInfo=`mktemp` + + # write job info content to temporary file + cat > $jobInfo < powershell invocations +# as dot sourcing isn't possible. +function InitializeDotNetCli([bool]$install, [bool]$createSdkLocationFile) { + if (Test-Path variable:global:_DotNetInstallDir) { + return $global:_DotNetInstallDir + } + + # Don't resolve runtime, shared framework, or SDK from other locations to ensure build determinism + $env:DOTNET_MULTILEVEL_LOOKUP=0 + + # Disable first run since we do not need all ASP.NET packages restored. + $env:DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1 + + # Disable telemetry on CI. + if ($ci) { + $env:DOTNET_CLI_TELEMETRY_OPTOUT=1 + } + + # Source Build uses DotNetCoreSdkDir variable + if ($env:DotNetCoreSdkDir -ne $null) { + $env:DOTNET_INSTALL_DIR = $env:DotNetCoreSdkDir + } + + # Find the first path on %PATH% that contains the dotnet.exe + if ($useInstalledDotNetCli -and (-not $globalJsonHasRuntimes) -and ($env:DOTNET_INSTALL_DIR -eq $null)) { + $dotnetExecutable = GetExecutableFileName 'dotnet' + $dotnetCmd = Get-Command $dotnetExecutable -ErrorAction SilentlyContinue + + if ($dotnetCmd -ne $null) { + $env:DOTNET_INSTALL_DIR = Split-Path $dotnetCmd.Path -Parent + } + } + + $dotnetSdkVersion = $GlobalJson.tools.dotnet + + # Use dotnet installation specified in DOTNET_INSTALL_DIR if it contains the required SDK version, + # otherwise install the dotnet CLI and SDK to repo local .dotnet directory to avoid potential permission issues. + if ((-not $globalJsonHasRuntimes) -and ($env:DOTNET_INSTALL_DIR -ne $null) -and (Test-Path(Join-Path $env:DOTNET_INSTALL_DIR "sdk\$dotnetSdkVersion"))) { + $dotnetRoot = $env:DOTNET_INSTALL_DIR + } else { + $dotnetRoot = Join-Path $RepoRoot '.dotnet' + + if (-not (Test-Path(Join-Path $dotnetRoot "sdk\$dotnetSdkVersion"))) { + if ($install) { + InstallDotNetSdk $dotnetRoot $dotnetSdkVersion + } else { + Write-PipelineTelemetryError -Category 'InitializeToolset' -Message "Unable to find dotnet with SDK version '$dotnetSdkVersion'" + ExitWithExitCode 1 + } + } + + $env:DOTNET_INSTALL_DIR = $dotnetRoot + } + + # Creates a temporary file under the toolset dir. + # The following code block is protecting against concurrent access so that this function can + # be called in parallel. + if ($createSdkLocationFile) { + do { + $sdkCacheFileTemp = Join-Path $ToolsetDir $([System.IO.Path]::GetRandomFileName()) + } + until (!(Test-Path $sdkCacheFileTemp)) + Set-Content -Path $sdkCacheFileTemp -Value $dotnetRoot + + try { + Rename-Item -Force -Path $sdkCacheFileTemp 'sdk.txt' + } catch { + # Somebody beat us + Remove-Item -Path $sdkCacheFileTemp + } + } + + # Add dotnet to PATH. This prevents any bare invocation of dotnet in custom + # build steps from using anything other than what we've downloaded. + # It also ensures that VS msbuild will use the downloaded sdk targets. + $env:PATH = "$dotnetRoot;$env:PATH" + + # Make Sure that our bootstrapped dotnet cli is available in future steps of the Azure Pipelines build + Write-PipelinePrependPath -Path $dotnetRoot + + Write-PipelineSetVariable -Name 'DOTNET_MULTILEVEL_LOOKUP' -Value '0' + Write-PipelineSetVariable -Name 'DOTNET_SKIP_FIRST_TIME_EXPERIENCE' -Value '1' + + return $global:_DotNetInstallDir = $dotnetRoot +} + +function GetDotNetInstallScript([string] $dotnetRoot) { + $installScript = Join-Path $dotnetRoot 'dotnet-install.ps1' + if (!(Test-Path $installScript)) { + create-directory $dotnetroot + + if ($useDefaultDotnetInstall) + { + $progresspreference = 'silentlycontinue' # don't display the console progress ui - it's a huge perf hit + + $maxretries = 5 + $retries = 1 + + $uri = "https://dot.net/$dotnetinstallscriptversion/dotnet-install.ps1" + + while($true) { + try { + write-host "get $uri" + invoke-webrequest $uri -outfile $installscript + break + } + catch { + write-host "failed to download '$uri'" + write-error $_.exception.message -erroraction continue + } + + if (++$retries -le $maxretries) { + $delayinseconds = [math]::pow(2, $retries) - 1 # exponential backoff + write-host "retrying. waiting for $delayinseconds seconds before next attempt ($retries of $maxretries)." + start-sleep -seconds $delayinseconds + } + else { + throw "unable to download file in $maxretries attempts." + } + } + } + else + { + # Use a special version of the script from eng/common that understands the existence of a "productVersion.txt" in a dotnet path. + # See https://github.com/dotnet/arcade/issues/6047 for details + $engCommonCopy = Resolve-Path (Join-Path $PSScriptRoot 'dotnet-install-scripts\dotnet-install.ps1') + Copy-Item $engCommonCopy -Destination $installScript -Force + } + } + return $installScript +} + +function InstallDotNetSdk([string] $dotnetRoot, [string] $version, [string] $architecture = '', [switch] $noPath) { + InstallDotNet $dotnetRoot $version $architecture '' $false $runtimeSourceFeed $runtimeSourceFeedKey -noPath:$noPath +} + +function InstallDotNet([string] $dotnetRoot, + [string] $version, + [string] $architecture = '', + [string] $runtime = '', + [bool] $skipNonVersionedFiles = $false, + [string] $runtimeSourceFeed = '', + [string] $runtimeSourceFeedKey = '', + [switch] $noPath) { + + $installScript = GetDotNetInstallScript $dotnetRoot + $installParameters = @{ + Version = $version + InstallDir = $dotnetRoot + } + + if ($architecture) { $installParameters.Architecture = $architecture } + if ($runtime) { $installParameters.Runtime = $runtime } + if ($skipNonVersionedFiles) { $installParameters.SkipNonVersionedFiles = $skipNonVersionedFiles } + if ($noPath) { $installParameters.NoPath = $True } + + try { + & $installScript @installParameters + } + catch { + if ($runtimeSourceFeed -or $runtimeSourceFeedKey) { + Write-Host "Failed to install dotnet from public location. Trying from '$runtimeSourceFeed'" + if ($runtimeSourceFeed) { $installParameters.AzureFeed = $runtimeSourceFeed } + + if ($runtimeSourceFeedKey) { + $decodedBytes = [System.Convert]::FromBase64String($runtimeSourceFeedKey) + $decodedString = [System.Text.Encoding]::UTF8.GetString($decodedBytes) + $installParameters.FeedCredential = $decodedString + } + + try { + & $installScript @installParameters + } + catch { + Write-PipelineTelemetryError -Category 'InitializeToolset' -Message "Failed to install dotnet from custom location '$runtimeSourceFeed'." + ExitWithExitCode 1 + } + } else { + Write-PipelineTelemetryError -Category 'InitializeToolset' -Message "Failed to install dotnet from public location." + ExitWithExitCode 1 + } + } +} + +# +# Locates Visual Studio MSBuild installation. +# The preference order for MSBuild to use is as follows: +# +# 1. MSBuild from an active VS command prompt +# 2. MSBuild from a compatible VS installation +# 3. MSBuild from the xcopy tool package +# +# Returns full path to msbuild.exe. +# Throws on failure. +# +function InitializeVisualStudioMSBuild([bool]$install, [object]$vsRequirements = $null) { + if (-not (IsWindowsPlatform)) { + throw "Cannot initialize Visual Studio on non-Windows" + } + + if (Test-Path variable:global:_MSBuildExe) { + return $global:_MSBuildExe + } + + $vsMinVersionReqdStr = '16.5' + $vsMinVersionReqd = [Version]::new($vsMinVersionReqdStr) + + if (!$vsRequirements) { $vsRequirements = $GlobalJson.tools.vs } + $vsMinVersionStr = if ($vsRequirements.version) { $vsRequirements.version } else { $vsMinVersionReqdStr } + $vsMinVersion = [Version]::new($vsMinVersionStr) + + # Try msbuild command available in the environment. + if ($env:VSINSTALLDIR -ne $null) { + $msbuildCmd = Get-Command 'msbuild.exe' -ErrorAction SilentlyContinue + if ($msbuildCmd -ne $null) { + # Workaround for https://github.com/dotnet/roslyn/issues/35793 + # Due to this issue $msbuildCmd.Version returns 0.0.0.0 for msbuild.exe 16.2+ + $msbuildVersion = [Version]::new((Get-Item $msbuildCmd.Path).VersionInfo.ProductVersion.Split([char[]]@('-', '+'))[0]) + + if ($msbuildVersion -ge $vsMinVersion) { + return $global:_MSBuildExe = $msbuildCmd.Path + } + + # Report error - the developer environment is initialized with incompatible VS version. + throw "Developer Command Prompt for VS $($env:VisualStudioVersion) is not recent enough. Please upgrade to $vsMinVersionStr or build from a plain CMD window" + } + } + + # Locate Visual Studio installation or download x-copy msbuild. + $vsInfo = LocateVisualStudio $vsRequirements + if ($vsInfo -ne $null) { + $vsInstallDir = $vsInfo.installationPath + $vsMajorVersion = $vsInfo.installationVersion.Split('.')[0] + + InitializeVisualStudioEnvironmentVariables $vsInstallDir $vsMajorVersion + } else { + + if (Get-Member -InputObject $GlobalJson.tools -Name 'xcopy-msbuild') { + $xcopyMSBuildVersion = $GlobalJson.tools.'xcopy-msbuild' + $vsMajorVersion = $xcopyMSBuildVersion.Split('.')[0] + } else { + #if vs version provided in global.json is incompatible then use the default version for xcopy msbuild download + if($vsMinVersion -lt $vsMinVersionReqd){ + Write-Host "Using xcopy-msbuild version of $vsMinVersionReqdStr.0-alpha since VS version $vsMinVersionStr provided in global.json is not compatible" + $vsMajorVersion = $vsMinVersionReqd.Major + $vsMinorVersion = $vsMinVersionReqd.Minor + } + else{ + $vsMajorVersion = $vsMinVersion.Major + $vsMinorVersion = $vsMinVersion.Minor + } + + $xcopyMSBuildVersion = "$vsMajorVersion.$vsMinorVersion.0-alpha" + } + + $vsInstallDir = $null + if ($xcopyMSBuildVersion.Trim() -ine "none") { + $vsInstallDir = InitializeXCopyMSBuild $xcopyMSBuildVersion $install + } + if ($vsInstallDir -eq $null) { + throw 'Unable to find Visual Studio that has required version and components installed' + } + } + + $msbuildVersionDir = if ([int]$vsMajorVersion -lt 16) { "$vsMajorVersion.0" } else { "Current" } + return $global:_MSBuildExe = Join-Path $vsInstallDir "MSBuild\$msbuildVersionDir\Bin\msbuild.exe" +} + +function InitializeVisualStudioEnvironmentVariables([string] $vsInstallDir, [string] $vsMajorVersion) { + $env:VSINSTALLDIR = $vsInstallDir + Set-Item "env:VS$($vsMajorVersion)0COMNTOOLS" (Join-Path $vsInstallDir "Common7\Tools\") + + $vsSdkInstallDir = Join-Path $vsInstallDir "VSSDK\" + if (Test-Path $vsSdkInstallDir) { + Set-Item "env:VSSDK$($vsMajorVersion)0Install" $vsSdkInstallDir + $env:VSSDKInstall = $vsSdkInstallDir + } +} + +function InstallXCopyMSBuild([string]$packageVersion) { + return InitializeXCopyMSBuild $packageVersion -install $true +} + +function InitializeXCopyMSBuild([string]$packageVersion, [bool]$install) { + $packageName = 'RoslynTools.MSBuild' + $packageDir = Join-Path $ToolsDir "msbuild\$packageVersion" + $packagePath = Join-Path $packageDir "$packageName.$packageVersion.nupkg" + + if (!(Test-Path $packageDir)) { + if (!$install) { + return $null + } + + Create-Directory $packageDir + Write-Host "Downloading $packageName $packageVersion" + $ProgressPreference = 'SilentlyContinue' # Don't display the console progress UI - it's a huge perf hit + Invoke-WebRequest "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/flat2/$packageName/$packageVersion/$packageName.$packageVersion.nupkg" -OutFile $packagePath + Unzip $packagePath $packageDir + } + + return Join-Path $packageDir 'tools' +} + +# +# Locates Visual Studio instance that meets the minimal requirements specified by tools.vs object in global.json. +# +# The following properties of tools.vs are recognized: +# "version": "{major}.{minor}" +# Two part minimal VS version, e.g. "15.9", "16.0", etc. +# "components": ["componentId1", "componentId2", ...] +# Array of ids of workload components that must be available in the VS instance. +# See e.g. https://docs.microsoft.com/en-us/visualstudio/install/workload-component-id-vs-enterprise?view=vs-2017 +# +# Returns JSON describing the located VS instance (same format as returned by vswhere), +# or $null if no instance meeting the requirements is found on the machine. +# +function LocateVisualStudio([object]$vsRequirements = $null){ + if (-not (IsWindowsPlatform)) { + throw "Cannot run vswhere on non-Windows platforms." + } + + if (Get-Member -InputObject $GlobalJson.tools -Name 'vswhere') { + $vswhereVersion = $GlobalJson.tools.vswhere + } else { + $vswhereVersion = '2.5.2' + } + + $vsWhereDir = Join-Path $ToolsDir "vswhere\$vswhereVersion" + $vsWhereExe = Join-Path $vsWhereDir 'vswhere.exe' + + if (!(Test-Path $vsWhereExe)) { + Create-Directory $vsWhereDir + Write-Host 'Downloading vswhere' + try { + Invoke-WebRequest "https://netcorenativeassets.blob.core.windows.net/resource-packages/external/windows/vswhere/$vswhereVersion/vswhere.exe" -OutFile $vswhereExe + } + catch { + Write-PipelineTelemetryError -Category 'InitializeToolset' -Message $_ + } + } + + if (!$vsRequirements) { $vsRequirements = $GlobalJson.tools.vs } + $args = @('-latest', '-prerelease', '-format', 'json', '-requires', 'Microsoft.Component.MSBuild', '-products', '*') + + if (Get-Member -InputObject $vsRequirements -Name 'version') { + $args += '-version' + $args += $vsRequirements.version + } + + if (Get-Member -InputObject $vsRequirements -Name 'components') { + foreach ($component in $vsRequirements.components) { + $args += '-requires' + $args += $component + } + } + + $vsInfo =& $vsWhereExe $args | ConvertFrom-Json + + if ($lastExitCode -ne 0) { + return $null + } + + # use first matching instance + return $vsInfo[0] +} + +function InitializeBuildTool() { + if (Test-Path variable:global:_BuildTool) { + return $global:_BuildTool + } + + if (-not $msbuildEngine) { + $msbuildEngine = GetDefaultMSBuildEngine + } + + # Initialize dotnet cli if listed in 'tools' + $dotnetRoot = $null + if (Get-Member -InputObject $GlobalJson.tools -Name 'dotnet') { + $dotnetRoot = InitializeDotNetCli -install:$restore + } + + if ($msbuildEngine -eq 'dotnet') { + if (!$dotnetRoot) { + Write-PipelineTelemetryError -Category 'InitializeToolset' -Message "/global.json must specify 'tools.dotnet'." + ExitWithExitCode 1 + } + $dotnetPath = Join-Path $dotnetRoot (GetExecutableFileName 'dotnet') + $buildTool = @{ Path = $dotnetPath; Command = 'msbuild'; Tool = 'dotnet'; Framework = 'netcoreapp2.1' } + } elseif ($msbuildEngine -eq "vs") { + try { + $msbuildPath = InitializeVisualStudioMSBuild -install:$restore + } catch { + Write-PipelineTelemetryError -Category 'InitializeToolset' -Message $_ + ExitWithExitCode 1 + } + + $buildTool = @{ Path = $msbuildPath; Command = ""; Tool = "vs"; Framework = "net472" } + } else { + Write-PipelineTelemetryError -Category 'InitializeToolset' -Message "Unexpected value of -msbuildEngine: '$msbuildEngine'." + ExitWithExitCode 1 + } + + return $global:_BuildTool = $buildTool +} + +function GetDefaultMSBuildEngine() { + # Presence of tools.vs indicates the repo needs to build using VS msbuild on Windows. + if (Get-Member -InputObject $GlobalJson.tools -Name 'vs') { + return 'vs' + } + + if (Get-Member -InputObject $GlobalJson.tools -Name 'dotnet') { + return 'dotnet' + } + + Write-PipelineTelemetryError -Category 'InitializeToolset' -Message "-msbuildEngine must be specified, or /global.json must specify 'tools.dotnet' or 'tools.vs'." + ExitWithExitCode 1 +} + +function GetNuGetPackageCachePath() { + if ($env:NUGET_PACKAGES -eq $null) { + # Use local cache on CI to ensure deterministic build, + # use global cache in dev builds to avoid cost of downloading packages. + # For directory normalization, see also: https://github.com/NuGet/Home/issues/7968 + if ($useGlobalNuGetCache) { + $env:NUGET_PACKAGES = Join-Path $env:UserProfile '.nuget\packages\' + } else { + $env:NUGET_PACKAGES = Join-Path $RepoRoot '.packages\' + } + } + + return $env:NUGET_PACKAGES +} + +# Returns a full path to an Arcade SDK task project file. +function GetSdkTaskProject([string]$taskName) { + return Join-Path (Split-Path (InitializeToolset) -Parent) "SdkTasks\$taskName.proj" +} + +function InitializeNativeTools() { + if (-Not (Test-Path variable:DisableNativeToolsetInstalls) -And (Get-Member -InputObject $GlobalJson -Name "native-tools")) { + $nativeArgs= @{} + if ($ci) { + $nativeArgs = @{ + InstallDirectory = "$ToolsDir" + } + } + & "$PSScriptRoot/init-tools-native.ps1" @nativeArgs + } +} + +function InitializeToolset() { + if (Test-Path variable:global:_ToolsetBuildProj) { + return $global:_ToolsetBuildProj + } + + $nugetCache = GetNuGetPackageCachePath + + $toolsetVersion = $GlobalJson.'msbuild-sdks'.'Microsoft.DotNet.Arcade.Sdk' + $toolsetLocationFile = Join-Path $ToolsetDir "$toolsetVersion.txt" + + if (Test-Path $toolsetLocationFile) { + $path = Get-Content $toolsetLocationFile -TotalCount 1 + if (Test-Path $path) { + return $global:_ToolsetBuildProj = $path + } + } + + if (-not $restore) { + Write-PipelineTelemetryError -Category 'InitializeToolset' -Message "Toolset version $toolsetVersion has not been restored." + ExitWithExitCode 1 + } + + $buildTool = InitializeBuildTool + + $proj = Join-Path $ToolsetDir 'restore.proj' + $bl = if ($binaryLog) { '/bl:' + (Join-Path $LogDir 'ToolsetRestore.binlog') } else { '' } + + '' | Set-Content $proj + + MSBuild-Core $proj $bl /t:__WriteToolsetLocation /clp:ErrorsOnly`;NoSummary /p:__ToolsetLocationOutputFile=$toolsetLocationFile + + $path = Get-Content $toolsetLocationFile -Encoding UTF8 -TotalCount 1 + if (!(Test-Path $path)) { + throw "Invalid toolset path: $path" + } + + return $global:_ToolsetBuildProj = $path +} + +function ExitWithExitCode([int] $exitCode) { + if ($ci -and $prepareMachine) { + Stop-Processes + } + exit $exitCode +} + +function Stop-Processes() { + Write-Host 'Killing running build processes...' + foreach ($processName in $processesToStopOnExit) { + Get-Process -Name $processName -ErrorAction SilentlyContinue | Stop-Process + } +} + +# +# Executes msbuild (or 'dotnet msbuild') with arguments passed to the function. +# The arguments are automatically quoted. +# Terminates the script if the build fails. +# +function MSBuild() { + if ($pipelinesLog) { + $buildTool = InitializeBuildTool + + if ($ci -and $buildTool.Tool -eq 'dotnet') { + $env:NUGET_PLUGIN_HANDSHAKE_TIMEOUT_IN_SECONDS = 20 + $env:NUGET_PLUGIN_REQUEST_TIMEOUT_IN_SECONDS = 20 + Write-PipelineSetVariable -Name 'NUGET_PLUGIN_HANDSHAKE_TIMEOUT_IN_SECONDS' -Value '20' + Write-PipelineSetVariable -Name 'NUGET_PLUGIN_REQUEST_TIMEOUT_IN_SECONDS' -Value '20' + } + + $toolsetBuildProject = InitializeToolset + $path = Split-Path -parent $toolsetBuildProject + $path = Join-Path $path (Join-Path $buildTool.Framework 'Microsoft.DotNet.Arcade.Sdk.dll') + $args += "/logger:$path" + } + + MSBuild-Core @args +} + +# +# Executes msbuild (or 'dotnet msbuild') with arguments passed to the function. +# The arguments are automatically quoted. +# Terminates the script if the build fails. +# +function MSBuild-Core() { + if ($ci) { + if (!$binaryLog -and !$excludeCIBinarylog) { + Write-PipelineTelemetryError -Category 'Build' -Message 'Binary log must be enabled in CI build, or explicitly opted-out from with the -excludeCIBinarylog switch.' + ExitWithExitCode 1 + } + + if ($nodeReuse) { + Write-PipelineTelemetryError -Category 'Build' -Message 'Node reuse must be disabled in CI build.' + ExitWithExitCode 1 + } + } + + $buildTool = InitializeBuildTool + + $cmdArgs = "$($buildTool.Command) /m /nologo /clp:Summary /v:$verbosity /nr:$nodeReuse /p:ContinuousIntegrationBuild=$ci" + + if ($warnAsError) { + $cmdArgs += ' /warnaserror /p:TreatWarningsAsErrors=true' + } + else { + $cmdArgs += ' /p:TreatWarningsAsErrors=false' + } + + foreach ($arg in $args) { + if ($arg -ne $null -and $arg.Trim() -ne "") { + $cmdArgs += " `"$arg`"" + } + } + + $env:ARCADE_BUILD_TOOL_COMMAND = "$($buildTool.Path) $cmdArgs" + + $exitCode = Exec-Process $buildTool.Path $cmdArgs + + if ($exitCode -ne 0) { + Write-PipelineTelemetryError -Category 'Build' -Message 'Build failed.' + + $buildLog = GetMSBuildBinaryLogCommandLineArgument $args + if ($buildLog -ne $null) { + Write-Host "See log: $buildLog" -ForegroundColor DarkGray + } + + ExitWithExitCode $exitCode + } +} + +function GetMSBuildBinaryLogCommandLineArgument($arguments) { + foreach ($argument in $arguments) { + if ($argument -ne $null) { + $arg = $argument.Trim() + if ($arg.StartsWith('/bl:', "OrdinalIgnoreCase")) { + return $arg.Substring('/bl:'.Length) + } + + if ($arg.StartsWith('/binaryLogger:', 'OrdinalIgnoreCase')) { + return $arg.Substring('/binaryLogger:'.Length) + } + } + } + + return $null +} + +function GetExecutableFileName($baseName) { + if (IsWindowsPlatform) { + return "$baseName.exe" + } + else { + return $baseName + } +} + +function IsWindowsPlatform() { + return [environment]::OSVersion.Platform -eq [PlatformID]::Win32NT +} + +function Get-Darc($version) { + $darcPath = "$TempDir\darc\$(New-Guid)" + if ($version -ne $null) { + & $PSScriptRoot\darc-init.ps1 -toolpath $darcPath -darcVersion $version | Out-Host + } else { + & $PSScriptRoot\darc-init.ps1 -toolpath $darcPath | Out-Host + } + return "$darcPath\darc.exe" +} + +. $PSScriptRoot\pipeline-logging-functions.ps1 + +$RepoRoot = Resolve-Path (Join-Path $PSScriptRoot '..\..') +$EngRoot = Resolve-Path (Join-Path $PSScriptRoot '..') +$ArtifactsDir = Join-Path $RepoRoot 'artifacts' +$ToolsetDir = Join-Path $ArtifactsDir 'toolset' +$ToolsDir = Join-Path $RepoRoot '.tools' +$LogDir = Join-Path (Join-Path $ArtifactsDir 'log') $configuration +$TempDir = Join-Path (Join-Path $ArtifactsDir 'tmp') $configuration +$GlobalJson = Get-Content -Raw -Path (Join-Path $RepoRoot 'global.json') | ConvertFrom-Json +# true if global.json contains a "runtimes" section +$globalJsonHasRuntimes = if ($GlobalJson.tools.PSObject.Properties.Name -Match 'runtimes') { $true } else { $false } + +Create-Directory $ToolsetDir +Create-Directory $TempDir +Create-Directory $LogDir + +Write-PipelineSetVariable -Name 'Artifacts' -Value $ArtifactsDir +Write-PipelineSetVariable -Name 'Artifacts.Toolset' -Value $ToolsetDir +Write-PipelineSetVariable -Name 'Artifacts.Log' -Value $LogDir +Write-PipelineSetVariable -Name 'TEMP' -Value $TempDir +Write-PipelineSetVariable -Name 'TMP' -Value $TempDir + +# Import custom tools configuration, if present in the repo. +# Note: Import in global scope so that the script set top-level variables without qualification. +if (!$disableConfigureToolsetImport) { + $configureToolsetScript = Join-Path $EngRoot 'configure-toolset.ps1' + if (Test-Path $configureToolsetScript) { + . $configureToolsetScript + if ((Test-Path variable:failOnConfigureToolsetError) -And $failOnConfigureToolsetError) { + if ((Test-Path variable:LastExitCode) -And ($LastExitCode -ne 0)) { + Write-PipelineTelemetryError -Category 'Build' -Message 'configure-toolset.ps1 returned a non-zero exit code' + ExitWithExitCode $LastExitCode + } + } + } +} diff --git a/eng/common/tools.sh b/eng/common/tools.sh new file mode 100755 index 0000000000..c722a05853 --- /dev/null +++ b/eng/common/tools.sh @@ -0,0 +1,507 @@ +#!/usr/bin/env bash + +# Initialize variables if they aren't already defined. + +# CI mode - set to true on CI server for PR validation build or official build. +ci=${ci:-false} + +# Set to true to use the pipelines logger which will enable Azure logging output. +# https://github.com/Microsoft/azure-pipelines-tasks/blob/master/docs/authoring/commands.md +# This flag is meant as a temporary opt-opt for the feature while validate it across +# our consumers. It will be deleted in the future. +if [[ "$ci" == true ]]; then + pipelines_log=${pipelines_log:-true} +else + pipelines_log=${pipelines_log:-false} +fi + +# Build configuration. Common values include 'Debug' and 'Release', but the repository may use other names. +configuration=${configuration:-'Debug'} + +# Set to true to opt out of outputting binary log while running in CI +exclude_ci_binary_log=${exclude_ci_binary_log:-false} + +if [[ "$ci" == true && "$exclude_ci_binary_log" == false ]]; then + binary_log_default=true +else + binary_log_default=false +fi + +# Set to true to output binary log from msbuild. Note that emitting binary log slows down the build. +binary_log=${binary_log:-$binary_log_default} + +# Turns on machine preparation/clean up code that changes the machine state (e.g. kills build processes). +prepare_machine=${prepare_machine:-false} + +# True to restore toolsets and dependencies. +restore=${restore:-true} + +# Adjusts msbuild verbosity level. +verbosity=${verbosity:-'minimal'} + +# Set to true to reuse msbuild nodes. Recommended to not reuse on CI. +if [[ "$ci" == true ]]; then + node_reuse=${node_reuse:-false} +else + node_reuse=${node_reuse:-true} +fi + +# Configures warning treatment in msbuild. +warn_as_error=${warn_as_error:-true} + +# True to attempt using .NET Core already that meets requirements specified in global.json +# installed on the machine instead of downloading one. +use_installed_dotnet_cli=${use_installed_dotnet_cli:-true} + +# Enable repos to use a particular version of the on-line dotnet-install scripts. +# default URL: https://dot.net/v1/dotnet-install.sh +dotnetInstallScriptVersion=${dotnetInstallScriptVersion:-'v1'} + +# True to use global NuGet cache instead of restoring packages to repository-local directory. +if [[ "$ci" == true ]]; then + use_global_nuget_cache=${use_global_nuget_cache:-false} +else + use_global_nuget_cache=${use_global_nuget_cache:-true} +fi + +# Used when restoring .NET SDK from alternative feeds +runtime_source_feed=${runtime_source_feed:-''} +runtime_source_feed_key=${runtime_source_feed_key:-''} + +# Determines if dotnet-install.sh comes from the eng/common folder or the internet +# (default = public version) +use_default_dotnet_install=${use_default_dotnet_install:-false} + +# Resolve any symlinks in the given path. +function ResolvePath { + local path=$1 + + while [[ -h $path ]]; do + local dir="$( cd -P "$( dirname "$path" )" && pwd )" + path="$(readlink "$path")" + + # if $path was a relative symlink, we need to resolve it relative to the path where the + # symlink file was located + [[ $path != /* ]] && path="$dir/$path" + done + + # return value + _ResolvePath="$path" +} + +# ReadVersionFromJson [json key] +function ReadGlobalVersion { + local key=$1 + + local line=$(awk "/$key/ {print; exit}" "$global_json_file") + local pattern="\"$key\" *: *\"(.*)\"" + + if [[ ! $line =~ $pattern ]]; then + Write-PipelineTelemetryError -category 'Build' "Error: Cannot find \"$key\" in $global_json_file" + ExitWithExitCode 1 + fi + + # return value + _ReadGlobalVersion=${BASH_REMATCH[1]} +} + +function InitializeDotNetCli { + if [[ -n "${_InitializeDotNetCli:-}" ]]; then + return + fi + + local install=$1 + + # Don't resolve runtime, shared framework, or SDK from other locations to ensure build determinism + export DOTNET_MULTILEVEL_LOOKUP=0 + + # Disable first run since we want to control all package sources + export DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1 + + # Disable telemetry on CI + if [[ $ci == true ]]; then + export DOTNET_CLI_TELEMETRY_OPTOUT=1 + fi + + # LTTNG is the logging infrastructure used by Core CLR. Need this variable set + # so it doesn't output warnings to the console. + export LTTNG_HOME="$HOME" + + # Source Build uses DotNetCoreSdkDir variable + if [[ -n "${DotNetCoreSdkDir:-}" ]]; then + export DOTNET_INSTALL_DIR="$DotNetCoreSdkDir" + fi + + # Find the first path on $PATH that contains the dotnet.exe + if [[ "$use_installed_dotnet_cli" == true && $global_json_has_runtimes == false && -z "${DOTNET_INSTALL_DIR:-}" ]]; then + local dotnet_path=`command -v dotnet` + if [[ -n "$dotnet_path" ]]; then + ResolvePath "$dotnet_path" + export DOTNET_INSTALL_DIR=`dirname "$_ResolvePath"` + fi + fi + + ReadGlobalVersion "dotnet" + local dotnet_sdk_version=$_ReadGlobalVersion + local dotnet_root="" + + # Use dotnet installation specified in DOTNET_INSTALL_DIR if it contains the required SDK version, + # otherwise install the dotnet CLI and SDK to repo local .dotnet directory to avoid potential permission issues. + if [[ $global_json_has_runtimes == false && -n "${DOTNET_INSTALL_DIR:-}" && -d "$DOTNET_INSTALL_DIR/sdk/$dotnet_sdk_version" ]]; then + dotnet_root="$DOTNET_INSTALL_DIR" + else + dotnet_root="$repo_root/.dotnet" + + export DOTNET_INSTALL_DIR="$dotnet_root" + + if [[ ! -d "$DOTNET_INSTALL_DIR/sdk/$dotnet_sdk_version" ]]; then + if [[ "$install" == true ]]; then + InstallDotNetSdk "$dotnet_root" "$dotnet_sdk_version" + else + Write-PipelineTelemetryError -category 'InitializeToolset' "Unable to find dotnet with SDK version '$dotnet_sdk_version'" + ExitWithExitCode 1 + fi + fi + fi + + # Add dotnet to PATH. This prevents any bare invocation of dotnet in custom + # build steps from using anything other than what we've downloaded. + Write-PipelinePrependPath -path "$dotnet_root" + + Write-PipelineSetVariable -name "DOTNET_MULTILEVEL_LOOKUP" -value "0" + Write-PipelineSetVariable -name "DOTNET_SKIP_FIRST_TIME_EXPERIENCE" -value "1" + + # return value + _InitializeDotNetCli="$dotnet_root" +} + +function InstallDotNetSdk { + local root=$1 + local version=$2 + local architecture="unset" + if [[ $# -ge 3 ]]; then + architecture=$3 + fi + InstallDotNet "$root" "$version" $architecture 'sdk' 'false' $runtime_source_feed $runtime_source_feed_key +} + +function InstallDotNet { + local root=$1 + local version=$2 + + GetDotNetInstallScript "$root" + local install_script=$_GetDotNetInstallScript + + local archArg='' + if [[ -n "${3:-}" ]] && [ "$3" != 'unset' ]; then + archArg="--architecture $3" + fi + local runtimeArg='' + if [[ -n "${4:-}" ]] && [ "$4" != 'sdk' ]; then + runtimeArg="--runtime $4" + fi + local skipNonVersionedFilesArg="" + if [[ "$#" -ge "5" ]] && [[ "$5" != 'false' ]]; then + skipNonVersionedFilesArg="--skip-non-versioned-files" + fi + bash "$install_script" --version $version --install-dir "$root" $archArg $runtimeArg $skipNonVersionedFilesArg || { + local exit_code=$? + echo "Failed to install dotnet SDK from public location (exit code '$exit_code')." + + local runtimeSourceFeed='' + if [[ -n "${6:-}" ]]; then + runtimeSourceFeed="--azure-feed $6" + fi + + local runtimeSourceFeedKey='' + if [[ -n "${7:-}" ]]; then + # The 'base64' binary on alpine uses '-d' and doesn't support '--decode' + # '-d'. To work around this, do a simple detection and switch the parameter + # accordingly. + decodeArg="--decode" + if base64 --help 2>&1 | grep -q "BusyBox"; then + decodeArg="-d" + fi + decodedFeedKey=`echo $7 | base64 $decodeArg` + runtimeSourceFeedKey="--feed-credential $decodedFeedKey" + fi + + if [[ -n "$runtimeSourceFeed" || -n "$runtimeSourceFeedKey" ]]; then + bash "$install_script" --version $version --install-dir "$root" $archArg $runtimeArg $skipNonVersionedFilesArg $runtimeSourceFeed $runtimeSourceFeedKey || { + local exit_code=$? + Write-PipelineTelemetryError -category 'InitializeToolset' "Failed to install dotnet SDK from custom location '$runtimeSourceFeed' (exit code '$exit_code')." + ExitWithExitCode $exit_code + } + else + if [[ $exit_code != 0 ]]; then + Write-PipelineTelemetryError -category 'InitializeToolset' "Failed to install dotnet SDK from public location (exit code '$exit_code')." + fi + ExitWithExitCode $exit_code + fi + } +} + +function with_retries { + local maxRetries=5 + local retries=1 + echo "Trying to run '$@' for maximum of $maxRetries attempts." + while [[ $((retries++)) -le $maxRetries ]]; do + "$@" + + if [[ $? == 0 ]]; then + echo "Ran '$@' successfully." + return 0 + fi + + timeout=$((2**$retries-1)) + echo "Failed to execute '$@'. Waiting $timeout seconds before next attempt ($retries out of $maxRetries)." 1>&2 + sleep $timeout + done + + echo "Failed to execute '$@' for $maxRetries times." 1>&2 + + return 1 +} + +function GetDotNetInstallScript { + local root=$1 + local install_script="$root/dotnet-install.sh" + local install_script_url="https://dot.net/$dotnetInstallScriptVersion/dotnet-install.sh" + + if [[ ! -a "$install_script" ]]; then + mkdir -p "$root" + + if [[ "$use_default_dotnet_install" == true ]]; then + echo "Downloading '$install_script_url'" + + # Use curl if available, otherwise use wget + if command -v curl > /dev/null; then + with_retries curl "$install_script_url" -sSL --retry 10 --create-dirs -o "$install_script" || { + local exit_code=$? + Write-PipelineTelemetryError -category 'InitializeToolset' "Failed to acquire dotnet install script (exit code '$exit_code')." + ExitWithExitCode $exit_code + } + else + with_retries wget -v -O "$install_script" "$install_script_url" || { + local exit_code=$? + Write-PipelineTelemetryError -category 'InitializeToolset' "Failed to acquire dotnet install script (exit code '$exit_code')." + ExitWithExitCode $exit_code + } + fi + else + # Use a special version of the script from eng/common that understands the existence of a "productVersion.txt" in a dotnet path. + # See https://github.com/dotnet/arcade/issues/6047 for details + cp $repo_root/eng/common/dotnet-install-scripts/dotnet-install.sh $install_script + fi + fi + + # return value + _GetDotNetInstallScript="$install_script" +} + +function InitializeBuildTool { + if [[ -n "${_InitializeBuildTool:-}" ]]; then + return + fi + + InitializeDotNetCli $restore + + # return values + _InitializeBuildTool="$_InitializeDotNetCli/dotnet" + _InitializeBuildToolCommand="msbuild" + _InitializeBuildToolFramework="netcoreapp2.1" +} + +function GetNuGetPackageCachePath { + if [[ -z ${NUGET_PACKAGES:-} ]]; then + if [[ "$use_global_nuget_cache" == true ]]; then + export NUGET_PACKAGES="$HOME/.nuget/packages" + else + export NUGET_PACKAGES="$repo_root/.packages" + fi + fi + + # return value + _GetNuGetPackageCachePath=$NUGET_PACKAGES +} + +function InitializeNativeTools() { + if [[ -n "${DisableNativeToolsetInstalls:-}" ]]; then + return + fi + if grep -Fq "native-tools" $global_json_file + then + local nativeArgs="" + if [[ "$ci" == true ]]; then + nativeArgs="--installDirectory $tools_dir" + fi + "$_script_dir/init-tools-native.sh" $nativeArgs + fi +} + +function InitializeToolset { + if [[ -n "${_InitializeToolset:-}" ]]; then + return + fi + + GetNuGetPackageCachePath + + ReadGlobalVersion "Microsoft.DotNet.Arcade.Sdk" + + local toolset_version=$_ReadGlobalVersion + local toolset_location_file="$toolset_dir/$toolset_version.txt" + + if [[ -a "$toolset_location_file" ]]; then + local path=`cat "$toolset_location_file"` + if [[ -a "$path" ]]; then + # return value + _InitializeToolset="$path" + return + fi + fi + + if [[ "$restore" != true ]]; then + Write-PipelineTelemetryError -category 'InitializeToolset' "Toolset version $toolset_version has not been restored." + ExitWithExitCode 2 + fi + + local proj="$toolset_dir/restore.proj" + + local bl="" + if [[ "$binary_log" == true ]]; then + bl="/bl:$log_dir/ToolsetRestore.binlog" + fi + + echo '' > "$proj" + MSBuild-Core "$proj" $bl /t:__WriteToolsetLocation /clp:ErrorsOnly\;NoSummary /p:__ToolsetLocationOutputFile="$toolset_location_file" + + local toolset_build_proj=`cat "$toolset_location_file"` + + if [[ ! -a "$toolset_build_proj" ]]; then + Write-PipelineTelemetryError -category 'Build' "Invalid toolset path: $toolset_build_proj" + ExitWithExitCode 3 + fi + + # return value + _InitializeToolset="$toolset_build_proj" +} + +function ExitWithExitCode { + if [[ "$ci" == true && "$prepare_machine" == true ]]; then + StopProcesses + fi + exit $1 +} + +function StopProcesses { + echo "Killing running build processes..." + pkill -9 "dotnet" || true + pkill -9 "vbcscompiler" || true + return 0 +} + +function MSBuild { + local args=$@ + if [[ "$pipelines_log" == true ]]; then + InitializeBuildTool + InitializeToolset + + if [[ "$ci" == true ]]; then + export NUGET_PLUGIN_HANDSHAKE_TIMEOUT_IN_SECONDS=20 + export NUGET_PLUGIN_REQUEST_TIMEOUT_IN_SECONDS=20 + Write-PipelineSetVariable -name "NUGET_PLUGIN_HANDSHAKE_TIMEOUT_IN_SECONDS" -value "20" + Write-PipelineSetVariable -name "NUGET_PLUGIN_REQUEST_TIMEOUT_IN_SECONDS" -value "20" + fi + + local toolset_dir="${_InitializeToolset%/*}" + local logger_path="$toolset_dir/$_InitializeBuildToolFramework/Microsoft.DotNet.Arcade.Sdk.dll" + args=( "${args[@]}" "-logger:$logger_path" ) + fi + + MSBuild-Core ${args[@]} +} + +function MSBuild-Core { + if [[ "$ci" == true ]]; then + if [[ "$binary_log" != true && "$exclude_ci_binary_log" != true ]]; then + Write-PipelineTelemetryError -category 'Build' "Binary log must be enabled in CI build, or explicitly opted-out from with the -noBinaryLog switch." + ExitWithExitCode 1 + fi + + if [[ "$node_reuse" == true ]]; then + Write-PipelineTelemetryError -category 'Build' "Node reuse must be disabled in CI build." + ExitWithExitCode 1 + fi + fi + + InitializeBuildTool + + local warnaserror_switch="" + if [[ $warn_as_error == true ]]; then + warnaserror_switch="/warnaserror" + fi + + function RunBuildTool { + export ARCADE_BUILD_TOOL_COMMAND="$_InitializeBuildTool $@" + + "$_InitializeBuildTool" "$@" || { + local exit_code=$? + Write-PipelineTaskError "Build failed (exit code '$exit_code')." + ExitWithExitCode $exit_code + } + } + + RunBuildTool "$_InitializeBuildToolCommand" /m /nologo /clp:Summary /v:$verbosity /nr:$node_reuse $warnaserror_switch /p:TreatWarningsAsErrors=$warn_as_error /p:ContinuousIntegrationBuild=$ci "$@" +} + +ResolvePath "${BASH_SOURCE[0]}" +_script_dir=`dirname "$_ResolvePath"` + +. "$_script_dir/pipeline-logging-functions.sh" + +eng_root=`cd -P "$_script_dir/.." && pwd` +repo_root=`cd -P "$_script_dir/../.." && pwd` +artifacts_dir="$repo_root/artifacts" +toolset_dir="$artifacts_dir/toolset" +tools_dir="$repo_root/.tools" +log_dir="$artifacts_dir/log/$configuration" +temp_dir="$artifacts_dir/tmp/$configuration" + +global_json_file="$repo_root/global.json" +# determine if global.json contains a "runtimes" entry +global_json_has_runtimes=false +dotnetlocal_key=$(awk "/runtimes/ {print; exit}" "$global_json_file") || true +if [[ -n "$dotnetlocal_key" ]]; then + global_json_has_runtimes=true +fi + +# HOME may not be defined in some scenarios, but it is required by NuGet +if [[ -z $HOME ]]; then + export HOME="$repo_root/artifacts/.home/" + mkdir -p "$HOME" +fi + +mkdir -p "$toolset_dir" +mkdir -p "$temp_dir" +mkdir -p "$log_dir" + +Write-PipelineSetVariable -name "Artifacts" -value "$artifacts_dir" +Write-PipelineSetVariable -name "Artifacts.Toolset" -value "$toolset_dir" +Write-PipelineSetVariable -name "Artifacts.Log" -value "$log_dir" +Write-PipelineSetVariable -name "Temp" -value "$temp_dir" +Write-PipelineSetVariable -name "TMP" -value "$temp_dir" + +# Import custom tools configuration, if present in the repo. +if [ -z "${disable_configure_toolset_import:-}" ]; then + configure_toolset_script="$eng_root/configure-toolset.sh" + if [[ -a "$configure_toolset_script" ]]; then + . "$configure_toolset_script" + fi +fi + +# TODO: https://github.com/dotnet/arcade/issues/1468 +# Temporary workaround to avoid breaking change. +# Remove once repos are updated. +if [[ -n "${useInstalledDotNetCli:-}" ]]; then + use_installed_dotnet_cli="$useInstalledDotNetCli" +fi diff --git a/pkg/common/CommonPackage.props b/eng/pkg/CommonPackage.props similarity index 100% rename from pkg/common/CommonPackage.props rename to eng/pkg/CommonPackage.props diff --git a/pkg/common/DnnImageFeaturizer.props b/eng/pkg/DnnImageFeaturizer.props similarity index 100% rename from pkg/common/DnnImageFeaturizer.props rename to eng/pkg/DnnImageFeaturizer.props diff --git a/eng/pkg/Pack.props b/eng/pkg/Pack.props new file mode 100644 index 0000000000..496cb2d50e --- /dev/null +++ b/eng/pkg/Pack.props @@ -0,0 +1,78 @@ + + + + $(ArtifactsDir)pkgassets/ + true + snupkg + true + $(MSBuildProjectName.Replace('.symbols', '')) + true + true + + + + + + Microsoft + LICENSE + https://dot.net/ml + mlnetlogo.png + https://aka.ms/mlnetreleasenotes + + ML.NET ML Machine Learning + + .dll + .so + .dylib + + + + + + + + + + + + + + + + + + + + + + + + + + + + PreserveNewest + false + %(Filename)%(Extension) + + + PreserveNewest + false + %(Filename)%(Extension) + + + + + + + None + + + + \ No newline at end of file diff --git a/pkg/_._ b/eng/pkg/_._ similarity index 100% rename from pkg/_._ rename to eng/pkg/_._ diff --git a/pkg/mlnetlogo.png b/eng/pkg/mlnetlogo.png similarity index 100% rename from pkg/mlnetlogo.png rename to eng/pkg/mlnetlogo.png diff --git a/eng/snk/Test.snk b/eng/snk/Test.snk new file mode 100644 index 0000000000000000000000000000000000000000..8082d18e9d24e7dd04453e7799204acad77edd42 GIT binary patch literal 596 zcmV-a0;~N80ssI2Bme+XQ$aES1ONa50096Mz#8H84vfH?sp`oTeE9vJ&Mf|)jm}SV z0mKt5sryjQjK3Z9+!)%KLc@9Xt(fPK-b_PBfW}(FS z9t1vej;0|k?sUz~-QC7XH%7q6xaBsjyUKpt3f_309HN$?IIYOg0f~v%TtgRIC~v1G zP4+O*$pHhi=_3C9M7|PXa_Vy``#hPhHJN|S_hfLcoR^vicfDlj*X4R!CNjwBB5y)}bKw+3(Z8oGI zbKNx`KgJw4!Q|4bZdjG)9IaBZ(eeTHi`w?aU@C)FcE%^;1Klt=K3z_Y_oycADZNu` i^tCqjX&;7%oFDsFiUM&svdWAB#EVY|qg%t2H4F^B%o*?i literal 0 HcmV?d00001 diff --git a/global.json b/global.json new file mode 100644 index 0000000000..ee6291512f --- /dev/null +++ b/global.json @@ -0,0 +1,16 @@ +{ + "tools": { + "dotnet": "3.1.102", + "runtimes": { + "dotnet/x64": ["$(MicrosoftNETCorePlatformsVersion)", "$(MicrosoftNETCore3PlatformsVersion)"], + "dotnet/x86": ["$(MicrosoftNETCorePlatformsVersion)", "$(MicrosoftNETCore3PlatformsVersion)"] + } + }, + "msbuild-sdks": { + "Microsoft.DotNet.Arcade.Sdk": "5.0.0-beta.20461.7", + "Microsoft.DotNet.Helix.Sdk": "5.0.0-beta.20461.7", + "Microsoft.Build.Traversal": "2.1.1", + "Microsoft.SourceLink.GitHub": "1.1.0-beta-20206-02", + "Microsoft.SourceLink.Common": "1.1.0-beta-20206-02" + } + } diff --git a/init-tools.cmd b/init-tools.cmd deleted file mode 100644 index 4c7893ec49..0000000000 --- a/init-tools.cmd +++ /dev/null @@ -1,128 +0,0 @@ -@if not defined _echo @echo off -setlocal - -set INIT_TOOLS_LOG=%~dp0init-tools.log -if [%PACKAGES_DIR%]==[] set PACKAGES_DIR=%~dp0packages -if [%TOOLRUNTIME_DIR%]==[] set TOOLRUNTIME_DIR=%~dp0Tools -set DOTNET_PATH=%TOOLRUNTIME_DIR%\dotnetcli\ -if [%DOTNET_CMD%]==[] set DOTNET_CMD=%DOTNET_PATH%dotnet.exe -if [%BUILDTOOLS_SOURCE%]==[] set BUILDTOOLS_SOURCE=https://dotnet.myget.org/F/dotnet-buildtools/api/v3/index.json -set /P BUILDTOOLS_VERSION=< "%~dp0BuildToolsVersion.txt" -set BUILD_TOOLS_PATH=%PACKAGES_DIR%\Microsoft.DotNet.BuildTools\%BUILDTOOLS_VERSION%\lib -set INIT_TOOLS_RESTORE_PROJECT=%~dp0init-tools.msbuild -set BUILD_TOOLS_SEMAPHORE_DIR=%TOOLRUNTIME_DIR%\%BUILDTOOLS_VERSION% -set BUILD_TOOLS_SEMAPHORE=%BUILD_TOOLS_SEMAPHORE_DIR%\init-tools.completed -set ARCH=x64 - -:: if force option is specified then clean the tool runtime and build tools package directory to force it to get recreated -if [%1]==[force] ( - if exist "%TOOLRUNTIME_DIR%" rmdir /S /Q "%TOOLRUNTIME_DIR%" - if exist "%PACKAGES_DIR%\Microsoft.DotNet.BuildTools" rmdir /S /Q "%PACKAGES_DIR%\Microsoft.DotNet.BuildTools" -) - -:: If semaphore exists do nothing -if exist "%BUILD_TOOLS_SEMAPHORE%" ( - echo Tools are already initialized. - goto :EOF -) - -if exist "%TOOLRUNTIME_DIR%" rmdir /S /Q "%TOOLRUNTIME_DIR%" - -if exist "%DotNetBuildToolsDir%" ( - echo Using tools from '%DotNetBuildToolsDir%'. - mklink /j "%TOOLRUNTIME_DIR%" "%DotNetBuildToolsDir%" - - if not exist "%DOTNET_CMD%" ( - echo ERROR: Ensure that '%DotNetBuildToolsDir%' contains the .NET Core SDK at '%DOTNET_PATH%' - exit /b 1 - ) - - echo Done initializing tools. - if NOT exist "%BUILD_TOOLS_SEMAPHORE_DIR%" mkdir "%BUILD_TOOLS_SEMAPHORE_DIR%" - echo Using tools from '%DotNetBuildToolsDir%'. > "%BUILD_TOOLS_SEMAPHORE%" - exit /b 0 -) - -echo Running %0 > "%INIT_TOOLS_LOG%" - -set /p DOTNET_VERSION=< "%~dp0DotnetCLIVersion.txt" -set /p DOTNET_EXTRA_RUNTIME_VERSION=< "%~dp0DotnetExtraRuntimeVersion.txt" - -:Arg_Loop -if [%1] == [] goto :ArchSet -if /i [%1] == [x86] ( set ARCH=x86) -shift -goto :Arg_Loop - -:ArchSet -if exist "%DOTNET_CMD%" goto :afterdotnetrestore - -if NOT exist "%DOTNET_PATH%" mkdir "%DOTNET_PATH%" - -:: set registry to take dump automatically when test process crashes -if NOT [%AGENT_ID%] == [] ( - reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps" /f - reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps" /f /v DumpType /t REG_DWORD /d 2 - reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps" /f /v DumpCount /t REG_DWORD /d 2 - reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps" /f /v DumpFolder /t REG_SZ /d "%~dp0CrashDumps" -) - -:: install procdump.exe to take process dump when test crashes, hangs or fails -echo Installing procdump.exe -powershell -Command "Invoke-WebRequest https://download.sysinternals.com/files/Procdump.zip -UseBasicParsing -outfile procdump.zip | Out-Null" -powershell -Command "Expand-Archive -Force procdump.zip Tools\ProcDump" -del /f procdump.zip -echo Finish install procdump.exe - -:: install the extra runtime first, so the SDK install will overwrite the root dotnet executable -echo Installing dotnet runtime %DOTNET_EXTRA_RUNTIME_VERSION%... -set DOTNET_EXTRA_RUNTIME_ZIP_NAME=dotnet-runtime-%DOTNET_EXTRA_RUNTIME_VERSION%-win-%ARCH%.zip -set DOTNET_EXTRA_RUNTIME_REMOTE_PATH=https://dotnetcli.azureedge.net/dotnet/Runtime/%DOTNET_EXTRA_RUNTIME_VERSION%/%DOTNET_EXTRA_RUNTIME_ZIP_NAME% -set DOTNET_EXTRA_RUNTIME_LOCAL_PATH=%DOTNET_PATH%%DOTNET_EXTRA_RUNTIME_ZIP_NAME% -echo Installing '%DOTNET_EXTRA_RUNTIME_REMOTE_PATH%' to '%DOTNET_EXTRA_RUNTIME_LOCAL_PATH%' >> "%INIT_TOOLS_LOG%" -powershell -NoProfile -ExecutionPolicy unrestricted -Command "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12;$retryCount = 0; $success = $false; $proxyCredentialsRequired = $false; do { try { $wc = New-Object Net.WebClient; if ($proxyCredentialsRequired) { [Net.WebRequest]::DefaultWebProxy.Credentials = [Net.CredentialCache]::DefaultNetworkCredentials; } $wc.DownloadFile('%DOTNET_EXTRA_RUNTIME_REMOTE_PATH%', '%DOTNET_EXTRA_RUNTIME_LOCAL_PATH%'); $success = $true; } catch { if ($retryCount -ge 6) { throw; } else { $we = $_.Exception.InnerException -as [Net.WebException]; $proxyCredentialsRequired = ($we -ne $null -and ([Net.HttpWebResponse]$we.Response).StatusCode -eq [Net.HttpStatusCode]::ProxyAuthenticationRequired); Start-Sleep -Seconds (5 * $retryCount); $retryCount++; } } } while ($success -eq $false); Expand-Archive '%DOTNET_EXTRA_RUNTIME_LOCAL_PATH%' '%DOTNET_PATH%';" >> "%INIT_TOOLS_LOG%" - -echo Installing dotnet cli %DOTNET_VERSION%... -set DOTNET_ZIP_NAME=dotnet-sdk-%DOTNET_VERSION%-win-%ARCH%.zip -set DOTNET_REMOTE_PATH=https://dotnetcli.azureedge.net/dotnet/Sdk/%DOTNET_VERSION%/%DOTNET_ZIP_NAME% -set DOTNET_LOCAL_PATH=%DOTNET_PATH%%DOTNET_ZIP_NAME% -echo Installing '%DOTNET_REMOTE_PATH%' to '%DOTNET_LOCAL_PATH%' >> "%INIT_TOOLS_LOG%" -powershell -NoProfile -ExecutionPolicy unrestricted -Command "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12;$retryCount = 0; $success = $false; $proxyCredentialsRequired = $false; do { try { $wc = New-Object Net.WebClient; if ($proxyCredentialsRequired) { [Net.WebRequest]::DefaultWebProxy.Credentials = [Net.CredentialCache]::DefaultNetworkCredentials; } $wc.DownloadFile('%DOTNET_REMOTE_PATH%', '%DOTNET_LOCAL_PATH%'); $success = $true; } catch { if ($retryCount -ge 6) { throw; } else { $we = $_.Exception.InnerException -as [Net.WebException]; $proxyCredentialsRequired = ($we -ne $null -and ([Net.HttpWebResponse]$we.Response).StatusCode -eq [Net.HttpStatusCode]::ProxyAuthenticationRequired); Start-Sleep -Seconds (5 * $retryCount); $retryCount++; } } } while ($success -eq $false); Expand-Archive '%DOTNET_LOCAL_PATH%' '%DOTNET_PATH%' -Force; " >> "%INIT_TOOLS_LOG%" - -if NOT exist "%DOTNET_LOCAL_PATH%" ( - echo ERROR: Could not install dotnet cli correctly. 1>&2 - goto :error -) - -:afterdotnetrestore - -if exist "%BUILD_TOOLS_PATH%" goto :afterbuildtoolsrestore -echo Restoring BuildTools version %BUILDTOOLS_VERSION%... -echo Running: "%DOTNET_CMD%" restore "%INIT_TOOLS_RESTORE_PROJECT%" --no-cache --packages "%PACKAGES_DIR%" --source "%BUILDTOOLS_SOURCE%" /p:BuildToolsPackageVersion=%BUILDTOOLS_VERSION% /p:ToolsDir=%TOOLRUNTIME_DIR% >> "%INIT_TOOLS_LOG%" -call "%DOTNET_CMD%" restore "%INIT_TOOLS_RESTORE_PROJECT%" --no-cache --packages "%PACKAGES_DIR%" --source "%BUILDTOOLS_SOURCE%" /p:BuildToolsPackageVersion=%BUILDTOOLS_VERSION% /p:ToolsDir="%TOOLRUNTIME_DIR%" >> "%INIT_TOOLS_LOG%" -if NOT exist "%BUILD_TOOLS_PATH%\init-tools.cmd" ( - echo ERROR: Could not restore build tools correctly. 1>&2 - goto :error -) - -:afterbuildtoolsrestore - -echo Initializing BuildTools... -echo Running: "%BUILD_TOOLS_PATH%\init-tools.cmd" "%~dp0" "%DOTNET_CMD%" "%TOOLRUNTIME_DIR%" "%PACKAGES_DIR%" >> "%INIT_TOOLS_LOG%" -call "%BUILD_TOOLS_PATH%\init-tools.cmd" "%~dp0" "%DOTNET_CMD%" "%TOOLRUNTIME_DIR%" "%PACKAGES_DIR%" >> "%INIT_TOOLS_LOG%" -set INIT_TOOLS_ERRORLEVEL=%ERRORLEVEL% -if not [%INIT_TOOLS_ERRORLEVEL%]==[0] ( - echo ERROR: An error occured when trying to initialize the tools. 1>&2 - goto :error -) - -:: Create semaphore file -echo Done initializing tools. -if NOT exist "%BUILD_TOOLS_SEMAPHORE_DIR%" mkdir "%BUILD_TOOLS_SEMAPHORE_DIR%" -echo Init-Tools.cmd completed for BuildTools Version: %BUILDTOOLS_VERSION% > "%BUILD_TOOLS_SEMAPHORE%" -exit /b 0 - -:error -echo Please check the detailed log that follows. 1>&2 -type "%INIT_TOOLS_LOG%" 1>&2 -exit /b 1 diff --git a/init-tools.msbuild b/init-tools.msbuild deleted file mode 100644 index 7bb7fa0043..0000000000 --- a/init-tools.msbuild +++ /dev/null @@ -1,13 +0,0 @@ - - - netcoreapp1.0 - false - true - $(MSBuildThisFileDirectory)Tools/$(BuildToolsPackageVersion) - Microsoft.SymbolUploader.Build.Task - - - - - - \ No newline at end of file diff --git a/init-tools.sh b/init-tools.sh deleted file mode 100755 index 492df5711f..0000000000 --- a/init-tools.sh +++ /dev/null @@ -1,207 +0,0 @@ -#!/usr/bin/env bash - -__scriptpath=$(cd "$(dirname "$0")"; pwd -P) -__init_tools_log="$__scriptpath/init-tools.log" -__PACKAGES_DIR="$__scriptpath/packages" -__TOOLRUNTIME_DIR="$__scriptpath/Tools" -__DOTNET_PATH="$__TOOLRUNTIME_DIR/dotnetcli" -__DOTNET_CMD="$__DOTNET_PATH/dotnet" -if [ -z "${__BUILDTOOLS_SOURCE:-}" ]; then __BUILDTOOLS_SOURCE=https://dotnet.myget.org/F/dotnet-buildtools/api/v3/index.json; fi -export __BUILDTOOLS_USE_CSPROJ=true -__BUILD_TOOLS_PACKAGE_VERSION=$(cat "$__scriptpath/BuildToolsVersion.txt" | sed 's/\r$//') # remove CR if mounted repo on Windows drive - -DotNetCliFileName="DotnetCLIVersion.txt" -DotNetExtraRuntimeFileName="DotnetExtraRuntimeVersion.txt" - -__DOTNET_TOOLS_VERSION=$(cat "$__scriptpath/$DotNetCliFileName" | sed 's/\r$//') # remove CR if mounted repo on Windows drive -__DOTNET_EXTRA_RUNTIME_VERSION=$(cat "$__scriptpath/$DotNetExtraRuntimeFileName" | sed 's/\r$//') # remove CR if mounted repo on Windows drive -__BUILD_TOOLS_PATH="$__PACKAGES_DIR/microsoft.dotnet.buildtools/$__BUILD_TOOLS_PACKAGE_VERSION/lib" -__INIT_TOOLS_RESTORE_PROJECT="$__scriptpath/init-tools.msbuild" -__BUILD_TOOLS_SEMAPHORE="$__TOOLRUNTIME_DIR/$__BUILD_TOOLS_PACKAGE_VERSION/init-tools.complete" - -if [ -e "$__BUILD_TOOLS_SEMAPHORE" ]; then - echo "Tools are already initialized" - return #return instead of exit because this script is inlined in other scripts which we don't want to exit -fi - -if [ -e "$__TOOLRUNTIME_DIR" ]; then rm -rf -- "$__TOOLRUNTIME_DIR"; fi - -if [ -d "${DotNetBuildToolsDir:-}" ]; then - echo "Using tools from '$DotNetBuildToolsDir'." - ln -s "$DotNetBuildToolsDir" "$__TOOLRUNTIME_DIR" - - if [ ! -e "$__DOTNET_CMD" ]; then - echo "ERROR: Ensure that $DotNetBuildToolsDir contains the .NET Core SDK at $__DOTNET_PATH" - exit 1 - fi - - echo "Done initializing tools." - mkdir -p "$(dirname "$__BUILD_TOOLS_SEMAPHORE")" && touch "$__BUILD_TOOLS_SEMAPHORE" - return #return instead of exit because this script is inlined in other scripts which we don't want to exit -fi - -echo "Running: $__scriptpath/init-tools.sh" > "$__init_tools_log" - -display_error_message() -{ - echo "Please check the detailed log that follows." 1>&2 - cat "$__init_tools_log" 1>&2 -} - -# Executes a command and retries if it fails. -execute_with_retry() { - local count=0 - local retries=${retries:-5} - local waitFactor=${waitFactor:-6} - until "$@"; do - local exit=$? - count=$(( $count + 1 )) - if [ $count -lt $retries ]; then - local wait=$(( waitFactor ** (( count - 1 )) )) - echo "Retry $count/$retries exited $exit, retrying in $wait seconds..." - sleep $wait - else - say_err "Retry $count/$retries exited $exit, no more retries left." - return $exit - fi - done - - return 0 -} - -if [ ! -e "$__DOTNET_PATH" ]; then - if [ -z "${__DOTNET_PKG:-}" ]; then - if [ "$(uname -m | grep "i[3456]86")" = "i686" ]; then - echo "Warning: build not supported on 32 bit Unix" - fi - - __PKG_ARCH=x64 - - OSName=$(uname -s) - case $OSName in - Darwin) - OS=OSX - __PKG_RID=osx - ulimit -n 2048 - # Format x.y.z as single integer with three digits for each part - VERSION=`sw_vers -productVersion| sed -e 's/\./ /g' | xargs printf "%03d%03d%03d"` - if [ "$VERSION" -lt 010012000 ]; then - echo error: macOS version `sw_vers -productVersion` is too old. 10.12 is needed as minimum. - exit 1 - fi - ;; - - Linux) - __PKG_RID=linux - OS=Linux - - if [ -e /etc/os-release ]; then - source /etc/os-release - if [[ $ID == "alpine" ]]; then - __PKG_RID=linux-musl - fi - elif [ -e /etc/redhat-release ]; then - redhatRelease=$( /dev/null; then - curl --retry 10 -sSL --create-dirs -o $__DOTNET_PATH/dotnet.extra.runtime.tar ${__DOTNET_EXTRA_RUNTIME_LOCATION} - else - wget -q -O $__DOTNET_PATH/dotnet.extra.runtime.tar ${__DOTNET_EXTRA_RUNTIME_LOCATION} - fi - else - echo "Copying '$DotNetExtraRuntimeTarPath' to '$__DOTNET_PATH/dotnet.extra.runtime.tar'" - cp $DotNetExtraRuntimeTarPath $__DOTNET_PATH/dotnet.extra.runtime.tar - fi - cd "$__DOTNET_PATH" - tar -xf "$__DOTNET_PATH/dotnet.extra.runtime.tar" - } - execute_with_retry install_dotnet_extra_runtime >> "$__init_tools_log" 2>&1 - - echo "Installing dotnet cli ${__DOTNET_TOOLS_VERSION}..." - __DOTNET_LOCATION="https://dotnetcli.azureedge.net/dotnet/Sdk/${__DOTNET_TOOLS_VERSION}/${__DOTNET_PKG}.tar.gz" - - install_dotnet_cli() { - if [[ -z "${DotNetBootstrapCliTarPath-}" ]]; then - echo "Installing '${__DOTNET_LOCATION}' to '$__DOTNET_PATH/dotnet.tar'" - rm -rf -- "$__DOTNET_PATH/*" - # curl has HTTPS CA trust-issues less often than wget, so lets try that first. - if command -v curl > /dev/null; then - curl --retry 10 -sSL --create-dirs -o $__DOTNET_PATH/dotnet.tar ${__DOTNET_LOCATION} - else - wget -q -O $__DOTNET_PATH/dotnet.tar ${__DOTNET_LOCATION} - fi - else - echo "Copying '$DotNetBootstrapCliTarPath' to '$__DOTNET_PATH/dotnet.tar'" - cp $DotNetBootstrapCliTarPath $__DOTNET_PATH/dotnet.tar - fi - cd "$__DOTNET_PATH" - tar -xf "$__DOTNET_PATH/dotnet.tar" - } - execute_with_retry install_dotnet_cli >> "$__init_tools_log" 2>&1 - - cd "$__scriptpath" -fi - -if [ ! -e "$__BUILD_TOOLS_PATH" ]; then - echo "Restoring BuildTools version $__BUILD_TOOLS_PACKAGE_VERSION..." - echo "Running: $__DOTNET_CMD restore \"$__INIT_TOOLS_RESTORE_PROJECT\" --no-cache --packages $__PACKAGES_DIR --source $__BUILDTOOLS_SOURCE /p:BuildToolsPackageVersion=$__BUILD_TOOLS_PACKAGE_VERSION /p:ToolsDir=$__TOOLRUNTIME_DIR" >> "$__init_tools_log" - "$__DOTNET_CMD" restore "$__INIT_TOOLS_RESTORE_PROJECT" --no-cache --packages "$__PACKAGES_DIR" --source "$__BUILDTOOLS_SOURCE" /p:BuildToolsPackageVersion=$__BUILD_TOOLS_PACKAGE_VERSION /p:ToolsDir="$__TOOLRUNTIME_DIR" >> "$__init_tools_log" - if [ ! -e "$__BUILD_TOOLS_PATH/init-tools.sh" ]; then - echo "ERROR: Could not restore build tools correctly." 1>&2 - display_error_message - fi -fi - -echo "Initializing BuildTools..." -echo "Running: $__BUILD_TOOLS_PATH/init-tools.sh $__scriptpath $__DOTNET_CMD $__TOOLRUNTIME_DIR $__PACKAGES_DIR" >> "$__init_tools_log" - -# Executables restored with .NET Core 2.0 do not have executable permission flags. https://github.com/NuGet/Home/issues/4424 -chmod +x "$__BUILD_TOOLS_PATH/init-tools.sh" -"$__BUILD_TOOLS_PATH/init-tools.sh" "$__scriptpath" "$__DOTNET_CMD" "$__TOOLRUNTIME_DIR" "$__PACKAGES_DIR" >> "$__init_tools_log" -if [ "$?" != "0" ]; then - echo "ERROR: An error occurred when trying to initialize the tools." 1>&2 - display_error_message - exit 1 -fi - -echo "Making all .sh files executable under Tools." -# Executables restored with .NET Core 2.0 do not have executable permission flags. https://github.com/NuGet/Home/issues/4424 -ls "$__scriptpath/Tools/"*.sh | xargs chmod +x -ls "$__scriptpath/Tools/scripts/docker/"*.sh | xargs chmod +x - -mkdir -p "$(dirname "$__BUILD_TOOLS_SEMAPHORE")" && touch "$__BUILD_TOOLS_SEMAPHORE" - -echo "Done initializing tools." diff --git a/pkg/Directory.Build.props b/pkg/Directory.Build.props deleted file mode 100644 index 16ad2d7b8d..0000000000 --- a/pkg/Directory.Build.props +++ /dev/null @@ -1,59 +0,0 @@ - - - - - true - false - false - - true - $(MSBuildProjectName.Replace('.symbols', '')) - - - $(IntermediateOutputRootPath)$(MSBuildProjectName).NupkgProj\ - $(IntermediateOutputPath) - - - - - Microsoft - LICENSE - https://dot.net/ml - mlnetlogo.png - https://aka.ms/mlnetreleasenotes - - ML.NET ML Machine Learning - - - - - - - - - - - - - - - - - - - - - - - - - - None - - - - \ No newline at end of file diff --git a/pkg/Microsoft.Extensions.ML/Microsoft.Extensions.ML.nupkgproj b/pkg/Microsoft.Extensions.ML/Microsoft.Extensions.ML.nupkgproj deleted file mode 100644 index 4dbb257b8f..0000000000 --- a/pkg/Microsoft.Extensions.ML/Microsoft.Extensions.ML.nupkgproj +++ /dev/null @@ -1,16 +0,0 @@ - - - - netstandard2.0 - An integration package for ML.NET models on scalable web apps and services. - - - - - - - - - - - diff --git a/pkg/Microsoft.Extensions.ML/Microsoft.Extensions.ML.symbols.nupkgproj b/pkg/Microsoft.Extensions.ML/Microsoft.Extensions.ML.symbols.nupkgproj deleted file mode 100644 index 0b7af4d817..0000000000 --- a/pkg/Microsoft.Extensions.ML/Microsoft.Extensions.ML.symbols.nupkgproj +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/pkg/Microsoft.ML.AutoML/Microsoft.ML.AutoML.nupkgproj b/pkg/Microsoft.ML.AutoML/Microsoft.ML.AutoML.nupkgproj deleted file mode 100644 index 8a9fc5db71..0000000000 --- a/pkg/Microsoft.ML.AutoML/Microsoft.ML.AutoML.nupkgproj +++ /dev/null @@ -1,17 +0,0 @@ - - - - netstandard2.0 - ML.NET AutoML: Optimizes an ML pipeline for your dataset, by automatically locating the best feature engineering, model, and hyperparameters - - - - - - - - - - - - diff --git a/pkg/Microsoft.ML.AutoML/Microsoft.ML.AutoML.symbols.nupkgproj b/pkg/Microsoft.ML.AutoML/Microsoft.ML.AutoML.symbols.nupkgproj deleted file mode 100644 index a648ab1d59..0000000000 --- a/pkg/Microsoft.ML.AutoML/Microsoft.ML.AutoML.symbols.nupkgproj +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/pkg/Microsoft.ML.CodeGenerator/Microsoft.ML.CodeGenerator.nupkgproj b/pkg/Microsoft.ML.CodeGenerator/Microsoft.ML.CodeGenerator.nupkgproj deleted file mode 100644 index 48c288fb6b..0000000000 --- a/pkg/Microsoft.ML.CodeGenerator/Microsoft.ML.CodeGenerator.nupkgproj +++ /dev/null @@ -1,17 +0,0 @@ - - - - netstandard2.0 - ML.NET Code Generator - - - - - - - - - - - - diff --git a/pkg/Microsoft.ML.CodeGenerator/Microsoft.ML.CodeGenerator.symbols.nupkgproj b/pkg/Microsoft.ML.CodeGenerator/Microsoft.ML.CodeGenerator.symbols.nupkgproj deleted file mode 100644 index cc330b9cbb..0000000000 --- a/pkg/Microsoft.ML.CodeGenerator/Microsoft.ML.CodeGenerator.symbols.nupkgproj +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/pkg/Microsoft.ML.CpuMath/Microsoft.ML.CpuMath.nupkgproj b/pkg/Microsoft.ML.CpuMath/Microsoft.ML.CpuMath.nupkgproj deleted file mode 100644 index e60e2b232d..0000000000 --- a/pkg/Microsoft.ML.CpuMath/Microsoft.ML.CpuMath.nupkgproj +++ /dev/null @@ -1,16 +0,0 @@ - - - - netstandard2.0;netcoreapp3.1 - Microsoft.ML.CpuMath contains optimized math routines for ML.NET. - - - - - - - - - - - diff --git a/pkg/Microsoft.ML.CpuMath/Microsoft.ML.CpuMath.symbols.nupkgproj b/pkg/Microsoft.ML.CpuMath/Microsoft.ML.CpuMath.symbols.nupkgproj deleted file mode 100644 index 8b44c50d7f..0000000000 --- a/pkg/Microsoft.ML.CpuMath/Microsoft.ML.CpuMath.symbols.nupkgproj +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - $(NoWarn);NU5129 - - - diff --git a/pkg/Microsoft.ML.DataView/Microsoft.ML.DataView.nupkgproj b/pkg/Microsoft.ML.DataView/Microsoft.ML.DataView.nupkgproj deleted file mode 100644 index ab500b904e..0000000000 --- a/pkg/Microsoft.ML.DataView/Microsoft.ML.DataView.nupkgproj +++ /dev/null @@ -1,13 +0,0 @@ - - - - netstandard2.0 - Contains the IDataView system which is a set of interfaces and components that provide efficient, compositional processing of schematized data for machine learning and advanced analytics applications. - - - - - - - - diff --git a/pkg/Microsoft.ML.DataView/Microsoft.ML.DataView.symbols.nupkgproj b/pkg/Microsoft.ML.DataView/Microsoft.ML.DataView.symbols.nupkgproj deleted file mode 100644 index 988c4c5f72..0000000000 --- a/pkg/Microsoft.ML.DataView/Microsoft.ML.DataView.symbols.nupkgproj +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/pkg/Microsoft.ML.DnnImageFeaturizer.AlexNet/Microsoft.ML.DnnImageFeaturizer.AlexNet.nupkgproj b/pkg/Microsoft.ML.DnnImageFeaturizer.AlexNet/Microsoft.ML.DnnImageFeaturizer.AlexNet.nupkgproj deleted file mode 100644 index 4fb4e52d0a..0000000000 --- a/pkg/Microsoft.ML.DnnImageFeaturizer.AlexNet/Microsoft.ML.DnnImageFeaturizer.AlexNet.nupkgproj +++ /dev/null @@ -1,17 +0,0 @@ - - - - netstandard2.0 - ML.NET component for pretrained AlexNet image featurization - - - - - - - - - - - - diff --git a/pkg/Microsoft.ML.DnnImageFeaturizer.AlexNet/Microsoft.ML.DnnImageFeaturizer.AlexNet.symbols.nupkgproj b/pkg/Microsoft.ML.DnnImageFeaturizer.AlexNet/Microsoft.ML.DnnImageFeaturizer.AlexNet.symbols.nupkgproj deleted file mode 100644 index 8c6a7fcc4c..0000000000 --- a/pkg/Microsoft.ML.DnnImageFeaturizer.AlexNet/Microsoft.ML.DnnImageFeaturizer.AlexNet.symbols.nupkgproj +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/pkg/Microsoft.ML.DnnImageFeaturizer.ResNet101/Microsoft.ML.DnnImageFeaturizer.ResNet101.nupkgproj b/pkg/Microsoft.ML.DnnImageFeaturizer.ResNet101/Microsoft.ML.DnnImageFeaturizer.ResNet101.nupkgproj deleted file mode 100644 index 3d667604cd..0000000000 --- a/pkg/Microsoft.ML.DnnImageFeaturizer.ResNet101/Microsoft.ML.DnnImageFeaturizer.ResNet101.nupkgproj +++ /dev/null @@ -1,16 +0,0 @@ - - - - netstandard2.0 - ML.NET component for pretrained ResNet101 image featurization - - - - - - - - - - - diff --git a/pkg/Microsoft.ML.DnnImageFeaturizer.ResNet101/Microsoft.ML.DnnImageFeaturizer.ResNet101.symbols.nupkgproj b/pkg/Microsoft.ML.DnnImageFeaturizer.ResNet101/Microsoft.ML.DnnImageFeaturizer.ResNet101.symbols.nupkgproj deleted file mode 100644 index 7035bef747..0000000000 --- a/pkg/Microsoft.ML.DnnImageFeaturizer.ResNet101/Microsoft.ML.DnnImageFeaturizer.ResNet101.symbols.nupkgproj +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/pkg/Microsoft.ML.DnnImageFeaturizer.ResNet18/Microsoft.ML.DnnImageFeaturizer.ResNet18.nupkgproj b/pkg/Microsoft.ML.DnnImageFeaturizer.ResNet18/Microsoft.ML.DnnImageFeaturizer.ResNet18.nupkgproj deleted file mode 100644 index 1055b4cbbe..0000000000 --- a/pkg/Microsoft.ML.DnnImageFeaturizer.ResNet18/Microsoft.ML.DnnImageFeaturizer.ResNet18.nupkgproj +++ /dev/null @@ -1,16 +0,0 @@ - - - - netstandard2.0 - ML.NET component for pretrained ResNet18 image featurization - - - - - - - - - - - diff --git a/pkg/Microsoft.ML.DnnImageFeaturizer.ResNet18/Microsoft.ML.DnnImageFeaturizer.ResNet18.symbols.nupkgproj b/pkg/Microsoft.ML.DnnImageFeaturizer.ResNet18/Microsoft.ML.DnnImageFeaturizer.ResNet18.symbols.nupkgproj deleted file mode 100644 index 9fb3f5ca75..0000000000 --- a/pkg/Microsoft.ML.DnnImageFeaturizer.ResNet18/Microsoft.ML.DnnImageFeaturizer.ResNet18.symbols.nupkgproj +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/pkg/Microsoft.ML.DnnImageFeaturizer.ResNet50/Microsoft.ML.DnnImageFeaturizer.ResNet50.nupkgproj b/pkg/Microsoft.ML.DnnImageFeaturizer.ResNet50/Microsoft.ML.DnnImageFeaturizer.ResNet50.nupkgproj deleted file mode 100644 index 2c33df9ff8..0000000000 --- a/pkg/Microsoft.ML.DnnImageFeaturizer.ResNet50/Microsoft.ML.DnnImageFeaturizer.ResNet50.nupkgproj +++ /dev/null @@ -1,16 +0,0 @@ - - - - netstandard2.0 - ML.NET component for pretrained ResNet50 image featurization - - - - - - - - - - - diff --git a/pkg/Microsoft.ML.DnnImageFeaturizer.ResNet50/Microsoft.ML.DnnImageFeaturizer.ResNet50.symbols.nupkgproj b/pkg/Microsoft.ML.DnnImageFeaturizer.ResNet50/Microsoft.ML.DnnImageFeaturizer.ResNet50.symbols.nupkgproj deleted file mode 100644 index 2b04e494f9..0000000000 --- a/pkg/Microsoft.ML.DnnImageFeaturizer.ResNet50/Microsoft.ML.DnnImageFeaturizer.ResNet50.symbols.nupkgproj +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/pkg/Microsoft.ML.Ensemble/Microsoft.ML.Ensemble.nupkgproj b/pkg/Microsoft.ML.Ensemble/Microsoft.ML.Ensemble.nupkgproj deleted file mode 100644 index f8b8082047..0000000000 --- a/pkg/Microsoft.ML.Ensemble/Microsoft.ML.Ensemble.nupkgproj +++ /dev/null @@ -1,12 +0,0 @@ - - - - netstandard2.0 - ML.NET component for Ensembles - - - - - - - \ No newline at end of file diff --git a/pkg/Microsoft.ML.Ensemble/Microsoft.ML.Ensemble.symbols.nupkgproj b/pkg/Microsoft.ML.Ensemble/Microsoft.ML.Ensemble.symbols.nupkgproj deleted file mode 100644 index bb48a51cab..0000000000 --- a/pkg/Microsoft.ML.Ensemble/Microsoft.ML.Ensemble.symbols.nupkgproj +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/pkg/Microsoft.ML.EntryPoints/Microsoft.ML.EntryPoints.nupkgproj b/pkg/Microsoft.ML.EntryPoints/Microsoft.ML.EntryPoints.nupkgproj deleted file mode 100644 index b845fdeb45..0000000000 --- a/pkg/Microsoft.ML.EntryPoints/Microsoft.ML.EntryPoints.nupkgproj +++ /dev/null @@ -1,12 +0,0 @@ - - - - netstandard2.0 - Microsoft.ML.EntryPoints contains the ML.NET entry point API catalog. - - - - - - - diff --git a/pkg/Microsoft.ML.EntryPoints/Microsoft.ML.EntryPoints.symbols.nupkgproj b/pkg/Microsoft.ML.EntryPoints/Microsoft.ML.EntryPoints.symbols.nupkgproj deleted file mode 100644 index 3fa0255960..0000000000 --- a/pkg/Microsoft.ML.EntryPoints/Microsoft.ML.EntryPoints.symbols.nupkgproj +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/pkg/Microsoft.ML.Experimental/Microsoft.ML.Experimental.nupkgproj b/pkg/Microsoft.ML.Experimental/Microsoft.ML.Experimental.nupkgproj deleted file mode 100644 index edf80ad475..0000000000 --- a/pkg/Microsoft.ML.Experimental/Microsoft.ML.Experimental.nupkgproj +++ /dev/null @@ -1,12 +0,0 @@ - - - - netstandard2.0 - Microsoft.ML.Experimental contains experimental work such extension methods to access internal methods. - - - - - - - diff --git a/pkg/Microsoft.ML.Experimental/Microsoft.ML.Experimental.symbols.nupkgproj b/pkg/Microsoft.ML.Experimental/Microsoft.ML.Experimental.symbols.nupkgproj deleted file mode 100644 index c869da5d2b..0000000000 --- a/pkg/Microsoft.ML.Experimental/Microsoft.ML.Experimental.symbols.nupkgproj +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/pkg/Microsoft.ML.FastTree/Microsoft.ML.FastTree.nupkgproj b/pkg/Microsoft.ML.FastTree/Microsoft.ML.FastTree.nupkgproj deleted file mode 100644 index ac6f2452ad..0000000000 --- a/pkg/Microsoft.ML.FastTree/Microsoft.ML.FastTree.nupkgproj +++ /dev/null @@ -1,16 +0,0 @@ - - - - netstandard2.0 - ML.NET component for FastTree - - - - - - - - - - - diff --git a/pkg/Microsoft.ML.FastTree/Microsoft.ML.FastTree.symbols.nupkgproj b/pkg/Microsoft.ML.FastTree/Microsoft.ML.FastTree.symbols.nupkgproj deleted file mode 100644 index 9f4c5712ff..0000000000 --- a/pkg/Microsoft.ML.FastTree/Microsoft.ML.FastTree.symbols.nupkgproj +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/pkg/Microsoft.ML.Featurizers/Microsoft.ML.Featurizers.nupkgproj b/pkg/Microsoft.ML.Featurizers/Microsoft.ML.Featurizers.nupkgproj deleted file mode 100644 index ea35d7d019..0000000000 --- a/pkg/Microsoft.ML.Featurizers/Microsoft.ML.Featurizers.nupkgproj +++ /dev/null @@ -1,14 +0,0 @@ - - - - netstandard2.0;netcoreapp2.1 - ML.NET featurizers with native code implementation - - - - - - - - - diff --git a/pkg/Microsoft.ML.Featurizers/Microsoft.ML.Featurizers.symbols.nupkgproj b/pkg/Microsoft.ML.Featurizers/Microsoft.ML.Featurizers.symbols.nupkgproj deleted file mode 100644 index 483e51c61a..0000000000 --- a/pkg/Microsoft.ML.Featurizers/Microsoft.ML.Featurizers.symbols.nupkgproj +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/pkg/Microsoft.ML.ImageAnalytics/Microsoft.ML.ImageAnalytics.nupkgproj b/pkg/Microsoft.ML.ImageAnalytics/Microsoft.ML.ImageAnalytics.nupkgproj deleted file mode 100644 index bb59e06653..0000000000 --- a/pkg/Microsoft.ML.ImageAnalytics/Microsoft.ML.ImageAnalytics.nupkgproj +++ /dev/null @@ -1,13 +0,0 @@ - - - - netstandard2.0 - ML.NET component for Image support - - - - - - - - diff --git a/pkg/Microsoft.ML.ImageAnalytics/Microsoft.ML.ImageAnalytics.symbols.nupkgproj b/pkg/Microsoft.ML.ImageAnalytics/Microsoft.ML.ImageAnalytics.symbols.nupkgproj deleted file mode 100644 index b36800ea0b..0000000000 --- a/pkg/Microsoft.ML.ImageAnalytics/Microsoft.ML.ImageAnalytics.symbols.nupkgproj +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/pkg/Microsoft.ML.LightGbm/Microsoft.ML.LightGbm.nupkgproj b/pkg/Microsoft.ML.LightGbm/Microsoft.ML.LightGbm.nupkgproj deleted file mode 100644 index d4e48e8dd0..0000000000 --- a/pkg/Microsoft.ML.LightGbm/Microsoft.ML.LightGbm.nupkgproj +++ /dev/null @@ -1,14 +0,0 @@ - - - - netstandard2.0 - ML.NET component for LightGBM - - - - - - - - - diff --git a/pkg/Microsoft.ML.LightGbm/Microsoft.ML.LightGbm.symbols.nupkgproj b/pkg/Microsoft.ML.LightGbm/Microsoft.ML.LightGbm.symbols.nupkgproj deleted file mode 100644 index 91a20f3ed8..0000000000 --- a/pkg/Microsoft.ML.LightGbm/Microsoft.ML.LightGbm.symbols.nupkgproj +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/pkg/Microsoft.ML.Mkl.Components/Microsoft.ML.Mkl.Components.nupkgproj b/pkg/Microsoft.ML.Mkl.Components/Microsoft.ML.Mkl.Components.nupkgproj deleted file mode 100644 index 1bd16d235d..0000000000 --- a/pkg/Microsoft.ML.Mkl.Components/Microsoft.ML.Mkl.Components.nupkgproj +++ /dev/null @@ -1,17 +0,0 @@ - - - - netstandard2.0 - ML.NET additional learners making use of Intel Mkl. - - - - - - - - - - - - diff --git a/pkg/Microsoft.ML.Mkl.Components/Microsoft.ML.Mkl.Components.symbols.nupkgproj b/pkg/Microsoft.ML.Mkl.Components/Microsoft.ML.Mkl.Components.symbols.nupkgproj deleted file mode 100644 index 0eaabcdd6e..0000000000 --- a/pkg/Microsoft.ML.Mkl.Components/Microsoft.ML.Mkl.Components.symbols.nupkgproj +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/pkg/Microsoft.ML.Mkl.Redist/Microsoft.ML.Mkl.Redist.nupkgproj b/pkg/Microsoft.ML.Mkl.Redist/Microsoft.ML.Mkl.Redist.nupkgproj deleted file mode 100644 index bda6fb1277..0000000000 --- a/pkg/Microsoft.ML.Mkl.Redist/Microsoft.ML.Mkl.Redist.nupkgproj +++ /dev/null @@ -1,20 +0,0 @@ - - - - Intel - netstandard2.0 - LICENSE.txt - $(MSBuildProjectName) contains the MKL library redistributed as a NuGet package. - $(PackageTags) MLNET MKL - - - - false - - - - - - - - diff --git a/pkg/Microsoft.ML.OnnxConverter/Microsoft.ML.OnnxConverter.nupkgproj b/pkg/Microsoft.ML.OnnxConverter/Microsoft.ML.OnnxConverter.nupkgproj deleted file mode 100644 index bcc86939e2..0000000000 --- a/pkg/Microsoft.ML.OnnxConverter/Microsoft.ML.OnnxConverter.nupkgproj +++ /dev/null @@ -1,13 +0,0 @@ - - - - netstandard2.0 - ML.NET component for exporting ONNX Models - - - - - - - - diff --git a/pkg/Microsoft.ML.OnnxConverter/Microsoft.ML.OnnxConverter.symbols.nupkgproj b/pkg/Microsoft.ML.OnnxConverter/Microsoft.ML.OnnxConverter.symbols.nupkgproj deleted file mode 100644 index ccc3e94770..0000000000 --- a/pkg/Microsoft.ML.OnnxConverter/Microsoft.ML.OnnxConverter.symbols.nupkgproj +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/pkg/Microsoft.ML.OnnxTransformer/Microsoft.ML.OnnxTransformer.nupkgproj b/pkg/Microsoft.ML.OnnxTransformer/Microsoft.ML.OnnxTransformer.nupkgproj deleted file mode 100644 index 3c7d9f2ccd..0000000000 --- a/pkg/Microsoft.ML.OnnxTransformer/Microsoft.ML.OnnxTransformer.nupkgproj +++ /dev/null @@ -1,14 +0,0 @@ - - - - netstandard2.0 - ML.NET component for Microsoft.ML.Scoring library - - - - - - - - - diff --git a/pkg/Microsoft.ML.OnnxTransformer/Microsoft.ML.OnnxTransformer.symbols.nupkgproj b/pkg/Microsoft.ML.OnnxTransformer/Microsoft.ML.OnnxTransformer.symbols.nupkgproj deleted file mode 100644 index 6358a82311..0000000000 --- a/pkg/Microsoft.ML.OnnxTransformer/Microsoft.ML.OnnxTransformer.symbols.nupkgproj +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/pkg/Microsoft.ML.Parquet/Microsoft.ML.Parquet.nupkgproj b/pkg/Microsoft.ML.Parquet/Microsoft.ML.Parquet.nupkgproj deleted file mode 100644 index 750926db34..0000000000 --- a/pkg/Microsoft.ML.Parquet/Microsoft.ML.Parquet.nupkgproj +++ /dev/null @@ -1,13 +0,0 @@ - - - - netstandard2.0 - ML.NET components for Apache Parquet support. - - - - - - - - diff --git a/pkg/Microsoft.ML.Parquet/Microsoft.ML.Parquet.symbols.nupkgproj b/pkg/Microsoft.ML.Parquet/Microsoft.ML.Parquet.symbols.nupkgproj deleted file mode 100644 index bc14894823..0000000000 --- a/pkg/Microsoft.ML.Parquet/Microsoft.ML.Parquet.symbols.nupkgproj +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/pkg/Microsoft.ML.Recommender/Microsoft.ML.Recommender.nupkgproj b/pkg/Microsoft.ML.Recommender/Microsoft.ML.Recommender.nupkgproj deleted file mode 100644 index bc0e57f8c0..0000000000 --- a/pkg/Microsoft.ML.Recommender/Microsoft.ML.Recommender.nupkgproj +++ /dev/null @@ -1,14 +0,0 @@ - - - - netstandard2.0 - LIBMF, the core computation library for matrix factorization in ML.NET - - - - - - - - - diff --git a/pkg/Microsoft.ML.Recommender/Microsoft.ML.Recommender.symbols.nupkgproj b/pkg/Microsoft.ML.Recommender/Microsoft.ML.Recommender.symbols.nupkgproj deleted file mode 100644 index d82f31ad89..0000000000 --- a/pkg/Microsoft.ML.Recommender/Microsoft.ML.Recommender.symbols.nupkgproj +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/pkg/Microsoft.ML.SampleUtils/Microsoft.ML.SampleUtils.nupkgproj b/pkg/Microsoft.ML.SampleUtils/Microsoft.ML.SampleUtils.nupkgproj deleted file mode 100644 index e2b85df502..0000000000 --- a/pkg/Microsoft.ML.SampleUtils/Microsoft.ML.SampleUtils.nupkgproj +++ /dev/null @@ -1,12 +0,0 @@ - - - - netstandard2.0 - Sample utils for Microsoft.ML.Samples - - - - - - - diff --git a/pkg/Microsoft.ML.SampleUtils/Microsoft.ML.SampleUtils.symbols.nupkgproj b/pkg/Microsoft.ML.SampleUtils/Microsoft.ML.SampleUtils.symbols.nupkgproj deleted file mode 100644 index 2a2228e6af..0000000000 --- a/pkg/Microsoft.ML.SampleUtils/Microsoft.ML.SampleUtils.symbols.nupkgproj +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/pkg/Microsoft.ML.TensorFlow/Microsoft.ML.TensorFlow.nupkgproj b/pkg/Microsoft.ML.TensorFlow/Microsoft.ML.TensorFlow.nupkgproj deleted file mode 100644 index ac054f6136..0000000000 --- a/pkg/Microsoft.ML.TensorFlow/Microsoft.ML.TensorFlow.nupkgproj +++ /dev/null @@ -1,15 +0,0 @@ - - - - netstandard2.0 - Microsoft.ML.TensorFlow contains ML.NET integration of TensorFlow. - - - - - - - - - - diff --git a/pkg/Microsoft.ML.TensorFlow/Microsoft.ML.TensorFlow.symbols.nupkgproj b/pkg/Microsoft.ML.TensorFlow/Microsoft.ML.TensorFlow.symbols.nupkgproj deleted file mode 100644 index a2a2a153f7..0000000000 --- a/pkg/Microsoft.ML.TensorFlow/Microsoft.ML.TensorFlow.symbols.nupkgproj +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/pkg/Microsoft.ML.TimeSeries/Microsoft.ML.TimeSeries.nupkgproj b/pkg/Microsoft.ML.TimeSeries/Microsoft.ML.TimeSeries.nupkgproj deleted file mode 100644 index d0325da023..0000000000 --- a/pkg/Microsoft.ML.TimeSeries/Microsoft.ML.TimeSeries.nupkgproj +++ /dev/null @@ -1,13 +0,0 @@ - - - - netstandard2.0 - Microsoft.ML.TimeSeries contains ML.NET Time Series prediction algorithms. Uses Intel Mkl. - - - - - - - - diff --git a/pkg/Microsoft.ML.TimeSeries/Microsoft.ML.TimeSeries.symbols.nupkgproj b/pkg/Microsoft.ML.TimeSeries/Microsoft.ML.TimeSeries.symbols.nupkgproj deleted file mode 100644 index 05f361fa6c..0000000000 --- a/pkg/Microsoft.ML.TimeSeries/Microsoft.ML.TimeSeries.symbols.nupkgproj +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/pkg/Microsoft.ML.Vision/Microsoft.ML.Vision.nupkgproj b/pkg/Microsoft.ML.Vision/Microsoft.ML.Vision.nupkgproj deleted file mode 100644 index f3f00e368c..0000000000 --- a/pkg/Microsoft.ML.Vision/Microsoft.ML.Vision.nupkgproj +++ /dev/null @@ -1,12 +0,0 @@ - - - - netstandard2.0 - Microsoft.ML.Vision contains high level APIs for vision tasks like image classification. - - - - - - - diff --git a/pkg/Microsoft.ML.Vision/Microsoft.ML.Vision.symbols.nupkgproj b/pkg/Microsoft.ML.Vision/Microsoft.ML.Vision.symbols.nupkgproj deleted file mode 100644 index 1ba48a28b9..0000000000 --- a/pkg/Microsoft.ML.Vision/Microsoft.ML.Vision.symbols.nupkgproj +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/pkg/Microsoft.ML/Microsoft.ML.nupkgproj b/pkg/Microsoft.ML/Microsoft.ML.nupkgproj deleted file mode 100644 index 43ad73f248..0000000000 --- a/pkg/Microsoft.ML/Microsoft.ML.nupkgproj +++ /dev/null @@ -1,24 +0,0 @@ - - - - netstandard2.0 - ML.NET is a cross-platform open-source machine learning framework which makes machine learning accessible to .NET developers. - - - - - - - - - - - - - - - - - - - diff --git a/pkg/Microsoft.ML/Microsoft.ML.symbols.nupkgproj b/pkg/Microsoft.ML/Microsoft.ML.symbols.nupkgproj deleted file mode 100644 index fc08dc12dc..0000000000 --- a/pkg/Microsoft.ML/Microsoft.ML.symbols.nupkgproj +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - $(NoWarn);NU5129 - - - diff --git a/restore.cmd b/restore.cmd new file mode 100644 index 0000000000..185ccb3178 --- /dev/null +++ b/restore.cmd @@ -0,0 +1,3 @@ +@echo off +powershell -ExecutionPolicy ByPass -NoProfile -command "& """%~dp0eng\common\Build.ps1""" -restore -warnAsError 0 %*" +exit /b %ErrorLevel% \ No newline at end of file diff --git a/restore.sh b/restore.sh new file mode 100755 index 0000000000..e14c4b82ec --- /dev/null +++ b/restore.sh @@ -0,0 +1,13 @@ +#!/usr/bin/env bash + +set -e + +SOURCE="${BASH_SOURCE[0]}" +while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symlink + DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )" + SOURCE="$(readlink "$SOURCE")" + [[ "$SOURCE" != /* ]] && SOURCE="$DIR/$SOURCE" # if $SOURCE was a relative symlink, we need to resolve it relative to the path where the symlink file was located +done +DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )" + +"$DIR/eng/common/build.sh" --restore --warnAsError false "$@" \ No newline at end of file diff --git a/run.cmd b/run.cmd deleted file mode 100644 index ccbe714db8..0000000000 --- a/run.cmd +++ /dev/null @@ -1,28 +0,0 @@ -@if not defined _echo @echo off -setlocal - -:: Clear the 'Platform' env variable for this session, as it's a per-project setting within the build, and -:: misleading value (such as 'MCD' in HP PCs) may lead to build breakage (corefx issue: #69). -set Platform= - -:: Disable telemetry, first time experience, and global sdk look for the CLI -set DOTNET_CLI_TELEMETRY_OPTOUT=1 -set DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1 -set DOTNET_MULTILEVEL_LOOKUP=0 - -:: Restore the Tools directory -call "%~dp0init-tools.cmd" %* -if NOT [%ERRORLEVEL%]==[0] exit /b 1 - -set _toolRuntime=%~dp0Tools -set _dotnet=%_toolRuntime%\dotnetcli\dotnet.exe -set _json=%~dp0config.json - -:: run.exe depends on running in the root directory, notably because the config.json specifies -:: a relative path to the binclash logger - -pushd "%~dp0" -call "%_dotnet%" "%_toolRuntime%\run.exe" "%_json%" %* -popd - -exit /b %ERRORLEVEL% \ No newline at end of file diff --git a/run.sh b/run.sh deleted file mode 100755 index fe936e3ecc..0000000000 --- a/run.sh +++ /dev/null @@ -1,21 +0,0 @@ -#!/usr/bin/env bash - -__scriptpath=$(cd "$(dirname "$0")"; pwd -P) - -# Disable telemetry, first time experience, and global sdk look for the CLI -export DOTNET_CLI_TELEMETRY_OPTOUT=1 -export DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1 -export DOTNET_MULTILEVEL_LOOKUP=0 - -# Set the terminal language to en-US in order to avoid problems with MSBuild compareversion command -export LANG=en_US.UTF-8 - -# Source the init-tools.sh script rather than execute in order to preserve ulimit values in child-processes. https://github.com/dotnet/corefx/issues/19152 -. "$__scriptpath/init-tools.sh" - -__toolRuntime=$__scriptpath/Tools -__dotnet=$__toolRuntime/dotnetcli/dotnet - -cd "$__scriptpath" -"$__dotnet" "$__toolRuntime/run.exe" "$__scriptpath/config.json" "$@" -exit $? diff --git a/sign.cmd b/sign.cmd new file mode 100644 index 0000000000..6e75c6d287 --- /dev/null +++ b/sign.cmd @@ -0,0 +1,3 @@ +@echo off +powershell -ExecutionPolicy ByPass -NoProfile -command "& """%~dp0eng\common\Build.ps1""" -sign -warnAsError 0 %*" +exit /b %ErrorLevel% \ No newline at end of file diff --git a/src/Directory.Build.props b/src/Directory.Build.props index c686486a81..71c462977b 100644 --- a/src/Directory.Build.props +++ b/src/Directory.Build.props @@ -8,12 +8,12 @@ When you are ready to tackle adding them, remove below, and when you get clean, also remove --> - $(NoWarn);1591 + $(NoWarn);1591;NU5118 $(WarningsNotAsErrors);1591 $(MSBuildThisFileDirectory)\Source.ruleset - $(BaseOutputPath)$(TargetArchitecture).$(Configuration)\Native + $(BaseOutputPath)$(TargetArchitecture).$(Configuration) win linux @@ -25,7 +25,6 @@ false $(IsStableProject) - $(ToolsDir)dotnetcli/dotnet + $(NoWarn);1591;NU5100;MSML_GeneralName;MSML_ParameterLocalVarName;MSML_PrivateFieldName;MSML_TypeParamName;SA1028;SA1507;SX1101;MSML_NoInstanceInitializers + $(TargetsForTfmSpecificContentInPackage);AddMDAIToInteractiveExtensionsFolder + + + + + + + + + + + <_ItemsToIncludeForInteractive Update="@(_ItemsToIncludeForInteractive)" PackagePath="interactive-extensions/dotnet" /> + + + + + + + True + True + Converters.tt + + + True + True + PrimitiveDataFrameColumn.BinaryOperators.tt + + + + + + + + + + + + + + + + + + TextTemplatingFileGenerator + Converters.cs + + + TextTemplatingFileGenerator + PrimitiveDataFrameColumn.BinaryOperationAPIs.ExplodedColumns.cs + + + TextTemplatingFileGenerator + PrimitiveDataFrameColumn.BinaryOperationImplementations.Exploded.cs + + + TextTemplatingFileGenerator + DataFrameColumn.BinaryOperations.cs + + + TextTemplatingFileGenerator + DataFrameColumn.BinaryOperators.cs + + + TextTemplatingFileGenerator + DataFrameColumn.Computations.cs + + + TextTemplatingFileGenerator + DataFrame.BinaryOperations.cs + + + TextTemplatingFileGenerator + DataFrame.BinaryOperators.cs + + + TextTemplatingFileGenerator + DataFrameBinaryOperators.cs + + + TextTemplatingFileGenerator + PrimitiveDataFrameColumn.BinaryOperations.Combinations.ttinclude + + + True + True + PrimitiveDataFrameColumn.BinaryOperations.Combinations.tt + + + TextTemplatingFileGenerator + PrimitiveDataFrameColumn.BinaryOperations.cs + + + TextTemplatingFileGenerator + PrimitiveDataFrameColumn.BinaryOperators.cs + + + TextTemplatingFileGenerator + PrimitiveDataFrameColumn.Computations.cs + + + TextTemplatingFileGenerator + PrimitiveDataFrameColumn.ReversedBinaryOperations.cs + + + TextTemplatingFileGenerator + PrimitiveColumnArithmetic.cs + + + TextTemplatingFileGenerator + PrimitiveDataFrameColumnComputations.cs + + + TextTemplatingFileGenerator + PrimitiveColumnContainer.BinaryOperations.cs + + + TextTemplatingFileGenerator + PrimitiveDataFrameColumnArithmetic.cs + + + TextTemplatingFileGenerator + PrimitiveColumnContainer.BinaryOperations.cs + + + + + + + + + + True + True + Converters.tt + + + True + True + PrimitiveDataFrameColumn.BinaryOperationImplementations.Exploded.tt + + + True + True + DataFrameColumn.BinaryOperations.tt + + + True + True + PrimitiveDataFrameColumn.BinaryOperationAPIs.ExplodedColumns.tt + + + True + True + DataFrameColumn.BinaryOperators.tt + + + True + True + DataFrameColumn.Computations.tt + + + True + True + DataFrame.BinaryOperations.tt + + + True + True + DataFrame.BinaryOperators.tt + + + True + True + DataFrameBinaryOperators.tt + + + True + True + PrimitiveDataFrameColumn.BinaryOperations.tt + + + True + True + PrimitiveDataFrameColumn.BinaryOperators.tt + + + True + True + PrimitiveDataFrameColumn.Computations.tt + + + True + True + PrimitiveDataFrameColumn.ReversedBinaryOperations.tt + + + True + True + PrimitiveColumnArithmetic.tt + + + True + True + PrimitiveDataFrameColumnComputations.tt + + + True + True + PrimitiveColumnContainer.BinaryOperations.tt + + + True + True + PrimitiveDataFrameColumnArithmetic.tt + + + True + True + PrimitiveColumnContainer.BinaryOperations.tt + + + True + True + Strings.resx + + + + + + ResXFileCodeGenerator + Strings.Designer.cs + Microsoft.Data + + + diff --git a/src/Microsoft.Data.Analysis/PrimitiveColumnContainer.BinaryOperations.cs b/src/Microsoft.Data.Analysis/PrimitiveColumnContainer.BinaryOperations.cs new file mode 100644 index 0000000000..f8a8410a39 --- /dev/null +++ b/src/Microsoft.Data.Analysis/PrimitiveColumnContainer.BinaryOperations.cs @@ -0,0 +1,234 @@ + +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +// Generated from PrimitiveColumnContainer.BinaryOperations.tt. Do not modify directly + +namespace Microsoft.Data.Analysis +{ + internal partial class PrimitiveColumnContainer + where T : struct + { + public PrimitiveColumnContainer Add(PrimitiveColumnContainer right) + { + PrimitiveDataFrameColumnArithmetic.Instance.Add(this, right); + return this; + } + + public PrimitiveColumnContainer Add(T scalar) + { + PrimitiveDataFrameColumnArithmetic.Instance.Add(this, scalar); + return this; + } + + public PrimitiveColumnContainer Subtract(PrimitiveColumnContainer right) + { + PrimitiveDataFrameColumnArithmetic.Instance.Subtract(this, right); + return this; + } + + public PrimitiveColumnContainer Subtract(T scalar) + { + PrimitiveDataFrameColumnArithmetic.Instance.Subtract(this, scalar); + return this; + } + + public PrimitiveColumnContainer Multiply(PrimitiveColumnContainer right) + { + PrimitiveDataFrameColumnArithmetic.Instance.Multiply(this, right); + return this; + } + + public PrimitiveColumnContainer Multiply(T scalar) + { + PrimitiveDataFrameColumnArithmetic.Instance.Multiply(this, scalar); + return this; + } + + public PrimitiveColumnContainer Divide(PrimitiveColumnContainer right) + { + PrimitiveDataFrameColumnArithmetic.Instance.Divide(this, right); + return this; + } + + public PrimitiveColumnContainer Divide(T scalar) + { + PrimitiveDataFrameColumnArithmetic.Instance.Divide(this, scalar); + return this; + } + + public PrimitiveColumnContainer Modulo(PrimitiveColumnContainer right) + { + PrimitiveDataFrameColumnArithmetic.Instance.Modulo(this, right); + return this; + } + + public PrimitiveColumnContainer Modulo(T scalar) + { + PrimitiveDataFrameColumnArithmetic.Instance.Modulo(this, scalar); + return this; + } + + public PrimitiveColumnContainer And(PrimitiveColumnContainer right) + { + PrimitiveDataFrameColumnArithmetic.Instance.And(this, right); + return this; + } + + public PrimitiveColumnContainer And(T scalar) + { + PrimitiveDataFrameColumnArithmetic.Instance.And(this, scalar); + return this; + } + + public PrimitiveColumnContainer Or(PrimitiveColumnContainer right) + { + PrimitiveDataFrameColumnArithmetic.Instance.Or(this, right); + return this; + } + + public PrimitiveColumnContainer Or(T scalar) + { + PrimitiveDataFrameColumnArithmetic.Instance.Or(this, scalar); + return this; + } + + public PrimitiveColumnContainer Xor(PrimitiveColumnContainer right) + { + PrimitiveDataFrameColumnArithmetic.Instance.Xor(this, right); + return this; + } + + public PrimitiveColumnContainer Xor(T scalar) + { + PrimitiveDataFrameColumnArithmetic.Instance.Xor(this, scalar); + return this; + } + + public PrimitiveColumnContainer LeftShift(int value) + { + PrimitiveDataFrameColumnArithmetic.Instance.LeftShift(this, value); + return this; + } + + public PrimitiveColumnContainer RightShift(int value) + { + PrimitiveDataFrameColumnArithmetic.Instance.RightShift(this, value); + return this; + } + + public PrimitiveColumnContainer ElementwiseEquals(PrimitiveColumnContainer right, PrimitiveColumnContainer ret) + { + PrimitiveDataFrameColumnArithmetic.Instance.ElementwiseEquals(this, right, ret); + return this; + } + + public PrimitiveColumnContainer ElementwiseEquals(T scalar, PrimitiveColumnContainer ret) + { + PrimitiveDataFrameColumnArithmetic.Instance.ElementwiseEquals(this, scalar, ret); + return this; + } + + public PrimitiveColumnContainer ElementwiseNotEquals(PrimitiveColumnContainer right, PrimitiveColumnContainer ret) + { + PrimitiveDataFrameColumnArithmetic.Instance.ElementwiseNotEquals(this, right, ret); + return this; + } + + public PrimitiveColumnContainer ElementwiseNotEquals(T scalar, PrimitiveColumnContainer ret) + { + PrimitiveDataFrameColumnArithmetic.Instance.ElementwiseNotEquals(this, scalar, ret); + return this; + } + + public PrimitiveColumnContainer ElementwiseGreaterThanOrEqual(PrimitiveColumnContainer right, PrimitiveColumnContainer ret) + { + PrimitiveDataFrameColumnArithmetic.Instance.ElementwiseGreaterThanOrEqual(this, right, ret); + return this; + } + + public PrimitiveColumnContainer ElementwiseGreaterThanOrEqual(T scalar, PrimitiveColumnContainer ret) + { + PrimitiveDataFrameColumnArithmetic.Instance.ElementwiseGreaterThanOrEqual(this, scalar, ret); + return this; + } + + public PrimitiveColumnContainer ElementwiseLessThanOrEqual(PrimitiveColumnContainer right, PrimitiveColumnContainer ret) + { + PrimitiveDataFrameColumnArithmetic.Instance.ElementwiseLessThanOrEqual(this, right, ret); + return this; + } + + public PrimitiveColumnContainer ElementwiseLessThanOrEqual(T scalar, PrimitiveColumnContainer ret) + { + PrimitiveDataFrameColumnArithmetic.Instance.ElementwiseLessThanOrEqual(this, scalar, ret); + return this; + } + + public PrimitiveColumnContainer ElementwiseGreaterThan(PrimitiveColumnContainer right, PrimitiveColumnContainer ret) + { + PrimitiveDataFrameColumnArithmetic.Instance.ElementwiseGreaterThan(this, right, ret); + return this; + } + + public PrimitiveColumnContainer ElementwiseGreaterThan(T scalar, PrimitiveColumnContainer ret) + { + PrimitiveDataFrameColumnArithmetic.Instance.ElementwiseGreaterThan(this, scalar, ret); + return this; + } + + public PrimitiveColumnContainer ElementwiseLessThan(PrimitiveColumnContainer right, PrimitiveColumnContainer ret) + { + PrimitiveDataFrameColumnArithmetic.Instance.ElementwiseLessThan(this, right, ret); + return this; + } + + public PrimitiveColumnContainer ElementwiseLessThan(T scalar, PrimitiveColumnContainer ret) + { + PrimitiveDataFrameColumnArithmetic.Instance.ElementwiseLessThan(this, scalar, ret); + return this; + } + + public PrimitiveColumnContainer ReverseAdd(T scalar) + { + PrimitiveDataFrameColumnArithmetic.Instance.Add(scalar, this); + return this; + } + public PrimitiveColumnContainer ReverseSubtract(T scalar) + { + PrimitiveDataFrameColumnArithmetic.Instance.Subtract(scalar, this); + return this; + } + public PrimitiveColumnContainer ReverseMultiply(T scalar) + { + PrimitiveDataFrameColumnArithmetic.Instance.Multiply(scalar, this); + return this; + } + public PrimitiveColumnContainer ReverseDivide(T scalar) + { + PrimitiveDataFrameColumnArithmetic.Instance.Divide(scalar, this); + return this; + } + public PrimitiveColumnContainer ReverseModulo(T scalar) + { + PrimitiveDataFrameColumnArithmetic.Instance.Modulo(scalar, this); + return this; + } + public PrimitiveColumnContainer ReverseAnd(T scalar) + { + PrimitiveDataFrameColumnArithmetic.Instance.And(scalar, this); + return this; + } + public PrimitiveColumnContainer ReverseOr(T scalar) + { + PrimitiveDataFrameColumnArithmetic.Instance.Or(scalar, this); + return this; + } + public PrimitiveColumnContainer ReverseXor(T scalar) + { + PrimitiveDataFrameColumnArithmetic.Instance.Xor(scalar, this); + return this; + } + } +} diff --git a/src/Microsoft.Data.Analysis/PrimitiveColumnContainer.BinaryOperations.tt b/src/Microsoft.Data.Analysis/PrimitiveColumnContainer.BinaryOperations.tt new file mode 100644 index 0000000000..1006508524 --- /dev/null +++ b/src/Microsoft.Data.Analysis/PrimitiveColumnContainer.BinaryOperations.tt @@ -0,0 +1,56 @@ +<#@ template debug="false" hostspecific="false" language="C#" #> +<#@ assembly name="System.Core" #> +<#@ import namespace="System.Linq" #> +<#@ import namespace="System.Text" #> +<#@ import namespace="System.Collections.Generic" #> +<#@ output extension=".cs" #> +<#@ include file="ColumnArithmeticTemplate.ttinclude" #> +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +// Generated from PrimitiveColumnContainer.BinaryOperations.tt. Do not modify directly + +namespace Microsoft.Data.Analysis +{ + internal partial class PrimitiveColumnContainer + where T : struct + { +<# foreach (MethodConfiguration method in methodConfiguration) { #> +<# if (method.MethodType == MethodType.Comparison || method.MethodType == MethodType.ComparisonScalar) { #> + public <#= method.GetSingleArgumentMethodSignature("PrimitiveColumnContainer", "T") #> + { +<# if (method.MethodType == MethodType.ComparisonScalar ) { #> + PrimitiveDataFrameColumnArithmetic.Instance.<#=method.MethodName#>(this, scalar, ret); +<# } else { #> + PrimitiveDataFrameColumnArithmetic.Instance.<#=method.MethodName#>(this, right, ret); +<# } #> + return this; + } + +<# } else { #> + public <#= method.GetSingleArgumentMethodSignature("PrimitiveColumnContainer", "T")#> + { +<# if (method.MethodType == MethodType.BinaryScalar) { #> + PrimitiveDataFrameColumnArithmetic.Instance.<#=method.MethodName#>(this, scalar); +<# } else if (method.MethodType == MethodType.BinaryInt) { #> + PrimitiveDataFrameColumnArithmetic.Instance.<#=method.MethodName#>(this, value); +<# } else { #> + PrimitiveDataFrameColumnArithmetic.Instance.<#=method.MethodName#>(this, right); +<# } #> + return this; + } + +<# } #> +<# } #> +<# foreach (MethodConfiguration method in methodConfiguration) { #> +<# if (method.MethodType == MethodType.BinaryScalar) { #> + public PrimitiveColumnContainer Reverse<#=method.MethodName#>(T scalar) + { + PrimitiveDataFrameColumnArithmetic.Instance.<#=method.MethodName#>(scalar, this); + return this; + } +<# } #> +<# } #> + } +} diff --git a/src/Microsoft.Data.Analysis/PrimitiveColumnContainer.cs b/src/Microsoft.Data.Analysis/PrimitiveColumnContainer.cs new file mode 100644 index 0000000000..2e04f63fee --- /dev/null +++ b/src/Microsoft.Data.Analysis/PrimitiveColumnContainer.cs @@ -0,0 +1,850 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Diagnostics; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using System.Text; + +namespace Microsoft.Data.Analysis +{ + /// + /// PrimitiveDataFrameColumnContainer is just a store for the column data. APIs that want to change the data must be defined in PrimitiveDataFrameColumn + /// + /// + internal partial class PrimitiveColumnContainer : IEnumerable + where T : struct + { + public IList> Buffers = new List>(); + + // To keep the mapping simple, each buffer is mapped 1v1 to a nullBitMapBuffer + // A set bit implies a valid value. An unset bit => null value + public IList> NullBitMapBuffers = new List>(); + + // Need a way to differentiate between columns initialized with default values and those with null values in SetValidityBit + internal bool _modifyNullCountWhileIndexing = true; + + public PrimitiveColumnContainer(T[] values) + { + values = values ?? throw new ArgumentNullException(nameof(values)); + long length = values.LongLength; + DataFrameBuffer curBuffer; + if (Buffers.Count == 0) + { + curBuffer = new DataFrameBuffer(); + Buffers.Add(curBuffer); + NullBitMapBuffers.Add(new DataFrameBuffer()); + } + else + { + curBuffer = (DataFrameBuffer)Buffers[Buffers.Count - 1]; + } + for (long i = 0; i < length; i++) + { + if (curBuffer.Length == ReadOnlyDataFrameBuffer.MaxCapacity) + { + curBuffer = new DataFrameBuffer(); + Buffers.Add(curBuffer); + NullBitMapBuffers.Add(new DataFrameBuffer()); + } + curBuffer.Append(values[i]); + SetValidityBit(Length, true); + Length++; + } + } + + public PrimitiveColumnContainer(IEnumerable values) + { + values = values ?? throw new ArgumentNullException(nameof(values)); + foreach (T value in values) + { + Append(value); + } + } + public PrimitiveColumnContainer(IEnumerable values) + { + values = values ?? throw new ArgumentNullException(nameof(values)); + foreach (T? value in values) + { + Append(value); + } + } + + public PrimitiveColumnContainer(ReadOnlyMemory buffer, ReadOnlyMemory nullBitMap, int length, int nullCount) + { + ReadOnlyDataFrameBuffer dataBuffer; + if (buffer.IsEmpty) + { + DataFrameBuffer mutableBuffer = new DataFrameBuffer(); + mutableBuffer.EnsureCapacity(length); + mutableBuffer.Length = length; + mutableBuffer.RawSpan.Fill(default(T)); + dataBuffer = mutableBuffer; + } + else + { + dataBuffer = new ReadOnlyDataFrameBuffer(buffer, length); + } + Buffers.Add(dataBuffer); + int bitMapBufferLength = (length + 7) / 8; + ReadOnlyDataFrameBuffer nullDataFrameBuffer; + if (nullBitMap.IsEmpty) + { + if (nullCount != 0) + { + throw new ArgumentNullException(Strings.InconsistentNullBitMapAndNullCount, nameof(nullBitMap)); + } + if (!buffer.IsEmpty) + { + // Create a new bitMap with all the bits up to length set + var bitMap = new byte[bitMapBufferLength]; + bitMap.AsSpan().Fill(255); + int lastByte = 1 << (length - (bitMapBufferLength - 1) * 8); + bitMap[bitMapBufferLength - 1] = (byte)(lastByte - 1); + nullDataFrameBuffer = new DataFrameBuffer(bitMap, bitMapBufferLength); + } + else + { + nullDataFrameBuffer = new DataFrameBuffer(); + } + } + else + { + if (nullBitMap.Length < bitMapBufferLength) + { + throw new ArgumentException(Strings.InconsistentNullBitMapAndLength, nameof(nullBitMap)); + } + nullDataFrameBuffer = new ReadOnlyDataFrameBuffer(nullBitMap, bitMapBufferLength); + } + NullBitMapBuffers.Add(nullDataFrameBuffer); + Length = length; + NullCount = nullCount; + } + + public PrimitiveColumnContainer(long length = 0) + { + while (length > 0) + { + if (Buffers.Count == 0) + { + Buffers.Add(new DataFrameBuffer()); + NullBitMapBuffers.Add(new DataFrameBuffer()); + } + DataFrameBuffer lastBuffer = (DataFrameBuffer)Buffers[Buffers.Count - 1]; + if (lastBuffer.Length == ReadOnlyDataFrameBuffer.MaxCapacity) + { + lastBuffer = new DataFrameBuffer(); + Buffers.Add(lastBuffer); + NullBitMapBuffers.Add(new DataFrameBuffer()); + } + int allocatable = (int)Math.Min(length, ReadOnlyDataFrameBuffer.MaxCapacity); + lastBuffer.EnsureCapacity(allocatable); + DataFrameBuffer lastNullBitMapBuffer = (DataFrameBuffer)(NullBitMapBuffers[NullBitMapBuffers.Count - 1]); + int nullBufferAllocatable = (allocatable + 7) / 8; + lastNullBitMapBuffer.EnsureCapacity(nullBufferAllocatable); + lastBuffer.Length = allocatable; + lastNullBitMapBuffer.Length = nullBufferAllocatable; + length -= allocatable; + Length += lastBuffer.Length; + NullCount += lastBuffer.Length; + } + } + + public void Resize(long length) + { + if (length < Length) + throw new ArgumentException(Strings.CannotResizeDown, nameof(length)); + AppendMany(default, length - Length); + } + + public void Append(T? value) + { + if (Buffers.Count == 0) + { + Buffers.Add(new DataFrameBuffer()); + NullBitMapBuffers.Add(new DataFrameBuffer()); + } + int bufferIndex = Buffers.Count - 1; + ReadOnlyDataFrameBuffer lastBuffer = Buffers[bufferIndex]; + if (lastBuffer.Length == ReadOnlyDataFrameBuffer.MaxCapacity) + { + lastBuffer = new DataFrameBuffer(); + Buffers.Add(lastBuffer); + NullBitMapBuffers.Add(new DataFrameBuffer()); + } + DataFrameBuffer mutableLastBuffer = DataFrameBuffer.GetMutableBuffer(lastBuffer); + Buffers[bufferIndex] = mutableLastBuffer; + mutableLastBuffer.Append(value ?? default); + SetValidityBit(Length, value.HasValue); + Length++; + } + + public void AppendMany(T? value, long count) + { + if (!value.HasValue) + { + NullCount += count; + } + + while (count > 0) + { + if (Buffers.Count == 0) + { + Buffers.Add(new DataFrameBuffer()); + NullBitMapBuffers.Add(new DataFrameBuffer()); + } + int bufferIndex = Buffers.Count - 1; + ReadOnlyDataFrameBuffer lastBuffer = Buffers[bufferIndex]; + if (lastBuffer.Length == ReadOnlyDataFrameBuffer.MaxCapacity) + { + lastBuffer = new DataFrameBuffer(); + Buffers.Add(lastBuffer); + NullBitMapBuffers.Add(new DataFrameBuffer()); + } + DataFrameBuffer mutableLastBuffer = DataFrameBuffer.GetMutableBuffer(lastBuffer); + Buffers[bufferIndex] = mutableLastBuffer; + int allocatable = (int)Math.Min(count, ReadOnlyDataFrameBuffer.MaxCapacity); + mutableLastBuffer.EnsureCapacity(allocatable); + mutableLastBuffer.RawSpan.Slice(lastBuffer.Length, allocatable).Fill(value ?? default); + mutableLastBuffer.Length += allocatable; + Length += allocatable; + + int nullBitMapBufferIndex = NullBitMapBuffers.Count - 1; + ReadOnlyDataFrameBuffer lastNullBitMapBuffer = NullBitMapBuffers[nullBitMapBufferIndex]; + DataFrameBuffer mutableLastNullBitMapBuffer = DataFrameBuffer.GetMutableBuffer(lastNullBitMapBuffer); + NullBitMapBuffers[nullBitMapBufferIndex] = mutableLastNullBitMapBuffer; + int nullBitMapAllocatable = (int)(((uint)allocatable) / 8) + 1; + mutableLastNullBitMapBuffer.EnsureCapacity(nullBitMapAllocatable); + _modifyNullCountWhileIndexing = false; + for (long i = Length - count; i < Length; i++) + { + SetValidityBit(i, value.HasValue ? true : false); + } + _modifyNullCountWhileIndexing = true; + count -= allocatable; + } + } + + public void ApplyElementwise(Func func) + { + for (int b = 0; b < Buffers.Count; b++) + { + ReadOnlyDataFrameBuffer buffer = Buffers[b]; + long prevLength = checked(Buffers[0].Length * b); + DataFrameBuffer mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + Buffers[b] = mutableBuffer; + Span span = mutableBuffer.Span; + DataFrameBuffer mutableNullBitMapBuffer = DataFrameBuffer.GetMutableBuffer(NullBitMapBuffers[b]); + NullBitMapBuffers[b] = mutableNullBitMapBuffer; + Span nullBitMapSpan = mutableNullBitMapBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + long curIndex = i + prevLength; + bool isValid = IsValid(nullBitMapSpan, i); + T? value = func(isValid ? span[i] : default(T?), curIndex); + span[i] = value.GetValueOrDefault(); + SetValidityBit(nullBitMapSpan, i, value != null); + } + } + } + + public void Apply(Func func, PrimitiveColumnContainer resultContainer) + where TResult : unmanaged + { + for (int b = 0; b < Buffers.Count; b++) + { + ReadOnlyDataFrameBuffer buffer = Buffers[b]; + long prevLength = checked(Buffers[0].Length * b); + DataFrameBuffer mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + Buffers[b] = mutableBuffer; + Span span = mutableBuffer.Span; + DataFrameBuffer mutableNullBitMapBuffer = DataFrameBuffer.GetMutableBuffer(NullBitMapBuffers[b]); + NullBitMapBuffers[b] = mutableNullBitMapBuffer; + Span nullBitMapSpan = mutableNullBitMapBuffer.Span; + + ReadOnlyDataFrameBuffer resultBuffer = resultContainer.Buffers[b]; + long resultPrevLength = checked(resultContainer.Buffers[0].Length * b); + DataFrameBuffer resultMutableBuffer = DataFrameBuffer.GetMutableBuffer(resultBuffer); + resultContainer.Buffers[b] = resultMutableBuffer; + Span resultSpan = resultMutableBuffer.Span; + DataFrameBuffer resultMutableNullBitMapBuffer = DataFrameBuffer.GetMutableBuffer(resultContainer.NullBitMapBuffers[b]); + resultContainer.NullBitMapBuffers[b] = resultMutableNullBitMapBuffer; + Span resultNullBitMapSpan = resultMutableNullBitMapBuffer.Span; + + for (int i = 0; i < span.Length; i++) + { + long curIndex = i + prevLength; + bool isValid = IsValid(nullBitMapSpan, i); + TResult? value = func(isValid ? span[i] : default(T?)); + resultSpan[i] = value.GetValueOrDefault(); + SetValidityBit(resultNullBitMapSpan, i, value != null); + } + } + } + + // Faster to use when we already have a span since it avoids indexing + public bool IsValid(ReadOnlySpan bitMapBufferSpan, int index) + { + int nullBitMapSpanIndex = index / 8; + byte thisBitMap = bitMapBufferSpan[nullBitMapSpanIndex]; + return IsBitSet(thisBitMap, index); + } + + public bool IsValid(long index) => NullCount == 0 || GetValidityBit(index); + + private byte SetBit(byte curBitMap, int index, bool value) + { + byte newBitMap; + if (value) + { + newBitMap = (byte)(curBitMap | (byte)(1 << (index & 7))); //bit hack for index % 8 + if (_modifyNullCountWhileIndexing && ((curBitMap >> (index & 7)) & 1) == 0 && index < Length && NullCount > 0) + { + // Old value was null. + NullCount--; + } + } + else + { + if (_modifyNullCountWhileIndexing && ((curBitMap >> (index & 7)) & 1) == 1 && index < Length) + { + // old value was NOT null and new value is null + NullCount++; + } + else if (_modifyNullCountWhileIndexing && index == Length) + { + // New entry from an append + NullCount++; + } + newBitMap = (byte)(curBitMap & (byte)~(1 << (int)((uint)index & 7))); + } + return newBitMap; + } + + // private function. Faster to use when we already have a span since it avoids indexing + private void SetValidityBit(Span bitMapBufferSpan, int index, bool value) + { + int bitMapBufferIndex = (int)((uint)index / 8); + Debug.Assert(bitMapBufferSpan.Length >= bitMapBufferIndex); + byte curBitMap = bitMapBufferSpan[bitMapBufferIndex]; + byte newBitMap = SetBit(curBitMap, index, value); + bitMapBufferSpan[bitMapBufferIndex] = newBitMap; + } + + /// + /// A null value has an unset bit + /// A NON-null value has a set bit + /// + /// + /// + internal void SetValidityBit(long index, bool value) + { + if ((ulong)index > (ulong)Length) + { + throw new ArgumentOutOfRangeException(nameof(index)); + } + // First find the right bitMapBuffer + int bitMapIndex = (int)(index / ReadOnlyDataFrameBuffer.MaxCapacity); + Debug.Assert(NullBitMapBuffers.Count > bitMapIndex); + DataFrameBuffer bitMapBuffer = (DataFrameBuffer)NullBitMapBuffers[bitMapIndex]; + + // Set the bit + index -= bitMapIndex * ReadOnlyDataFrameBuffer.MaxCapacity; + int bitMapBufferIndex = (int)((uint)index / 8); + Debug.Assert(bitMapBuffer.Length >= bitMapBufferIndex); + if (bitMapBuffer.Length == bitMapBufferIndex) + bitMapBuffer.Append(0); + SetValidityBit(bitMapBuffer.Span, (int)index, value); + } + + private bool IsBitSet(byte curBitMap, int index) + { + return ((curBitMap >> (index & 7)) & 1) != 0; + } + + private bool GetValidityBit(long index) + { + if ((uint)index >= Length) + { + throw new ArgumentOutOfRangeException(nameof(index)); + } + // First find the right bitMapBuffer + int bitMapIndex = (int)(index / ReadOnlyDataFrameBuffer.MaxCapacity); + Debug.Assert(NullBitMapBuffers.Count > bitMapIndex); + ReadOnlyDataFrameBuffer bitMapBuffer = NullBitMapBuffers[bitMapIndex]; + + // Get the bit + index -= bitMapIndex * ReadOnlyDataFrameBuffer.MaxCapacity; + int bitMapBufferIndex = (int)((uint)index / 8); + Debug.Assert(bitMapBuffer.Length > bitMapBufferIndex); + byte curBitMap = bitMapBuffer[bitMapBufferIndex]; + return IsBitSet(curBitMap, (int)index); + } + + public long Length; + + public long NullCount; + public int GetArrayContainingRowIndex(long rowIndex) + { + if (rowIndex >= Length) + { + throw new ArgumentOutOfRangeException(Strings.ColumnIndexOutOfRange, nameof(rowIndex)); + } + return (int)(rowIndex / ReadOnlyDataFrameBuffer.MaxCapacity); + } + + internal int MaxRecordBatchLength(long startIndex) + { + if (Length == 0) + return 0; + int arrayIndex = GetArrayContainingRowIndex(startIndex); + startIndex = startIndex - arrayIndex * ReadOnlyDataFrameBuffer.MaxCapacity; + return Buffers[arrayIndex].Length - (int)startIndex; + } + + internal ReadOnlyMemory GetValueBuffer(long startIndex) + { + int arrayIndex = GetArrayContainingRowIndex(startIndex); + return Buffers[arrayIndex].ReadOnlyBuffer; + } + + internal ReadOnlyMemory GetNullBuffer(long startIndex) + { + int arrayIndex = GetArrayContainingRowIndex(startIndex); + return NullBitMapBuffers[arrayIndex].ReadOnlyBuffer; + } + + public IReadOnlyList this[long startIndex, int length] + { + get + { + var ret = new List(length); + long endIndex = Math.Min(Length, startIndex + length); + for (long i = startIndex; i < endIndex; i++) + { + ret.Add(this[i]); + } + return ret; + } + } + + public T? this[long rowIndex] + { + get + { + if (!IsValid(rowIndex)) + { + return null; + } + int arrayIndex = GetArrayContainingRowIndex(rowIndex); + rowIndex = rowIndex - arrayIndex * ReadOnlyDataFrameBuffer.MaxCapacity; + return Buffers[arrayIndex][(int)rowIndex]; + } + set + { + int arrayIndex = GetArrayContainingRowIndex(rowIndex); + rowIndex = rowIndex - arrayIndex * ReadOnlyDataFrameBuffer.MaxCapacity; + ReadOnlyDataFrameBuffer buffer = Buffers[arrayIndex]; + DataFrameBuffer mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + Buffers[arrayIndex] = mutableBuffer; + DataFrameBuffer mutableNullBuffer = DataFrameBuffer.GetMutableBuffer(NullBitMapBuffers[arrayIndex]); + NullBitMapBuffers[arrayIndex] = mutableNullBuffer; + if (value.HasValue) + { + Buffers[arrayIndex][(int)rowIndex] = value.Value; + SetValidityBit(rowIndex, true); + } + else + { + Buffers[arrayIndex][(int)rowIndex] = default; + SetValidityBit(rowIndex, false); + } + } + } + + public IEnumerator GetEnumerator() + { + for (long i = 0; i < Length; i++) + { + yield return this[i]; + } + } + + IEnumerator IEnumerable.GetEnumerator() => GetEnumerator(); + + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + for (int i = 0; i < Length; i++) + { + T? value = this[i]; + if (value.HasValue) + { + sb.Append(this[i]).Append(" "); + } + else + { + sb.Append("null").Append(" "); + } + // Can this run out of memory? Just being safe here + if (sb.Length > 1000) + { + sb.Append("..."); + break; + } + } + return sb.ToString(); + } + + private List> CloneNullBitMapBuffers() + { + List> ret = new List>(); + foreach (ReadOnlyDataFrameBuffer buffer in NullBitMapBuffers) + { + DataFrameBuffer newBuffer = new DataFrameBuffer(); + ret.Add(newBuffer); + ReadOnlySpan span = buffer.ReadOnlySpan; + for (int i = 0; i < span.Length; i++) + { + newBuffer.Append(span[i]); + } + } + return ret; + } + + public PrimitiveColumnContainer Clone(PrimitiveColumnContainer mapIndices, Type type, bool invertMapIndices = false) + where U : unmanaged + { + ReadOnlySpan thisSpan = Buffers[0].ReadOnlySpan; + ReadOnlySpan thisNullBitMapSpan = NullBitMapBuffers[0].ReadOnlySpan; + long minRange = 0; + long maxRange = DataFrameBuffer.MaxCapacity; + long maxCapacity = maxRange; + PrimitiveColumnContainer ret = new PrimitiveColumnContainer(mapIndices.Length); + for (int b = 0; b < mapIndices.Buffers.Count; b++) + { + int index = b; + if (invertMapIndices) + index = mapIndices.Buffers.Count - 1 - b; + + ReadOnlyDataFrameBuffer buffer = mapIndices.Buffers[index]; + ReadOnlySpan mapIndicesNullBitMapSpan = mapIndices.NullBitMapBuffers[index].ReadOnlySpan; + ReadOnlySpan mapIndicesSpan = buffer.ReadOnlySpan; + ReadOnlySpan mapIndicesLongSpan = default; + ReadOnlySpan mapIndicesIntSpan = default; + DataFrameBuffer mutableBuffer = DataFrameBuffer.GetMutableBuffer(ret.Buffers[index]); + ret.Buffers[index] = mutableBuffer; + Span retSpan = mutableBuffer.Span; + DataFrameBuffer mutableNullBuffer = DataFrameBuffer.GetMutableBuffer(ret.NullBitMapBuffers[index]); + ret.NullBitMapBuffers[index] = mutableNullBuffer; + Span retNullBitMapSpan = mutableNullBuffer.Span; + if (type == typeof(long)) + { + mapIndicesLongSpan = MemoryMarshal.Cast(mapIndicesSpan); + } + if (type == typeof(int)) + { + mapIndicesIntSpan = MemoryMarshal.Cast(mapIndicesSpan); + } + for (int i = 0; i < buffer.Length; i++) + { + int spanIndex = i; + if (invertMapIndices) + spanIndex = buffer.Length - 1 - i; + + long mapRowIndex = mapIndicesIntSpan.IsEmpty ? mapIndicesLongSpan[spanIndex] : mapIndicesIntSpan[spanIndex]; + bool mapRowIndexIsValid = mapIndices.IsValid(mapIndicesNullBitMapSpan, spanIndex); + if (mapRowIndexIsValid && (mapRowIndex < minRange || mapRowIndex >= maxRange)) + { + int bufferIndex = (int)(mapRowIndex / maxCapacity); + thisSpan = Buffers[bufferIndex].ReadOnlySpan; + thisNullBitMapSpan = NullBitMapBuffers[bufferIndex].ReadOnlySpan; + minRange = bufferIndex * maxCapacity; + maxRange = (bufferIndex + 1) * maxCapacity; + } + T value = default; + bool isValid = false; + if (mapRowIndexIsValid) + { + mapRowIndex -= minRange; + value = thisSpan[(int)mapRowIndex]; + isValid = IsValid(thisNullBitMapSpan, (int)mapRowIndex); + } + + retSpan[i] = isValid ? value : default; + ret.SetValidityBit(retNullBitMapSpan, i, isValid); + } + } + return ret; + } + + public PrimitiveColumnContainer Clone() + { + var ret = new PrimitiveColumnContainer(); + foreach (ReadOnlyDataFrameBuffer buffer in Buffers) + { + DataFrameBuffer newBuffer = new DataFrameBuffer(); + ret.Buffers.Add(newBuffer); + ReadOnlySpan span = buffer.ReadOnlySpan; + ret.Length += buffer.Length; + for (int i = 0; i < span.Length; i++) + { + newBuffer.Append(span[i]); + } + } + ret.NullBitMapBuffers = CloneNullBitMapBuffers(); + ret.NullCount = NullCount; + return ret; + } + + internal PrimitiveColumnContainer CloneAsBoolContainer() + { + var ret = new PrimitiveColumnContainer(); + foreach (ReadOnlyDataFrameBuffer buffer in Buffers) + { + DataFrameBuffer newBuffer = new DataFrameBuffer(); + ret.Buffers.Add(newBuffer); + newBuffer.EnsureCapacity(buffer.Length); + if (typeof(T) == typeof(bool)) + { + var localBuffer = buffer; + ReadOnlyDataFrameBuffer boolLocalBuffer = Unsafe.As, ReadOnlyDataFrameBuffer>(ref localBuffer); + boolLocalBuffer.ReadOnlySpan.TryCopyTo(newBuffer.RawSpan); + } + else + { + newBuffer.Span.Fill(false); + } + newBuffer.Length = buffer.Length; + ret.Length += buffer.Length; + } + ret.NullBitMapBuffers = CloneNullBitMapBuffers(); + ret.NullCount = NullCount; + return ret; + } + + internal PrimitiveColumnContainer CloneAsByteContainer() + { + var ret = new PrimitiveColumnContainer(); + foreach (ReadOnlyDataFrameBuffer buffer in Buffers) + { + ret.Length += buffer.Length; + DataFrameBuffer newBuffer = new DataFrameBuffer(); + ret.Buffers.Add(newBuffer); + newBuffer.EnsureCapacity(buffer.Length); + ReadOnlySpan span = buffer.ReadOnlySpan; + for (int i = 0; i < span.Length; i++) + { + newBuffer.Append(ByteConverter.Instance.GetByte(span[i])); + } + } + ret.NullBitMapBuffers = CloneNullBitMapBuffers(); + ret.NullCount = NullCount; + return ret; + } + + internal PrimitiveColumnContainer CloneAsSByteContainer() + { + var ret = new PrimitiveColumnContainer(); + foreach (ReadOnlyDataFrameBuffer buffer in Buffers) + { + ret.Length += buffer.Length; + DataFrameBuffer newBuffer = new DataFrameBuffer(); + ret.Buffers.Add(newBuffer); + newBuffer.EnsureCapacity(buffer.Length); + ReadOnlySpan span = buffer.ReadOnlySpan; + for (int i = 0; i < span.Length; i++) + { + newBuffer.Append(SByteConverter.Instance.GetSByte(span[i])); + } + } + ret.NullBitMapBuffers = CloneNullBitMapBuffers(); + ret.NullCount = NullCount; + return ret; + } + + internal PrimitiveColumnContainer CloneAsDoubleContainer() + { + var ret = new PrimitiveColumnContainer(); + foreach (ReadOnlyDataFrameBuffer buffer in Buffers) + { + ret.Length += buffer.Length; + DataFrameBuffer newBuffer = new DataFrameBuffer(); + ret.Buffers.Add(newBuffer); + newBuffer.EnsureCapacity(buffer.Length); + ReadOnlySpan span = buffer.ReadOnlySpan; + for (int i = 0; i < span.Length; i++) + { + newBuffer.Append(DoubleConverter.Instance.GetDouble(span[i])); + } + } + ret.NullBitMapBuffers = CloneNullBitMapBuffers(); + ret.NullCount = NullCount; + return ret; + } + + internal PrimitiveColumnContainer CloneAsDecimalContainer() + { + var ret = new PrimitiveColumnContainer(); + foreach (ReadOnlyDataFrameBuffer buffer in Buffers) + { + ret.Length += buffer.Length; + DataFrameBuffer newBuffer = new DataFrameBuffer(); + ret.Buffers.Add(newBuffer); + newBuffer.EnsureCapacity(buffer.Length); + ReadOnlySpan span = buffer.ReadOnlySpan; + for (int i = 0; i < span.Length; i++) + { + newBuffer.Append(DecimalConverter.Instance.GetDecimal(span[i])); + } + } + ret.NullBitMapBuffers = CloneNullBitMapBuffers(); + ret.NullCount = NullCount; + return ret; + } + + internal PrimitiveColumnContainer CloneAsShortContainer() + { + var ret = new PrimitiveColumnContainer(); + foreach (ReadOnlyDataFrameBuffer buffer in Buffers) + { + ret.Length += buffer.Length; + DataFrameBuffer newBuffer = new DataFrameBuffer(); + ret.Buffers.Add(newBuffer); + newBuffer.EnsureCapacity(buffer.Length); + ReadOnlySpan span = buffer.ReadOnlySpan; + for (int i = 0; i < span.Length; i++) + { + newBuffer.Append(Int16Converter.Instance.GetInt16(span[i])); + } + } + ret.NullBitMapBuffers = CloneNullBitMapBuffers(); + ret.NullCount = NullCount; + return ret; + } + + internal PrimitiveColumnContainer CloneAsUShortContainer() + { + var ret = new PrimitiveColumnContainer(); + foreach (ReadOnlyDataFrameBuffer buffer in Buffers) + { + ret.Length += buffer.Length; + DataFrameBuffer newBuffer = new DataFrameBuffer(); + ret.Buffers.Add(newBuffer); + newBuffer.EnsureCapacity(buffer.Length); + ReadOnlySpan span = buffer.ReadOnlySpan; + for (int i = 0; i < span.Length; i++) + { + newBuffer.Append(UInt16Converter.Instance.GetUInt16(span[i])); + } + } + ret.NullBitMapBuffers = CloneNullBitMapBuffers(); + ret.NullCount = NullCount; + return ret; + } + + internal PrimitiveColumnContainer CloneAsIntContainer() + { + var ret = new PrimitiveColumnContainer(); + foreach (ReadOnlyDataFrameBuffer buffer in Buffers) + { + ret.Length += buffer.Length; + DataFrameBuffer newBuffer = new DataFrameBuffer(); + ret.Buffers.Add(newBuffer); + newBuffer.EnsureCapacity(buffer.Length); + ReadOnlySpan span = buffer.ReadOnlySpan; + for (int i = 0; i < span.Length; i++) + { + newBuffer.Append(Int32Converter.Instance.GetInt32(span[i])); + } + } + ret.NullBitMapBuffers = CloneNullBitMapBuffers(); + ret.NullCount = NullCount; + return ret; + } + + internal PrimitiveColumnContainer CloneAsUIntContainer() + { + var ret = new PrimitiveColumnContainer(); + foreach (ReadOnlyDataFrameBuffer buffer in Buffers) + { + ret.Length += buffer.Length; + DataFrameBuffer newBuffer = new DataFrameBuffer(); + ret.Buffers.Add(newBuffer); + newBuffer.EnsureCapacity(buffer.Length); + ReadOnlySpan span = buffer.ReadOnlySpan; + for (int i = 0; i < span.Length; i++) + { + newBuffer.Append(UInt32Converter.Instance.GetUInt32(span[i])); + } + } + ret.NullBitMapBuffers = CloneNullBitMapBuffers(); + ret.NullCount = NullCount; + return ret; + } + + internal PrimitiveColumnContainer CloneAsLongContainer() + { + var ret = new PrimitiveColumnContainer(); + foreach (ReadOnlyDataFrameBuffer buffer in Buffers) + { + ret.Length += buffer.Length; + DataFrameBuffer newBuffer = new DataFrameBuffer(); + ret.Buffers.Add(newBuffer); + newBuffer.EnsureCapacity(buffer.Length); + ReadOnlySpan span = buffer.ReadOnlySpan; + for (int i = 0; i < span.Length; i++) + { + newBuffer.Append(Int64Converter.Instance.GetInt64(span[i])); + } + } + ret.NullBitMapBuffers = CloneNullBitMapBuffers(); + ret.NullCount = NullCount; + return ret; + } + + internal PrimitiveColumnContainer CloneAsULongContainer() + { + var ret = new PrimitiveColumnContainer(); + foreach (ReadOnlyDataFrameBuffer buffer in Buffers) + { + ret.Length += buffer.Length; + DataFrameBuffer newBuffer = new DataFrameBuffer(); + ret.Buffers.Add(newBuffer); + newBuffer.EnsureCapacity(buffer.Length); + ReadOnlySpan span = buffer.ReadOnlySpan; + for (int i = 0; i < span.Length; i++) + { + newBuffer.Append(UInt64Converter.Instance.GetUInt64(span[i])); + } + } + ret.NullBitMapBuffers = CloneNullBitMapBuffers(); + ret.NullCount = NullCount; + return ret; + } + + internal PrimitiveColumnContainer CloneAsFloatContainer() + { + var ret = new PrimitiveColumnContainer(); + foreach (ReadOnlyDataFrameBuffer buffer in Buffers) + { + ret.Length += buffer.Length; + DataFrameBuffer newBuffer = new DataFrameBuffer(); + ret.Buffers.Add(newBuffer); + newBuffer.EnsureCapacity(buffer.Length); + ReadOnlySpan span = buffer.ReadOnlySpan; + for (int i = 0; i < span.Length; i++) + { + newBuffer.Append(SingleConverter.Instance.GetSingle(span[i])); + } + } + ret.NullBitMapBuffers = CloneNullBitMapBuffers(); + ret.NullCount = NullCount; + return ret; + } + } +} diff --git a/src/Microsoft.Data.Analysis/PrimitiveDataFrameColumn.BinaryOperationAPIs.ExplodedColumns.cs b/src/Microsoft.Data.Analysis/PrimitiveDataFrameColumn.BinaryOperationAPIs.ExplodedColumns.cs new file mode 100644 index 0000000000..51258d1d77 --- /dev/null +++ b/src/Microsoft.Data.Analysis/PrimitiveDataFrameColumn.BinaryOperationAPIs.ExplodedColumns.cs @@ -0,0 +1,15832 @@ + + +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +// Generated from DataFrameColumn.BinaryOperationAPIs.ExplodedColumns.tt. Do not modify directly + +using System; +using System.Collections.Generic; + +namespace Microsoft.Data.Analysis +{ + public partial class ByteDataFrameColumn + { + public Int32DataFrameColumn Add(ByteDataFrameColumn column) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + Int32DataFrameColumn otherintColumn = column.CloneAsInt32Column(); + return intColumn.AddImplementation(otherintColumn, inPlace: true); + } + public Int32DataFrameColumn Subtract(ByteDataFrameColumn column) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + Int32DataFrameColumn otherintColumn = column.CloneAsInt32Column(); + return intColumn.SubtractImplementation(otherintColumn, inPlace: true); + } + public Int32DataFrameColumn Multiply(ByteDataFrameColumn column) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + Int32DataFrameColumn otherintColumn = column.CloneAsInt32Column(); + return intColumn.MultiplyImplementation(otherintColumn, inPlace: true); + } + public Int32DataFrameColumn Divide(ByteDataFrameColumn column) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + Int32DataFrameColumn otherintColumn = column.CloneAsInt32Column(); + return intColumn.DivideImplementation(otherintColumn, inPlace: true); + } + public Int32DataFrameColumn Modulo(ByteDataFrameColumn column) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + Int32DataFrameColumn otherintColumn = column.CloneAsInt32Column(); + return intColumn.ModuloImplementation(otherintColumn, inPlace: true); + } + public DecimalDataFrameColumn Add(DecimalDataFrameColumn column) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.AddImplementation(column, inPlace: true); + } + public DecimalDataFrameColumn Subtract(DecimalDataFrameColumn column) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.SubtractImplementation(column, inPlace: true); + } + public DecimalDataFrameColumn Multiply(DecimalDataFrameColumn column) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.MultiplyImplementation(column, inPlace: true); + } + public DecimalDataFrameColumn Divide(DecimalDataFrameColumn column) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.DivideImplementation(column, inPlace: true); + } + public DecimalDataFrameColumn Modulo(DecimalDataFrameColumn column) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.ModuloImplementation(column, inPlace: true); + } + public DoubleDataFrameColumn Add(DoubleDataFrameColumn column) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.AddImplementation(column, inPlace: true); + } + public DoubleDataFrameColumn Subtract(DoubleDataFrameColumn column) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.SubtractImplementation(column, inPlace: true); + } + public DoubleDataFrameColumn Multiply(DoubleDataFrameColumn column) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.MultiplyImplementation(column, inPlace: true); + } + public DoubleDataFrameColumn Divide(DoubleDataFrameColumn column) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.DivideImplementation(column, inPlace: true); + } + public DoubleDataFrameColumn Modulo(DoubleDataFrameColumn column) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.ModuloImplementation(column, inPlace: true); + } + public SingleDataFrameColumn Add(SingleDataFrameColumn column) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.AddImplementation(column, inPlace: true); + } + public SingleDataFrameColumn Subtract(SingleDataFrameColumn column) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.SubtractImplementation(column, inPlace: true); + } + public SingleDataFrameColumn Multiply(SingleDataFrameColumn column) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.MultiplyImplementation(column, inPlace: true); + } + public SingleDataFrameColumn Divide(SingleDataFrameColumn column) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.DivideImplementation(column, inPlace: true); + } + public SingleDataFrameColumn Modulo(SingleDataFrameColumn column) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.ModuloImplementation(column, inPlace: true); + } + public Int32DataFrameColumn Add(Int32DataFrameColumn column) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.AddImplementation(column, inPlace: true); + } + public Int32DataFrameColumn Subtract(Int32DataFrameColumn column) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.SubtractImplementation(column, inPlace: true); + } + public Int32DataFrameColumn Multiply(Int32DataFrameColumn column) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.MultiplyImplementation(column, inPlace: true); + } + public Int32DataFrameColumn Divide(Int32DataFrameColumn column) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.DivideImplementation(column, inPlace: true); + } + public Int32DataFrameColumn Modulo(Int32DataFrameColumn column) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.ModuloImplementation(column, inPlace: true); + } + public Int64DataFrameColumn Add(Int64DataFrameColumn column) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.AddImplementation(column, inPlace: true); + } + public Int64DataFrameColumn Subtract(Int64DataFrameColumn column) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.SubtractImplementation(column, inPlace: true); + } + public Int64DataFrameColumn Multiply(Int64DataFrameColumn column) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.MultiplyImplementation(column, inPlace: true); + } + public Int64DataFrameColumn Divide(Int64DataFrameColumn column) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.DivideImplementation(column, inPlace: true); + } + public Int64DataFrameColumn Modulo(Int64DataFrameColumn column) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.ModuloImplementation(column, inPlace: true); + } + public Int32DataFrameColumn Add(SByteDataFrameColumn column) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + Int32DataFrameColumn otherintColumn = column.CloneAsInt32Column(); + return intColumn.AddImplementation(otherintColumn, inPlace: true); + } + public Int32DataFrameColumn Subtract(SByteDataFrameColumn column) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + Int32DataFrameColumn otherintColumn = column.CloneAsInt32Column(); + return intColumn.SubtractImplementation(otherintColumn, inPlace: true); + } + public Int32DataFrameColumn Multiply(SByteDataFrameColumn column) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + Int32DataFrameColumn otherintColumn = column.CloneAsInt32Column(); + return intColumn.MultiplyImplementation(otherintColumn, inPlace: true); + } + public Int32DataFrameColumn Divide(SByteDataFrameColumn column) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + Int32DataFrameColumn otherintColumn = column.CloneAsInt32Column(); + return intColumn.DivideImplementation(otherintColumn, inPlace: true); + } + public Int32DataFrameColumn Modulo(SByteDataFrameColumn column) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + Int32DataFrameColumn otherintColumn = column.CloneAsInt32Column(); + return intColumn.ModuloImplementation(otherintColumn, inPlace: true); + } + public Int32DataFrameColumn Add(Int16DataFrameColumn column) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + Int32DataFrameColumn otherintColumn = column.CloneAsInt32Column(); + return intColumn.AddImplementation(otherintColumn, inPlace: true); + } + public Int32DataFrameColumn Subtract(Int16DataFrameColumn column) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + Int32DataFrameColumn otherintColumn = column.CloneAsInt32Column(); + return intColumn.SubtractImplementation(otherintColumn, inPlace: true); + } + public Int32DataFrameColumn Multiply(Int16DataFrameColumn column) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + Int32DataFrameColumn otherintColumn = column.CloneAsInt32Column(); + return intColumn.MultiplyImplementation(otherintColumn, inPlace: true); + } + public Int32DataFrameColumn Divide(Int16DataFrameColumn column) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + Int32DataFrameColumn otherintColumn = column.CloneAsInt32Column(); + return intColumn.DivideImplementation(otherintColumn, inPlace: true); + } + public Int32DataFrameColumn Modulo(Int16DataFrameColumn column) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + Int32DataFrameColumn otherintColumn = column.CloneAsInt32Column(); + return intColumn.ModuloImplementation(otherintColumn, inPlace: true); + } + public UInt32DataFrameColumn Add(UInt32DataFrameColumn column) + { + UInt32DataFrameColumn uintColumn = CloneAsUInt32Column(); + return uintColumn.AddImplementation(column, inPlace: true); + } + public UInt32DataFrameColumn Subtract(UInt32DataFrameColumn column) + { + UInt32DataFrameColumn uintColumn = CloneAsUInt32Column(); + return uintColumn.SubtractImplementation(column, inPlace: true); + } + public UInt32DataFrameColumn Multiply(UInt32DataFrameColumn column) + { + UInt32DataFrameColumn uintColumn = CloneAsUInt32Column(); + return uintColumn.MultiplyImplementation(column, inPlace: true); + } + public UInt32DataFrameColumn Divide(UInt32DataFrameColumn column) + { + UInt32DataFrameColumn uintColumn = CloneAsUInt32Column(); + return uintColumn.DivideImplementation(column, inPlace: true); + } + public UInt32DataFrameColumn Modulo(UInt32DataFrameColumn column) + { + UInt32DataFrameColumn uintColumn = CloneAsUInt32Column(); + return uintColumn.ModuloImplementation(column, inPlace: true); + } + public UInt64DataFrameColumn Add(UInt64DataFrameColumn column) + { + UInt64DataFrameColumn ulongColumn = CloneAsUInt64Column(); + return ulongColumn.AddImplementation(column, inPlace: true); + } + public UInt64DataFrameColumn Subtract(UInt64DataFrameColumn column) + { + UInt64DataFrameColumn ulongColumn = CloneAsUInt64Column(); + return ulongColumn.SubtractImplementation(column, inPlace: true); + } + public UInt64DataFrameColumn Multiply(UInt64DataFrameColumn column) + { + UInt64DataFrameColumn ulongColumn = CloneAsUInt64Column(); + return ulongColumn.MultiplyImplementation(column, inPlace: true); + } + public UInt64DataFrameColumn Divide(UInt64DataFrameColumn column) + { + UInt64DataFrameColumn ulongColumn = CloneAsUInt64Column(); + return ulongColumn.DivideImplementation(column, inPlace: true); + } + public UInt64DataFrameColumn Modulo(UInt64DataFrameColumn column) + { + UInt64DataFrameColumn ulongColumn = CloneAsUInt64Column(); + return ulongColumn.ModuloImplementation(column, inPlace: true); + } + public Int32DataFrameColumn Add(UInt16DataFrameColumn column) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + Int32DataFrameColumn otherintColumn = column.CloneAsInt32Column(); + return intColumn.AddImplementation(otherintColumn, inPlace: true); + } + public Int32DataFrameColumn Subtract(UInt16DataFrameColumn column) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + Int32DataFrameColumn otherintColumn = column.CloneAsInt32Column(); + return intColumn.SubtractImplementation(otherintColumn, inPlace: true); + } + public Int32DataFrameColumn Multiply(UInt16DataFrameColumn column) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + Int32DataFrameColumn otherintColumn = column.CloneAsInt32Column(); + return intColumn.MultiplyImplementation(otherintColumn, inPlace: true); + } + public Int32DataFrameColumn Divide(UInt16DataFrameColumn column) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + Int32DataFrameColumn otherintColumn = column.CloneAsInt32Column(); + return intColumn.DivideImplementation(otherintColumn, inPlace: true); + } + public Int32DataFrameColumn Modulo(UInt16DataFrameColumn column) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + Int32DataFrameColumn otherintColumn = column.CloneAsInt32Column(); + return intColumn.ModuloImplementation(otherintColumn, inPlace: true); + } + } + public partial class DecimalDataFrameColumn + { + public DecimalDataFrameColumn Add(ByteDataFrameColumn column, bool inPlace = false) + { + DecimalDataFrameColumn otherdecimalColumn = column.CloneAsDecimalColumn(); + return AddImplementation(otherdecimalColumn, inPlace); + } + public DecimalDataFrameColumn Subtract(ByteDataFrameColumn column, bool inPlace = false) + { + DecimalDataFrameColumn otherdecimalColumn = column.CloneAsDecimalColumn(); + return SubtractImplementation(otherdecimalColumn, inPlace); + } + public DecimalDataFrameColumn Multiply(ByteDataFrameColumn column, bool inPlace = false) + { + DecimalDataFrameColumn otherdecimalColumn = column.CloneAsDecimalColumn(); + return MultiplyImplementation(otherdecimalColumn, inPlace); + } + public DecimalDataFrameColumn Divide(ByteDataFrameColumn column, bool inPlace = false) + { + DecimalDataFrameColumn otherdecimalColumn = column.CloneAsDecimalColumn(); + return DivideImplementation(otherdecimalColumn, inPlace); + } + public DecimalDataFrameColumn Modulo(ByteDataFrameColumn column, bool inPlace = false) + { + DecimalDataFrameColumn otherdecimalColumn = column.CloneAsDecimalColumn(); + return ModuloImplementation(otherdecimalColumn, inPlace); + } + public DecimalDataFrameColumn Add(DecimalDataFrameColumn column, bool inPlace = false) + { + return AddImplementation(column, inPlace); + } + public DecimalDataFrameColumn Subtract(DecimalDataFrameColumn column, bool inPlace = false) + { + return SubtractImplementation(column, inPlace); + } + public DecimalDataFrameColumn Multiply(DecimalDataFrameColumn column, bool inPlace = false) + { + return MultiplyImplementation(column, inPlace); + } + public DecimalDataFrameColumn Divide(DecimalDataFrameColumn column, bool inPlace = false) + { + return DivideImplementation(column, inPlace); + } + public DecimalDataFrameColumn Modulo(DecimalDataFrameColumn column, bool inPlace = false) + { + return ModuloImplementation(column, inPlace); + } + public DecimalDataFrameColumn Add(Int32DataFrameColumn column, bool inPlace = false) + { + DecimalDataFrameColumn otherdecimalColumn = column.CloneAsDecimalColumn(); + return AddImplementation(otherdecimalColumn, inPlace); + } + public DecimalDataFrameColumn Subtract(Int32DataFrameColumn column, bool inPlace = false) + { + DecimalDataFrameColumn otherdecimalColumn = column.CloneAsDecimalColumn(); + return SubtractImplementation(otherdecimalColumn, inPlace); + } + public DecimalDataFrameColumn Multiply(Int32DataFrameColumn column, bool inPlace = false) + { + DecimalDataFrameColumn otherdecimalColumn = column.CloneAsDecimalColumn(); + return MultiplyImplementation(otherdecimalColumn, inPlace); + } + public DecimalDataFrameColumn Divide(Int32DataFrameColumn column, bool inPlace = false) + { + DecimalDataFrameColumn otherdecimalColumn = column.CloneAsDecimalColumn(); + return DivideImplementation(otherdecimalColumn, inPlace); + } + public DecimalDataFrameColumn Modulo(Int32DataFrameColumn column, bool inPlace = false) + { + DecimalDataFrameColumn otherdecimalColumn = column.CloneAsDecimalColumn(); + return ModuloImplementation(otherdecimalColumn, inPlace); + } + public DecimalDataFrameColumn Add(Int64DataFrameColumn column, bool inPlace = false) + { + DecimalDataFrameColumn otherdecimalColumn = column.CloneAsDecimalColumn(); + return AddImplementation(otherdecimalColumn, inPlace); + } + public DecimalDataFrameColumn Subtract(Int64DataFrameColumn column, bool inPlace = false) + { + DecimalDataFrameColumn otherdecimalColumn = column.CloneAsDecimalColumn(); + return SubtractImplementation(otherdecimalColumn, inPlace); + } + public DecimalDataFrameColumn Multiply(Int64DataFrameColumn column, bool inPlace = false) + { + DecimalDataFrameColumn otherdecimalColumn = column.CloneAsDecimalColumn(); + return MultiplyImplementation(otherdecimalColumn, inPlace); + } + public DecimalDataFrameColumn Divide(Int64DataFrameColumn column, bool inPlace = false) + { + DecimalDataFrameColumn otherdecimalColumn = column.CloneAsDecimalColumn(); + return DivideImplementation(otherdecimalColumn, inPlace); + } + public DecimalDataFrameColumn Modulo(Int64DataFrameColumn column, bool inPlace = false) + { + DecimalDataFrameColumn otherdecimalColumn = column.CloneAsDecimalColumn(); + return ModuloImplementation(otherdecimalColumn, inPlace); + } + public DecimalDataFrameColumn Add(SByteDataFrameColumn column, bool inPlace = false) + { + DecimalDataFrameColumn otherdecimalColumn = column.CloneAsDecimalColumn(); + return AddImplementation(otherdecimalColumn, inPlace); + } + public DecimalDataFrameColumn Subtract(SByteDataFrameColumn column, bool inPlace = false) + { + DecimalDataFrameColumn otherdecimalColumn = column.CloneAsDecimalColumn(); + return SubtractImplementation(otherdecimalColumn, inPlace); + } + public DecimalDataFrameColumn Multiply(SByteDataFrameColumn column, bool inPlace = false) + { + DecimalDataFrameColumn otherdecimalColumn = column.CloneAsDecimalColumn(); + return MultiplyImplementation(otherdecimalColumn, inPlace); + } + public DecimalDataFrameColumn Divide(SByteDataFrameColumn column, bool inPlace = false) + { + DecimalDataFrameColumn otherdecimalColumn = column.CloneAsDecimalColumn(); + return DivideImplementation(otherdecimalColumn, inPlace); + } + public DecimalDataFrameColumn Modulo(SByteDataFrameColumn column, bool inPlace = false) + { + DecimalDataFrameColumn otherdecimalColumn = column.CloneAsDecimalColumn(); + return ModuloImplementation(otherdecimalColumn, inPlace); + } + public DecimalDataFrameColumn Add(Int16DataFrameColumn column, bool inPlace = false) + { + DecimalDataFrameColumn otherdecimalColumn = column.CloneAsDecimalColumn(); + return AddImplementation(otherdecimalColumn, inPlace); + } + public DecimalDataFrameColumn Subtract(Int16DataFrameColumn column, bool inPlace = false) + { + DecimalDataFrameColumn otherdecimalColumn = column.CloneAsDecimalColumn(); + return SubtractImplementation(otherdecimalColumn, inPlace); + } + public DecimalDataFrameColumn Multiply(Int16DataFrameColumn column, bool inPlace = false) + { + DecimalDataFrameColumn otherdecimalColumn = column.CloneAsDecimalColumn(); + return MultiplyImplementation(otherdecimalColumn, inPlace); + } + public DecimalDataFrameColumn Divide(Int16DataFrameColumn column, bool inPlace = false) + { + DecimalDataFrameColumn otherdecimalColumn = column.CloneAsDecimalColumn(); + return DivideImplementation(otherdecimalColumn, inPlace); + } + public DecimalDataFrameColumn Modulo(Int16DataFrameColumn column, bool inPlace = false) + { + DecimalDataFrameColumn otherdecimalColumn = column.CloneAsDecimalColumn(); + return ModuloImplementation(otherdecimalColumn, inPlace); + } + public DecimalDataFrameColumn Add(UInt32DataFrameColumn column, bool inPlace = false) + { + DecimalDataFrameColumn otherdecimalColumn = column.CloneAsDecimalColumn(); + return AddImplementation(otherdecimalColumn, inPlace); + } + public DecimalDataFrameColumn Subtract(UInt32DataFrameColumn column, bool inPlace = false) + { + DecimalDataFrameColumn otherdecimalColumn = column.CloneAsDecimalColumn(); + return SubtractImplementation(otherdecimalColumn, inPlace); + } + public DecimalDataFrameColumn Multiply(UInt32DataFrameColumn column, bool inPlace = false) + { + DecimalDataFrameColumn otherdecimalColumn = column.CloneAsDecimalColumn(); + return MultiplyImplementation(otherdecimalColumn, inPlace); + } + public DecimalDataFrameColumn Divide(UInt32DataFrameColumn column, bool inPlace = false) + { + DecimalDataFrameColumn otherdecimalColumn = column.CloneAsDecimalColumn(); + return DivideImplementation(otherdecimalColumn, inPlace); + } + public DecimalDataFrameColumn Modulo(UInt32DataFrameColumn column, bool inPlace = false) + { + DecimalDataFrameColumn otherdecimalColumn = column.CloneAsDecimalColumn(); + return ModuloImplementation(otherdecimalColumn, inPlace); + } + public DecimalDataFrameColumn Add(UInt64DataFrameColumn column, bool inPlace = false) + { + DecimalDataFrameColumn otherdecimalColumn = column.CloneAsDecimalColumn(); + return AddImplementation(otherdecimalColumn, inPlace); + } + public DecimalDataFrameColumn Subtract(UInt64DataFrameColumn column, bool inPlace = false) + { + DecimalDataFrameColumn otherdecimalColumn = column.CloneAsDecimalColumn(); + return SubtractImplementation(otherdecimalColumn, inPlace); + } + public DecimalDataFrameColumn Multiply(UInt64DataFrameColumn column, bool inPlace = false) + { + DecimalDataFrameColumn otherdecimalColumn = column.CloneAsDecimalColumn(); + return MultiplyImplementation(otherdecimalColumn, inPlace); + } + public DecimalDataFrameColumn Divide(UInt64DataFrameColumn column, bool inPlace = false) + { + DecimalDataFrameColumn otherdecimalColumn = column.CloneAsDecimalColumn(); + return DivideImplementation(otherdecimalColumn, inPlace); + } + public DecimalDataFrameColumn Modulo(UInt64DataFrameColumn column, bool inPlace = false) + { + DecimalDataFrameColumn otherdecimalColumn = column.CloneAsDecimalColumn(); + return ModuloImplementation(otherdecimalColumn, inPlace); + } + public DecimalDataFrameColumn Add(UInt16DataFrameColumn column, bool inPlace = false) + { + DecimalDataFrameColumn otherdecimalColumn = column.CloneAsDecimalColumn(); + return AddImplementation(otherdecimalColumn, inPlace); + } + public DecimalDataFrameColumn Subtract(UInt16DataFrameColumn column, bool inPlace = false) + { + DecimalDataFrameColumn otherdecimalColumn = column.CloneAsDecimalColumn(); + return SubtractImplementation(otherdecimalColumn, inPlace); + } + public DecimalDataFrameColumn Multiply(UInt16DataFrameColumn column, bool inPlace = false) + { + DecimalDataFrameColumn otherdecimalColumn = column.CloneAsDecimalColumn(); + return MultiplyImplementation(otherdecimalColumn, inPlace); + } + public DecimalDataFrameColumn Divide(UInt16DataFrameColumn column, bool inPlace = false) + { + DecimalDataFrameColumn otherdecimalColumn = column.CloneAsDecimalColumn(); + return DivideImplementation(otherdecimalColumn, inPlace); + } + public DecimalDataFrameColumn Modulo(UInt16DataFrameColumn column, bool inPlace = false) + { + DecimalDataFrameColumn otherdecimalColumn = column.CloneAsDecimalColumn(); + return ModuloImplementation(otherdecimalColumn, inPlace); + } + } + public partial class DoubleDataFrameColumn + { + public DoubleDataFrameColumn Add(ByteDataFrameColumn column, bool inPlace = false) + { + DoubleDataFrameColumn otherdoubleColumn = column.CloneAsDoubleColumn(); + return AddImplementation(otherdoubleColumn, inPlace); + } + public DoubleDataFrameColumn Subtract(ByteDataFrameColumn column, bool inPlace = false) + { + DoubleDataFrameColumn otherdoubleColumn = column.CloneAsDoubleColumn(); + return SubtractImplementation(otherdoubleColumn, inPlace); + } + public DoubleDataFrameColumn Multiply(ByteDataFrameColumn column, bool inPlace = false) + { + DoubleDataFrameColumn otherdoubleColumn = column.CloneAsDoubleColumn(); + return MultiplyImplementation(otherdoubleColumn, inPlace); + } + public DoubleDataFrameColumn Divide(ByteDataFrameColumn column, bool inPlace = false) + { + DoubleDataFrameColumn otherdoubleColumn = column.CloneAsDoubleColumn(); + return DivideImplementation(otherdoubleColumn, inPlace); + } + public DoubleDataFrameColumn Modulo(ByteDataFrameColumn column, bool inPlace = false) + { + DoubleDataFrameColumn otherdoubleColumn = column.CloneAsDoubleColumn(); + return ModuloImplementation(otherdoubleColumn, inPlace); + } + public DoubleDataFrameColumn Add(DoubleDataFrameColumn column, bool inPlace = false) + { + return AddImplementation(column, inPlace); + } + public DoubleDataFrameColumn Subtract(DoubleDataFrameColumn column, bool inPlace = false) + { + return SubtractImplementation(column, inPlace); + } + public DoubleDataFrameColumn Multiply(DoubleDataFrameColumn column, bool inPlace = false) + { + return MultiplyImplementation(column, inPlace); + } + public DoubleDataFrameColumn Divide(DoubleDataFrameColumn column, bool inPlace = false) + { + return DivideImplementation(column, inPlace); + } + public DoubleDataFrameColumn Modulo(DoubleDataFrameColumn column, bool inPlace = false) + { + return ModuloImplementation(column, inPlace); + } + public DoubleDataFrameColumn Add(SingleDataFrameColumn column, bool inPlace = false) + { + DoubleDataFrameColumn otherdoubleColumn = column.CloneAsDoubleColumn(); + return AddImplementation(otherdoubleColumn, inPlace); + } + public DoubleDataFrameColumn Subtract(SingleDataFrameColumn column, bool inPlace = false) + { + DoubleDataFrameColumn otherdoubleColumn = column.CloneAsDoubleColumn(); + return SubtractImplementation(otherdoubleColumn, inPlace); + } + public DoubleDataFrameColumn Multiply(SingleDataFrameColumn column, bool inPlace = false) + { + DoubleDataFrameColumn otherdoubleColumn = column.CloneAsDoubleColumn(); + return MultiplyImplementation(otherdoubleColumn, inPlace); + } + public DoubleDataFrameColumn Divide(SingleDataFrameColumn column, bool inPlace = false) + { + DoubleDataFrameColumn otherdoubleColumn = column.CloneAsDoubleColumn(); + return DivideImplementation(otherdoubleColumn, inPlace); + } + public DoubleDataFrameColumn Modulo(SingleDataFrameColumn column, bool inPlace = false) + { + DoubleDataFrameColumn otherdoubleColumn = column.CloneAsDoubleColumn(); + return ModuloImplementation(otherdoubleColumn, inPlace); + } + public DoubleDataFrameColumn Add(Int32DataFrameColumn column, bool inPlace = false) + { + DoubleDataFrameColumn otherdoubleColumn = column.CloneAsDoubleColumn(); + return AddImplementation(otherdoubleColumn, inPlace); + } + public DoubleDataFrameColumn Subtract(Int32DataFrameColumn column, bool inPlace = false) + { + DoubleDataFrameColumn otherdoubleColumn = column.CloneAsDoubleColumn(); + return SubtractImplementation(otherdoubleColumn, inPlace); + } + public DoubleDataFrameColumn Multiply(Int32DataFrameColumn column, bool inPlace = false) + { + DoubleDataFrameColumn otherdoubleColumn = column.CloneAsDoubleColumn(); + return MultiplyImplementation(otherdoubleColumn, inPlace); + } + public DoubleDataFrameColumn Divide(Int32DataFrameColumn column, bool inPlace = false) + { + DoubleDataFrameColumn otherdoubleColumn = column.CloneAsDoubleColumn(); + return DivideImplementation(otherdoubleColumn, inPlace); + } + public DoubleDataFrameColumn Modulo(Int32DataFrameColumn column, bool inPlace = false) + { + DoubleDataFrameColumn otherdoubleColumn = column.CloneAsDoubleColumn(); + return ModuloImplementation(otherdoubleColumn, inPlace); + } + public DoubleDataFrameColumn Add(Int64DataFrameColumn column, bool inPlace = false) + { + DoubleDataFrameColumn otherdoubleColumn = column.CloneAsDoubleColumn(); + return AddImplementation(otherdoubleColumn, inPlace); + } + public DoubleDataFrameColumn Subtract(Int64DataFrameColumn column, bool inPlace = false) + { + DoubleDataFrameColumn otherdoubleColumn = column.CloneAsDoubleColumn(); + return SubtractImplementation(otherdoubleColumn, inPlace); + } + public DoubleDataFrameColumn Multiply(Int64DataFrameColumn column, bool inPlace = false) + { + DoubleDataFrameColumn otherdoubleColumn = column.CloneAsDoubleColumn(); + return MultiplyImplementation(otherdoubleColumn, inPlace); + } + public DoubleDataFrameColumn Divide(Int64DataFrameColumn column, bool inPlace = false) + { + DoubleDataFrameColumn otherdoubleColumn = column.CloneAsDoubleColumn(); + return DivideImplementation(otherdoubleColumn, inPlace); + } + public DoubleDataFrameColumn Modulo(Int64DataFrameColumn column, bool inPlace = false) + { + DoubleDataFrameColumn otherdoubleColumn = column.CloneAsDoubleColumn(); + return ModuloImplementation(otherdoubleColumn, inPlace); + } + public DoubleDataFrameColumn Add(SByteDataFrameColumn column, bool inPlace = false) + { + DoubleDataFrameColumn otherdoubleColumn = column.CloneAsDoubleColumn(); + return AddImplementation(otherdoubleColumn, inPlace); + } + public DoubleDataFrameColumn Subtract(SByteDataFrameColumn column, bool inPlace = false) + { + DoubleDataFrameColumn otherdoubleColumn = column.CloneAsDoubleColumn(); + return SubtractImplementation(otherdoubleColumn, inPlace); + } + public DoubleDataFrameColumn Multiply(SByteDataFrameColumn column, bool inPlace = false) + { + DoubleDataFrameColumn otherdoubleColumn = column.CloneAsDoubleColumn(); + return MultiplyImplementation(otherdoubleColumn, inPlace); + } + public DoubleDataFrameColumn Divide(SByteDataFrameColumn column, bool inPlace = false) + { + DoubleDataFrameColumn otherdoubleColumn = column.CloneAsDoubleColumn(); + return DivideImplementation(otherdoubleColumn, inPlace); + } + public DoubleDataFrameColumn Modulo(SByteDataFrameColumn column, bool inPlace = false) + { + DoubleDataFrameColumn otherdoubleColumn = column.CloneAsDoubleColumn(); + return ModuloImplementation(otherdoubleColumn, inPlace); + } + public DoubleDataFrameColumn Add(Int16DataFrameColumn column, bool inPlace = false) + { + DoubleDataFrameColumn otherdoubleColumn = column.CloneAsDoubleColumn(); + return AddImplementation(otherdoubleColumn, inPlace); + } + public DoubleDataFrameColumn Subtract(Int16DataFrameColumn column, bool inPlace = false) + { + DoubleDataFrameColumn otherdoubleColumn = column.CloneAsDoubleColumn(); + return SubtractImplementation(otherdoubleColumn, inPlace); + } + public DoubleDataFrameColumn Multiply(Int16DataFrameColumn column, bool inPlace = false) + { + DoubleDataFrameColumn otherdoubleColumn = column.CloneAsDoubleColumn(); + return MultiplyImplementation(otherdoubleColumn, inPlace); + } + public DoubleDataFrameColumn Divide(Int16DataFrameColumn column, bool inPlace = false) + { + DoubleDataFrameColumn otherdoubleColumn = column.CloneAsDoubleColumn(); + return DivideImplementation(otherdoubleColumn, inPlace); + } + public DoubleDataFrameColumn Modulo(Int16DataFrameColumn column, bool inPlace = false) + { + DoubleDataFrameColumn otherdoubleColumn = column.CloneAsDoubleColumn(); + return ModuloImplementation(otherdoubleColumn, inPlace); + } + public DoubleDataFrameColumn Add(UInt32DataFrameColumn column, bool inPlace = false) + { + DoubleDataFrameColumn otherdoubleColumn = column.CloneAsDoubleColumn(); + return AddImplementation(otherdoubleColumn, inPlace); + } + public DoubleDataFrameColumn Subtract(UInt32DataFrameColumn column, bool inPlace = false) + { + DoubleDataFrameColumn otherdoubleColumn = column.CloneAsDoubleColumn(); + return SubtractImplementation(otherdoubleColumn, inPlace); + } + public DoubleDataFrameColumn Multiply(UInt32DataFrameColumn column, bool inPlace = false) + { + DoubleDataFrameColumn otherdoubleColumn = column.CloneAsDoubleColumn(); + return MultiplyImplementation(otherdoubleColumn, inPlace); + } + public DoubleDataFrameColumn Divide(UInt32DataFrameColumn column, bool inPlace = false) + { + DoubleDataFrameColumn otherdoubleColumn = column.CloneAsDoubleColumn(); + return DivideImplementation(otherdoubleColumn, inPlace); + } + public DoubleDataFrameColumn Modulo(UInt32DataFrameColumn column, bool inPlace = false) + { + DoubleDataFrameColumn otherdoubleColumn = column.CloneAsDoubleColumn(); + return ModuloImplementation(otherdoubleColumn, inPlace); + } + public DoubleDataFrameColumn Add(UInt64DataFrameColumn column, bool inPlace = false) + { + DoubleDataFrameColumn otherdoubleColumn = column.CloneAsDoubleColumn(); + return AddImplementation(otherdoubleColumn, inPlace); + } + public DoubleDataFrameColumn Subtract(UInt64DataFrameColumn column, bool inPlace = false) + { + DoubleDataFrameColumn otherdoubleColumn = column.CloneAsDoubleColumn(); + return SubtractImplementation(otherdoubleColumn, inPlace); + } + public DoubleDataFrameColumn Multiply(UInt64DataFrameColumn column, bool inPlace = false) + { + DoubleDataFrameColumn otherdoubleColumn = column.CloneAsDoubleColumn(); + return MultiplyImplementation(otherdoubleColumn, inPlace); + } + public DoubleDataFrameColumn Divide(UInt64DataFrameColumn column, bool inPlace = false) + { + DoubleDataFrameColumn otherdoubleColumn = column.CloneAsDoubleColumn(); + return DivideImplementation(otherdoubleColumn, inPlace); + } + public DoubleDataFrameColumn Modulo(UInt64DataFrameColumn column, bool inPlace = false) + { + DoubleDataFrameColumn otherdoubleColumn = column.CloneAsDoubleColumn(); + return ModuloImplementation(otherdoubleColumn, inPlace); + } + public DoubleDataFrameColumn Add(UInt16DataFrameColumn column, bool inPlace = false) + { + DoubleDataFrameColumn otherdoubleColumn = column.CloneAsDoubleColumn(); + return AddImplementation(otherdoubleColumn, inPlace); + } + public DoubleDataFrameColumn Subtract(UInt16DataFrameColumn column, bool inPlace = false) + { + DoubleDataFrameColumn otherdoubleColumn = column.CloneAsDoubleColumn(); + return SubtractImplementation(otherdoubleColumn, inPlace); + } + public DoubleDataFrameColumn Multiply(UInt16DataFrameColumn column, bool inPlace = false) + { + DoubleDataFrameColumn otherdoubleColumn = column.CloneAsDoubleColumn(); + return MultiplyImplementation(otherdoubleColumn, inPlace); + } + public DoubleDataFrameColumn Divide(UInt16DataFrameColumn column, bool inPlace = false) + { + DoubleDataFrameColumn otherdoubleColumn = column.CloneAsDoubleColumn(); + return DivideImplementation(otherdoubleColumn, inPlace); + } + public DoubleDataFrameColumn Modulo(UInt16DataFrameColumn column, bool inPlace = false) + { + DoubleDataFrameColumn otherdoubleColumn = column.CloneAsDoubleColumn(); + return ModuloImplementation(otherdoubleColumn, inPlace); + } + } + public partial class SingleDataFrameColumn + { + public SingleDataFrameColumn Add(ByteDataFrameColumn column, bool inPlace = false) + { + SingleDataFrameColumn otherfloatColumn = column.CloneAsSingleColumn(); + return AddImplementation(otherfloatColumn, inPlace); + } + public SingleDataFrameColumn Subtract(ByteDataFrameColumn column, bool inPlace = false) + { + SingleDataFrameColumn otherfloatColumn = column.CloneAsSingleColumn(); + return SubtractImplementation(otherfloatColumn, inPlace); + } + public SingleDataFrameColumn Multiply(ByteDataFrameColumn column, bool inPlace = false) + { + SingleDataFrameColumn otherfloatColumn = column.CloneAsSingleColumn(); + return MultiplyImplementation(otherfloatColumn, inPlace); + } + public SingleDataFrameColumn Divide(ByteDataFrameColumn column, bool inPlace = false) + { + SingleDataFrameColumn otherfloatColumn = column.CloneAsSingleColumn(); + return DivideImplementation(otherfloatColumn, inPlace); + } + public SingleDataFrameColumn Modulo(ByteDataFrameColumn column, bool inPlace = false) + { + SingleDataFrameColumn otherfloatColumn = column.CloneAsSingleColumn(); + return ModuloImplementation(otherfloatColumn, inPlace); + } + public DoubleDataFrameColumn Add(DoubleDataFrameColumn column) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.AddImplementation(column, inPlace: true); + } + public DoubleDataFrameColumn Subtract(DoubleDataFrameColumn column) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.SubtractImplementation(column, inPlace: true); + } + public DoubleDataFrameColumn Multiply(DoubleDataFrameColumn column) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.MultiplyImplementation(column, inPlace: true); + } + public DoubleDataFrameColumn Divide(DoubleDataFrameColumn column) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.DivideImplementation(column, inPlace: true); + } + public DoubleDataFrameColumn Modulo(DoubleDataFrameColumn column) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.ModuloImplementation(column, inPlace: true); + } + public SingleDataFrameColumn Add(SingleDataFrameColumn column, bool inPlace = false) + { + return AddImplementation(column, inPlace); + } + public SingleDataFrameColumn Subtract(SingleDataFrameColumn column, bool inPlace = false) + { + return SubtractImplementation(column, inPlace); + } + public SingleDataFrameColumn Multiply(SingleDataFrameColumn column, bool inPlace = false) + { + return MultiplyImplementation(column, inPlace); + } + public SingleDataFrameColumn Divide(SingleDataFrameColumn column, bool inPlace = false) + { + return DivideImplementation(column, inPlace); + } + public SingleDataFrameColumn Modulo(SingleDataFrameColumn column, bool inPlace = false) + { + return ModuloImplementation(column, inPlace); + } + public SingleDataFrameColumn Add(Int32DataFrameColumn column, bool inPlace = false) + { + SingleDataFrameColumn otherfloatColumn = column.CloneAsSingleColumn(); + return AddImplementation(otherfloatColumn, inPlace); + } + public SingleDataFrameColumn Subtract(Int32DataFrameColumn column, bool inPlace = false) + { + SingleDataFrameColumn otherfloatColumn = column.CloneAsSingleColumn(); + return SubtractImplementation(otherfloatColumn, inPlace); + } + public SingleDataFrameColumn Multiply(Int32DataFrameColumn column, bool inPlace = false) + { + SingleDataFrameColumn otherfloatColumn = column.CloneAsSingleColumn(); + return MultiplyImplementation(otherfloatColumn, inPlace); + } + public SingleDataFrameColumn Divide(Int32DataFrameColumn column, bool inPlace = false) + { + SingleDataFrameColumn otherfloatColumn = column.CloneAsSingleColumn(); + return DivideImplementation(otherfloatColumn, inPlace); + } + public SingleDataFrameColumn Modulo(Int32DataFrameColumn column, bool inPlace = false) + { + SingleDataFrameColumn otherfloatColumn = column.CloneAsSingleColumn(); + return ModuloImplementation(otherfloatColumn, inPlace); + } + public SingleDataFrameColumn Add(Int64DataFrameColumn column, bool inPlace = false) + { + SingleDataFrameColumn otherfloatColumn = column.CloneAsSingleColumn(); + return AddImplementation(otherfloatColumn, inPlace); + } + public SingleDataFrameColumn Subtract(Int64DataFrameColumn column, bool inPlace = false) + { + SingleDataFrameColumn otherfloatColumn = column.CloneAsSingleColumn(); + return SubtractImplementation(otherfloatColumn, inPlace); + } + public SingleDataFrameColumn Multiply(Int64DataFrameColumn column, bool inPlace = false) + { + SingleDataFrameColumn otherfloatColumn = column.CloneAsSingleColumn(); + return MultiplyImplementation(otherfloatColumn, inPlace); + } + public SingleDataFrameColumn Divide(Int64DataFrameColumn column, bool inPlace = false) + { + SingleDataFrameColumn otherfloatColumn = column.CloneAsSingleColumn(); + return DivideImplementation(otherfloatColumn, inPlace); + } + public SingleDataFrameColumn Modulo(Int64DataFrameColumn column, bool inPlace = false) + { + SingleDataFrameColumn otherfloatColumn = column.CloneAsSingleColumn(); + return ModuloImplementation(otherfloatColumn, inPlace); + } + public SingleDataFrameColumn Add(SByteDataFrameColumn column, bool inPlace = false) + { + SingleDataFrameColumn otherfloatColumn = column.CloneAsSingleColumn(); + return AddImplementation(otherfloatColumn, inPlace); + } + public SingleDataFrameColumn Subtract(SByteDataFrameColumn column, bool inPlace = false) + { + SingleDataFrameColumn otherfloatColumn = column.CloneAsSingleColumn(); + return SubtractImplementation(otherfloatColumn, inPlace); + } + public SingleDataFrameColumn Multiply(SByteDataFrameColumn column, bool inPlace = false) + { + SingleDataFrameColumn otherfloatColumn = column.CloneAsSingleColumn(); + return MultiplyImplementation(otherfloatColumn, inPlace); + } + public SingleDataFrameColumn Divide(SByteDataFrameColumn column, bool inPlace = false) + { + SingleDataFrameColumn otherfloatColumn = column.CloneAsSingleColumn(); + return DivideImplementation(otherfloatColumn, inPlace); + } + public SingleDataFrameColumn Modulo(SByteDataFrameColumn column, bool inPlace = false) + { + SingleDataFrameColumn otherfloatColumn = column.CloneAsSingleColumn(); + return ModuloImplementation(otherfloatColumn, inPlace); + } + public SingleDataFrameColumn Add(Int16DataFrameColumn column, bool inPlace = false) + { + SingleDataFrameColumn otherfloatColumn = column.CloneAsSingleColumn(); + return AddImplementation(otherfloatColumn, inPlace); + } + public SingleDataFrameColumn Subtract(Int16DataFrameColumn column, bool inPlace = false) + { + SingleDataFrameColumn otherfloatColumn = column.CloneAsSingleColumn(); + return SubtractImplementation(otherfloatColumn, inPlace); + } + public SingleDataFrameColumn Multiply(Int16DataFrameColumn column, bool inPlace = false) + { + SingleDataFrameColumn otherfloatColumn = column.CloneAsSingleColumn(); + return MultiplyImplementation(otherfloatColumn, inPlace); + } + public SingleDataFrameColumn Divide(Int16DataFrameColumn column, bool inPlace = false) + { + SingleDataFrameColumn otherfloatColumn = column.CloneAsSingleColumn(); + return DivideImplementation(otherfloatColumn, inPlace); + } + public SingleDataFrameColumn Modulo(Int16DataFrameColumn column, bool inPlace = false) + { + SingleDataFrameColumn otherfloatColumn = column.CloneAsSingleColumn(); + return ModuloImplementation(otherfloatColumn, inPlace); + } + public SingleDataFrameColumn Add(UInt32DataFrameColumn column, bool inPlace = false) + { + SingleDataFrameColumn otherfloatColumn = column.CloneAsSingleColumn(); + return AddImplementation(otherfloatColumn, inPlace); + } + public SingleDataFrameColumn Subtract(UInt32DataFrameColumn column, bool inPlace = false) + { + SingleDataFrameColumn otherfloatColumn = column.CloneAsSingleColumn(); + return SubtractImplementation(otherfloatColumn, inPlace); + } + public SingleDataFrameColumn Multiply(UInt32DataFrameColumn column, bool inPlace = false) + { + SingleDataFrameColumn otherfloatColumn = column.CloneAsSingleColumn(); + return MultiplyImplementation(otherfloatColumn, inPlace); + } + public SingleDataFrameColumn Divide(UInt32DataFrameColumn column, bool inPlace = false) + { + SingleDataFrameColumn otherfloatColumn = column.CloneAsSingleColumn(); + return DivideImplementation(otherfloatColumn, inPlace); + } + public SingleDataFrameColumn Modulo(UInt32DataFrameColumn column, bool inPlace = false) + { + SingleDataFrameColumn otherfloatColumn = column.CloneAsSingleColumn(); + return ModuloImplementation(otherfloatColumn, inPlace); + } + public SingleDataFrameColumn Add(UInt64DataFrameColumn column, bool inPlace = false) + { + SingleDataFrameColumn otherfloatColumn = column.CloneAsSingleColumn(); + return AddImplementation(otherfloatColumn, inPlace); + } + public SingleDataFrameColumn Subtract(UInt64DataFrameColumn column, bool inPlace = false) + { + SingleDataFrameColumn otherfloatColumn = column.CloneAsSingleColumn(); + return SubtractImplementation(otherfloatColumn, inPlace); + } + public SingleDataFrameColumn Multiply(UInt64DataFrameColumn column, bool inPlace = false) + { + SingleDataFrameColumn otherfloatColumn = column.CloneAsSingleColumn(); + return MultiplyImplementation(otherfloatColumn, inPlace); + } + public SingleDataFrameColumn Divide(UInt64DataFrameColumn column, bool inPlace = false) + { + SingleDataFrameColumn otherfloatColumn = column.CloneAsSingleColumn(); + return DivideImplementation(otherfloatColumn, inPlace); + } + public SingleDataFrameColumn Modulo(UInt64DataFrameColumn column, bool inPlace = false) + { + SingleDataFrameColumn otherfloatColumn = column.CloneAsSingleColumn(); + return ModuloImplementation(otherfloatColumn, inPlace); + } + public SingleDataFrameColumn Add(UInt16DataFrameColumn column, bool inPlace = false) + { + SingleDataFrameColumn otherfloatColumn = column.CloneAsSingleColumn(); + return AddImplementation(otherfloatColumn, inPlace); + } + public SingleDataFrameColumn Subtract(UInt16DataFrameColumn column, bool inPlace = false) + { + SingleDataFrameColumn otherfloatColumn = column.CloneAsSingleColumn(); + return SubtractImplementation(otherfloatColumn, inPlace); + } + public SingleDataFrameColumn Multiply(UInt16DataFrameColumn column, bool inPlace = false) + { + SingleDataFrameColumn otherfloatColumn = column.CloneAsSingleColumn(); + return MultiplyImplementation(otherfloatColumn, inPlace); + } + public SingleDataFrameColumn Divide(UInt16DataFrameColumn column, bool inPlace = false) + { + SingleDataFrameColumn otherfloatColumn = column.CloneAsSingleColumn(); + return DivideImplementation(otherfloatColumn, inPlace); + } + public SingleDataFrameColumn Modulo(UInt16DataFrameColumn column, bool inPlace = false) + { + SingleDataFrameColumn otherfloatColumn = column.CloneAsSingleColumn(); + return ModuloImplementation(otherfloatColumn, inPlace); + } + } + public partial class Int32DataFrameColumn + { + public Int32DataFrameColumn Add(ByteDataFrameColumn column, bool inPlace = false) + { + Int32DataFrameColumn otherintColumn = column.CloneAsInt32Column(); + return AddImplementation(otherintColumn, inPlace); + } + public Int32DataFrameColumn Subtract(ByteDataFrameColumn column, bool inPlace = false) + { + Int32DataFrameColumn otherintColumn = column.CloneAsInt32Column(); + return SubtractImplementation(otherintColumn, inPlace); + } + public Int32DataFrameColumn Multiply(ByteDataFrameColumn column, bool inPlace = false) + { + Int32DataFrameColumn otherintColumn = column.CloneAsInt32Column(); + return MultiplyImplementation(otherintColumn, inPlace); + } + public Int32DataFrameColumn Divide(ByteDataFrameColumn column, bool inPlace = false) + { + Int32DataFrameColumn otherintColumn = column.CloneAsInt32Column(); + return DivideImplementation(otherintColumn, inPlace); + } + public Int32DataFrameColumn Modulo(ByteDataFrameColumn column, bool inPlace = false) + { + Int32DataFrameColumn otherintColumn = column.CloneAsInt32Column(); + return ModuloImplementation(otherintColumn, inPlace); + } + public DecimalDataFrameColumn Add(DecimalDataFrameColumn column) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.AddImplementation(column, inPlace: true); + } + public DecimalDataFrameColumn Subtract(DecimalDataFrameColumn column) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.SubtractImplementation(column, inPlace: true); + } + public DecimalDataFrameColumn Multiply(DecimalDataFrameColumn column) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.MultiplyImplementation(column, inPlace: true); + } + public DecimalDataFrameColumn Divide(DecimalDataFrameColumn column) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.DivideImplementation(column, inPlace: true); + } + public DecimalDataFrameColumn Modulo(DecimalDataFrameColumn column) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.ModuloImplementation(column, inPlace: true); + } + public DoubleDataFrameColumn Add(DoubleDataFrameColumn column) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.AddImplementation(column, inPlace: true); + } + public DoubleDataFrameColumn Subtract(DoubleDataFrameColumn column) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.SubtractImplementation(column, inPlace: true); + } + public DoubleDataFrameColumn Multiply(DoubleDataFrameColumn column) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.MultiplyImplementation(column, inPlace: true); + } + public DoubleDataFrameColumn Divide(DoubleDataFrameColumn column) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.DivideImplementation(column, inPlace: true); + } + public DoubleDataFrameColumn Modulo(DoubleDataFrameColumn column) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.ModuloImplementation(column, inPlace: true); + } + public SingleDataFrameColumn Add(SingleDataFrameColumn column) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.AddImplementation(column, inPlace: true); + } + public SingleDataFrameColumn Subtract(SingleDataFrameColumn column) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.SubtractImplementation(column, inPlace: true); + } + public SingleDataFrameColumn Multiply(SingleDataFrameColumn column) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.MultiplyImplementation(column, inPlace: true); + } + public SingleDataFrameColumn Divide(SingleDataFrameColumn column) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.DivideImplementation(column, inPlace: true); + } + public SingleDataFrameColumn Modulo(SingleDataFrameColumn column) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.ModuloImplementation(column, inPlace: true); + } + public Int32DataFrameColumn Add(Int32DataFrameColumn column, bool inPlace = false) + { + return AddImplementation(column, inPlace); + } + public Int32DataFrameColumn Subtract(Int32DataFrameColumn column, bool inPlace = false) + { + return SubtractImplementation(column, inPlace); + } + public Int32DataFrameColumn Multiply(Int32DataFrameColumn column, bool inPlace = false) + { + return MultiplyImplementation(column, inPlace); + } + public Int32DataFrameColumn Divide(Int32DataFrameColumn column, bool inPlace = false) + { + return DivideImplementation(column, inPlace); + } + public Int32DataFrameColumn Modulo(Int32DataFrameColumn column, bool inPlace = false) + { + return ModuloImplementation(column, inPlace); + } + public Int64DataFrameColumn Add(Int64DataFrameColumn column) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.AddImplementation(column, inPlace: true); + } + public Int64DataFrameColumn Subtract(Int64DataFrameColumn column) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.SubtractImplementation(column, inPlace: true); + } + public Int64DataFrameColumn Multiply(Int64DataFrameColumn column) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.MultiplyImplementation(column, inPlace: true); + } + public Int64DataFrameColumn Divide(Int64DataFrameColumn column) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.DivideImplementation(column, inPlace: true); + } + public Int64DataFrameColumn Modulo(Int64DataFrameColumn column) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.ModuloImplementation(column, inPlace: true); + } + public Int32DataFrameColumn Add(SByteDataFrameColumn column, bool inPlace = false) + { + Int32DataFrameColumn otherintColumn = column.CloneAsInt32Column(); + return AddImplementation(otherintColumn, inPlace); + } + public Int32DataFrameColumn Subtract(SByteDataFrameColumn column, bool inPlace = false) + { + Int32DataFrameColumn otherintColumn = column.CloneAsInt32Column(); + return SubtractImplementation(otherintColumn, inPlace); + } + public Int32DataFrameColumn Multiply(SByteDataFrameColumn column, bool inPlace = false) + { + Int32DataFrameColumn otherintColumn = column.CloneAsInt32Column(); + return MultiplyImplementation(otherintColumn, inPlace); + } + public Int32DataFrameColumn Divide(SByteDataFrameColumn column, bool inPlace = false) + { + Int32DataFrameColumn otherintColumn = column.CloneAsInt32Column(); + return DivideImplementation(otherintColumn, inPlace); + } + public Int32DataFrameColumn Modulo(SByteDataFrameColumn column, bool inPlace = false) + { + Int32DataFrameColumn otherintColumn = column.CloneAsInt32Column(); + return ModuloImplementation(otherintColumn, inPlace); + } + public Int32DataFrameColumn Add(Int16DataFrameColumn column, bool inPlace = false) + { + Int32DataFrameColumn otherintColumn = column.CloneAsInt32Column(); + return AddImplementation(otherintColumn, inPlace); + } + public Int32DataFrameColumn Subtract(Int16DataFrameColumn column, bool inPlace = false) + { + Int32DataFrameColumn otherintColumn = column.CloneAsInt32Column(); + return SubtractImplementation(otherintColumn, inPlace); + } + public Int32DataFrameColumn Multiply(Int16DataFrameColumn column, bool inPlace = false) + { + Int32DataFrameColumn otherintColumn = column.CloneAsInt32Column(); + return MultiplyImplementation(otherintColumn, inPlace); + } + public Int32DataFrameColumn Divide(Int16DataFrameColumn column, bool inPlace = false) + { + Int32DataFrameColumn otherintColumn = column.CloneAsInt32Column(); + return DivideImplementation(otherintColumn, inPlace); + } + public Int32DataFrameColumn Modulo(Int16DataFrameColumn column, bool inPlace = false) + { + Int32DataFrameColumn otherintColumn = column.CloneAsInt32Column(); + return ModuloImplementation(otherintColumn, inPlace); + } + public Int64DataFrameColumn Add(UInt32DataFrameColumn column) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + Int64DataFrameColumn otherlongColumn = column.CloneAsInt64Column(); + return longColumn.AddImplementation(otherlongColumn, inPlace: true); + } + public Int64DataFrameColumn Subtract(UInt32DataFrameColumn column) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + Int64DataFrameColumn otherlongColumn = column.CloneAsInt64Column(); + return longColumn.SubtractImplementation(otherlongColumn, inPlace: true); + } + public Int64DataFrameColumn Multiply(UInt32DataFrameColumn column) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + Int64DataFrameColumn otherlongColumn = column.CloneAsInt64Column(); + return longColumn.MultiplyImplementation(otherlongColumn, inPlace: true); + } + public Int64DataFrameColumn Divide(UInt32DataFrameColumn column) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + Int64DataFrameColumn otherlongColumn = column.CloneAsInt64Column(); + return longColumn.DivideImplementation(otherlongColumn, inPlace: true); + } + public Int64DataFrameColumn Modulo(UInt32DataFrameColumn column) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + Int64DataFrameColumn otherlongColumn = column.CloneAsInt64Column(); + return longColumn.ModuloImplementation(otherlongColumn, inPlace: true); + } + public SingleDataFrameColumn Add(UInt64DataFrameColumn column) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + SingleDataFrameColumn otherfloatColumn = column.CloneAsSingleColumn(); + return floatColumn.AddImplementation(otherfloatColumn, inPlace: true); + } + public SingleDataFrameColumn Subtract(UInt64DataFrameColumn column) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + SingleDataFrameColumn otherfloatColumn = column.CloneAsSingleColumn(); + return floatColumn.SubtractImplementation(otherfloatColumn, inPlace: true); + } + public SingleDataFrameColumn Multiply(UInt64DataFrameColumn column) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + SingleDataFrameColumn otherfloatColumn = column.CloneAsSingleColumn(); + return floatColumn.MultiplyImplementation(otherfloatColumn, inPlace: true); + } + public SingleDataFrameColumn Divide(UInt64DataFrameColumn column) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + SingleDataFrameColumn otherfloatColumn = column.CloneAsSingleColumn(); + return floatColumn.DivideImplementation(otherfloatColumn, inPlace: true); + } + public SingleDataFrameColumn Modulo(UInt64DataFrameColumn column) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + SingleDataFrameColumn otherfloatColumn = column.CloneAsSingleColumn(); + return floatColumn.ModuloImplementation(otherfloatColumn, inPlace: true); + } + public Int32DataFrameColumn Add(UInt16DataFrameColumn column, bool inPlace = false) + { + Int32DataFrameColumn otherintColumn = column.CloneAsInt32Column(); + return AddImplementation(otherintColumn, inPlace); + } + public Int32DataFrameColumn Subtract(UInt16DataFrameColumn column, bool inPlace = false) + { + Int32DataFrameColumn otherintColumn = column.CloneAsInt32Column(); + return SubtractImplementation(otherintColumn, inPlace); + } + public Int32DataFrameColumn Multiply(UInt16DataFrameColumn column, bool inPlace = false) + { + Int32DataFrameColumn otherintColumn = column.CloneAsInt32Column(); + return MultiplyImplementation(otherintColumn, inPlace); + } + public Int32DataFrameColumn Divide(UInt16DataFrameColumn column, bool inPlace = false) + { + Int32DataFrameColumn otherintColumn = column.CloneAsInt32Column(); + return DivideImplementation(otherintColumn, inPlace); + } + public Int32DataFrameColumn Modulo(UInt16DataFrameColumn column, bool inPlace = false) + { + Int32DataFrameColumn otherintColumn = column.CloneAsInt32Column(); + return ModuloImplementation(otherintColumn, inPlace); + } + } + public partial class Int64DataFrameColumn + { + public Int64DataFrameColumn Add(ByteDataFrameColumn column, bool inPlace = false) + { + Int64DataFrameColumn otherlongColumn = column.CloneAsInt64Column(); + return AddImplementation(otherlongColumn, inPlace); + } + public Int64DataFrameColumn Subtract(ByteDataFrameColumn column, bool inPlace = false) + { + Int64DataFrameColumn otherlongColumn = column.CloneAsInt64Column(); + return SubtractImplementation(otherlongColumn, inPlace); + } + public Int64DataFrameColumn Multiply(ByteDataFrameColumn column, bool inPlace = false) + { + Int64DataFrameColumn otherlongColumn = column.CloneAsInt64Column(); + return MultiplyImplementation(otherlongColumn, inPlace); + } + public Int64DataFrameColumn Divide(ByteDataFrameColumn column, bool inPlace = false) + { + Int64DataFrameColumn otherlongColumn = column.CloneAsInt64Column(); + return DivideImplementation(otherlongColumn, inPlace); + } + public Int64DataFrameColumn Modulo(ByteDataFrameColumn column, bool inPlace = false) + { + Int64DataFrameColumn otherlongColumn = column.CloneAsInt64Column(); + return ModuloImplementation(otherlongColumn, inPlace); + } + public DecimalDataFrameColumn Add(DecimalDataFrameColumn column) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.AddImplementation(column, inPlace: true); + } + public DecimalDataFrameColumn Subtract(DecimalDataFrameColumn column) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.SubtractImplementation(column, inPlace: true); + } + public DecimalDataFrameColumn Multiply(DecimalDataFrameColumn column) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.MultiplyImplementation(column, inPlace: true); + } + public DecimalDataFrameColumn Divide(DecimalDataFrameColumn column) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.DivideImplementation(column, inPlace: true); + } + public DecimalDataFrameColumn Modulo(DecimalDataFrameColumn column) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.ModuloImplementation(column, inPlace: true); + } + public DoubleDataFrameColumn Add(DoubleDataFrameColumn column) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.AddImplementation(column, inPlace: true); + } + public DoubleDataFrameColumn Subtract(DoubleDataFrameColumn column) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.SubtractImplementation(column, inPlace: true); + } + public DoubleDataFrameColumn Multiply(DoubleDataFrameColumn column) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.MultiplyImplementation(column, inPlace: true); + } + public DoubleDataFrameColumn Divide(DoubleDataFrameColumn column) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.DivideImplementation(column, inPlace: true); + } + public DoubleDataFrameColumn Modulo(DoubleDataFrameColumn column) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.ModuloImplementation(column, inPlace: true); + } + public SingleDataFrameColumn Add(SingleDataFrameColumn column) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.AddImplementation(column, inPlace: true); + } + public SingleDataFrameColumn Subtract(SingleDataFrameColumn column) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.SubtractImplementation(column, inPlace: true); + } + public SingleDataFrameColumn Multiply(SingleDataFrameColumn column) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.MultiplyImplementation(column, inPlace: true); + } + public SingleDataFrameColumn Divide(SingleDataFrameColumn column) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.DivideImplementation(column, inPlace: true); + } + public SingleDataFrameColumn Modulo(SingleDataFrameColumn column) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.ModuloImplementation(column, inPlace: true); + } + public Int64DataFrameColumn Add(Int32DataFrameColumn column, bool inPlace = false) + { + Int64DataFrameColumn otherlongColumn = column.CloneAsInt64Column(); + return AddImplementation(otherlongColumn, inPlace); + } + public Int64DataFrameColumn Subtract(Int32DataFrameColumn column, bool inPlace = false) + { + Int64DataFrameColumn otherlongColumn = column.CloneAsInt64Column(); + return SubtractImplementation(otherlongColumn, inPlace); + } + public Int64DataFrameColumn Multiply(Int32DataFrameColumn column, bool inPlace = false) + { + Int64DataFrameColumn otherlongColumn = column.CloneAsInt64Column(); + return MultiplyImplementation(otherlongColumn, inPlace); + } + public Int64DataFrameColumn Divide(Int32DataFrameColumn column, bool inPlace = false) + { + Int64DataFrameColumn otherlongColumn = column.CloneAsInt64Column(); + return DivideImplementation(otherlongColumn, inPlace); + } + public Int64DataFrameColumn Modulo(Int32DataFrameColumn column, bool inPlace = false) + { + Int64DataFrameColumn otherlongColumn = column.CloneAsInt64Column(); + return ModuloImplementation(otherlongColumn, inPlace); + } + public Int64DataFrameColumn Add(Int64DataFrameColumn column, bool inPlace = false) + { + return AddImplementation(column, inPlace); + } + public Int64DataFrameColumn Subtract(Int64DataFrameColumn column, bool inPlace = false) + { + return SubtractImplementation(column, inPlace); + } + public Int64DataFrameColumn Multiply(Int64DataFrameColumn column, bool inPlace = false) + { + return MultiplyImplementation(column, inPlace); + } + public Int64DataFrameColumn Divide(Int64DataFrameColumn column, bool inPlace = false) + { + return DivideImplementation(column, inPlace); + } + public Int64DataFrameColumn Modulo(Int64DataFrameColumn column, bool inPlace = false) + { + return ModuloImplementation(column, inPlace); + } + public Int64DataFrameColumn Add(SByteDataFrameColumn column, bool inPlace = false) + { + Int64DataFrameColumn otherlongColumn = column.CloneAsInt64Column(); + return AddImplementation(otherlongColumn, inPlace); + } + public Int64DataFrameColumn Subtract(SByteDataFrameColumn column, bool inPlace = false) + { + Int64DataFrameColumn otherlongColumn = column.CloneAsInt64Column(); + return SubtractImplementation(otherlongColumn, inPlace); + } + public Int64DataFrameColumn Multiply(SByteDataFrameColumn column, bool inPlace = false) + { + Int64DataFrameColumn otherlongColumn = column.CloneAsInt64Column(); + return MultiplyImplementation(otherlongColumn, inPlace); + } + public Int64DataFrameColumn Divide(SByteDataFrameColumn column, bool inPlace = false) + { + Int64DataFrameColumn otherlongColumn = column.CloneAsInt64Column(); + return DivideImplementation(otherlongColumn, inPlace); + } + public Int64DataFrameColumn Modulo(SByteDataFrameColumn column, bool inPlace = false) + { + Int64DataFrameColumn otherlongColumn = column.CloneAsInt64Column(); + return ModuloImplementation(otherlongColumn, inPlace); + } + public Int64DataFrameColumn Add(Int16DataFrameColumn column, bool inPlace = false) + { + Int64DataFrameColumn otherlongColumn = column.CloneAsInt64Column(); + return AddImplementation(otherlongColumn, inPlace); + } + public Int64DataFrameColumn Subtract(Int16DataFrameColumn column, bool inPlace = false) + { + Int64DataFrameColumn otherlongColumn = column.CloneAsInt64Column(); + return SubtractImplementation(otherlongColumn, inPlace); + } + public Int64DataFrameColumn Multiply(Int16DataFrameColumn column, bool inPlace = false) + { + Int64DataFrameColumn otherlongColumn = column.CloneAsInt64Column(); + return MultiplyImplementation(otherlongColumn, inPlace); + } + public Int64DataFrameColumn Divide(Int16DataFrameColumn column, bool inPlace = false) + { + Int64DataFrameColumn otherlongColumn = column.CloneAsInt64Column(); + return DivideImplementation(otherlongColumn, inPlace); + } + public Int64DataFrameColumn Modulo(Int16DataFrameColumn column, bool inPlace = false) + { + Int64DataFrameColumn otherlongColumn = column.CloneAsInt64Column(); + return ModuloImplementation(otherlongColumn, inPlace); + } + public Int64DataFrameColumn Add(UInt32DataFrameColumn column, bool inPlace = false) + { + Int64DataFrameColumn otherlongColumn = column.CloneAsInt64Column(); + return AddImplementation(otherlongColumn, inPlace); + } + public Int64DataFrameColumn Subtract(UInt32DataFrameColumn column, bool inPlace = false) + { + Int64DataFrameColumn otherlongColumn = column.CloneAsInt64Column(); + return SubtractImplementation(otherlongColumn, inPlace); + } + public Int64DataFrameColumn Multiply(UInt32DataFrameColumn column, bool inPlace = false) + { + Int64DataFrameColumn otherlongColumn = column.CloneAsInt64Column(); + return MultiplyImplementation(otherlongColumn, inPlace); + } + public Int64DataFrameColumn Divide(UInt32DataFrameColumn column, bool inPlace = false) + { + Int64DataFrameColumn otherlongColumn = column.CloneAsInt64Column(); + return DivideImplementation(otherlongColumn, inPlace); + } + public Int64DataFrameColumn Modulo(UInt32DataFrameColumn column, bool inPlace = false) + { + Int64DataFrameColumn otherlongColumn = column.CloneAsInt64Column(); + return ModuloImplementation(otherlongColumn, inPlace); + } + public Int64DataFrameColumn Add(UInt16DataFrameColumn column, bool inPlace = false) + { + Int64DataFrameColumn otherlongColumn = column.CloneAsInt64Column(); + return AddImplementation(otherlongColumn, inPlace); + } + public Int64DataFrameColumn Subtract(UInt16DataFrameColumn column, bool inPlace = false) + { + Int64DataFrameColumn otherlongColumn = column.CloneAsInt64Column(); + return SubtractImplementation(otherlongColumn, inPlace); + } + public Int64DataFrameColumn Multiply(UInt16DataFrameColumn column, bool inPlace = false) + { + Int64DataFrameColumn otherlongColumn = column.CloneAsInt64Column(); + return MultiplyImplementation(otherlongColumn, inPlace); + } + public Int64DataFrameColumn Divide(UInt16DataFrameColumn column, bool inPlace = false) + { + Int64DataFrameColumn otherlongColumn = column.CloneAsInt64Column(); + return DivideImplementation(otherlongColumn, inPlace); + } + public Int64DataFrameColumn Modulo(UInt16DataFrameColumn column, bool inPlace = false) + { + Int64DataFrameColumn otherlongColumn = column.CloneAsInt64Column(); + return ModuloImplementation(otherlongColumn, inPlace); + } + } + public partial class SByteDataFrameColumn + { + public Int32DataFrameColumn Add(ByteDataFrameColumn column) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + Int32DataFrameColumn otherintColumn = column.CloneAsInt32Column(); + return intColumn.AddImplementation(otherintColumn, inPlace: true); + } + public Int32DataFrameColumn Subtract(ByteDataFrameColumn column) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + Int32DataFrameColumn otherintColumn = column.CloneAsInt32Column(); + return intColumn.SubtractImplementation(otherintColumn, inPlace: true); + } + public Int32DataFrameColumn Multiply(ByteDataFrameColumn column) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + Int32DataFrameColumn otherintColumn = column.CloneAsInt32Column(); + return intColumn.MultiplyImplementation(otherintColumn, inPlace: true); + } + public Int32DataFrameColumn Divide(ByteDataFrameColumn column) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + Int32DataFrameColumn otherintColumn = column.CloneAsInt32Column(); + return intColumn.DivideImplementation(otherintColumn, inPlace: true); + } + public Int32DataFrameColumn Modulo(ByteDataFrameColumn column) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + Int32DataFrameColumn otherintColumn = column.CloneAsInt32Column(); + return intColumn.ModuloImplementation(otherintColumn, inPlace: true); + } + public DecimalDataFrameColumn Add(DecimalDataFrameColumn column) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.AddImplementation(column, inPlace: true); + } + public DecimalDataFrameColumn Subtract(DecimalDataFrameColumn column) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.SubtractImplementation(column, inPlace: true); + } + public DecimalDataFrameColumn Multiply(DecimalDataFrameColumn column) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.MultiplyImplementation(column, inPlace: true); + } + public DecimalDataFrameColumn Divide(DecimalDataFrameColumn column) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.DivideImplementation(column, inPlace: true); + } + public DecimalDataFrameColumn Modulo(DecimalDataFrameColumn column) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.ModuloImplementation(column, inPlace: true); + } + public DoubleDataFrameColumn Add(DoubleDataFrameColumn column) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.AddImplementation(column, inPlace: true); + } + public DoubleDataFrameColumn Subtract(DoubleDataFrameColumn column) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.SubtractImplementation(column, inPlace: true); + } + public DoubleDataFrameColumn Multiply(DoubleDataFrameColumn column) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.MultiplyImplementation(column, inPlace: true); + } + public DoubleDataFrameColumn Divide(DoubleDataFrameColumn column) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.DivideImplementation(column, inPlace: true); + } + public DoubleDataFrameColumn Modulo(DoubleDataFrameColumn column) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.ModuloImplementation(column, inPlace: true); + } + public SingleDataFrameColumn Add(SingleDataFrameColumn column) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.AddImplementation(column, inPlace: true); + } + public SingleDataFrameColumn Subtract(SingleDataFrameColumn column) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.SubtractImplementation(column, inPlace: true); + } + public SingleDataFrameColumn Multiply(SingleDataFrameColumn column) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.MultiplyImplementation(column, inPlace: true); + } + public SingleDataFrameColumn Divide(SingleDataFrameColumn column) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.DivideImplementation(column, inPlace: true); + } + public SingleDataFrameColumn Modulo(SingleDataFrameColumn column) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.ModuloImplementation(column, inPlace: true); + } + public Int32DataFrameColumn Add(Int32DataFrameColumn column) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.AddImplementation(column, inPlace: true); + } + public Int32DataFrameColumn Subtract(Int32DataFrameColumn column) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.SubtractImplementation(column, inPlace: true); + } + public Int32DataFrameColumn Multiply(Int32DataFrameColumn column) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.MultiplyImplementation(column, inPlace: true); + } + public Int32DataFrameColumn Divide(Int32DataFrameColumn column) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.DivideImplementation(column, inPlace: true); + } + public Int32DataFrameColumn Modulo(Int32DataFrameColumn column) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.ModuloImplementation(column, inPlace: true); + } + public Int64DataFrameColumn Add(Int64DataFrameColumn column) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.AddImplementation(column, inPlace: true); + } + public Int64DataFrameColumn Subtract(Int64DataFrameColumn column) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.SubtractImplementation(column, inPlace: true); + } + public Int64DataFrameColumn Multiply(Int64DataFrameColumn column) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.MultiplyImplementation(column, inPlace: true); + } + public Int64DataFrameColumn Divide(Int64DataFrameColumn column) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.DivideImplementation(column, inPlace: true); + } + public Int64DataFrameColumn Modulo(Int64DataFrameColumn column) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.ModuloImplementation(column, inPlace: true); + } + public Int32DataFrameColumn Add(SByteDataFrameColumn column) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + Int32DataFrameColumn otherintColumn = column.CloneAsInt32Column(); + return intColumn.AddImplementation(otherintColumn, inPlace: true); + } + public Int32DataFrameColumn Subtract(SByteDataFrameColumn column) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + Int32DataFrameColumn otherintColumn = column.CloneAsInt32Column(); + return intColumn.SubtractImplementation(otherintColumn, inPlace: true); + } + public Int32DataFrameColumn Multiply(SByteDataFrameColumn column) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + Int32DataFrameColumn otherintColumn = column.CloneAsInt32Column(); + return intColumn.MultiplyImplementation(otherintColumn, inPlace: true); + } + public Int32DataFrameColumn Divide(SByteDataFrameColumn column) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + Int32DataFrameColumn otherintColumn = column.CloneAsInt32Column(); + return intColumn.DivideImplementation(otherintColumn, inPlace: true); + } + public Int32DataFrameColumn Modulo(SByteDataFrameColumn column) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + Int32DataFrameColumn otherintColumn = column.CloneAsInt32Column(); + return intColumn.ModuloImplementation(otherintColumn, inPlace: true); + } + public Int32DataFrameColumn Add(Int16DataFrameColumn column) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + Int32DataFrameColumn otherintColumn = column.CloneAsInt32Column(); + return intColumn.AddImplementation(otherintColumn, inPlace: true); + } + public Int32DataFrameColumn Subtract(Int16DataFrameColumn column) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + Int32DataFrameColumn otherintColumn = column.CloneAsInt32Column(); + return intColumn.SubtractImplementation(otherintColumn, inPlace: true); + } + public Int32DataFrameColumn Multiply(Int16DataFrameColumn column) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + Int32DataFrameColumn otherintColumn = column.CloneAsInt32Column(); + return intColumn.MultiplyImplementation(otherintColumn, inPlace: true); + } + public Int32DataFrameColumn Divide(Int16DataFrameColumn column) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + Int32DataFrameColumn otherintColumn = column.CloneAsInt32Column(); + return intColumn.DivideImplementation(otherintColumn, inPlace: true); + } + public Int32DataFrameColumn Modulo(Int16DataFrameColumn column) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + Int32DataFrameColumn otherintColumn = column.CloneAsInt32Column(); + return intColumn.ModuloImplementation(otherintColumn, inPlace: true); + } + public Int64DataFrameColumn Add(UInt32DataFrameColumn column) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + Int64DataFrameColumn otherlongColumn = column.CloneAsInt64Column(); + return longColumn.AddImplementation(otherlongColumn, inPlace: true); + } + public Int64DataFrameColumn Subtract(UInt32DataFrameColumn column) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + Int64DataFrameColumn otherlongColumn = column.CloneAsInt64Column(); + return longColumn.SubtractImplementation(otherlongColumn, inPlace: true); + } + public Int64DataFrameColumn Multiply(UInt32DataFrameColumn column) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + Int64DataFrameColumn otherlongColumn = column.CloneAsInt64Column(); + return longColumn.MultiplyImplementation(otherlongColumn, inPlace: true); + } + public Int64DataFrameColumn Divide(UInt32DataFrameColumn column) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + Int64DataFrameColumn otherlongColumn = column.CloneAsInt64Column(); + return longColumn.DivideImplementation(otherlongColumn, inPlace: true); + } + public Int64DataFrameColumn Modulo(UInt32DataFrameColumn column) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + Int64DataFrameColumn otherlongColumn = column.CloneAsInt64Column(); + return longColumn.ModuloImplementation(otherlongColumn, inPlace: true); + } + public SingleDataFrameColumn Add(UInt64DataFrameColumn column) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + SingleDataFrameColumn otherfloatColumn = column.CloneAsSingleColumn(); + return floatColumn.AddImplementation(otherfloatColumn, inPlace: true); + } + public SingleDataFrameColumn Subtract(UInt64DataFrameColumn column) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + SingleDataFrameColumn otherfloatColumn = column.CloneAsSingleColumn(); + return floatColumn.SubtractImplementation(otherfloatColumn, inPlace: true); + } + public SingleDataFrameColumn Multiply(UInt64DataFrameColumn column) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + SingleDataFrameColumn otherfloatColumn = column.CloneAsSingleColumn(); + return floatColumn.MultiplyImplementation(otherfloatColumn, inPlace: true); + } + public SingleDataFrameColumn Divide(UInt64DataFrameColumn column) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + SingleDataFrameColumn otherfloatColumn = column.CloneAsSingleColumn(); + return floatColumn.DivideImplementation(otherfloatColumn, inPlace: true); + } + public SingleDataFrameColumn Modulo(UInt64DataFrameColumn column) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + SingleDataFrameColumn otherfloatColumn = column.CloneAsSingleColumn(); + return floatColumn.ModuloImplementation(otherfloatColumn, inPlace: true); + } + public Int32DataFrameColumn Add(UInt16DataFrameColumn column) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + Int32DataFrameColumn otherintColumn = column.CloneAsInt32Column(); + return intColumn.AddImplementation(otherintColumn, inPlace: true); + } + public Int32DataFrameColumn Subtract(UInt16DataFrameColumn column) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + Int32DataFrameColumn otherintColumn = column.CloneAsInt32Column(); + return intColumn.SubtractImplementation(otherintColumn, inPlace: true); + } + public Int32DataFrameColumn Multiply(UInt16DataFrameColumn column) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + Int32DataFrameColumn otherintColumn = column.CloneAsInt32Column(); + return intColumn.MultiplyImplementation(otherintColumn, inPlace: true); + } + public Int32DataFrameColumn Divide(UInt16DataFrameColumn column) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + Int32DataFrameColumn otherintColumn = column.CloneAsInt32Column(); + return intColumn.DivideImplementation(otherintColumn, inPlace: true); + } + public Int32DataFrameColumn Modulo(UInt16DataFrameColumn column) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + Int32DataFrameColumn otherintColumn = column.CloneAsInt32Column(); + return intColumn.ModuloImplementation(otherintColumn, inPlace: true); + } + } + public partial class Int16DataFrameColumn + { + public Int32DataFrameColumn Add(ByteDataFrameColumn column) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + Int32DataFrameColumn otherintColumn = column.CloneAsInt32Column(); + return intColumn.AddImplementation(otherintColumn, inPlace: true); + } + public Int32DataFrameColumn Subtract(ByteDataFrameColumn column) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + Int32DataFrameColumn otherintColumn = column.CloneAsInt32Column(); + return intColumn.SubtractImplementation(otherintColumn, inPlace: true); + } + public Int32DataFrameColumn Multiply(ByteDataFrameColumn column) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + Int32DataFrameColumn otherintColumn = column.CloneAsInt32Column(); + return intColumn.MultiplyImplementation(otherintColumn, inPlace: true); + } + public Int32DataFrameColumn Divide(ByteDataFrameColumn column) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + Int32DataFrameColumn otherintColumn = column.CloneAsInt32Column(); + return intColumn.DivideImplementation(otherintColumn, inPlace: true); + } + public Int32DataFrameColumn Modulo(ByteDataFrameColumn column) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + Int32DataFrameColumn otherintColumn = column.CloneAsInt32Column(); + return intColumn.ModuloImplementation(otherintColumn, inPlace: true); + } + public DecimalDataFrameColumn Add(DecimalDataFrameColumn column) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.AddImplementation(column, inPlace: true); + } + public DecimalDataFrameColumn Subtract(DecimalDataFrameColumn column) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.SubtractImplementation(column, inPlace: true); + } + public DecimalDataFrameColumn Multiply(DecimalDataFrameColumn column) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.MultiplyImplementation(column, inPlace: true); + } + public DecimalDataFrameColumn Divide(DecimalDataFrameColumn column) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.DivideImplementation(column, inPlace: true); + } + public DecimalDataFrameColumn Modulo(DecimalDataFrameColumn column) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.ModuloImplementation(column, inPlace: true); + } + public DoubleDataFrameColumn Add(DoubleDataFrameColumn column) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.AddImplementation(column, inPlace: true); + } + public DoubleDataFrameColumn Subtract(DoubleDataFrameColumn column) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.SubtractImplementation(column, inPlace: true); + } + public DoubleDataFrameColumn Multiply(DoubleDataFrameColumn column) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.MultiplyImplementation(column, inPlace: true); + } + public DoubleDataFrameColumn Divide(DoubleDataFrameColumn column) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.DivideImplementation(column, inPlace: true); + } + public DoubleDataFrameColumn Modulo(DoubleDataFrameColumn column) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.ModuloImplementation(column, inPlace: true); + } + public SingleDataFrameColumn Add(SingleDataFrameColumn column) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.AddImplementation(column, inPlace: true); + } + public SingleDataFrameColumn Subtract(SingleDataFrameColumn column) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.SubtractImplementation(column, inPlace: true); + } + public SingleDataFrameColumn Multiply(SingleDataFrameColumn column) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.MultiplyImplementation(column, inPlace: true); + } + public SingleDataFrameColumn Divide(SingleDataFrameColumn column) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.DivideImplementation(column, inPlace: true); + } + public SingleDataFrameColumn Modulo(SingleDataFrameColumn column) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.ModuloImplementation(column, inPlace: true); + } + public Int32DataFrameColumn Add(Int32DataFrameColumn column) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.AddImplementation(column, inPlace: true); + } + public Int32DataFrameColumn Subtract(Int32DataFrameColumn column) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.SubtractImplementation(column, inPlace: true); + } + public Int32DataFrameColumn Multiply(Int32DataFrameColumn column) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.MultiplyImplementation(column, inPlace: true); + } + public Int32DataFrameColumn Divide(Int32DataFrameColumn column) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.DivideImplementation(column, inPlace: true); + } + public Int32DataFrameColumn Modulo(Int32DataFrameColumn column) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.ModuloImplementation(column, inPlace: true); + } + public Int64DataFrameColumn Add(Int64DataFrameColumn column) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.AddImplementation(column, inPlace: true); + } + public Int64DataFrameColumn Subtract(Int64DataFrameColumn column) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.SubtractImplementation(column, inPlace: true); + } + public Int64DataFrameColumn Multiply(Int64DataFrameColumn column) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.MultiplyImplementation(column, inPlace: true); + } + public Int64DataFrameColumn Divide(Int64DataFrameColumn column) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.DivideImplementation(column, inPlace: true); + } + public Int64DataFrameColumn Modulo(Int64DataFrameColumn column) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.ModuloImplementation(column, inPlace: true); + } + public Int32DataFrameColumn Add(SByteDataFrameColumn column) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + Int32DataFrameColumn otherintColumn = column.CloneAsInt32Column(); + return intColumn.AddImplementation(otherintColumn, inPlace: true); + } + public Int32DataFrameColumn Subtract(SByteDataFrameColumn column) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + Int32DataFrameColumn otherintColumn = column.CloneAsInt32Column(); + return intColumn.SubtractImplementation(otherintColumn, inPlace: true); + } + public Int32DataFrameColumn Multiply(SByteDataFrameColumn column) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + Int32DataFrameColumn otherintColumn = column.CloneAsInt32Column(); + return intColumn.MultiplyImplementation(otherintColumn, inPlace: true); + } + public Int32DataFrameColumn Divide(SByteDataFrameColumn column) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + Int32DataFrameColumn otherintColumn = column.CloneAsInt32Column(); + return intColumn.DivideImplementation(otherintColumn, inPlace: true); + } + public Int32DataFrameColumn Modulo(SByteDataFrameColumn column) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + Int32DataFrameColumn otherintColumn = column.CloneAsInt32Column(); + return intColumn.ModuloImplementation(otherintColumn, inPlace: true); + } + public Int32DataFrameColumn Add(Int16DataFrameColumn column) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + Int32DataFrameColumn otherintColumn = column.CloneAsInt32Column(); + return intColumn.AddImplementation(otherintColumn, inPlace: true); + } + public Int32DataFrameColumn Subtract(Int16DataFrameColumn column) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + Int32DataFrameColumn otherintColumn = column.CloneAsInt32Column(); + return intColumn.SubtractImplementation(otherintColumn, inPlace: true); + } + public Int32DataFrameColumn Multiply(Int16DataFrameColumn column) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + Int32DataFrameColumn otherintColumn = column.CloneAsInt32Column(); + return intColumn.MultiplyImplementation(otherintColumn, inPlace: true); + } + public Int32DataFrameColumn Divide(Int16DataFrameColumn column) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + Int32DataFrameColumn otherintColumn = column.CloneAsInt32Column(); + return intColumn.DivideImplementation(otherintColumn, inPlace: true); + } + public Int32DataFrameColumn Modulo(Int16DataFrameColumn column) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + Int32DataFrameColumn otherintColumn = column.CloneAsInt32Column(); + return intColumn.ModuloImplementation(otherintColumn, inPlace: true); + } + public Int64DataFrameColumn Add(UInt32DataFrameColumn column) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + Int64DataFrameColumn otherlongColumn = column.CloneAsInt64Column(); + return longColumn.AddImplementation(otherlongColumn, inPlace: true); + } + public Int64DataFrameColumn Subtract(UInt32DataFrameColumn column) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + Int64DataFrameColumn otherlongColumn = column.CloneAsInt64Column(); + return longColumn.SubtractImplementation(otherlongColumn, inPlace: true); + } + public Int64DataFrameColumn Multiply(UInt32DataFrameColumn column) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + Int64DataFrameColumn otherlongColumn = column.CloneAsInt64Column(); + return longColumn.MultiplyImplementation(otherlongColumn, inPlace: true); + } + public Int64DataFrameColumn Divide(UInt32DataFrameColumn column) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + Int64DataFrameColumn otherlongColumn = column.CloneAsInt64Column(); + return longColumn.DivideImplementation(otherlongColumn, inPlace: true); + } + public Int64DataFrameColumn Modulo(UInt32DataFrameColumn column) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + Int64DataFrameColumn otherlongColumn = column.CloneAsInt64Column(); + return longColumn.ModuloImplementation(otherlongColumn, inPlace: true); + } + public SingleDataFrameColumn Add(UInt64DataFrameColumn column) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + SingleDataFrameColumn otherfloatColumn = column.CloneAsSingleColumn(); + return floatColumn.AddImplementation(otherfloatColumn, inPlace: true); + } + public SingleDataFrameColumn Subtract(UInt64DataFrameColumn column) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + SingleDataFrameColumn otherfloatColumn = column.CloneAsSingleColumn(); + return floatColumn.SubtractImplementation(otherfloatColumn, inPlace: true); + } + public SingleDataFrameColumn Multiply(UInt64DataFrameColumn column) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + SingleDataFrameColumn otherfloatColumn = column.CloneAsSingleColumn(); + return floatColumn.MultiplyImplementation(otherfloatColumn, inPlace: true); + } + public SingleDataFrameColumn Divide(UInt64DataFrameColumn column) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + SingleDataFrameColumn otherfloatColumn = column.CloneAsSingleColumn(); + return floatColumn.DivideImplementation(otherfloatColumn, inPlace: true); + } + public SingleDataFrameColumn Modulo(UInt64DataFrameColumn column) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + SingleDataFrameColumn otherfloatColumn = column.CloneAsSingleColumn(); + return floatColumn.ModuloImplementation(otherfloatColumn, inPlace: true); + } + public Int32DataFrameColumn Add(UInt16DataFrameColumn column) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + Int32DataFrameColumn otherintColumn = column.CloneAsInt32Column(); + return intColumn.AddImplementation(otherintColumn, inPlace: true); + } + public Int32DataFrameColumn Subtract(UInt16DataFrameColumn column) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + Int32DataFrameColumn otherintColumn = column.CloneAsInt32Column(); + return intColumn.SubtractImplementation(otherintColumn, inPlace: true); + } + public Int32DataFrameColumn Multiply(UInt16DataFrameColumn column) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + Int32DataFrameColumn otherintColumn = column.CloneAsInt32Column(); + return intColumn.MultiplyImplementation(otherintColumn, inPlace: true); + } + public Int32DataFrameColumn Divide(UInt16DataFrameColumn column) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + Int32DataFrameColumn otherintColumn = column.CloneAsInt32Column(); + return intColumn.DivideImplementation(otherintColumn, inPlace: true); + } + public Int32DataFrameColumn Modulo(UInt16DataFrameColumn column) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + Int32DataFrameColumn otherintColumn = column.CloneAsInt32Column(); + return intColumn.ModuloImplementation(otherintColumn, inPlace: true); + } + } + public partial class UInt32DataFrameColumn + { + public UInt32DataFrameColumn Add(ByteDataFrameColumn column, bool inPlace = false) + { + UInt32DataFrameColumn otheruintColumn = column.CloneAsUInt32Column(); + return AddImplementation(otheruintColumn, inPlace); + } + public UInt32DataFrameColumn Subtract(ByteDataFrameColumn column, bool inPlace = false) + { + UInt32DataFrameColumn otheruintColumn = column.CloneAsUInt32Column(); + return SubtractImplementation(otheruintColumn, inPlace); + } + public UInt32DataFrameColumn Multiply(ByteDataFrameColumn column, bool inPlace = false) + { + UInt32DataFrameColumn otheruintColumn = column.CloneAsUInt32Column(); + return MultiplyImplementation(otheruintColumn, inPlace); + } + public UInt32DataFrameColumn Divide(ByteDataFrameColumn column, bool inPlace = false) + { + UInt32DataFrameColumn otheruintColumn = column.CloneAsUInt32Column(); + return DivideImplementation(otheruintColumn, inPlace); + } + public UInt32DataFrameColumn Modulo(ByteDataFrameColumn column, bool inPlace = false) + { + UInt32DataFrameColumn otheruintColumn = column.CloneAsUInt32Column(); + return ModuloImplementation(otheruintColumn, inPlace); + } + public DecimalDataFrameColumn Add(DecimalDataFrameColumn column) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.AddImplementation(column, inPlace: true); + } + public DecimalDataFrameColumn Subtract(DecimalDataFrameColumn column) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.SubtractImplementation(column, inPlace: true); + } + public DecimalDataFrameColumn Multiply(DecimalDataFrameColumn column) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.MultiplyImplementation(column, inPlace: true); + } + public DecimalDataFrameColumn Divide(DecimalDataFrameColumn column) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.DivideImplementation(column, inPlace: true); + } + public DecimalDataFrameColumn Modulo(DecimalDataFrameColumn column) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.ModuloImplementation(column, inPlace: true); + } + public DoubleDataFrameColumn Add(DoubleDataFrameColumn column) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.AddImplementation(column, inPlace: true); + } + public DoubleDataFrameColumn Subtract(DoubleDataFrameColumn column) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.SubtractImplementation(column, inPlace: true); + } + public DoubleDataFrameColumn Multiply(DoubleDataFrameColumn column) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.MultiplyImplementation(column, inPlace: true); + } + public DoubleDataFrameColumn Divide(DoubleDataFrameColumn column) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.DivideImplementation(column, inPlace: true); + } + public DoubleDataFrameColumn Modulo(DoubleDataFrameColumn column) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.ModuloImplementation(column, inPlace: true); + } + public SingleDataFrameColumn Add(SingleDataFrameColumn column) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.AddImplementation(column, inPlace: true); + } + public SingleDataFrameColumn Subtract(SingleDataFrameColumn column) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.SubtractImplementation(column, inPlace: true); + } + public SingleDataFrameColumn Multiply(SingleDataFrameColumn column) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.MultiplyImplementation(column, inPlace: true); + } + public SingleDataFrameColumn Divide(SingleDataFrameColumn column) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.DivideImplementation(column, inPlace: true); + } + public SingleDataFrameColumn Modulo(SingleDataFrameColumn column) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.ModuloImplementation(column, inPlace: true); + } + public Int64DataFrameColumn Add(Int32DataFrameColumn column) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + Int64DataFrameColumn otherlongColumn = column.CloneAsInt64Column(); + return longColumn.AddImplementation(otherlongColumn, inPlace: true); + } + public Int64DataFrameColumn Subtract(Int32DataFrameColumn column) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + Int64DataFrameColumn otherlongColumn = column.CloneAsInt64Column(); + return longColumn.SubtractImplementation(otherlongColumn, inPlace: true); + } + public Int64DataFrameColumn Multiply(Int32DataFrameColumn column) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + Int64DataFrameColumn otherlongColumn = column.CloneAsInt64Column(); + return longColumn.MultiplyImplementation(otherlongColumn, inPlace: true); + } + public Int64DataFrameColumn Divide(Int32DataFrameColumn column) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + Int64DataFrameColumn otherlongColumn = column.CloneAsInt64Column(); + return longColumn.DivideImplementation(otherlongColumn, inPlace: true); + } + public Int64DataFrameColumn Modulo(Int32DataFrameColumn column) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + Int64DataFrameColumn otherlongColumn = column.CloneAsInt64Column(); + return longColumn.ModuloImplementation(otherlongColumn, inPlace: true); + } + public Int64DataFrameColumn Add(Int64DataFrameColumn column) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.AddImplementation(column, inPlace: true); + } + public Int64DataFrameColumn Subtract(Int64DataFrameColumn column) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.SubtractImplementation(column, inPlace: true); + } + public Int64DataFrameColumn Multiply(Int64DataFrameColumn column) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.MultiplyImplementation(column, inPlace: true); + } + public Int64DataFrameColumn Divide(Int64DataFrameColumn column) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.DivideImplementation(column, inPlace: true); + } + public Int64DataFrameColumn Modulo(Int64DataFrameColumn column) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.ModuloImplementation(column, inPlace: true); + } + public Int64DataFrameColumn Add(SByteDataFrameColumn column) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + Int64DataFrameColumn otherlongColumn = column.CloneAsInt64Column(); + return longColumn.AddImplementation(otherlongColumn, inPlace: true); + } + public Int64DataFrameColumn Subtract(SByteDataFrameColumn column) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + Int64DataFrameColumn otherlongColumn = column.CloneAsInt64Column(); + return longColumn.SubtractImplementation(otherlongColumn, inPlace: true); + } + public Int64DataFrameColumn Multiply(SByteDataFrameColumn column) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + Int64DataFrameColumn otherlongColumn = column.CloneAsInt64Column(); + return longColumn.MultiplyImplementation(otherlongColumn, inPlace: true); + } + public Int64DataFrameColumn Divide(SByteDataFrameColumn column) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + Int64DataFrameColumn otherlongColumn = column.CloneAsInt64Column(); + return longColumn.DivideImplementation(otherlongColumn, inPlace: true); + } + public Int64DataFrameColumn Modulo(SByteDataFrameColumn column) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + Int64DataFrameColumn otherlongColumn = column.CloneAsInt64Column(); + return longColumn.ModuloImplementation(otherlongColumn, inPlace: true); + } + public Int64DataFrameColumn Add(Int16DataFrameColumn column) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + Int64DataFrameColumn otherlongColumn = column.CloneAsInt64Column(); + return longColumn.AddImplementation(otherlongColumn, inPlace: true); + } + public Int64DataFrameColumn Subtract(Int16DataFrameColumn column) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + Int64DataFrameColumn otherlongColumn = column.CloneAsInt64Column(); + return longColumn.SubtractImplementation(otherlongColumn, inPlace: true); + } + public Int64DataFrameColumn Multiply(Int16DataFrameColumn column) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + Int64DataFrameColumn otherlongColumn = column.CloneAsInt64Column(); + return longColumn.MultiplyImplementation(otherlongColumn, inPlace: true); + } + public Int64DataFrameColumn Divide(Int16DataFrameColumn column) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + Int64DataFrameColumn otherlongColumn = column.CloneAsInt64Column(); + return longColumn.DivideImplementation(otherlongColumn, inPlace: true); + } + public Int64DataFrameColumn Modulo(Int16DataFrameColumn column) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + Int64DataFrameColumn otherlongColumn = column.CloneAsInt64Column(); + return longColumn.ModuloImplementation(otherlongColumn, inPlace: true); + } + public UInt32DataFrameColumn Add(UInt32DataFrameColumn column, bool inPlace = false) + { + return AddImplementation(column, inPlace); + } + public UInt32DataFrameColumn Subtract(UInt32DataFrameColumn column, bool inPlace = false) + { + return SubtractImplementation(column, inPlace); + } + public UInt32DataFrameColumn Multiply(UInt32DataFrameColumn column, bool inPlace = false) + { + return MultiplyImplementation(column, inPlace); + } + public UInt32DataFrameColumn Divide(UInt32DataFrameColumn column, bool inPlace = false) + { + return DivideImplementation(column, inPlace); + } + public UInt32DataFrameColumn Modulo(UInt32DataFrameColumn column, bool inPlace = false) + { + return ModuloImplementation(column, inPlace); + } + public UInt64DataFrameColumn Add(UInt64DataFrameColumn column) + { + UInt64DataFrameColumn ulongColumn = CloneAsUInt64Column(); + return ulongColumn.AddImplementation(column, inPlace: true); + } + public UInt64DataFrameColumn Subtract(UInt64DataFrameColumn column) + { + UInt64DataFrameColumn ulongColumn = CloneAsUInt64Column(); + return ulongColumn.SubtractImplementation(column, inPlace: true); + } + public UInt64DataFrameColumn Multiply(UInt64DataFrameColumn column) + { + UInt64DataFrameColumn ulongColumn = CloneAsUInt64Column(); + return ulongColumn.MultiplyImplementation(column, inPlace: true); + } + public UInt64DataFrameColumn Divide(UInt64DataFrameColumn column) + { + UInt64DataFrameColumn ulongColumn = CloneAsUInt64Column(); + return ulongColumn.DivideImplementation(column, inPlace: true); + } + public UInt64DataFrameColumn Modulo(UInt64DataFrameColumn column) + { + UInt64DataFrameColumn ulongColumn = CloneAsUInt64Column(); + return ulongColumn.ModuloImplementation(column, inPlace: true); + } + public UInt32DataFrameColumn Add(UInt16DataFrameColumn column, bool inPlace = false) + { + UInt32DataFrameColumn otheruintColumn = column.CloneAsUInt32Column(); + return AddImplementation(otheruintColumn, inPlace); + } + public UInt32DataFrameColumn Subtract(UInt16DataFrameColumn column, bool inPlace = false) + { + UInt32DataFrameColumn otheruintColumn = column.CloneAsUInt32Column(); + return SubtractImplementation(otheruintColumn, inPlace); + } + public UInt32DataFrameColumn Multiply(UInt16DataFrameColumn column, bool inPlace = false) + { + UInt32DataFrameColumn otheruintColumn = column.CloneAsUInt32Column(); + return MultiplyImplementation(otheruintColumn, inPlace); + } + public UInt32DataFrameColumn Divide(UInt16DataFrameColumn column, bool inPlace = false) + { + UInt32DataFrameColumn otheruintColumn = column.CloneAsUInt32Column(); + return DivideImplementation(otheruintColumn, inPlace); + } + public UInt32DataFrameColumn Modulo(UInt16DataFrameColumn column, bool inPlace = false) + { + UInt32DataFrameColumn otheruintColumn = column.CloneAsUInt32Column(); + return ModuloImplementation(otheruintColumn, inPlace); + } + } + public partial class UInt64DataFrameColumn + { + public UInt64DataFrameColumn Add(ByteDataFrameColumn column, bool inPlace = false) + { + UInt64DataFrameColumn otherulongColumn = column.CloneAsUInt64Column(); + return AddImplementation(otherulongColumn, inPlace); + } + public UInt64DataFrameColumn Subtract(ByteDataFrameColumn column, bool inPlace = false) + { + UInt64DataFrameColumn otherulongColumn = column.CloneAsUInt64Column(); + return SubtractImplementation(otherulongColumn, inPlace); + } + public UInt64DataFrameColumn Multiply(ByteDataFrameColumn column, bool inPlace = false) + { + UInt64DataFrameColumn otherulongColumn = column.CloneAsUInt64Column(); + return MultiplyImplementation(otherulongColumn, inPlace); + } + public UInt64DataFrameColumn Divide(ByteDataFrameColumn column, bool inPlace = false) + { + UInt64DataFrameColumn otherulongColumn = column.CloneAsUInt64Column(); + return DivideImplementation(otherulongColumn, inPlace); + } + public UInt64DataFrameColumn Modulo(ByteDataFrameColumn column, bool inPlace = false) + { + UInt64DataFrameColumn otherulongColumn = column.CloneAsUInt64Column(); + return ModuloImplementation(otherulongColumn, inPlace); + } + public DecimalDataFrameColumn Add(DecimalDataFrameColumn column) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.AddImplementation(column, inPlace: true); + } + public DecimalDataFrameColumn Subtract(DecimalDataFrameColumn column) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.SubtractImplementation(column, inPlace: true); + } + public DecimalDataFrameColumn Multiply(DecimalDataFrameColumn column) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.MultiplyImplementation(column, inPlace: true); + } + public DecimalDataFrameColumn Divide(DecimalDataFrameColumn column) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.DivideImplementation(column, inPlace: true); + } + public DecimalDataFrameColumn Modulo(DecimalDataFrameColumn column) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.ModuloImplementation(column, inPlace: true); + } + public DoubleDataFrameColumn Add(DoubleDataFrameColumn column) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.AddImplementation(column, inPlace: true); + } + public DoubleDataFrameColumn Subtract(DoubleDataFrameColumn column) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.SubtractImplementation(column, inPlace: true); + } + public DoubleDataFrameColumn Multiply(DoubleDataFrameColumn column) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.MultiplyImplementation(column, inPlace: true); + } + public DoubleDataFrameColumn Divide(DoubleDataFrameColumn column) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.DivideImplementation(column, inPlace: true); + } + public DoubleDataFrameColumn Modulo(DoubleDataFrameColumn column) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.ModuloImplementation(column, inPlace: true); + } + public SingleDataFrameColumn Add(SingleDataFrameColumn column) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.AddImplementation(column, inPlace: true); + } + public SingleDataFrameColumn Subtract(SingleDataFrameColumn column) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.SubtractImplementation(column, inPlace: true); + } + public SingleDataFrameColumn Multiply(SingleDataFrameColumn column) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.MultiplyImplementation(column, inPlace: true); + } + public SingleDataFrameColumn Divide(SingleDataFrameColumn column) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.DivideImplementation(column, inPlace: true); + } + public SingleDataFrameColumn Modulo(SingleDataFrameColumn column) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.ModuloImplementation(column, inPlace: true); + } + public SingleDataFrameColumn Add(Int32DataFrameColumn column) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + SingleDataFrameColumn otherfloatColumn = column.CloneAsSingleColumn(); + return floatColumn.AddImplementation(otherfloatColumn, inPlace: true); + } + public SingleDataFrameColumn Subtract(Int32DataFrameColumn column) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + SingleDataFrameColumn otherfloatColumn = column.CloneAsSingleColumn(); + return floatColumn.SubtractImplementation(otherfloatColumn, inPlace: true); + } + public SingleDataFrameColumn Multiply(Int32DataFrameColumn column) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + SingleDataFrameColumn otherfloatColumn = column.CloneAsSingleColumn(); + return floatColumn.MultiplyImplementation(otherfloatColumn, inPlace: true); + } + public SingleDataFrameColumn Divide(Int32DataFrameColumn column) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + SingleDataFrameColumn otherfloatColumn = column.CloneAsSingleColumn(); + return floatColumn.DivideImplementation(otherfloatColumn, inPlace: true); + } + public SingleDataFrameColumn Modulo(Int32DataFrameColumn column) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + SingleDataFrameColumn otherfloatColumn = column.CloneAsSingleColumn(); + return floatColumn.ModuloImplementation(otherfloatColumn, inPlace: true); + } + public SingleDataFrameColumn Add(SByteDataFrameColumn column) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + SingleDataFrameColumn otherfloatColumn = column.CloneAsSingleColumn(); + return floatColumn.AddImplementation(otherfloatColumn, inPlace: true); + } + public SingleDataFrameColumn Subtract(SByteDataFrameColumn column) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + SingleDataFrameColumn otherfloatColumn = column.CloneAsSingleColumn(); + return floatColumn.SubtractImplementation(otherfloatColumn, inPlace: true); + } + public SingleDataFrameColumn Multiply(SByteDataFrameColumn column) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + SingleDataFrameColumn otherfloatColumn = column.CloneAsSingleColumn(); + return floatColumn.MultiplyImplementation(otherfloatColumn, inPlace: true); + } + public SingleDataFrameColumn Divide(SByteDataFrameColumn column) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + SingleDataFrameColumn otherfloatColumn = column.CloneAsSingleColumn(); + return floatColumn.DivideImplementation(otherfloatColumn, inPlace: true); + } + public SingleDataFrameColumn Modulo(SByteDataFrameColumn column) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + SingleDataFrameColumn otherfloatColumn = column.CloneAsSingleColumn(); + return floatColumn.ModuloImplementation(otherfloatColumn, inPlace: true); + } + public SingleDataFrameColumn Add(Int16DataFrameColumn column) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + SingleDataFrameColumn otherfloatColumn = column.CloneAsSingleColumn(); + return floatColumn.AddImplementation(otherfloatColumn, inPlace: true); + } + public SingleDataFrameColumn Subtract(Int16DataFrameColumn column) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + SingleDataFrameColumn otherfloatColumn = column.CloneAsSingleColumn(); + return floatColumn.SubtractImplementation(otherfloatColumn, inPlace: true); + } + public SingleDataFrameColumn Multiply(Int16DataFrameColumn column) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + SingleDataFrameColumn otherfloatColumn = column.CloneAsSingleColumn(); + return floatColumn.MultiplyImplementation(otherfloatColumn, inPlace: true); + } + public SingleDataFrameColumn Divide(Int16DataFrameColumn column) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + SingleDataFrameColumn otherfloatColumn = column.CloneAsSingleColumn(); + return floatColumn.DivideImplementation(otherfloatColumn, inPlace: true); + } + public SingleDataFrameColumn Modulo(Int16DataFrameColumn column) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + SingleDataFrameColumn otherfloatColumn = column.CloneAsSingleColumn(); + return floatColumn.ModuloImplementation(otherfloatColumn, inPlace: true); + } + public UInt64DataFrameColumn Add(UInt32DataFrameColumn column, bool inPlace = false) + { + UInt64DataFrameColumn otherulongColumn = column.CloneAsUInt64Column(); + return AddImplementation(otherulongColumn, inPlace); + } + public UInt64DataFrameColumn Subtract(UInt32DataFrameColumn column, bool inPlace = false) + { + UInt64DataFrameColumn otherulongColumn = column.CloneAsUInt64Column(); + return SubtractImplementation(otherulongColumn, inPlace); + } + public UInt64DataFrameColumn Multiply(UInt32DataFrameColumn column, bool inPlace = false) + { + UInt64DataFrameColumn otherulongColumn = column.CloneAsUInt64Column(); + return MultiplyImplementation(otherulongColumn, inPlace); + } + public UInt64DataFrameColumn Divide(UInt32DataFrameColumn column, bool inPlace = false) + { + UInt64DataFrameColumn otherulongColumn = column.CloneAsUInt64Column(); + return DivideImplementation(otherulongColumn, inPlace); + } + public UInt64DataFrameColumn Modulo(UInt32DataFrameColumn column, bool inPlace = false) + { + UInt64DataFrameColumn otherulongColumn = column.CloneAsUInt64Column(); + return ModuloImplementation(otherulongColumn, inPlace); + } + public UInt64DataFrameColumn Add(UInt64DataFrameColumn column, bool inPlace = false) + { + return AddImplementation(column, inPlace); + } + public UInt64DataFrameColumn Subtract(UInt64DataFrameColumn column, bool inPlace = false) + { + return SubtractImplementation(column, inPlace); + } + public UInt64DataFrameColumn Multiply(UInt64DataFrameColumn column, bool inPlace = false) + { + return MultiplyImplementation(column, inPlace); + } + public UInt64DataFrameColumn Divide(UInt64DataFrameColumn column, bool inPlace = false) + { + return DivideImplementation(column, inPlace); + } + public UInt64DataFrameColumn Modulo(UInt64DataFrameColumn column, bool inPlace = false) + { + return ModuloImplementation(column, inPlace); + } + public UInt64DataFrameColumn Add(UInt16DataFrameColumn column, bool inPlace = false) + { + UInt64DataFrameColumn otherulongColumn = column.CloneAsUInt64Column(); + return AddImplementation(otherulongColumn, inPlace); + } + public UInt64DataFrameColumn Subtract(UInt16DataFrameColumn column, bool inPlace = false) + { + UInt64DataFrameColumn otherulongColumn = column.CloneAsUInt64Column(); + return SubtractImplementation(otherulongColumn, inPlace); + } + public UInt64DataFrameColumn Multiply(UInt16DataFrameColumn column, bool inPlace = false) + { + UInt64DataFrameColumn otherulongColumn = column.CloneAsUInt64Column(); + return MultiplyImplementation(otherulongColumn, inPlace); + } + public UInt64DataFrameColumn Divide(UInt16DataFrameColumn column, bool inPlace = false) + { + UInt64DataFrameColumn otherulongColumn = column.CloneAsUInt64Column(); + return DivideImplementation(otherulongColumn, inPlace); + } + public UInt64DataFrameColumn Modulo(UInt16DataFrameColumn column, bool inPlace = false) + { + UInt64DataFrameColumn otherulongColumn = column.CloneAsUInt64Column(); + return ModuloImplementation(otherulongColumn, inPlace); + } + } + public partial class UInt16DataFrameColumn + { + public Int32DataFrameColumn Add(ByteDataFrameColumn column) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + Int32DataFrameColumn otherintColumn = column.CloneAsInt32Column(); + return intColumn.AddImplementation(otherintColumn, inPlace: true); + } + public Int32DataFrameColumn Subtract(ByteDataFrameColumn column) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + Int32DataFrameColumn otherintColumn = column.CloneAsInt32Column(); + return intColumn.SubtractImplementation(otherintColumn, inPlace: true); + } + public Int32DataFrameColumn Multiply(ByteDataFrameColumn column) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + Int32DataFrameColumn otherintColumn = column.CloneAsInt32Column(); + return intColumn.MultiplyImplementation(otherintColumn, inPlace: true); + } + public Int32DataFrameColumn Divide(ByteDataFrameColumn column) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + Int32DataFrameColumn otherintColumn = column.CloneAsInt32Column(); + return intColumn.DivideImplementation(otherintColumn, inPlace: true); + } + public Int32DataFrameColumn Modulo(ByteDataFrameColumn column) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + Int32DataFrameColumn otherintColumn = column.CloneAsInt32Column(); + return intColumn.ModuloImplementation(otherintColumn, inPlace: true); + } + public DecimalDataFrameColumn Add(DecimalDataFrameColumn column) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.AddImplementation(column, inPlace: true); + } + public DecimalDataFrameColumn Subtract(DecimalDataFrameColumn column) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.SubtractImplementation(column, inPlace: true); + } + public DecimalDataFrameColumn Multiply(DecimalDataFrameColumn column) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.MultiplyImplementation(column, inPlace: true); + } + public DecimalDataFrameColumn Divide(DecimalDataFrameColumn column) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.DivideImplementation(column, inPlace: true); + } + public DecimalDataFrameColumn Modulo(DecimalDataFrameColumn column) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.ModuloImplementation(column, inPlace: true); + } + public DoubleDataFrameColumn Add(DoubleDataFrameColumn column) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.AddImplementation(column, inPlace: true); + } + public DoubleDataFrameColumn Subtract(DoubleDataFrameColumn column) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.SubtractImplementation(column, inPlace: true); + } + public DoubleDataFrameColumn Multiply(DoubleDataFrameColumn column) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.MultiplyImplementation(column, inPlace: true); + } + public DoubleDataFrameColumn Divide(DoubleDataFrameColumn column) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.DivideImplementation(column, inPlace: true); + } + public DoubleDataFrameColumn Modulo(DoubleDataFrameColumn column) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.ModuloImplementation(column, inPlace: true); + } + public SingleDataFrameColumn Add(SingleDataFrameColumn column) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.AddImplementation(column, inPlace: true); + } + public SingleDataFrameColumn Subtract(SingleDataFrameColumn column) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.SubtractImplementation(column, inPlace: true); + } + public SingleDataFrameColumn Multiply(SingleDataFrameColumn column) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.MultiplyImplementation(column, inPlace: true); + } + public SingleDataFrameColumn Divide(SingleDataFrameColumn column) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.DivideImplementation(column, inPlace: true); + } + public SingleDataFrameColumn Modulo(SingleDataFrameColumn column) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.ModuloImplementation(column, inPlace: true); + } + public Int32DataFrameColumn Add(Int32DataFrameColumn column) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.AddImplementation(column, inPlace: true); + } + public Int32DataFrameColumn Subtract(Int32DataFrameColumn column) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.SubtractImplementation(column, inPlace: true); + } + public Int32DataFrameColumn Multiply(Int32DataFrameColumn column) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.MultiplyImplementation(column, inPlace: true); + } + public Int32DataFrameColumn Divide(Int32DataFrameColumn column) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.DivideImplementation(column, inPlace: true); + } + public Int32DataFrameColumn Modulo(Int32DataFrameColumn column) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.ModuloImplementation(column, inPlace: true); + } + public Int64DataFrameColumn Add(Int64DataFrameColumn column) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.AddImplementation(column, inPlace: true); + } + public Int64DataFrameColumn Subtract(Int64DataFrameColumn column) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.SubtractImplementation(column, inPlace: true); + } + public Int64DataFrameColumn Multiply(Int64DataFrameColumn column) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.MultiplyImplementation(column, inPlace: true); + } + public Int64DataFrameColumn Divide(Int64DataFrameColumn column) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.DivideImplementation(column, inPlace: true); + } + public Int64DataFrameColumn Modulo(Int64DataFrameColumn column) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.ModuloImplementation(column, inPlace: true); + } + public Int32DataFrameColumn Add(SByteDataFrameColumn column) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + Int32DataFrameColumn otherintColumn = column.CloneAsInt32Column(); + return intColumn.AddImplementation(otherintColumn, inPlace: true); + } + public Int32DataFrameColumn Subtract(SByteDataFrameColumn column) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + Int32DataFrameColumn otherintColumn = column.CloneAsInt32Column(); + return intColumn.SubtractImplementation(otherintColumn, inPlace: true); + } + public Int32DataFrameColumn Multiply(SByteDataFrameColumn column) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + Int32DataFrameColumn otherintColumn = column.CloneAsInt32Column(); + return intColumn.MultiplyImplementation(otherintColumn, inPlace: true); + } + public Int32DataFrameColumn Divide(SByteDataFrameColumn column) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + Int32DataFrameColumn otherintColumn = column.CloneAsInt32Column(); + return intColumn.DivideImplementation(otherintColumn, inPlace: true); + } + public Int32DataFrameColumn Modulo(SByteDataFrameColumn column) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + Int32DataFrameColumn otherintColumn = column.CloneAsInt32Column(); + return intColumn.ModuloImplementation(otherintColumn, inPlace: true); + } + public Int32DataFrameColumn Add(Int16DataFrameColumn column) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + Int32DataFrameColumn otherintColumn = column.CloneAsInt32Column(); + return intColumn.AddImplementation(otherintColumn, inPlace: true); + } + public Int32DataFrameColumn Subtract(Int16DataFrameColumn column) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + Int32DataFrameColumn otherintColumn = column.CloneAsInt32Column(); + return intColumn.SubtractImplementation(otherintColumn, inPlace: true); + } + public Int32DataFrameColumn Multiply(Int16DataFrameColumn column) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + Int32DataFrameColumn otherintColumn = column.CloneAsInt32Column(); + return intColumn.MultiplyImplementation(otherintColumn, inPlace: true); + } + public Int32DataFrameColumn Divide(Int16DataFrameColumn column) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + Int32DataFrameColumn otherintColumn = column.CloneAsInt32Column(); + return intColumn.DivideImplementation(otherintColumn, inPlace: true); + } + public Int32DataFrameColumn Modulo(Int16DataFrameColumn column) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + Int32DataFrameColumn otherintColumn = column.CloneAsInt32Column(); + return intColumn.ModuloImplementation(otherintColumn, inPlace: true); + } + public UInt32DataFrameColumn Add(UInt32DataFrameColumn column) + { + UInt32DataFrameColumn uintColumn = CloneAsUInt32Column(); + return uintColumn.AddImplementation(column, inPlace: true); + } + public UInt32DataFrameColumn Subtract(UInt32DataFrameColumn column) + { + UInt32DataFrameColumn uintColumn = CloneAsUInt32Column(); + return uintColumn.SubtractImplementation(column, inPlace: true); + } + public UInt32DataFrameColumn Multiply(UInt32DataFrameColumn column) + { + UInt32DataFrameColumn uintColumn = CloneAsUInt32Column(); + return uintColumn.MultiplyImplementation(column, inPlace: true); + } + public UInt32DataFrameColumn Divide(UInt32DataFrameColumn column) + { + UInt32DataFrameColumn uintColumn = CloneAsUInt32Column(); + return uintColumn.DivideImplementation(column, inPlace: true); + } + public UInt32DataFrameColumn Modulo(UInt32DataFrameColumn column) + { + UInt32DataFrameColumn uintColumn = CloneAsUInt32Column(); + return uintColumn.ModuloImplementation(column, inPlace: true); + } + public UInt64DataFrameColumn Add(UInt64DataFrameColumn column) + { + UInt64DataFrameColumn ulongColumn = CloneAsUInt64Column(); + return ulongColumn.AddImplementation(column, inPlace: true); + } + public UInt64DataFrameColumn Subtract(UInt64DataFrameColumn column) + { + UInt64DataFrameColumn ulongColumn = CloneAsUInt64Column(); + return ulongColumn.SubtractImplementation(column, inPlace: true); + } + public UInt64DataFrameColumn Multiply(UInt64DataFrameColumn column) + { + UInt64DataFrameColumn ulongColumn = CloneAsUInt64Column(); + return ulongColumn.MultiplyImplementation(column, inPlace: true); + } + public UInt64DataFrameColumn Divide(UInt64DataFrameColumn column) + { + UInt64DataFrameColumn ulongColumn = CloneAsUInt64Column(); + return ulongColumn.DivideImplementation(column, inPlace: true); + } + public UInt64DataFrameColumn Modulo(UInt64DataFrameColumn column) + { + UInt64DataFrameColumn ulongColumn = CloneAsUInt64Column(); + return ulongColumn.ModuloImplementation(column, inPlace: true); + } + public Int32DataFrameColumn Add(UInt16DataFrameColumn column) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + Int32DataFrameColumn otherintColumn = column.CloneAsInt32Column(); + return intColumn.AddImplementation(otherintColumn, inPlace: true); + } + public Int32DataFrameColumn Subtract(UInt16DataFrameColumn column) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + Int32DataFrameColumn otherintColumn = column.CloneAsInt32Column(); + return intColumn.SubtractImplementation(otherintColumn, inPlace: true); + } + public Int32DataFrameColumn Multiply(UInt16DataFrameColumn column) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + Int32DataFrameColumn otherintColumn = column.CloneAsInt32Column(); + return intColumn.MultiplyImplementation(otherintColumn, inPlace: true); + } + public Int32DataFrameColumn Divide(UInt16DataFrameColumn column) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + Int32DataFrameColumn otherintColumn = column.CloneAsInt32Column(); + return intColumn.DivideImplementation(otherintColumn, inPlace: true); + } + public Int32DataFrameColumn Modulo(UInt16DataFrameColumn column) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + Int32DataFrameColumn otherintColumn = column.CloneAsInt32Column(); + return intColumn.ModuloImplementation(otherintColumn, inPlace: true); + } + } + public partial class ByteDataFrameColumn + { + public Int32DataFrameColumn Add(byte value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.AddImplementation(value, inPlace: true); + } + public Int32DataFrameColumn ReverseAdd(byte value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.ReverseAddImplementation(value, inPlace: true); + } + public Int32DataFrameColumn Subtract(byte value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.SubtractImplementation(value, inPlace: true); + } + public Int32DataFrameColumn ReverseSubtract(byte value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.ReverseSubtractImplementation(value, inPlace: true); + } + public Int32DataFrameColumn Multiply(byte value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.MultiplyImplementation(value, inPlace: true); + } + public Int32DataFrameColumn ReverseMultiply(byte value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.ReverseMultiplyImplementation(value, inPlace: true); + } + public Int32DataFrameColumn Divide(byte value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.DivideImplementation(value, inPlace: true); + } + public Int32DataFrameColumn ReverseDivide(byte value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.ReverseDivideImplementation(value, inPlace: true); + } + public Int32DataFrameColumn Modulo(byte value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.ModuloImplementation(value, inPlace: true); + } + public Int32DataFrameColumn ReverseModulo(byte value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.ReverseModuloImplementation(value, inPlace: true); + } + public DecimalDataFrameColumn Add(decimal value) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.AddImplementation(value, inPlace: true); + } + public DecimalDataFrameColumn ReverseAdd(decimal value) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.ReverseAddImplementation(value, inPlace: true); + } + public DecimalDataFrameColumn Subtract(decimal value) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.SubtractImplementation(value, inPlace: true); + } + public DecimalDataFrameColumn ReverseSubtract(decimal value) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.ReverseSubtractImplementation(value, inPlace: true); + } + public DecimalDataFrameColumn Multiply(decimal value) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.MultiplyImplementation(value, inPlace: true); + } + public DecimalDataFrameColumn ReverseMultiply(decimal value) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.ReverseMultiplyImplementation(value, inPlace: true); + } + public DecimalDataFrameColumn Divide(decimal value) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.DivideImplementation(value, inPlace: true); + } + public DecimalDataFrameColumn ReverseDivide(decimal value) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.ReverseDivideImplementation(value, inPlace: true); + } + public DecimalDataFrameColumn Modulo(decimal value) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.ModuloImplementation(value, inPlace: true); + } + public DecimalDataFrameColumn ReverseModulo(decimal value) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.ReverseModuloImplementation(value, inPlace: true); + } + public DoubleDataFrameColumn Add(double value) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.AddImplementation(value, inPlace: true); + } + public DoubleDataFrameColumn ReverseAdd(double value) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.ReverseAddImplementation(value, inPlace: true); + } + public DoubleDataFrameColumn Subtract(double value) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.SubtractImplementation(value, inPlace: true); + } + public DoubleDataFrameColumn ReverseSubtract(double value) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.ReverseSubtractImplementation(value, inPlace: true); + } + public DoubleDataFrameColumn Multiply(double value) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.MultiplyImplementation(value, inPlace: true); + } + public DoubleDataFrameColumn ReverseMultiply(double value) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.ReverseMultiplyImplementation(value, inPlace: true); + } + public DoubleDataFrameColumn Divide(double value) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.DivideImplementation(value, inPlace: true); + } + public DoubleDataFrameColumn ReverseDivide(double value) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.ReverseDivideImplementation(value, inPlace: true); + } + public DoubleDataFrameColumn Modulo(double value) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.ModuloImplementation(value, inPlace: true); + } + public DoubleDataFrameColumn ReverseModulo(double value) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.ReverseModuloImplementation(value, inPlace: true); + } + public SingleDataFrameColumn Add(float value) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.AddImplementation(value, inPlace: true); + } + public SingleDataFrameColumn ReverseAdd(float value) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.ReverseAddImplementation(value, inPlace: true); + } + public SingleDataFrameColumn Subtract(float value) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.SubtractImplementation(value, inPlace: true); + } + public SingleDataFrameColumn ReverseSubtract(float value) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.ReverseSubtractImplementation(value, inPlace: true); + } + public SingleDataFrameColumn Multiply(float value) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.MultiplyImplementation(value, inPlace: true); + } + public SingleDataFrameColumn ReverseMultiply(float value) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.ReverseMultiplyImplementation(value, inPlace: true); + } + public SingleDataFrameColumn Divide(float value) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.DivideImplementation(value, inPlace: true); + } + public SingleDataFrameColumn ReverseDivide(float value) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.ReverseDivideImplementation(value, inPlace: true); + } + public SingleDataFrameColumn Modulo(float value) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.ModuloImplementation(value, inPlace: true); + } + public SingleDataFrameColumn ReverseModulo(float value) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.ReverseModuloImplementation(value, inPlace: true); + } + public Int32DataFrameColumn Add(int value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.AddImplementation(value, inPlace: true); + } + public Int32DataFrameColumn ReverseAdd(int value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.ReverseAddImplementation(value, inPlace: true); + } + public Int32DataFrameColumn Subtract(int value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.SubtractImplementation(value, inPlace: true); + } + public Int32DataFrameColumn ReverseSubtract(int value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.ReverseSubtractImplementation(value, inPlace: true); + } + public Int32DataFrameColumn Multiply(int value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.MultiplyImplementation(value, inPlace: true); + } + public Int32DataFrameColumn ReverseMultiply(int value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.ReverseMultiplyImplementation(value, inPlace: true); + } + public Int32DataFrameColumn Divide(int value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.DivideImplementation(value, inPlace: true); + } + public Int32DataFrameColumn ReverseDivide(int value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.ReverseDivideImplementation(value, inPlace: true); + } + public Int32DataFrameColumn Modulo(int value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.ModuloImplementation(value, inPlace: true); + } + public Int32DataFrameColumn ReverseModulo(int value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.ReverseModuloImplementation(value, inPlace: true); + } + public Int64DataFrameColumn Add(long value) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.AddImplementation(value, inPlace: true); + } + public Int64DataFrameColumn ReverseAdd(long value) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.ReverseAddImplementation(value, inPlace: true); + } + public Int64DataFrameColumn Subtract(long value) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.SubtractImplementation(value, inPlace: true); + } + public Int64DataFrameColumn ReverseSubtract(long value) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.ReverseSubtractImplementation(value, inPlace: true); + } + public Int64DataFrameColumn Multiply(long value) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.MultiplyImplementation(value, inPlace: true); + } + public Int64DataFrameColumn ReverseMultiply(long value) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.ReverseMultiplyImplementation(value, inPlace: true); + } + public Int64DataFrameColumn Divide(long value) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.DivideImplementation(value, inPlace: true); + } + public Int64DataFrameColumn ReverseDivide(long value) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.ReverseDivideImplementation(value, inPlace: true); + } + public Int64DataFrameColumn Modulo(long value) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.ModuloImplementation(value, inPlace: true); + } + public Int64DataFrameColumn ReverseModulo(long value) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.ReverseModuloImplementation(value, inPlace: true); + } + public Int32DataFrameColumn Add(sbyte value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.AddImplementation(value, inPlace: true); + } + public Int32DataFrameColumn ReverseAdd(sbyte value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.ReverseAddImplementation(value, inPlace: true); + } + public Int32DataFrameColumn Subtract(sbyte value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.SubtractImplementation(value, inPlace: true); + } + public Int32DataFrameColumn ReverseSubtract(sbyte value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.ReverseSubtractImplementation(value, inPlace: true); + } + public Int32DataFrameColumn Multiply(sbyte value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.MultiplyImplementation(value, inPlace: true); + } + public Int32DataFrameColumn ReverseMultiply(sbyte value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.ReverseMultiplyImplementation(value, inPlace: true); + } + public Int32DataFrameColumn Divide(sbyte value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.DivideImplementation(value, inPlace: true); + } + public Int32DataFrameColumn ReverseDivide(sbyte value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.ReverseDivideImplementation(value, inPlace: true); + } + public Int32DataFrameColumn Modulo(sbyte value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.ModuloImplementation(value, inPlace: true); + } + public Int32DataFrameColumn ReverseModulo(sbyte value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.ReverseModuloImplementation(value, inPlace: true); + } + public Int32DataFrameColumn Add(short value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.AddImplementation(value, inPlace: true); + } + public Int32DataFrameColumn ReverseAdd(short value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.ReverseAddImplementation(value, inPlace: true); + } + public Int32DataFrameColumn Subtract(short value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.SubtractImplementation(value, inPlace: true); + } + public Int32DataFrameColumn ReverseSubtract(short value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.ReverseSubtractImplementation(value, inPlace: true); + } + public Int32DataFrameColumn Multiply(short value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.MultiplyImplementation(value, inPlace: true); + } + public Int32DataFrameColumn ReverseMultiply(short value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.ReverseMultiplyImplementation(value, inPlace: true); + } + public Int32DataFrameColumn Divide(short value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.DivideImplementation(value, inPlace: true); + } + public Int32DataFrameColumn ReverseDivide(short value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.ReverseDivideImplementation(value, inPlace: true); + } + public Int32DataFrameColumn Modulo(short value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.ModuloImplementation(value, inPlace: true); + } + public Int32DataFrameColumn ReverseModulo(short value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.ReverseModuloImplementation(value, inPlace: true); + } + public UInt32DataFrameColumn Add(uint value) + { + UInt32DataFrameColumn uintColumn = CloneAsUInt32Column(); + return uintColumn.AddImplementation(value, inPlace: true); + } + public UInt32DataFrameColumn ReverseAdd(uint value) + { + UInt32DataFrameColumn uintColumn = CloneAsUInt32Column(); + return uintColumn.ReverseAddImplementation(value, inPlace: true); + } + public UInt32DataFrameColumn Subtract(uint value) + { + UInt32DataFrameColumn uintColumn = CloneAsUInt32Column(); + return uintColumn.SubtractImplementation(value, inPlace: true); + } + public UInt32DataFrameColumn ReverseSubtract(uint value) + { + UInt32DataFrameColumn uintColumn = CloneAsUInt32Column(); + return uintColumn.ReverseSubtractImplementation(value, inPlace: true); + } + public UInt32DataFrameColumn Multiply(uint value) + { + UInt32DataFrameColumn uintColumn = CloneAsUInt32Column(); + return uintColumn.MultiplyImplementation(value, inPlace: true); + } + public UInt32DataFrameColumn ReverseMultiply(uint value) + { + UInt32DataFrameColumn uintColumn = CloneAsUInt32Column(); + return uintColumn.ReverseMultiplyImplementation(value, inPlace: true); + } + public UInt32DataFrameColumn Divide(uint value) + { + UInt32DataFrameColumn uintColumn = CloneAsUInt32Column(); + return uintColumn.DivideImplementation(value, inPlace: true); + } + public UInt32DataFrameColumn ReverseDivide(uint value) + { + UInt32DataFrameColumn uintColumn = CloneAsUInt32Column(); + return uintColumn.ReverseDivideImplementation(value, inPlace: true); + } + public UInt32DataFrameColumn Modulo(uint value) + { + UInt32DataFrameColumn uintColumn = CloneAsUInt32Column(); + return uintColumn.ModuloImplementation(value, inPlace: true); + } + public UInt32DataFrameColumn ReverseModulo(uint value) + { + UInt32DataFrameColumn uintColumn = CloneAsUInt32Column(); + return uintColumn.ReverseModuloImplementation(value, inPlace: true); + } + public UInt64DataFrameColumn Add(ulong value) + { + UInt64DataFrameColumn ulongColumn = CloneAsUInt64Column(); + return ulongColumn.AddImplementation(value, inPlace: true); + } + public UInt64DataFrameColumn ReverseAdd(ulong value) + { + UInt64DataFrameColumn ulongColumn = CloneAsUInt64Column(); + return ulongColumn.ReverseAddImplementation(value, inPlace: true); + } + public UInt64DataFrameColumn Subtract(ulong value) + { + UInt64DataFrameColumn ulongColumn = CloneAsUInt64Column(); + return ulongColumn.SubtractImplementation(value, inPlace: true); + } + public UInt64DataFrameColumn ReverseSubtract(ulong value) + { + UInt64DataFrameColumn ulongColumn = CloneAsUInt64Column(); + return ulongColumn.ReverseSubtractImplementation(value, inPlace: true); + } + public UInt64DataFrameColumn Multiply(ulong value) + { + UInt64DataFrameColumn ulongColumn = CloneAsUInt64Column(); + return ulongColumn.MultiplyImplementation(value, inPlace: true); + } + public UInt64DataFrameColumn ReverseMultiply(ulong value) + { + UInt64DataFrameColumn ulongColumn = CloneAsUInt64Column(); + return ulongColumn.ReverseMultiplyImplementation(value, inPlace: true); + } + public UInt64DataFrameColumn Divide(ulong value) + { + UInt64DataFrameColumn ulongColumn = CloneAsUInt64Column(); + return ulongColumn.DivideImplementation(value, inPlace: true); + } + public UInt64DataFrameColumn ReverseDivide(ulong value) + { + UInt64DataFrameColumn ulongColumn = CloneAsUInt64Column(); + return ulongColumn.ReverseDivideImplementation(value, inPlace: true); + } + public UInt64DataFrameColumn Modulo(ulong value) + { + UInt64DataFrameColumn ulongColumn = CloneAsUInt64Column(); + return ulongColumn.ModuloImplementation(value, inPlace: true); + } + public UInt64DataFrameColumn ReverseModulo(ulong value) + { + UInt64DataFrameColumn ulongColumn = CloneAsUInt64Column(); + return ulongColumn.ReverseModuloImplementation(value, inPlace: true); + } + public Int32DataFrameColumn Add(ushort value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.AddImplementation(value, inPlace: true); + } + public Int32DataFrameColumn ReverseAdd(ushort value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.ReverseAddImplementation(value, inPlace: true); + } + public Int32DataFrameColumn Subtract(ushort value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.SubtractImplementation(value, inPlace: true); + } + public Int32DataFrameColumn ReverseSubtract(ushort value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.ReverseSubtractImplementation(value, inPlace: true); + } + public Int32DataFrameColumn Multiply(ushort value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.MultiplyImplementation(value, inPlace: true); + } + public Int32DataFrameColumn ReverseMultiply(ushort value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.ReverseMultiplyImplementation(value, inPlace: true); + } + public Int32DataFrameColumn Divide(ushort value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.DivideImplementation(value, inPlace: true); + } + public Int32DataFrameColumn ReverseDivide(ushort value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.ReverseDivideImplementation(value, inPlace: true); + } + public Int32DataFrameColumn Modulo(ushort value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.ModuloImplementation(value, inPlace: true); + } + public Int32DataFrameColumn ReverseModulo(ushort value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.ReverseModuloImplementation(value, inPlace: true); + } + } + public partial class DecimalDataFrameColumn + { + public DecimalDataFrameColumn Add(byte value, bool inPlace = false) + { + decimal convertedValue = (decimal)value; + return AddImplementation(convertedValue, inPlace); + } + public DecimalDataFrameColumn ReverseAdd(byte value, bool inPlace = false) + { + decimal convertedValue = (decimal)value; + return ReverseAddImplementation(convertedValue, inPlace); + } + public DecimalDataFrameColumn Subtract(byte value, bool inPlace = false) + { + decimal convertedValue = (decimal)value; + return SubtractImplementation(convertedValue, inPlace); + } + public DecimalDataFrameColumn ReverseSubtract(byte value, bool inPlace = false) + { + decimal convertedValue = (decimal)value; + return ReverseSubtractImplementation(convertedValue, inPlace); + } + public DecimalDataFrameColumn Multiply(byte value, bool inPlace = false) + { + decimal convertedValue = (decimal)value; + return MultiplyImplementation(convertedValue, inPlace); + } + public DecimalDataFrameColumn ReverseMultiply(byte value, bool inPlace = false) + { + decimal convertedValue = (decimal)value; + return ReverseMultiplyImplementation(convertedValue, inPlace); + } + public DecimalDataFrameColumn Divide(byte value, bool inPlace = false) + { + decimal convertedValue = (decimal)value; + return DivideImplementation(convertedValue, inPlace); + } + public DecimalDataFrameColumn ReverseDivide(byte value, bool inPlace = false) + { + decimal convertedValue = (decimal)value; + return ReverseDivideImplementation(convertedValue, inPlace); + } + public DecimalDataFrameColumn Modulo(byte value, bool inPlace = false) + { + decimal convertedValue = (decimal)value; + return ModuloImplementation(convertedValue, inPlace); + } + public DecimalDataFrameColumn ReverseModulo(byte value, bool inPlace = false) + { + decimal convertedValue = (decimal)value; + return ReverseModuloImplementation(convertedValue, inPlace); + } + public DecimalDataFrameColumn Add(decimal value, bool inPlace = false) + { + return AddImplementation(value, inPlace); + } + public DecimalDataFrameColumn ReverseAdd(decimal value, bool inPlace = false) + { + return ReverseAddImplementation(value, inPlace); + } + public DecimalDataFrameColumn Subtract(decimal value, bool inPlace = false) + { + return SubtractImplementation(value, inPlace); + } + public DecimalDataFrameColumn ReverseSubtract(decimal value, bool inPlace = false) + { + return ReverseSubtractImplementation(value, inPlace); + } + public DecimalDataFrameColumn Multiply(decimal value, bool inPlace = false) + { + return MultiplyImplementation(value, inPlace); + } + public DecimalDataFrameColumn ReverseMultiply(decimal value, bool inPlace = false) + { + return ReverseMultiplyImplementation(value, inPlace); + } + public DecimalDataFrameColumn Divide(decimal value, bool inPlace = false) + { + return DivideImplementation(value, inPlace); + } + public DecimalDataFrameColumn ReverseDivide(decimal value, bool inPlace = false) + { + return ReverseDivideImplementation(value, inPlace); + } + public DecimalDataFrameColumn Modulo(decimal value, bool inPlace = false) + { + return ModuloImplementation(value, inPlace); + } + public DecimalDataFrameColumn ReverseModulo(decimal value, bool inPlace = false) + { + return ReverseModuloImplementation(value, inPlace); + } + public DecimalDataFrameColumn Add(int value, bool inPlace = false) + { + decimal convertedValue = (decimal)value; + return AddImplementation(convertedValue, inPlace); + } + public DecimalDataFrameColumn ReverseAdd(int value, bool inPlace = false) + { + decimal convertedValue = (decimal)value; + return ReverseAddImplementation(convertedValue, inPlace); + } + public DecimalDataFrameColumn Subtract(int value, bool inPlace = false) + { + decimal convertedValue = (decimal)value; + return SubtractImplementation(convertedValue, inPlace); + } + public DecimalDataFrameColumn ReverseSubtract(int value, bool inPlace = false) + { + decimal convertedValue = (decimal)value; + return ReverseSubtractImplementation(convertedValue, inPlace); + } + public DecimalDataFrameColumn Multiply(int value, bool inPlace = false) + { + decimal convertedValue = (decimal)value; + return MultiplyImplementation(convertedValue, inPlace); + } + public DecimalDataFrameColumn ReverseMultiply(int value, bool inPlace = false) + { + decimal convertedValue = (decimal)value; + return ReverseMultiplyImplementation(convertedValue, inPlace); + } + public DecimalDataFrameColumn Divide(int value, bool inPlace = false) + { + decimal convertedValue = (decimal)value; + return DivideImplementation(convertedValue, inPlace); + } + public DecimalDataFrameColumn ReverseDivide(int value, bool inPlace = false) + { + decimal convertedValue = (decimal)value; + return ReverseDivideImplementation(convertedValue, inPlace); + } + public DecimalDataFrameColumn Modulo(int value, bool inPlace = false) + { + decimal convertedValue = (decimal)value; + return ModuloImplementation(convertedValue, inPlace); + } + public DecimalDataFrameColumn ReverseModulo(int value, bool inPlace = false) + { + decimal convertedValue = (decimal)value; + return ReverseModuloImplementation(convertedValue, inPlace); + } + public DecimalDataFrameColumn Add(long value, bool inPlace = false) + { + decimal convertedValue = (decimal)value; + return AddImplementation(convertedValue, inPlace); + } + public DecimalDataFrameColumn ReverseAdd(long value, bool inPlace = false) + { + decimal convertedValue = (decimal)value; + return ReverseAddImplementation(convertedValue, inPlace); + } + public DecimalDataFrameColumn Subtract(long value, bool inPlace = false) + { + decimal convertedValue = (decimal)value; + return SubtractImplementation(convertedValue, inPlace); + } + public DecimalDataFrameColumn ReverseSubtract(long value, bool inPlace = false) + { + decimal convertedValue = (decimal)value; + return ReverseSubtractImplementation(convertedValue, inPlace); + } + public DecimalDataFrameColumn Multiply(long value, bool inPlace = false) + { + decimal convertedValue = (decimal)value; + return MultiplyImplementation(convertedValue, inPlace); + } + public DecimalDataFrameColumn ReverseMultiply(long value, bool inPlace = false) + { + decimal convertedValue = (decimal)value; + return ReverseMultiplyImplementation(convertedValue, inPlace); + } + public DecimalDataFrameColumn Divide(long value, bool inPlace = false) + { + decimal convertedValue = (decimal)value; + return DivideImplementation(convertedValue, inPlace); + } + public DecimalDataFrameColumn ReverseDivide(long value, bool inPlace = false) + { + decimal convertedValue = (decimal)value; + return ReverseDivideImplementation(convertedValue, inPlace); + } + public DecimalDataFrameColumn Modulo(long value, bool inPlace = false) + { + decimal convertedValue = (decimal)value; + return ModuloImplementation(convertedValue, inPlace); + } + public DecimalDataFrameColumn ReverseModulo(long value, bool inPlace = false) + { + decimal convertedValue = (decimal)value; + return ReverseModuloImplementation(convertedValue, inPlace); + } + public DecimalDataFrameColumn Add(sbyte value, bool inPlace = false) + { + decimal convertedValue = (decimal)value; + return AddImplementation(convertedValue, inPlace); + } + public DecimalDataFrameColumn ReverseAdd(sbyte value, bool inPlace = false) + { + decimal convertedValue = (decimal)value; + return ReverseAddImplementation(convertedValue, inPlace); + } + public DecimalDataFrameColumn Subtract(sbyte value, bool inPlace = false) + { + decimal convertedValue = (decimal)value; + return SubtractImplementation(convertedValue, inPlace); + } + public DecimalDataFrameColumn ReverseSubtract(sbyte value, bool inPlace = false) + { + decimal convertedValue = (decimal)value; + return ReverseSubtractImplementation(convertedValue, inPlace); + } + public DecimalDataFrameColumn Multiply(sbyte value, bool inPlace = false) + { + decimal convertedValue = (decimal)value; + return MultiplyImplementation(convertedValue, inPlace); + } + public DecimalDataFrameColumn ReverseMultiply(sbyte value, bool inPlace = false) + { + decimal convertedValue = (decimal)value; + return ReverseMultiplyImplementation(convertedValue, inPlace); + } + public DecimalDataFrameColumn Divide(sbyte value, bool inPlace = false) + { + decimal convertedValue = (decimal)value; + return DivideImplementation(convertedValue, inPlace); + } + public DecimalDataFrameColumn ReverseDivide(sbyte value, bool inPlace = false) + { + decimal convertedValue = (decimal)value; + return ReverseDivideImplementation(convertedValue, inPlace); + } + public DecimalDataFrameColumn Modulo(sbyte value, bool inPlace = false) + { + decimal convertedValue = (decimal)value; + return ModuloImplementation(convertedValue, inPlace); + } + public DecimalDataFrameColumn ReverseModulo(sbyte value, bool inPlace = false) + { + decimal convertedValue = (decimal)value; + return ReverseModuloImplementation(convertedValue, inPlace); + } + public DecimalDataFrameColumn Add(short value, bool inPlace = false) + { + decimal convertedValue = (decimal)value; + return AddImplementation(convertedValue, inPlace); + } + public DecimalDataFrameColumn ReverseAdd(short value, bool inPlace = false) + { + decimal convertedValue = (decimal)value; + return ReverseAddImplementation(convertedValue, inPlace); + } + public DecimalDataFrameColumn Subtract(short value, bool inPlace = false) + { + decimal convertedValue = (decimal)value; + return SubtractImplementation(convertedValue, inPlace); + } + public DecimalDataFrameColumn ReverseSubtract(short value, bool inPlace = false) + { + decimal convertedValue = (decimal)value; + return ReverseSubtractImplementation(convertedValue, inPlace); + } + public DecimalDataFrameColumn Multiply(short value, bool inPlace = false) + { + decimal convertedValue = (decimal)value; + return MultiplyImplementation(convertedValue, inPlace); + } + public DecimalDataFrameColumn ReverseMultiply(short value, bool inPlace = false) + { + decimal convertedValue = (decimal)value; + return ReverseMultiplyImplementation(convertedValue, inPlace); + } + public DecimalDataFrameColumn Divide(short value, bool inPlace = false) + { + decimal convertedValue = (decimal)value; + return DivideImplementation(convertedValue, inPlace); + } + public DecimalDataFrameColumn ReverseDivide(short value, bool inPlace = false) + { + decimal convertedValue = (decimal)value; + return ReverseDivideImplementation(convertedValue, inPlace); + } + public DecimalDataFrameColumn Modulo(short value, bool inPlace = false) + { + decimal convertedValue = (decimal)value; + return ModuloImplementation(convertedValue, inPlace); + } + public DecimalDataFrameColumn ReverseModulo(short value, bool inPlace = false) + { + decimal convertedValue = (decimal)value; + return ReverseModuloImplementation(convertedValue, inPlace); + } + public DecimalDataFrameColumn Add(uint value, bool inPlace = false) + { + decimal convertedValue = (decimal)value; + return AddImplementation(convertedValue, inPlace); + } + public DecimalDataFrameColumn ReverseAdd(uint value, bool inPlace = false) + { + decimal convertedValue = (decimal)value; + return ReverseAddImplementation(convertedValue, inPlace); + } + public DecimalDataFrameColumn Subtract(uint value, bool inPlace = false) + { + decimal convertedValue = (decimal)value; + return SubtractImplementation(convertedValue, inPlace); + } + public DecimalDataFrameColumn ReverseSubtract(uint value, bool inPlace = false) + { + decimal convertedValue = (decimal)value; + return ReverseSubtractImplementation(convertedValue, inPlace); + } + public DecimalDataFrameColumn Multiply(uint value, bool inPlace = false) + { + decimal convertedValue = (decimal)value; + return MultiplyImplementation(convertedValue, inPlace); + } + public DecimalDataFrameColumn ReverseMultiply(uint value, bool inPlace = false) + { + decimal convertedValue = (decimal)value; + return ReverseMultiplyImplementation(convertedValue, inPlace); + } + public DecimalDataFrameColumn Divide(uint value, bool inPlace = false) + { + decimal convertedValue = (decimal)value; + return DivideImplementation(convertedValue, inPlace); + } + public DecimalDataFrameColumn ReverseDivide(uint value, bool inPlace = false) + { + decimal convertedValue = (decimal)value; + return ReverseDivideImplementation(convertedValue, inPlace); + } + public DecimalDataFrameColumn Modulo(uint value, bool inPlace = false) + { + decimal convertedValue = (decimal)value; + return ModuloImplementation(convertedValue, inPlace); + } + public DecimalDataFrameColumn ReverseModulo(uint value, bool inPlace = false) + { + decimal convertedValue = (decimal)value; + return ReverseModuloImplementation(convertedValue, inPlace); + } + public DecimalDataFrameColumn Add(ulong value, bool inPlace = false) + { + decimal convertedValue = (decimal)value; + return AddImplementation(convertedValue, inPlace); + } + public DecimalDataFrameColumn ReverseAdd(ulong value, bool inPlace = false) + { + decimal convertedValue = (decimal)value; + return ReverseAddImplementation(convertedValue, inPlace); + } + public DecimalDataFrameColumn Subtract(ulong value, bool inPlace = false) + { + decimal convertedValue = (decimal)value; + return SubtractImplementation(convertedValue, inPlace); + } + public DecimalDataFrameColumn ReverseSubtract(ulong value, bool inPlace = false) + { + decimal convertedValue = (decimal)value; + return ReverseSubtractImplementation(convertedValue, inPlace); + } + public DecimalDataFrameColumn Multiply(ulong value, bool inPlace = false) + { + decimal convertedValue = (decimal)value; + return MultiplyImplementation(convertedValue, inPlace); + } + public DecimalDataFrameColumn ReverseMultiply(ulong value, bool inPlace = false) + { + decimal convertedValue = (decimal)value; + return ReverseMultiplyImplementation(convertedValue, inPlace); + } + public DecimalDataFrameColumn Divide(ulong value, bool inPlace = false) + { + decimal convertedValue = (decimal)value; + return DivideImplementation(convertedValue, inPlace); + } + public DecimalDataFrameColumn ReverseDivide(ulong value, bool inPlace = false) + { + decimal convertedValue = (decimal)value; + return ReverseDivideImplementation(convertedValue, inPlace); + } + public DecimalDataFrameColumn Modulo(ulong value, bool inPlace = false) + { + decimal convertedValue = (decimal)value; + return ModuloImplementation(convertedValue, inPlace); + } + public DecimalDataFrameColumn ReverseModulo(ulong value, bool inPlace = false) + { + decimal convertedValue = (decimal)value; + return ReverseModuloImplementation(convertedValue, inPlace); + } + public DecimalDataFrameColumn Add(ushort value, bool inPlace = false) + { + decimal convertedValue = (decimal)value; + return AddImplementation(convertedValue, inPlace); + } + public DecimalDataFrameColumn ReverseAdd(ushort value, bool inPlace = false) + { + decimal convertedValue = (decimal)value; + return ReverseAddImplementation(convertedValue, inPlace); + } + public DecimalDataFrameColumn Subtract(ushort value, bool inPlace = false) + { + decimal convertedValue = (decimal)value; + return SubtractImplementation(convertedValue, inPlace); + } + public DecimalDataFrameColumn ReverseSubtract(ushort value, bool inPlace = false) + { + decimal convertedValue = (decimal)value; + return ReverseSubtractImplementation(convertedValue, inPlace); + } + public DecimalDataFrameColumn Multiply(ushort value, bool inPlace = false) + { + decimal convertedValue = (decimal)value; + return MultiplyImplementation(convertedValue, inPlace); + } + public DecimalDataFrameColumn ReverseMultiply(ushort value, bool inPlace = false) + { + decimal convertedValue = (decimal)value; + return ReverseMultiplyImplementation(convertedValue, inPlace); + } + public DecimalDataFrameColumn Divide(ushort value, bool inPlace = false) + { + decimal convertedValue = (decimal)value; + return DivideImplementation(convertedValue, inPlace); + } + public DecimalDataFrameColumn ReverseDivide(ushort value, bool inPlace = false) + { + decimal convertedValue = (decimal)value; + return ReverseDivideImplementation(convertedValue, inPlace); + } + public DecimalDataFrameColumn Modulo(ushort value, bool inPlace = false) + { + decimal convertedValue = (decimal)value; + return ModuloImplementation(convertedValue, inPlace); + } + public DecimalDataFrameColumn ReverseModulo(ushort value, bool inPlace = false) + { + decimal convertedValue = (decimal)value; + return ReverseModuloImplementation(convertedValue, inPlace); + } + } + public partial class DoubleDataFrameColumn + { + public DoubleDataFrameColumn Add(byte value, bool inPlace = false) + { + double convertedValue = (double)value; + return AddImplementation(convertedValue, inPlace); + } + public DoubleDataFrameColumn ReverseAdd(byte value, bool inPlace = false) + { + double convertedValue = (double)value; + return ReverseAddImplementation(convertedValue, inPlace); + } + public DoubleDataFrameColumn Subtract(byte value, bool inPlace = false) + { + double convertedValue = (double)value; + return SubtractImplementation(convertedValue, inPlace); + } + public DoubleDataFrameColumn ReverseSubtract(byte value, bool inPlace = false) + { + double convertedValue = (double)value; + return ReverseSubtractImplementation(convertedValue, inPlace); + } + public DoubleDataFrameColumn Multiply(byte value, bool inPlace = false) + { + double convertedValue = (double)value; + return MultiplyImplementation(convertedValue, inPlace); + } + public DoubleDataFrameColumn ReverseMultiply(byte value, bool inPlace = false) + { + double convertedValue = (double)value; + return ReverseMultiplyImplementation(convertedValue, inPlace); + } + public DoubleDataFrameColumn Divide(byte value, bool inPlace = false) + { + double convertedValue = (double)value; + return DivideImplementation(convertedValue, inPlace); + } + public DoubleDataFrameColumn ReverseDivide(byte value, bool inPlace = false) + { + double convertedValue = (double)value; + return ReverseDivideImplementation(convertedValue, inPlace); + } + public DoubleDataFrameColumn Modulo(byte value, bool inPlace = false) + { + double convertedValue = (double)value; + return ModuloImplementation(convertedValue, inPlace); + } + public DoubleDataFrameColumn ReverseModulo(byte value, bool inPlace = false) + { + double convertedValue = (double)value; + return ReverseModuloImplementation(convertedValue, inPlace); + } + public DoubleDataFrameColumn Add(double value, bool inPlace = false) + { + return AddImplementation(value, inPlace); + } + public DoubleDataFrameColumn ReverseAdd(double value, bool inPlace = false) + { + return ReverseAddImplementation(value, inPlace); + } + public DoubleDataFrameColumn Subtract(double value, bool inPlace = false) + { + return SubtractImplementation(value, inPlace); + } + public DoubleDataFrameColumn ReverseSubtract(double value, bool inPlace = false) + { + return ReverseSubtractImplementation(value, inPlace); + } + public DoubleDataFrameColumn Multiply(double value, bool inPlace = false) + { + return MultiplyImplementation(value, inPlace); + } + public DoubleDataFrameColumn ReverseMultiply(double value, bool inPlace = false) + { + return ReverseMultiplyImplementation(value, inPlace); + } + public DoubleDataFrameColumn Divide(double value, bool inPlace = false) + { + return DivideImplementation(value, inPlace); + } + public DoubleDataFrameColumn ReverseDivide(double value, bool inPlace = false) + { + return ReverseDivideImplementation(value, inPlace); + } + public DoubleDataFrameColumn Modulo(double value, bool inPlace = false) + { + return ModuloImplementation(value, inPlace); + } + public DoubleDataFrameColumn ReverseModulo(double value, bool inPlace = false) + { + return ReverseModuloImplementation(value, inPlace); + } + public DoubleDataFrameColumn Add(float value, bool inPlace = false) + { + double convertedValue = (double)value; + return AddImplementation(convertedValue, inPlace); + } + public DoubleDataFrameColumn ReverseAdd(float value, bool inPlace = false) + { + double convertedValue = (double)value; + return ReverseAddImplementation(convertedValue, inPlace); + } + public DoubleDataFrameColumn Subtract(float value, bool inPlace = false) + { + double convertedValue = (double)value; + return SubtractImplementation(convertedValue, inPlace); + } + public DoubleDataFrameColumn ReverseSubtract(float value, bool inPlace = false) + { + double convertedValue = (double)value; + return ReverseSubtractImplementation(convertedValue, inPlace); + } + public DoubleDataFrameColumn Multiply(float value, bool inPlace = false) + { + double convertedValue = (double)value; + return MultiplyImplementation(convertedValue, inPlace); + } + public DoubleDataFrameColumn ReverseMultiply(float value, bool inPlace = false) + { + double convertedValue = (double)value; + return ReverseMultiplyImplementation(convertedValue, inPlace); + } + public DoubleDataFrameColumn Divide(float value, bool inPlace = false) + { + double convertedValue = (double)value; + return DivideImplementation(convertedValue, inPlace); + } + public DoubleDataFrameColumn ReverseDivide(float value, bool inPlace = false) + { + double convertedValue = (double)value; + return ReverseDivideImplementation(convertedValue, inPlace); + } + public DoubleDataFrameColumn Modulo(float value, bool inPlace = false) + { + double convertedValue = (double)value; + return ModuloImplementation(convertedValue, inPlace); + } + public DoubleDataFrameColumn ReverseModulo(float value, bool inPlace = false) + { + double convertedValue = (double)value; + return ReverseModuloImplementation(convertedValue, inPlace); + } + public DoubleDataFrameColumn Add(int value, bool inPlace = false) + { + double convertedValue = (double)value; + return AddImplementation(convertedValue, inPlace); + } + public DoubleDataFrameColumn ReverseAdd(int value, bool inPlace = false) + { + double convertedValue = (double)value; + return ReverseAddImplementation(convertedValue, inPlace); + } + public DoubleDataFrameColumn Subtract(int value, bool inPlace = false) + { + double convertedValue = (double)value; + return SubtractImplementation(convertedValue, inPlace); + } + public DoubleDataFrameColumn ReverseSubtract(int value, bool inPlace = false) + { + double convertedValue = (double)value; + return ReverseSubtractImplementation(convertedValue, inPlace); + } + public DoubleDataFrameColumn Multiply(int value, bool inPlace = false) + { + double convertedValue = (double)value; + return MultiplyImplementation(convertedValue, inPlace); + } + public DoubleDataFrameColumn ReverseMultiply(int value, bool inPlace = false) + { + double convertedValue = (double)value; + return ReverseMultiplyImplementation(convertedValue, inPlace); + } + public DoubleDataFrameColumn Divide(int value, bool inPlace = false) + { + double convertedValue = (double)value; + return DivideImplementation(convertedValue, inPlace); + } + public DoubleDataFrameColumn ReverseDivide(int value, bool inPlace = false) + { + double convertedValue = (double)value; + return ReverseDivideImplementation(convertedValue, inPlace); + } + public DoubleDataFrameColumn Modulo(int value, bool inPlace = false) + { + double convertedValue = (double)value; + return ModuloImplementation(convertedValue, inPlace); + } + public DoubleDataFrameColumn ReverseModulo(int value, bool inPlace = false) + { + double convertedValue = (double)value; + return ReverseModuloImplementation(convertedValue, inPlace); + } + public DoubleDataFrameColumn Add(long value, bool inPlace = false) + { + double convertedValue = (double)value; + return AddImplementation(convertedValue, inPlace); + } + public DoubleDataFrameColumn ReverseAdd(long value, bool inPlace = false) + { + double convertedValue = (double)value; + return ReverseAddImplementation(convertedValue, inPlace); + } + public DoubleDataFrameColumn Subtract(long value, bool inPlace = false) + { + double convertedValue = (double)value; + return SubtractImplementation(convertedValue, inPlace); + } + public DoubleDataFrameColumn ReverseSubtract(long value, bool inPlace = false) + { + double convertedValue = (double)value; + return ReverseSubtractImplementation(convertedValue, inPlace); + } + public DoubleDataFrameColumn Multiply(long value, bool inPlace = false) + { + double convertedValue = (double)value; + return MultiplyImplementation(convertedValue, inPlace); + } + public DoubleDataFrameColumn ReverseMultiply(long value, bool inPlace = false) + { + double convertedValue = (double)value; + return ReverseMultiplyImplementation(convertedValue, inPlace); + } + public DoubleDataFrameColumn Divide(long value, bool inPlace = false) + { + double convertedValue = (double)value; + return DivideImplementation(convertedValue, inPlace); + } + public DoubleDataFrameColumn ReverseDivide(long value, bool inPlace = false) + { + double convertedValue = (double)value; + return ReverseDivideImplementation(convertedValue, inPlace); + } + public DoubleDataFrameColumn Modulo(long value, bool inPlace = false) + { + double convertedValue = (double)value; + return ModuloImplementation(convertedValue, inPlace); + } + public DoubleDataFrameColumn ReverseModulo(long value, bool inPlace = false) + { + double convertedValue = (double)value; + return ReverseModuloImplementation(convertedValue, inPlace); + } + public DoubleDataFrameColumn Add(sbyte value, bool inPlace = false) + { + double convertedValue = (double)value; + return AddImplementation(convertedValue, inPlace); + } + public DoubleDataFrameColumn ReverseAdd(sbyte value, bool inPlace = false) + { + double convertedValue = (double)value; + return ReverseAddImplementation(convertedValue, inPlace); + } + public DoubleDataFrameColumn Subtract(sbyte value, bool inPlace = false) + { + double convertedValue = (double)value; + return SubtractImplementation(convertedValue, inPlace); + } + public DoubleDataFrameColumn ReverseSubtract(sbyte value, bool inPlace = false) + { + double convertedValue = (double)value; + return ReverseSubtractImplementation(convertedValue, inPlace); + } + public DoubleDataFrameColumn Multiply(sbyte value, bool inPlace = false) + { + double convertedValue = (double)value; + return MultiplyImplementation(convertedValue, inPlace); + } + public DoubleDataFrameColumn ReverseMultiply(sbyte value, bool inPlace = false) + { + double convertedValue = (double)value; + return ReverseMultiplyImplementation(convertedValue, inPlace); + } + public DoubleDataFrameColumn Divide(sbyte value, bool inPlace = false) + { + double convertedValue = (double)value; + return DivideImplementation(convertedValue, inPlace); + } + public DoubleDataFrameColumn ReverseDivide(sbyte value, bool inPlace = false) + { + double convertedValue = (double)value; + return ReverseDivideImplementation(convertedValue, inPlace); + } + public DoubleDataFrameColumn Modulo(sbyte value, bool inPlace = false) + { + double convertedValue = (double)value; + return ModuloImplementation(convertedValue, inPlace); + } + public DoubleDataFrameColumn ReverseModulo(sbyte value, bool inPlace = false) + { + double convertedValue = (double)value; + return ReverseModuloImplementation(convertedValue, inPlace); + } + public DoubleDataFrameColumn Add(short value, bool inPlace = false) + { + double convertedValue = (double)value; + return AddImplementation(convertedValue, inPlace); + } + public DoubleDataFrameColumn ReverseAdd(short value, bool inPlace = false) + { + double convertedValue = (double)value; + return ReverseAddImplementation(convertedValue, inPlace); + } + public DoubleDataFrameColumn Subtract(short value, bool inPlace = false) + { + double convertedValue = (double)value; + return SubtractImplementation(convertedValue, inPlace); + } + public DoubleDataFrameColumn ReverseSubtract(short value, bool inPlace = false) + { + double convertedValue = (double)value; + return ReverseSubtractImplementation(convertedValue, inPlace); + } + public DoubleDataFrameColumn Multiply(short value, bool inPlace = false) + { + double convertedValue = (double)value; + return MultiplyImplementation(convertedValue, inPlace); + } + public DoubleDataFrameColumn ReverseMultiply(short value, bool inPlace = false) + { + double convertedValue = (double)value; + return ReverseMultiplyImplementation(convertedValue, inPlace); + } + public DoubleDataFrameColumn Divide(short value, bool inPlace = false) + { + double convertedValue = (double)value; + return DivideImplementation(convertedValue, inPlace); + } + public DoubleDataFrameColumn ReverseDivide(short value, bool inPlace = false) + { + double convertedValue = (double)value; + return ReverseDivideImplementation(convertedValue, inPlace); + } + public DoubleDataFrameColumn Modulo(short value, bool inPlace = false) + { + double convertedValue = (double)value; + return ModuloImplementation(convertedValue, inPlace); + } + public DoubleDataFrameColumn ReverseModulo(short value, bool inPlace = false) + { + double convertedValue = (double)value; + return ReverseModuloImplementation(convertedValue, inPlace); + } + public DoubleDataFrameColumn Add(uint value, bool inPlace = false) + { + double convertedValue = (double)value; + return AddImplementation(convertedValue, inPlace); + } + public DoubleDataFrameColumn ReverseAdd(uint value, bool inPlace = false) + { + double convertedValue = (double)value; + return ReverseAddImplementation(convertedValue, inPlace); + } + public DoubleDataFrameColumn Subtract(uint value, bool inPlace = false) + { + double convertedValue = (double)value; + return SubtractImplementation(convertedValue, inPlace); + } + public DoubleDataFrameColumn ReverseSubtract(uint value, bool inPlace = false) + { + double convertedValue = (double)value; + return ReverseSubtractImplementation(convertedValue, inPlace); + } + public DoubleDataFrameColumn Multiply(uint value, bool inPlace = false) + { + double convertedValue = (double)value; + return MultiplyImplementation(convertedValue, inPlace); + } + public DoubleDataFrameColumn ReverseMultiply(uint value, bool inPlace = false) + { + double convertedValue = (double)value; + return ReverseMultiplyImplementation(convertedValue, inPlace); + } + public DoubleDataFrameColumn Divide(uint value, bool inPlace = false) + { + double convertedValue = (double)value; + return DivideImplementation(convertedValue, inPlace); + } + public DoubleDataFrameColumn ReverseDivide(uint value, bool inPlace = false) + { + double convertedValue = (double)value; + return ReverseDivideImplementation(convertedValue, inPlace); + } + public DoubleDataFrameColumn Modulo(uint value, bool inPlace = false) + { + double convertedValue = (double)value; + return ModuloImplementation(convertedValue, inPlace); + } + public DoubleDataFrameColumn ReverseModulo(uint value, bool inPlace = false) + { + double convertedValue = (double)value; + return ReverseModuloImplementation(convertedValue, inPlace); + } + public DoubleDataFrameColumn Add(ulong value, bool inPlace = false) + { + double convertedValue = (double)value; + return AddImplementation(convertedValue, inPlace); + } + public DoubleDataFrameColumn ReverseAdd(ulong value, bool inPlace = false) + { + double convertedValue = (double)value; + return ReverseAddImplementation(convertedValue, inPlace); + } + public DoubleDataFrameColumn Subtract(ulong value, bool inPlace = false) + { + double convertedValue = (double)value; + return SubtractImplementation(convertedValue, inPlace); + } + public DoubleDataFrameColumn ReverseSubtract(ulong value, bool inPlace = false) + { + double convertedValue = (double)value; + return ReverseSubtractImplementation(convertedValue, inPlace); + } + public DoubleDataFrameColumn Multiply(ulong value, bool inPlace = false) + { + double convertedValue = (double)value; + return MultiplyImplementation(convertedValue, inPlace); + } + public DoubleDataFrameColumn ReverseMultiply(ulong value, bool inPlace = false) + { + double convertedValue = (double)value; + return ReverseMultiplyImplementation(convertedValue, inPlace); + } + public DoubleDataFrameColumn Divide(ulong value, bool inPlace = false) + { + double convertedValue = (double)value; + return DivideImplementation(convertedValue, inPlace); + } + public DoubleDataFrameColumn ReverseDivide(ulong value, bool inPlace = false) + { + double convertedValue = (double)value; + return ReverseDivideImplementation(convertedValue, inPlace); + } + public DoubleDataFrameColumn Modulo(ulong value, bool inPlace = false) + { + double convertedValue = (double)value; + return ModuloImplementation(convertedValue, inPlace); + } + public DoubleDataFrameColumn ReverseModulo(ulong value, bool inPlace = false) + { + double convertedValue = (double)value; + return ReverseModuloImplementation(convertedValue, inPlace); + } + public DoubleDataFrameColumn Add(ushort value, bool inPlace = false) + { + double convertedValue = (double)value; + return AddImplementation(convertedValue, inPlace); + } + public DoubleDataFrameColumn ReverseAdd(ushort value, bool inPlace = false) + { + double convertedValue = (double)value; + return ReverseAddImplementation(convertedValue, inPlace); + } + public DoubleDataFrameColumn Subtract(ushort value, bool inPlace = false) + { + double convertedValue = (double)value; + return SubtractImplementation(convertedValue, inPlace); + } + public DoubleDataFrameColumn ReverseSubtract(ushort value, bool inPlace = false) + { + double convertedValue = (double)value; + return ReverseSubtractImplementation(convertedValue, inPlace); + } + public DoubleDataFrameColumn Multiply(ushort value, bool inPlace = false) + { + double convertedValue = (double)value; + return MultiplyImplementation(convertedValue, inPlace); + } + public DoubleDataFrameColumn ReverseMultiply(ushort value, bool inPlace = false) + { + double convertedValue = (double)value; + return ReverseMultiplyImplementation(convertedValue, inPlace); + } + public DoubleDataFrameColumn Divide(ushort value, bool inPlace = false) + { + double convertedValue = (double)value; + return DivideImplementation(convertedValue, inPlace); + } + public DoubleDataFrameColumn ReverseDivide(ushort value, bool inPlace = false) + { + double convertedValue = (double)value; + return ReverseDivideImplementation(convertedValue, inPlace); + } + public DoubleDataFrameColumn Modulo(ushort value, bool inPlace = false) + { + double convertedValue = (double)value; + return ModuloImplementation(convertedValue, inPlace); + } + public DoubleDataFrameColumn ReverseModulo(ushort value, bool inPlace = false) + { + double convertedValue = (double)value; + return ReverseModuloImplementation(convertedValue, inPlace); + } + } + public partial class SingleDataFrameColumn + { + public SingleDataFrameColumn Add(byte value, bool inPlace = false) + { + float convertedValue = (float)value; + return AddImplementation(convertedValue, inPlace); + } + public SingleDataFrameColumn ReverseAdd(byte value, bool inPlace = false) + { + float convertedValue = (float)value; + return ReverseAddImplementation(convertedValue, inPlace); + } + public SingleDataFrameColumn Subtract(byte value, bool inPlace = false) + { + float convertedValue = (float)value; + return SubtractImplementation(convertedValue, inPlace); + } + public SingleDataFrameColumn ReverseSubtract(byte value, bool inPlace = false) + { + float convertedValue = (float)value; + return ReverseSubtractImplementation(convertedValue, inPlace); + } + public SingleDataFrameColumn Multiply(byte value, bool inPlace = false) + { + float convertedValue = (float)value; + return MultiplyImplementation(convertedValue, inPlace); + } + public SingleDataFrameColumn ReverseMultiply(byte value, bool inPlace = false) + { + float convertedValue = (float)value; + return ReverseMultiplyImplementation(convertedValue, inPlace); + } + public SingleDataFrameColumn Divide(byte value, bool inPlace = false) + { + float convertedValue = (float)value; + return DivideImplementation(convertedValue, inPlace); + } + public SingleDataFrameColumn ReverseDivide(byte value, bool inPlace = false) + { + float convertedValue = (float)value; + return ReverseDivideImplementation(convertedValue, inPlace); + } + public SingleDataFrameColumn Modulo(byte value, bool inPlace = false) + { + float convertedValue = (float)value; + return ModuloImplementation(convertedValue, inPlace); + } + public SingleDataFrameColumn ReverseModulo(byte value, bool inPlace = false) + { + float convertedValue = (float)value; + return ReverseModuloImplementation(convertedValue, inPlace); + } + public DoubleDataFrameColumn Add(double value) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.AddImplementation(value, inPlace: true); + } + public DoubleDataFrameColumn ReverseAdd(double value) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.ReverseAddImplementation(value, inPlace: true); + } + public DoubleDataFrameColumn Subtract(double value) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.SubtractImplementation(value, inPlace: true); + } + public DoubleDataFrameColumn ReverseSubtract(double value) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.ReverseSubtractImplementation(value, inPlace: true); + } + public DoubleDataFrameColumn Multiply(double value) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.MultiplyImplementation(value, inPlace: true); + } + public DoubleDataFrameColumn ReverseMultiply(double value) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.ReverseMultiplyImplementation(value, inPlace: true); + } + public DoubleDataFrameColumn Divide(double value) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.DivideImplementation(value, inPlace: true); + } + public DoubleDataFrameColumn ReverseDivide(double value) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.ReverseDivideImplementation(value, inPlace: true); + } + public DoubleDataFrameColumn Modulo(double value) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.ModuloImplementation(value, inPlace: true); + } + public DoubleDataFrameColumn ReverseModulo(double value) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.ReverseModuloImplementation(value, inPlace: true); + } + public SingleDataFrameColumn Add(float value, bool inPlace = false) + { + return AddImplementation(value, inPlace); + } + public SingleDataFrameColumn ReverseAdd(float value, bool inPlace = false) + { + return ReverseAddImplementation(value, inPlace); + } + public SingleDataFrameColumn Subtract(float value, bool inPlace = false) + { + return SubtractImplementation(value, inPlace); + } + public SingleDataFrameColumn ReverseSubtract(float value, bool inPlace = false) + { + return ReverseSubtractImplementation(value, inPlace); + } + public SingleDataFrameColumn Multiply(float value, bool inPlace = false) + { + return MultiplyImplementation(value, inPlace); + } + public SingleDataFrameColumn ReverseMultiply(float value, bool inPlace = false) + { + return ReverseMultiplyImplementation(value, inPlace); + } + public SingleDataFrameColumn Divide(float value, bool inPlace = false) + { + return DivideImplementation(value, inPlace); + } + public SingleDataFrameColumn ReverseDivide(float value, bool inPlace = false) + { + return ReverseDivideImplementation(value, inPlace); + } + public SingleDataFrameColumn Modulo(float value, bool inPlace = false) + { + return ModuloImplementation(value, inPlace); + } + public SingleDataFrameColumn ReverseModulo(float value, bool inPlace = false) + { + return ReverseModuloImplementation(value, inPlace); + } + public SingleDataFrameColumn Add(int value, bool inPlace = false) + { + float convertedValue = (float)value; + return AddImplementation(convertedValue, inPlace); + } + public SingleDataFrameColumn ReverseAdd(int value, bool inPlace = false) + { + float convertedValue = (float)value; + return ReverseAddImplementation(convertedValue, inPlace); + } + public SingleDataFrameColumn Subtract(int value, bool inPlace = false) + { + float convertedValue = (float)value; + return SubtractImplementation(convertedValue, inPlace); + } + public SingleDataFrameColumn ReverseSubtract(int value, bool inPlace = false) + { + float convertedValue = (float)value; + return ReverseSubtractImplementation(convertedValue, inPlace); + } + public SingleDataFrameColumn Multiply(int value, bool inPlace = false) + { + float convertedValue = (float)value; + return MultiplyImplementation(convertedValue, inPlace); + } + public SingleDataFrameColumn ReverseMultiply(int value, bool inPlace = false) + { + float convertedValue = (float)value; + return ReverseMultiplyImplementation(convertedValue, inPlace); + } + public SingleDataFrameColumn Divide(int value, bool inPlace = false) + { + float convertedValue = (float)value; + return DivideImplementation(convertedValue, inPlace); + } + public SingleDataFrameColumn ReverseDivide(int value, bool inPlace = false) + { + float convertedValue = (float)value; + return ReverseDivideImplementation(convertedValue, inPlace); + } + public SingleDataFrameColumn Modulo(int value, bool inPlace = false) + { + float convertedValue = (float)value; + return ModuloImplementation(convertedValue, inPlace); + } + public SingleDataFrameColumn ReverseModulo(int value, bool inPlace = false) + { + float convertedValue = (float)value; + return ReverseModuloImplementation(convertedValue, inPlace); + } + public SingleDataFrameColumn Add(long value, bool inPlace = false) + { + float convertedValue = (float)value; + return AddImplementation(convertedValue, inPlace); + } + public SingleDataFrameColumn ReverseAdd(long value, bool inPlace = false) + { + float convertedValue = (float)value; + return ReverseAddImplementation(convertedValue, inPlace); + } + public SingleDataFrameColumn Subtract(long value, bool inPlace = false) + { + float convertedValue = (float)value; + return SubtractImplementation(convertedValue, inPlace); + } + public SingleDataFrameColumn ReverseSubtract(long value, bool inPlace = false) + { + float convertedValue = (float)value; + return ReverseSubtractImplementation(convertedValue, inPlace); + } + public SingleDataFrameColumn Multiply(long value, bool inPlace = false) + { + float convertedValue = (float)value; + return MultiplyImplementation(convertedValue, inPlace); + } + public SingleDataFrameColumn ReverseMultiply(long value, bool inPlace = false) + { + float convertedValue = (float)value; + return ReverseMultiplyImplementation(convertedValue, inPlace); + } + public SingleDataFrameColumn Divide(long value, bool inPlace = false) + { + float convertedValue = (float)value; + return DivideImplementation(convertedValue, inPlace); + } + public SingleDataFrameColumn ReverseDivide(long value, bool inPlace = false) + { + float convertedValue = (float)value; + return ReverseDivideImplementation(convertedValue, inPlace); + } + public SingleDataFrameColumn Modulo(long value, bool inPlace = false) + { + float convertedValue = (float)value; + return ModuloImplementation(convertedValue, inPlace); + } + public SingleDataFrameColumn ReverseModulo(long value, bool inPlace = false) + { + float convertedValue = (float)value; + return ReverseModuloImplementation(convertedValue, inPlace); + } + public SingleDataFrameColumn Add(sbyte value, bool inPlace = false) + { + float convertedValue = (float)value; + return AddImplementation(convertedValue, inPlace); + } + public SingleDataFrameColumn ReverseAdd(sbyte value, bool inPlace = false) + { + float convertedValue = (float)value; + return ReverseAddImplementation(convertedValue, inPlace); + } + public SingleDataFrameColumn Subtract(sbyte value, bool inPlace = false) + { + float convertedValue = (float)value; + return SubtractImplementation(convertedValue, inPlace); + } + public SingleDataFrameColumn ReverseSubtract(sbyte value, bool inPlace = false) + { + float convertedValue = (float)value; + return ReverseSubtractImplementation(convertedValue, inPlace); + } + public SingleDataFrameColumn Multiply(sbyte value, bool inPlace = false) + { + float convertedValue = (float)value; + return MultiplyImplementation(convertedValue, inPlace); + } + public SingleDataFrameColumn ReverseMultiply(sbyte value, bool inPlace = false) + { + float convertedValue = (float)value; + return ReverseMultiplyImplementation(convertedValue, inPlace); + } + public SingleDataFrameColumn Divide(sbyte value, bool inPlace = false) + { + float convertedValue = (float)value; + return DivideImplementation(convertedValue, inPlace); + } + public SingleDataFrameColumn ReverseDivide(sbyte value, bool inPlace = false) + { + float convertedValue = (float)value; + return ReverseDivideImplementation(convertedValue, inPlace); + } + public SingleDataFrameColumn Modulo(sbyte value, bool inPlace = false) + { + float convertedValue = (float)value; + return ModuloImplementation(convertedValue, inPlace); + } + public SingleDataFrameColumn ReverseModulo(sbyte value, bool inPlace = false) + { + float convertedValue = (float)value; + return ReverseModuloImplementation(convertedValue, inPlace); + } + public SingleDataFrameColumn Add(short value, bool inPlace = false) + { + float convertedValue = (float)value; + return AddImplementation(convertedValue, inPlace); + } + public SingleDataFrameColumn ReverseAdd(short value, bool inPlace = false) + { + float convertedValue = (float)value; + return ReverseAddImplementation(convertedValue, inPlace); + } + public SingleDataFrameColumn Subtract(short value, bool inPlace = false) + { + float convertedValue = (float)value; + return SubtractImplementation(convertedValue, inPlace); + } + public SingleDataFrameColumn ReverseSubtract(short value, bool inPlace = false) + { + float convertedValue = (float)value; + return ReverseSubtractImplementation(convertedValue, inPlace); + } + public SingleDataFrameColumn Multiply(short value, bool inPlace = false) + { + float convertedValue = (float)value; + return MultiplyImplementation(convertedValue, inPlace); + } + public SingleDataFrameColumn ReverseMultiply(short value, bool inPlace = false) + { + float convertedValue = (float)value; + return ReverseMultiplyImplementation(convertedValue, inPlace); + } + public SingleDataFrameColumn Divide(short value, bool inPlace = false) + { + float convertedValue = (float)value; + return DivideImplementation(convertedValue, inPlace); + } + public SingleDataFrameColumn ReverseDivide(short value, bool inPlace = false) + { + float convertedValue = (float)value; + return ReverseDivideImplementation(convertedValue, inPlace); + } + public SingleDataFrameColumn Modulo(short value, bool inPlace = false) + { + float convertedValue = (float)value; + return ModuloImplementation(convertedValue, inPlace); + } + public SingleDataFrameColumn ReverseModulo(short value, bool inPlace = false) + { + float convertedValue = (float)value; + return ReverseModuloImplementation(convertedValue, inPlace); + } + public SingleDataFrameColumn Add(uint value, bool inPlace = false) + { + float convertedValue = (float)value; + return AddImplementation(convertedValue, inPlace); + } + public SingleDataFrameColumn ReverseAdd(uint value, bool inPlace = false) + { + float convertedValue = (float)value; + return ReverseAddImplementation(convertedValue, inPlace); + } + public SingleDataFrameColumn Subtract(uint value, bool inPlace = false) + { + float convertedValue = (float)value; + return SubtractImplementation(convertedValue, inPlace); + } + public SingleDataFrameColumn ReverseSubtract(uint value, bool inPlace = false) + { + float convertedValue = (float)value; + return ReverseSubtractImplementation(convertedValue, inPlace); + } + public SingleDataFrameColumn Multiply(uint value, bool inPlace = false) + { + float convertedValue = (float)value; + return MultiplyImplementation(convertedValue, inPlace); + } + public SingleDataFrameColumn ReverseMultiply(uint value, bool inPlace = false) + { + float convertedValue = (float)value; + return ReverseMultiplyImplementation(convertedValue, inPlace); + } + public SingleDataFrameColumn Divide(uint value, bool inPlace = false) + { + float convertedValue = (float)value; + return DivideImplementation(convertedValue, inPlace); + } + public SingleDataFrameColumn ReverseDivide(uint value, bool inPlace = false) + { + float convertedValue = (float)value; + return ReverseDivideImplementation(convertedValue, inPlace); + } + public SingleDataFrameColumn Modulo(uint value, bool inPlace = false) + { + float convertedValue = (float)value; + return ModuloImplementation(convertedValue, inPlace); + } + public SingleDataFrameColumn ReverseModulo(uint value, bool inPlace = false) + { + float convertedValue = (float)value; + return ReverseModuloImplementation(convertedValue, inPlace); + } + public SingleDataFrameColumn Add(ulong value, bool inPlace = false) + { + float convertedValue = (float)value; + return AddImplementation(convertedValue, inPlace); + } + public SingleDataFrameColumn ReverseAdd(ulong value, bool inPlace = false) + { + float convertedValue = (float)value; + return ReverseAddImplementation(convertedValue, inPlace); + } + public SingleDataFrameColumn Subtract(ulong value, bool inPlace = false) + { + float convertedValue = (float)value; + return SubtractImplementation(convertedValue, inPlace); + } + public SingleDataFrameColumn ReverseSubtract(ulong value, bool inPlace = false) + { + float convertedValue = (float)value; + return ReverseSubtractImplementation(convertedValue, inPlace); + } + public SingleDataFrameColumn Multiply(ulong value, bool inPlace = false) + { + float convertedValue = (float)value; + return MultiplyImplementation(convertedValue, inPlace); + } + public SingleDataFrameColumn ReverseMultiply(ulong value, bool inPlace = false) + { + float convertedValue = (float)value; + return ReverseMultiplyImplementation(convertedValue, inPlace); + } + public SingleDataFrameColumn Divide(ulong value, bool inPlace = false) + { + float convertedValue = (float)value; + return DivideImplementation(convertedValue, inPlace); + } + public SingleDataFrameColumn ReverseDivide(ulong value, bool inPlace = false) + { + float convertedValue = (float)value; + return ReverseDivideImplementation(convertedValue, inPlace); + } + public SingleDataFrameColumn Modulo(ulong value, bool inPlace = false) + { + float convertedValue = (float)value; + return ModuloImplementation(convertedValue, inPlace); + } + public SingleDataFrameColumn ReverseModulo(ulong value, bool inPlace = false) + { + float convertedValue = (float)value; + return ReverseModuloImplementation(convertedValue, inPlace); + } + public SingleDataFrameColumn Add(ushort value, bool inPlace = false) + { + float convertedValue = (float)value; + return AddImplementation(convertedValue, inPlace); + } + public SingleDataFrameColumn ReverseAdd(ushort value, bool inPlace = false) + { + float convertedValue = (float)value; + return ReverseAddImplementation(convertedValue, inPlace); + } + public SingleDataFrameColumn Subtract(ushort value, bool inPlace = false) + { + float convertedValue = (float)value; + return SubtractImplementation(convertedValue, inPlace); + } + public SingleDataFrameColumn ReverseSubtract(ushort value, bool inPlace = false) + { + float convertedValue = (float)value; + return ReverseSubtractImplementation(convertedValue, inPlace); + } + public SingleDataFrameColumn Multiply(ushort value, bool inPlace = false) + { + float convertedValue = (float)value; + return MultiplyImplementation(convertedValue, inPlace); + } + public SingleDataFrameColumn ReverseMultiply(ushort value, bool inPlace = false) + { + float convertedValue = (float)value; + return ReverseMultiplyImplementation(convertedValue, inPlace); + } + public SingleDataFrameColumn Divide(ushort value, bool inPlace = false) + { + float convertedValue = (float)value; + return DivideImplementation(convertedValue, inPlace); + } + public SingleDataFrameColumn ReverseDivide(ushort value, bool inPlace = false) + { + float convertedValue = (float)value; + return ReverseDivideImplementation(convertedValue, inPlace); + } + public SingleDataFrameColumn Modulo(ushort value, bool inPlace = false) + { + float convertedValue = (float)value; + return ModuloImplementation(convertedValue, inPlace); + } + public SingleDataFrameColumn ReverseModulo(ushort value, bool inPlace = false) + { + float convertedValue = (float)value; + return ReverseModuloImplementation(convertedValue, inPlace); + } + } + public partial class Int32DataFrameColumn + { + public Int32DataFrameColumn Add(byte value, bool inPlace = false) + { + int convertedValue = (int)value; + return AddImplementation(convertedValue, inPlace); + } + public Int32DataFrameColumn ReverseAdd(byte value, bool inPlace = false) + { + int convertedValue = (int)value; + return ReverseAddImplementation(convertedValue, inPlace); + } + public Int32DataFrameColumn Subtract(byte value, bool inPlace = false) + { + int convertedValue = (int)value; + return SubtractImplementation(convertedValue, inPlace); + } + public Int32DataFrameColumn ReverseSubtract(byte value, bool inPlace = false) + { + int convertedValue = (int)value; + return ReverseSubtractImplementation(convertedValue, inPlace); + } + public Int32DataFrameColumn Multiply(byte value, bool inPlace = false) + { + int convertedValue = (int)value; + return MultiplyImplementation(convertedValue, inPlace); + } + public Int32DataFrameColumn ReverseMultiply(byte value, bool inPlace = false) + { + int convertedValue = (int)value; + return ReverseMultiplyImplementation(convertedValue, inPlace); + } + public Int32DataFrameColumn Divide(byte value, bool inPlace = false) + { + int convertedValue = (int)value; + return DivideImplementation(convertedValue, inPlace); + } + public Int32DataFrameColumn ReverseDivide(byte value, bool inPlace = false) + { + int convertedValue = (int)value; + return ReverseDivideImplementation(convertedValue, inPlace); + } + public Int32DataFrameColumn Modulo(byte value, bool inPlace = false) + { + int convertedValue = (int)value; + return ModuloImplementation(convertedValue, inPlace); + } + public Int32DataFrameColumn ReverseModulo(byte value, bool inPlace = false) + { + int convertedValue = (int)value; + return ReverseModuloImplementation(convertedValue, inPlace); + } + public DecimalDataFrameColumn Add(decimal value) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.AddImplementation(value, inPlace: true); + } + public DecimalDataFrameColumn ReverseAdd(decimal value) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.ReverseAddImplementation(value, inPlace: true); + } + public DecimalDataFrameColumn Subtract(decimal value) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.SubtractImplementation(value, inPlace: true); + } + public DecimalDataFrameColumn ReverseSubtract(decimal value) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.ReverseSubtractImplementation(value, inPlace: true); + } + public DecimalDataFrameColumn Multiply(decimal value) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.MultiplyImplementation(value, inPlace: true); + } + public DecimalDataFrameColumn ReverseMultiply(decimal value) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.ReverseMultiplyImplementation(value, inPlace: true); + } + public DecimalDataFrameColumn Divide(decimal value) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.DivideImplementation(value, inPlace: true); + } + public DecimalDataFrameColumn ReverseDivide(decimal value) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.ReverseDivideImplementation(value, inPlace: true); + } + public DecimalDataFrameColumn Modulo(decimal value) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.ModuloImplementation(value, inPlace: true); + } + public DecimalDataFrameColumn ReverseModulo(decimal value) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.ReverseModuloImplementation(value, inPlace: true); + } + public DoubleDataFrameColumn Add(double value) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.AddImplementation(value, inPlace: true); + } + public DoubleDataFrameColumn ReverseAdd(double value) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.ReverseAddImplementation(value, inPlace: true); + } + public DoubleDataFrameColumn Subtract(double value) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.SubtractImplementation(value, inPlace: true); + } + public DoubleDataFrameColumn ReverseSubtract(double value) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.ReverseSubtractImplementation(value, inPlace: true); + } + public DoubleDataFrameColumn Multiply(double value) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.MultiplyImplementation(value, inPlace: true); + } + public DoubleDataFrameColumn ReverseMultiply(double value) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.ReverseMultiplyImplementation(value, inPlace: true); + } + public DoubleDataFrameColumn Divide(double value) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.DivideImplementation(value, inPlace: true); + } + public DoubleDataFrameColumn ReverseDivide(double value) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.ReverseDivideImplementation(value, inPlace: true); + } + public DoubleDataFrameColumn Modulo(double value) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.ModuloImplementation(value, inPlace: true); + } + public DoubleDataFrameColumn ReverseModulo(double value) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.ReverseModuloImplementation(value, inPlace: true); + } + public SingleDataFrameColumn Add(float value) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.AddImplementation(value, inPlace: true); + } + public SingleDataFrameColumn ReverseAdd(float value) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.ReverseAddImplementation(value, inPlace: true); + } + public SingleDataFrameColumn Subtract(float value) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.SubtractImplementation(value, inPlace: true); + } + public SingleDataFrameColumn ReverseSubtract(float value) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.ReverseSubtractImplementation(value, inPlace: true); + } + public SingleDataFrameColumn Multiply(float value) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.MultiplyImplementation(value, inPlace: true); + } + public SingleDataFrameColumn ReverseMultiply(float value) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.ReverseMultiplyImplementation(value, inPlace: true); + } + public SingleDataFrameColumn Divide(float value) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.DivideImplementation(value, inPlace: true); + } + public SingleDataFrameColumn ReverseDivide(float value) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.ReverseDivideImplementation(value, inPlace: true); + } + public SingleDataFrameColumn Modulo(float value) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.ModuloImplementation(value, inPlace: true); + } + public SingleDataFrameColumn ReverseModulo(float value) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.ReverseModuloImplementation(value, inPlace: true); + } + public Int32DataFrameColumn Add(int value, bool inPlace = false) + { + return AddImplementation(value, inPlace); + } + public Int32DataFrameColumn ReverseAdd(int value, bool inPlace = false) + { + return ReverseAddImplementation(value, inPlace); + } + public Int32DataFrameColumn Subtract(int value, bool inPlace = false) + { + return SubtractImplementation(value, inPlace); + } + public Int32DataFrameColumn ReverseSubtract(int value, bool inPlace = false) + { + return ReverseSubtractImplementation(value, inPlace); + } + public Int32DataFrameColumn Multiply(int value, bool inPlace = false) + { + return MultiplyImplementation(value, inPlace); + } + public Int32DataFrameColumn ReverseMultiply(int value, bool inPlace = false) + { + return ReverseMultiplyImplementation(value, inPlace); + } + public Int32DataFrameColumn Divide(int value, bool inPlace = false) + { + return DivideImplementation(value, inPlace); + } + public Int32DataFrameColumn ReverseDivide(int value, bool inPlace = false) + { + return ReverseDivideImplementation(value, inPlace); + } + public Int32DataFrameColumn Modulo(int value, bool inPlace = false) + { + return ModuloImplementation(value, inPlace); + } + public Int32DataFrameColumn ReverseModulo(int value, bool inPlace = false) + { + return ReverseModuloImplementation(value, inPlace); + } + public Int64DataFrameColumn Add(long value) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.AddImplementation(value, inPlace: true); + } + public Int64DataFrameColumn ReverseAdd(long value) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.ReverseAddImplementation(value, inPlace: true); + } + public Int64DataFrameColumn Subtract(long value) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.SubtractImplementation(value, inPlace: true); + } + public Int64DataFrameColumn ReverseSubtract(long value) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.ReverseSubtractImplementation(value, inPlace: true); + } + public Int64DataFrameColumn Multiply(long value) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.MultiplyImplementation(value, inPlace: true); + } + public Int64DataFrameColumn ReverseMultiply(long value) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.ReverseMultiplyImplementation(value, inPlace: true); + } + public Int64DataFrameColumn Divide(long value) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.DivideImplementation(value, inPlace: true); + } + public Int64DataFrameColumn ReverseDivide(long value) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.ReverseDivideImplementation(value, inPlace: true); + } + public Int64DataFrameColumn Modulo(long value) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.ModuloImplementation(value, inPlace: true); + } + public Int64DataFrameColumn ReverseModulo(long value) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.ReverseModuloImplementation(value, inPlace: true); + } + public Int32DataFrameColumn Add(sbyte value, bool inPlace = false) + { + int convertedValue = (int)value; + return AddImplementation(convertedValue, inPlace); + } + public Int32DataFrameColumn ReverseAdd(sbyte value, bool inPlace = false) + { + int convertedValue = (int)value; + return ReverseAddImplementation(convertedValue, inPlace); + } + public Int32DataFrameColumn Subtract(sbyte value, bool inPlace = false) + { + int convertedValue = (int)value; + return SubtractImplementation(convertedValue, inPlace); + } + public Int32DataFrameColumn ReverseSubtract(sbyte value, bool inPlace = false) + { + int convertedValue = (int)value; + return ReverseSubtractImplementation(convertedValue, inPlace); + } + public Int32DataFrameColumn Multiply(sbyte value, bool inPlace = false) + { + int convertedValue = (int)value; + return MultiplyImplementation(convertedValue, inPlace); + } + public Int32DataFrameColumn ReverseMultiply(sbyte value, bool inPlace = false) + { + int convertedValue = (int)value; + return ReverseMultiplyImplementation(convertedValue, inPlace); + } + public Int32DataFrameColumn Divide(sbyte value, bool inPlace = false) + { + int convertedValue = (int)value; + return DivideImplementation(convertedValue, inPlace); + } + public Int32DataFrameColumn ReverseDivide(sbyte value, bool inPlace = false) + { + int convertedValue = (int)value; + return ReverseDivideImplementation(convertedValue, inPlace); + } + public Int32DataFrameColumn Modulo(sbyte value, bool inPlace = false) + { + int convertedValue = (int)value; + return ModuloImplementation(convertedValue, inPlace); + } + public Int32DataFrameColumn ReverseModulo(sbyte value, bool inPlace = false) + { + int convertedValue = (int)value; + return ReverseModuloImplementation(convertedValue, inPlace); + } + public Int32DataFrameColumn Add(short value, bool inPlace = false) + { + int convertedValue = (int)value; + return AddImplementation(convertedValue, inPlace); + } + public Int32DataFrameColumn ReverseAdd(short value, bool inPlace = false) + { + int convertedValue = (int)value; + return ReverseAddImplementation(convertedValue, inPlace); + } + public Int32DataFrameColumn Subtract(short value, bool inPlace = false) + { + int convertedValue = (int)value; + return SubtractImplementation(convertedValue, inPlace); + } + public Int32DataFrameColumn ReverseSubtract(short value, bool inPlace = false) + { + int convertedValue = (int)value; + return ReverseSubtractImplementation(convertedValue, inPlace); + } + public Int32DataFrameColumn Multiply(short value, bool inPlace = false) + { + int convertedValue = (int)value; + return MultiplyImplementation(convertedValue, inPlace); + } + public Int32DataFrameColumn ReverseMultiply(short value, bool inPlace = false) + { + int convertedValue = (int)value; + return ReverseMultiplyImplementation(convertedValue, inPlace); + } + public Int32DataFrameColumn Divide(short value, bool inPlace = false) + { + int convertedValue = (int)value; + return DivideImplementation(convertedValue, inPlace); + } + public Int32DataFrameColumn ReverseDivide(short value, bool inPlace = false) + { + int convertedValue = (int)value; + return ReverseDivideImplementation(convertedValue, inPlace); + } + public Int32DataFrameColumn Modulo(short value, bool inPlace = false) + { + int convertedValue = (int)value; + return ModuloImplementation(convertedValue, inPlace); + } + public Int32DataFrameColumn ReverseModulo(short value, bool inPlace = false) + { + int convertedValue = (int)value; + return ReverseModuloImplementation(convertedValue, inPlace); + } + public Int64DataFrameColumn Add(uint value) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.AddImplementation(value, inPlace: true); + } + public Int64DataFrameColumn ReverseAdd(uint value) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.ReverseAddImplementation(value, inPlace: true); + } + public Int64DataFrameColumn Subtract(uint value) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.SubtractImplementation(value, inPlace: true); + } + public Int64DataFrameColumn ReverseSubtract(uint value) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.ReverseSubtractImplementation(value, inPlace: true); + } + public Int64DataFrameColumn Multiply(uint value) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.MultiplyImplementation(value, inPlace: true); + } + public Int64DataFrameColumn ReverseMultiply(uint value) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.ReverseMultiplyImplementation(value, inPlace: true); + } + public Int64DataFrameColumn Divide(uint value) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.DivideImplementation(value, inPlace: true); + } + public Int64DataFrameColumn ReverseDivide(uint value) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.ReverseDivideImplementation(value, inPlace: true); + } + public Int64DataFrameColumn Modulo(uint value) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.ModuloImplementation(value, inPlace: true); + } + public Int64DataFrameColumn ReverseModulo(uint value) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.ReverseModuloImplementation(value, inPlace: true); + } + public SingleDataFrameColumn Add(ulong value) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.AddImplementation(value, inPlace: true); + } + public SingleDataFrameColumn ReverseAdd(ulong value) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.ReverseAddImplementation(value, inPlace: true); + } + public SingleDataFrameColumn Subtract(ulong value) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.SubtractImplementation(value, inPlace: true); + } + public SingleDataFrameColumn ReverseSubtract(ulong value) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.ReverseSubtractImplementation(value, inPlace: true); + } + public SingleDataFrameColumn Multiply(ulong value) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.MultiplyImplementation(value, inPlace: true); + } + public SingleDataFrameColumn ReverseMultiply(ulong value) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.ReverseMultiplyImplementation(value, inPlace: true); + } + public SingleDataFrameColumn Divide(ulong value) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.DivideImplementation(value, inPlace: true); + } + public SingleDataFrameColumn ReverseDivide(ulong value) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.ReverseDivideImplementation(value, inPlace: true); + } + public SingleDataFrameColumn Modulo(ulong value) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.ModuloImplementation(value, inPlace: true); + } + public SingleDataFrameColumn ReverseModulo(ulong value) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.ReverseModuloImplementation(value, inPlace: true); + } + public Int32DataFrameColumn Add(ushort value, bool inPlace = false) + { + int convertedValue = (int)value; + return AddImplementation(convertedValue, inPlace); + } + public Int32DataFrameColumn ReverseAdd(ushort value, bool inPlace = false) + { + int convertedValue = (int)value; + return ReverseAddImplementation(convertedValue, inPlace); + } + public Int32DataFrameColumn Subtract(ushort value, bool inPlace = false) + { + int convertedValue = (int)value; + return SubtractImplementation(convertedValue, inPlace); + } + public Int32DataFrameColumn ReverseSubtract(ushort value, bool inPlace = false) + { + int convertedValue = (int)value; + return ReverseSubtractImplementation(convertedValue, inPlace); + } + public Int32DataFrameColumn Multiply(ushort value, bool inPlace = false) + { + int convertedValue = (int)value; + return MultiplyImplementation(convertedValue, inPlace); + } + public Int32DataFrameColumn ReverseMultiply(ushort value, bool inPlace = false) + { + int convertedValue = (int)value; + return ReverseMultiplyImplementation(convertedValue, inPlace); + } + public Int32DataFrameColumn Divide(ushort value, bool inPlace = false) + { + int convertedValue = (int)value; + return DivideImplementation(convertedValue, inPlace); + } + public Int32DataFrameColumn ReverseDivide(ushort value, bool inPlace = false) + { + int convertedValue = (int)value; + return ReverseDivideImplementation(convertedValue, inPlace); + } + public Int32DataFrameColumn Modulo(ushort value, bool inPlace = false) + { + int convertedValue = (int)value; + return ModuloImplementation(convertedValue, inPlace); + } + public Int32DataFrameColumn ReverseModulo(ushort value, bool inPlace = false) + { + int convertedValue = (int)value; + return ReverseModuloImplementation(convertedValue, inPlace); + } + } + public partial class Int64DataFrameColumn + { + public Int64DataFrameColumn Add(byte value, bool inPlace = false) + { + long convertedValue = (long)value; + return AddImplementation(convertedValue, inPlace); + } + public Int64DataFrameColumn ReverseAdd(byte value, bool inPlace = false) + { + long convertedValue = (long)value; + return ReverseAddImplementation(convertedValue, inPlace); + } + public Int64DataFrameColumn Subtract(byte value, bool inPlace = false) + { + long convertedValue = (long)value; + return SubtractImplementation(convertedValue, inPlace); + } + public Int64DataFrameColumn ReverseSubtract(byte value, bool inPlace = false) + { + long convertedValue = (long)value; + return ReverseSubtractImplementation(convertedValue, inPlace); + } + public Int64DataFrameColumn Multiply(byte value, bool inPlace = false) + { + long convertedValue = (long)value; + return MultiplyImplementation(convertedValue, inPlace); + } + public Int64DataFrameColumn ReverseMultiply(byte value, bool inPlace = false) + { + long convertedValue = (long)value; + return ReverseMultiplyImplementation(convertedValue, inPlace); + } + public Int64DataFrameColumn Divide(byte value, bool inPlace = false) + { + long convertedValue = (long)value; + return DivideImplementation(convertedValue, inPlace); + } + public Int64DataFrameColumn ReverseDivide(byte value, bool inPlace = false) + { + long convertedValue = (long)value; + return ReverseDivideImplementation(convertedValue, inPlace); + } + public Int64DataFrameColumn Modulo(byte value, bool inPlace = false) + { + long convertedValue = (long)value; + return ModuloImplementation(convertedValue, inPlace); + } + public Int64DataFrameColumn ReverseModulo(byte value, bool inPlace = false) + { + long convertedValue = (long)value; + return ReverseModuloImplementation(convertedValue, inPlace); + } + public DecimalDataFrameColumn Add(decimal value) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.AddImplementation(value, inPlace: true); + } + public DecimalDataFrameColumn ReverseAdd(decimal value) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.ReverseAddImplementation(value, inPlace: true); + } + public DecimalDataFrameColumn Subtract(decimal value) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.SubtractImplementation(value, inPlace: true); + } + public DecimalDataFrameColumn ReverseSubtract(decimal value) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.ReverseSubtractImplementation(value, inPlace: true); + } + public DecimalDataFrameColumn Multiply(decimal value) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.MultiplyImplementation(value, inPlace: true); + } + public DecimalDataFrameColumn ReverseMultiply(decimal value) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.ReverseMultiplyImplementation(value, inPlace: true); + } + public DecimalDataFrameColumn Divide(decimal value) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.DivideImplementation(value, inPlace: true); + } + public DecimalDataFrameColumn ReverseDivide(decimal value) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.ReverseDivideImplementation(value, inPlace: true); + } + public DecimalDataFrameColumn Modulo(decimal value) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.ModuloImplementation(value, inPlace: true); + } + public DecimalDataFrameColumn ReverseModulo(decimal value) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.ReverseModuloImplementation(value, inPlace: true); + } + public DoubleDataFrameColumn Add(double value) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.AddImplementation(value, inPlace: true); + } + public DoubleDataFrameColumn ReverseAdd(double value) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.ReverseAddImplementation(value, inPlace: true); + } + public DoubleDataFrameColumn Subtract(double value) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.SubtractImplementation(value, inPlace: true); + } + public DoubleDataFrameColumn ReverseSubtract(double value) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.ReverseSubtractImplementation(value, inPlace: true); + } + public DoubleDataFrameColumn Multiply(double value) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.MultiplyImplementation(value, inPlace: true); + } + public DoubleDataFrameColumn ReverseMultiply(double value) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.ReverseMultiplyImplementation(value, inPlace: true); + } + public DoubleDataFrameColumn Divide(double value) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.DivideImplementation(value, inPlace: true); + } + public DoubleDataFrameColumn ReverseDivide(double value) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.ReverseDivideImplementation(value, inPlace: true); + } + public DoubleDataFrameColumn Modulo(double value) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.ModuloImplementation(value, inPlace: true); + } + public DoubleDataFrameColumn ReverseModulo(double value) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.ReverseModuloImplementation(value, inPlace: true); + } + public SingleDataFrameColumn Add(float value) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.AddImplementation(value, inPlace: true); + } + public SingleDataFrameColumn ReverseAdd(float value) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.ReverseAddImplementation(value, inPlace: true); + } + public SingleDataFrameColumn Subtract(float value) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.SubtractImplementation(value, inPlace: true); + } + public SingleDataFrameColumn ReverseSubtract(float value) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.ReverseSubtractImplementation(value, inPlace: true); + } + public SingleDataFrameColumn Multiply(float value) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.MultiplyImplementation(value, inPlace: true); + } + public SingleDataFrameColumn ReverseMultiply(float value) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.ReverseMultiplyImplementation(value, inPlace: true); + } + public SingleDataFrameColumn Divide(float value) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.DivideImplementation(value, inPlace: true); + } + public SingleDataFrameColumn ReverseDivide(float value) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.ReverseDivideImplementation(value, inPlace: true); + } + public SingleDataFrameColumn Modulo(float value) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.ModuloImplementation(value, inPlace: true); + } + public SingleDataFrameColumn ReverseModulo(float value) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.ReverseModuloImplementation(value, inPlace: true); + } + public Int64DataFrameColumn Add(int value, bool inPlace = false) + { + long convertedValue = (long)value; + return AddImplementation(convertedValue, inPlace); + } + public Int64DataFrameColumn ReverseAdd(int value, bool inPlace = false) + { + long convertedValue = (long)value; + return ReverseAddImplementation(convertedValue, inPlace); + } + public Int64DataFrameColumn Subtract(int value, bool inPlace = false) + { + long convertedValue = (long)value; + return SubtractImplementation(convertedValue, inPlace); + } + public Int64DataFrameColumn ReverseSubtract(int value, bool inPlace = false) + { + long convertedValue = (long)value; + return ReverseSubtractImplementation(convertedValue, inPlace); + } + public Int64DataFrameColumn Multiply(int value, bool inPlace = false) + { + long convertedValue = (long)value; + return MultiplyImplementation(convertedValue, inPlace); + } + public Int64DataFrameColumn ReverseMultiply(int value, bool inPlace = false) + { + long convertedValue = (long)value; + return ReverseMultiplyImplementation(convertedValue, inPlace); + } + public Int64DataFrameColumn Divide(int value, bool inPlace = false) + { + long convertedValue = (long)value; + return DivideImplementation(convertedValue, inPlace); + } + public Int64DataFrameColumn ReverseDivide(int value, bool inPlace = false) + { + long convertedValue = (long)value; + return ReverseDivideImplementation(convertedValue, inPlace); + } + public Int64DataFrameColumn Modulo(int value, bool inPlace = false) + { + long convertedValue = (long)value; + return ModuloImplementation(convertedValue, inPlace); + } + public Int64DataFrameColumn ReverseModulo(int value, bool inPlace = false) + { + long convertedValue = (long)value; + return ReverseModuloImplementation(convertedValue, inPlace); + } + public Int64DataFrameColumn Add(long value, bool inPlace = false) + { + return AddImplementation(value, inPlace); + } + public Int64DataFrameColumn ReverseAdd(long value, bool inPlace = false) + { + return ReverseAddImplementation(value, inPlace); + } + public Int64DataFrameColumn Subtract(long value, bool inPlace = false) + { + return SubtractImplementation(value, inPlace); + } + public Int64DataFrameColumn ReverseSubtract(long value, bool inPlace = false) + { + return ReverseSubtractImplementation(value, inPlace); + } + public Int64DataFrameColumn Multiply(long value, bool inPlace = false) + { + return MultiplyImplementation(value, inPlace); + } + public Int64DataFrameColumn ReverseMultiply(long value, bool inPlace = false) + { + return ReverseMultiplyImplementation(value, inPlace); + } + public Int64DataFrameColumn Divide(long value, bool inPlace = false) + { + return DivideImplementation(value, inPlace); + } + public Int64DataFrameColumn ReverseDivide(long value, bool inPlace = false) + { + return ReverseDivideImplementation(value, inPlace); + } + public Int64DataFrameColumn Modulo(long value, bool inPlace = false) + { + return ModuloImplementation(value, inPlace); + } + public Int64DataFrameColumn ReverseModulo(long value, bool inPlace = false) + { + return ReverseModuloImplementation(value, inPlace); + } + public Int64DataFrameColumn Add(sbyte value, bool inPlace = false) + { + long convertedValue = (long)value; + return AddImplementation(convertedValue, inPlace); + } + public Int64DataFrameColumn ReverseAdd(sbyte value, bool inPlace = false) + { + long convertedValue = (long)value; + return ReverseAddImplementation(convertedValue, inPlace); + } + public Int64DataFrameColumn Subtract(sbyte value, bool inPlace = false) + { + long convertedValue = (long)value; + return SubtractImplementation(convertedValue, inPlace); + } + public Int64DataFrameColumn ReverseSubtract(sbyte value, bool inPlace = false) + { + long convertedValue = (long)value; + return ReverseSubtractImplementation(convertedValue, inPlace); + } + public Int64DataFrameColumn Multiply(sbyte value, bool inPlace = false) + { + long convertedValue = (long)value; + return MultiplyImplementation(convertedValue, inPlace); + } + public Int64DataFrameColumn ReverseMultiply(sbyte value, bool inPlace = false) + { + long convertedValue = (long)value; + return ReverseMultiplyImplementation(convertedValue, inPlace); + } + public Int64DataFrameColumn Divide(sbyte value, bool inPlace = false) + { + long convertedValue = (long)value; + return DivideImplementation(convertedValue, inPlace); + } + public Int64DataFrameColumn ReverseDivide(sbyte value, bool inPlace = false) + { + long convertedValue = (long)value; + return ReverseDivideImplementation(convertedValue, inPlace); + } + public Int64DataFrameColumn Modulo(sbyte value, bool inPlace = false) + { + long convertedValue = (long)value; + return ModuloImplementation(convertedValue, inPlace); + } + public Int64DataFrameColumn ReverseModulo(sbyte value, bool inPlace = false) + { + long convertedValue = (long)value; + return ReverseModuloImplementation(convertedValue, inPlace); + } + public Int64DataFrameColumn Add(short value, bool inPlace = false) + { + long convertedValue = (long)value; + return AddImplementation(convertedValue, inPlace); + } + public Int64DataFrameColumn ReverseAdd(short value, bool inPlace = false) + { + long convertedValue = (long)value; + return ReverseAddImplementation(convertedValue, inPlace); + } + public Int64DataFrameColumn Subtract(short value, bool inPlace = false) + { + long convertedValue = (long)value; + return SubtractImplementation(convertedValue, inPlace); + } + public Int64DataFrameColumn ReverseSubtract(short value, bool inPlace = false) + { + long convertedValue = (long)value; + return ReverseSubtractImplementation(convertedValue, inPlace); + } + public Int64DataFrameColumn Multiply(short value, bool inPlace = false) + { + long convertedValue = (long)value; + return MultiplyImplementation(convertedValue, inPlace); + } + public Int64DataFrameColumn ReverseMultiply(short value, bool inPlace = false) + { + long convertedValue = (long)value; + return ReverseMultiplyImplementation(convertedValue, inPlace); + } + public Int64DataFrameColumn Divide(short value, bool inPlace = false) + { + long convertedValue = (long)value; + return DivideImplementation(convertedValue, inPlace); + } + public Int64DataFrameColumn ReverseDivide(short value, bool inPlace = false) + { + long convertedValue = (long)value; + return ReverseDivideImplementation(convertedValue, inPlace); + } + public Int64DataFrameColumn Modulo(short value, bool inPlace = false) + { + long convertedValue = (long)value; + return ModuloImplementation(convertedValue, inPlace); + } + public Int64DataFrameColumn ReverseModulo(short value, bool inPlace = false) + { + long convertedValue = (long)value; + return ReverseModuloImplementation(convertedValue, inPlace); + } + public Int64DataFrameColumn Add(uint value, bool inPlace = false) + { + long convertedValue = (long)value; + return AddImplementation(convertedValue, inPlace); + } + public Int64DataFrameColumn ReverseAdd(uint value, bool inPlace = false) + { + long convertedValue = (long)value; + return ReverseAddImplementation(convertedValue, inPlace); + } + public Int64DataFrameColumn Subtract(uint value, bool inPlace = false) + { + long convertedValue = (long)value; + return SubtractImplementation(convertedValue, inPlace); + } + public Int64DataFrameColumn ReverseSubtract(uint value, bool inPlace = false) + { + long convertedValue = (long)value; + return ReverseSubtractImplementation(convertedValue, inPlace); + } + public Int64DataFrameColumn Multiply(uint value, bool inPlace = false) + { + long convertedValue = (long)value; + return MultiplyImplementation(convertedValue, inPlace); + } + public Int64DataFrameColumn ReverseMultiply(uint value, bool inPlace = false) + { + long convertedValue = (long)value; + return ReverseMultiplyImplementation(convertedValue, inPlace); + } + public Int64DataFrameColumn Divide(uint value, bool inPlace = false) + { + long convertedValue = (long)value; + return DivideImplementation(convertedValue, inPlace); + } + public Int64DataFrameColumn ReverseDivide(uint value, bool inPlace = false) + { + long convertedValue = (long)value; + return ReverseDivideImplementation(convertedValue, inPlace); + } + public Int64DataFrameColumn Modulo(uint value, bool inPlace = false) + { + long convertedValue = (long)value; + return ModuloImplementation(convertedValue, inPlace); + } + public Int64DataFrameColumn ReverseModulo(uint value, bool inPlace = false) + { + long convertedValue = (long)value; + return ReverseModuloImplementation(convertedValue, inPlace); + } + public Int64DataFrameColumn Add(ushort value, bool inPlace = false) + { + long convertedValue = (long)value; + return AddImplementation(convertedValue, inPlace); + } + public Int64DataFrameColumn ReverseAdd(ushort value, bool inPlace = false) + { + long convertedValue = (long)value; + return ReverseAddImplementation(convertedValue, inPlace); + } + public Int64DataFrameColumn Subtract(ushort value, bool inPlace = false) + { + long convertedValue = (long)value; + return SubtractImplementation(convertedValue, inPlace); + } + public Int64DataFrameColumn ReverseSubtract(ushort value, bool inPlace = false) + { + long convertedValue = (long)value; + return ReverseSubtractImplementation(convertedValue, inPlace); + } + public Int64DataFrameColumn Multiply(ushort value, bool inPlace = false) + { + long convertedValue = (long)value; + return MultiplyImplementation(convertedValue, inPlace); + } + public Int64DataFrameColumn ReverseMultiply(ushort value, bool inPlace = false) + { + long convertedValue = (long)value; + return ReverseMultiplyImplementation(convertedValue, inPlace); + } + public Int64DataFrameColumn Divide(ushort value, bool inPlace = false) + { + long convertedValue = (long)value; + return DivideImplementation(convertedValue, inPlace); + } + public Int64DataFrameColumn ReverseDivide(ushort value, bool inPlace = false) + { + long convertedValue = (long)value; + return ReverseDivideImplementation(convertedValue, inPlace); + } + public Int64DataFrameColumn Modulo(ushort value, bool inPlace = false) + { + long convertedValue = (long)value; + return ModuloImplementation(convertedValue, inPlace); + } + public Int64DataFrameColumn ReverseModulo(ushort value, bool inPlace = false) + { + long convertedValue = (long)value; + return ReverseModuloImplementation(convertedValue, inPlace); + } + } + public partial class SByteDataFrameColumn + { + public Int32DataFrameColumn Add(byte value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.AddImplementation(value, inPlace: true); + } + public Int32DataFrameColumn ReverseAdd(byte value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.ReverseAddImplementation(value, inPlace: true); + } + public Int32DataFrameColumn Subtract(byte value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.SubtractImplementation(value, inPlace: true); + } + public Int32DataFrameColumn ReverseSubtract(byte value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.ReverseSubtractImplementation(value, inPlace: true); + } + public Int32DataFrameColumn Multiply(byte value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.MultiplyImplementation(value, inPlace: true); + } + public Int32DataFrameColumn ReverseMultiply(byte value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.ReverseMultiplyImplementation(value, inPlace: true); + } + public Int32DataFrameColumn Divide(byte value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.DivideImplementation(value, inPlace: true); + } + public Int32DataFrameColumn ReverseDivide(byte value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.ReverseDivideImplementation(value, inPlace: true); + } + public Int32DataFrameColumn Modulo(byte value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.ModuloImplementation(value, inPlace: true); + } + public Int32DataFrameColumn ReverseModulo(byte value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.ReverseModuloImplementation(value, inPlace: true); + } + public DecimalDataFrameColumn Add(decimal value) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.AddImplementation(value, inPlace: true); + } + public DecimalDataFrameColumn ReverseAdd(decimal value) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.ReverseAddImplementation(value, inPlace: true); + } + public DecimalDataFrameColumn Subtract(decimal value) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.SubtractImplementation(value, inPlace: true); + } + public DecimalDataFrameColumn ReverseSubtract(decimal value) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.ReverseSubtractImplementation(value, inPlace: true); + } + public DecimalDataFrameColumn Multiply(decimal value) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.MultiplyImplementation(value, inPlace: true); + } + public DecimalDataFrameColumn ReverseMultiply(decimal value) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.ReverseMultiplyImplementation(value, inPlace: true); + } + public DecimalDataFrameColumn Divide(decimal value) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.DivideImplementation(value, inPlace: true); + } + public DecimalDataFrameColumn ReverseDivide(decimal value) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.ReverseDivideImplementation(value, inPlace: true); + } + public DecimalDataFrameColumn Modulo(decimal value) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.ModuloImplementation(value, inPlace: true); + } + public DecimalDataFrameColumn ReverseModulo(decimal value) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.ReverseModuloImplementation(value, inPlace: true); + } + public DoubleDataFrameColumn Add(double value) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.AddImplementation(value, inPlace: true); + } + public DoubleDataFrameColumn ReverseAdd(double value) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.ReverseAddImplementation(value, inPlace: true); + } + public DoubleDataFrameColumn Subtract(double value) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.SubtractImplementation(value, inPlace: true); + } + public DoubleDataFrameColumn ReverseSubtract(double value) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.ReverseSubtractImplementation(value, inPlace: true); + } + public DoubleDataFrameColumn Multiply(double value) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.MultiplyImplementation(value, inPlace: true); + } + public DoubleDataFrameColumn ReverseMultiply(double value) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.ReverseMultiplyImplementation(value, inPlace: true); + } + public DoubleDataFrameColumn Divide(double value) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.DivideImplementation(value, inPlace: true); + } + public DoubleDataFrameColumn ReverseDivide(double value) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.ReverseDivideImplementation(value, inPlace: true); + } + public DoubleDataFrameColumn Modulo(double value) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.ModuloImplementation(value, inPlace: true); + } + public DoubleDataFrameColumn ReverseModulo(double value) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.ReverseModuloImplementation(value, inPlace: true); + } + public SingleDataFrameColumn Add(float value) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.AddImplementation(value, inPlace: true); + } + public SingleDataFrameColumn ReverseAdd(float value) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.ReverseAddImplementation(value, inPlace: true); + } + public SingleDataFrameColumn Subtract(float value) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.SubtractImplementation(value, inPlace: true); + } + public SingleDataFrameColumn ReverseSubtract(float value) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.ReverseSubtractImplementation(value, inPlace: true); + } + public SingleDataFrameColumn Multiply(float value) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.MultiplyImplementation(value, inPlace: true); + } + public SingleDataFrameColumn ReverseMultiply(float value) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.ReverseMultiplyImplementation(value, inPlace: true); + } + public SingleDataFrameColumn Divide(float value) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.DivideImplementation(value, inPlace: true); + } + public SingleDataFrameColumn ReverseDivide(float value) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.ReverseDivideImplementation(value, inPlace: true); + } + public SingleDataFrameColumn Modulo(float value) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.ModuloImplementation(value, inPlace: true); + } + public SingleDataFrameColumn ReverseModulo(float value) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.ReverseModuloImplementation(value, inPlace: true); + } + public Int32DataFrameColumn Add(int value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.AddImplementation(value, inPlace: true); + } + public Int32DataFrameColumn ReverseAdd(int value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.ReverseAddImplementation(value, inPlace: true); + } + public Int32DataFrameColumn Subtract(int value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.SubtractImplementation(value, inPlace: true); + } + public Int32DataFrameColumn ReverseSubtract(int value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.ReverseSubtractImplementation(value, inPlace: true); + } + public Int32DataFrameColumn Multiply(int value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.MultiplyImplementation(value, inPlace: true); + } + public Int32DataFrameColumn ReverseMultiply(int value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.ReverseMultiplyImplementation(value, inPlace: true); + } + public Int32DataFrameColumn Divide(int value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.DivideImplementation(value, inPlace: true); + } + public Int32DataFrameColumn ReverseDivide(int value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.ReverseDivideImplementation(value, inPlace: true); + } + public Int32DataFrameColumn Modulo(int value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.ModuloImplementation(value, inPlace: true); + } + public Int32DataFrameColumn ReverseModulo(int value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.ReverseModuloImplementation(value, inPlace: true); + } + public Int64DataFrameColumn Add(long value) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.AddImplementation(value, inPlace: true); + } + public Int64DataFrameColumn ReverseAdd(long value) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.ReverseAddImplementation(value, inPlace: true); + } + public Int64DataFrameColumn Subtract(long value) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.SubtractImplementation(value, inPlace: true); + } + public Int64DataFrameColumn ReverseSubtract(long value) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.ReverseSubtractImplementation(value, inPlace: true); + } + public Int64DataFrameColumn Multiply(long value) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.MultiplyImplementation(value, inPlace: true); + } + public Int64DataFrameColumn ReverseMultiply(long value) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.ReverseMultiplyImplementation(value, inPlace: true); + } + public Int64DataFrameColumn Divide(long value) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.DivideImplementation(value, inPlace: true); + } + public Int64DataFrameColumn ReverseDivide(long value) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.ReverseDivideImplementation(value, inPlace: true); + } + public Int64DataFrameColumn Modulo(long value) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.ModuloImplementation(value, inPlace: true); + } + public Int64DataFrameColumn ReverseModulo(long value) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.ReverseModuloImplementation(value, inPlace: true); + } + public Int32DataFrameColumn Add(sbyte value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.AddImplementation(value, inPlace: true); + } + public Int32DataFrameColumn ReverseAdd(sbyte value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.ReverseAddImplementation(value, inPlace: true); + } + public Int32DataFrameColumn Subtract(sbyte value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.SubtractImplementation(value, inPlace: true); + } + public Int32DataFrameColumn ReverseSubtract(sbyte value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.ReverseSubtractImplementation(value, inPlace: true); + } + public Int32DataFrameColumn Multiply(sbyte value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.MultiplyImplementation(value, inPlace: true); + } + public Int32DataFrameColumn ReverseMultiply(sbyte value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.ReverseMultiplyImplementation(value, inPlace: true); + } + public Int32DataFrameColumn Divide(sbyte value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.DivideImplementation(value, inPlace: true); + } + public Int32DataFrameColumn ReverseDivide(sbyte value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.ReverseDivideImplementation(value, inPlace: true); + } + public Int32DataFrameColumn Modulo(sbyte value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.ModuloImplementation(value, inPlace: true); + } + public Int32DataFrameColumn ReverseModulo(sbyte value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.ReverseModuloImplementation(value, inPlace: true); + } + public Int32DataFrameColumn Add(short value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.AddImplementation(value, inPlace: true); + } + public Int32DataFrameColumn ReverseAdd(short value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.ReverseAddImplementation(value, inPlace: true); + } + public Int32DataFrameColumn Subtract(short value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.SubtractImplementation(value, inPlace: true); + } + public Int32DataFrameColumn ReverseSubtract(short value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.ReverseSubtractImplementation(value, inPlace: true); + } + public Int32DataFrameColumn Multiply(short value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.MultiplyImplementation(value, inPlace: true); + } + public Int32DataFrameColumn ReverseMultiply(short value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.ReverseMultiplyImplementation(value, inPlace: true); + } + public Int32DataFrameColumn Divide(short value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.DivideImplementation(value, inPlace: true); + } + public Int32DataFrameColumn ReverseDivide(short value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.ReverseDivideImplementation(value, inPlace: true); + } + public Int32DataFrameColumn Modulo(short value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.ModuloImplementation(value, inPlace: true); + } + public Int32DataFrameColumn ReverseModulo(short value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.ReverseModuloImplementation(value, inPlace: true); + } + public Int64DataFrameColumn Add(uint value) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.AddImplementation(value, inPlace: true); + } + public Int64DataFrameColumn ReverseAdd(uint value) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.ReverseAddImplementation(value, inPlace: true); + } + public Int64DataFrameColumn Subtract(uint value) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.SubtractImplementation(value, inPlace: true); + } + public Int64DataFrameColumn ReverseSubtract(uint value) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.ReverseSubtractImplementation(value, inPlace: true); + } + public Int64DataFrameColumn Multiply(uint value) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.MultiplyImplementation(value, inPlace: true); + } + public Int64DataFrameColumn ReverseMultiply(uint value) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.ReverseMultiplyImplementation(value, inPlace: true); + } + public Int64DataFrameColumn Divide(uint value) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.DivideImplementation(value, inPlace: true); + } + public Int64DataFrameColumn ReverseDivide(uint value) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.ReverseDivideImplementation(value, inPlace: true); + } + public Int64DataFrameColumn Modulo(uint value) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.ModuloImplementation(value, inPlace: true); + } + public Int64DataFrameColumn ReverseModulo(uint value) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.ReverseModuloImplementation(value, inPlace: true); + } + public SingleDataFrameColumn Add(ulong value) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.AddImplementation(value, inPlace: true); + } + public SingleDataFrameColumn ReverseAdd(ulong value) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.ReverseAddImplementation(value, inPlace: true); + } + public SingleDataFrameColumn Subtract(ulong value) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.SubtractImplementation(value, inPlace: true); + } + public SingleDataFrameColumn ReverseSubtract(ulong value) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.ReverseSubtractImplementation(value, inPlace: true); + } + public SingleDataFrameColumn Multiply(ulong value) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.MultiplyImplementation(value, inPlace: true); + } + public SingleDataFrameColumn ReverseMultiply(ulong value) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.ReverseMultiplyImplementation(value, inPlace: true); + } + public SingleDataFrameColumn Divide(ulong value) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.DivideImplementation(value, inPlace: true); + } + public SingleDataFrameColumn ReverseDivide(ulong value) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.ReverseDivideImplementation(value, inPlace: true); + } + public SingleDataFrameColumn Modulo(ulong value) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.ModuloImplementation(value, inPlace: true); + } + public SingleDataFrameColumn ReverseModulo(ulong value) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.ReverseModuloImplementation(value, inPlace: true); + } + public Int32DataFrameColumn Add(ushort value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.AddImplementation(value, inPlace: true); + } + public Int32DataFrameColumn ReverseAdd(ushort value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.ReverseAddImplementation(value, inPlace: true); + } + public Int32DataFrameColumn Subtract(ushort value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.SubtractImplementation(value, inPlace: true); + } + public Int32DataFrameColumn ReverseSubtract(ushort value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.ReverseSubtractImplementation(value, inPlace: true); + } + public Int32DataFrameColumn Multiply(ushort value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.MultiplyImplementation(value, inPlace: true); + } + public Int32DataFrameColumn ReverseMultiply(ushort value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.ReverseMultiplyImplementation(value, inPlace: true); + } + public Int32DataFrameColumn Divide(ushort value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.DivideImplementation(value, inPlace: true); + } + public Int32DataFrameColumn ReverseDivide(ushort value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.ReverseDivideImplementation(value, inPlace: true); + } + public Int32DataFrameColumn Modulo(ushort value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.ModuloImplementation(value, inPlace: true); + } + public Int32DataFrameColumn ReverseModulo(ushort value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.ReverseModuloImplementation(value, inPlace: true); + } + } + public partial class Int16DataFrameColumn + { + public Int32DataFrameColumn Add(byte value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.AddImplementation(value, inPlace: true); + } + public Int32DataFrameColumn ReverseAdd(byte value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.ReverseAddImplementation(value, inPlace: true); + } + public Int32DataFrameColumn Subtract(byte value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.SubtractImplementation(value, inPlace: true); + } + public Int32DataFrameColumn ReverseSubtract(byte value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.ReverseSubtractImplementation(value, inPlace: true); + } + public Int32DataFrameColumn Multiply(byte value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.MultiplyImplementation(value, inPlace: true); + } + public Int32DataFrameColumn ReverseMultiply(byte value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.ReverseMultiplyImplementation(value, inPlace: true); + } + public Int32DataFrameColumn Divide(byte value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.DivideImplementation(value, inPlace: true); + } + public Int32DataFrameColumn ReverseDivide(byte value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.ReverseDivideImplementation(value, inPlace: true); + } + public Int32DataFrameColumn Modulo(byte value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.ModuloImplementation(value, inPlace: true); + } + public Int32DataFrameColumn ReverseModulo(byte value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.ReverseModuloImplementation(value, inPlace: true); + } + public DecimalDataFrameColumn Add(decimal value) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.AddImplementation(value, inPlace: true); + } + public DecimalDataFrameColumn ReverseAdd(decimal value) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.ReverseAddImplementation(value, inPlace: true); + } + public DecimalDataFrameColumn Subtract(decimal value) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.SubtractImplementation(value, inPlace: true); + } + public DecimalDataFrameColumn ReverseSubtract(decimal value) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.ReverseSubtractImplementation(value, inPlace: true); + } + public DecimalDataFrameColumn Multiply(decimal value) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.MultiplyImplementation(value, inPlace: true); + } + public DecimalDataFrameColumn ReverseMultiply(decimal value) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.ReverseMultiplyImplementation(value, inPlace: true); + } + public DecimalDataFrameColumn Divide(decimal value) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.DivideImplementation(value, inPlace: true); + } + public DecimalDataFrameColumn ReverseDivide(decimal value) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.ReverseDivideImplementation(value, inPlace: true); + } + public DecimalDataFrameColumn Modulo(decimal value) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.ModuloImplementation(value, inPlace: true); + } + public DecimalDataFrameColumn ReverseModulo(decimal value) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.ReverseModuloImplementation(value, inPlace: true); + } + public DoubleDataFrameColumn Add(double value) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.AddImplementation(value, inPlace: true); + } + public DoubleDataFrameColumn ReverseAdd(double value) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.ReverseAddImplementation(value, inPlace: true); + } + public DoubleDataFrameColumn Subtract(double value) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.SubtractImplementation(value, inPlace: true); + } + public DoubleDataFrameColumn ReverseSubtract(double value) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.ReverseSubtractImplementation(value, inPlace: true); + } + public DoubleDataFrameColumn Multiply(double value) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.MultiplyImplementation(value, inPlace: true); + } + public DoubleDataFrameColumn ReverseMultiply(double value) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.ReverseMultiplyImplementation(value, inPlace: true); + } + public DoubleDataFrameColumn Divide(double value) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.DivideImplementation(value, inPlace: true); + } + public DoubleDataFrameColumn ReverseDivide(double value) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.ReverseDivideImplementation(value, inPlace: true); + } + public DoubleDataFrameColumn Modulo(double value) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.ModuloImplementation(value, inPlace: true); + } + public DoubleDataFrameColumn ReverseModulo(double value) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.ReverseModuloImplementation(value, inPlace: true); + } + public SingleDataFrameColumn Add(float value) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.AddImplementation(value, inPlace: true); + } + public SingleDataFrameColumn ReverseAdd(float value) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.ReverseAddImplementation(value, inPlace: true); + } + public SingleDataFrameColumn Subtract(float value) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.SubtractImplementation(value, inPlace: true); + } + public SingleDataFrameColumn ReverseSubtract(float value) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.ReverseSubtractImplementation(value, inPlace: true); + } + public SingleDataFrameColumn Multiply(float value) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.MultiplyImplementation(value, inPlace: true); + } + public SingleDataFrameColumn ReverseMultiply(float value) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.ReverseMultiplyImplementation(value, inPlace: true); + } + public SingleDataFrameColumn Divide(float value) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.DivideImplementation(value, inPlace: true); + } + public SingleDataFrameColumn ReverseDivide(float value) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.ReverseDivideImplementation(value, inPlace: true); + } + public SingleDataFrameColumn Modulo(float value) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.ModuloImplementation(value, inPlace: true); + } + public SingleDataFrameColumn ReverseModulo(float value) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.ReverseModuloImplementation(value, inPlace: true); + } + public Int32DataFrameColumn Add(int value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.AddImplementation(value, inPlace: true); + } + public Int32DataFrameColumn ReverseAdd(int value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.ReverseAddImplementation(value, inPlace: true); + } + public Int32DataFrameColumn Subtract(int value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.SubtractImplementation(value, inPlace: true); + } + public Int32DataFrameColumn ReverseSubtract(int value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.ReverseSubtractImplementation(value, inPlace: true); + } + public Int32DataFrameColumn Multiply(int value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.MultiplyImplementation(value, inPlace: true); + } + public Int32DataFrameColumn ReverseMultiply(int value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.ReverseMultiplyImplementation(value, inPlace: true); + } + public Int32DataFrameColumn Divide(int value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.DivideImplementation(value, inPlace: true); + } + public Int32DataFrameColumn ReverseDivide(int value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.ReverseDivideImplementation(value, inPlace: true); + } + public Int32DataFrameColumn Modulo(int value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.ModuloImplementation(value, inPlace: true); + } + public Int32DataFrameColumn ReverseModulo(int value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.ReverseModuloImplementation(value, inPlace: true); + } + public Int64DataFrameColumn Add(long value) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.AddImplementation(value, inPlace: true); + } + public Int64DataFrameColumn ReverseAdd(long value) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.ReverseAddImplementation(value, inPlace: true); + } + public Int64DataFrameColumn Subtract(long value) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.SubtractImplementation(value, inPlace: true); + } + public Int64DataFrameColumn ReverseSubtract(long value) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.ReverseSubtractImplementation(value, inPlace: true); + } + public Int64DataFrameColumn Multiply(long value) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.MultiplyImplementation(value, inPlace: true); + } + public Int64DataFrameColumn ReverseMultiply(long value) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.ReverseMultiplyImplementation(value, inPlace: true); + } + public Int64DataFrameColumn Divide(long value) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.DivideImplementation(value, inPlace: true); + } + public Int64DataFrameColumn ReverseDivide(long value) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.ReverseDivideImplementation(value, inPlace: true); + } + public Int64DataFrameColumn Modulo(long value) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.ModuloImplementation(value, inPlace: true); + } + public Int64DataFrameColumn ReverseModulo(long value) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.ReverseModuloImplementation(value, inPlace: true); + } + public Int32DataFrameColumn Add(sbyte value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.AddImplementation(value, inPlace: true); + } + public Int32DataFrameColumn ReverseAdd(sbyte value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.ReverseAddImplementation(value, inPlace: true); + } + public Int32DataFrameColumn Subtract(sbyte value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.SubtractImplementation(value, inPlace: true); + } + public Int32DataFrameColumn ReverseSubtract(sbyte value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.ReverseSubtractImplementation(value, inPlace: true); + } + public Int32DataFrameColumn Multiply(sbyte value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.MultiplyImplementation(value, inPlace: true); + } + public Int32DataFrameColumn ReverseMultiply(sbyte value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.ReverseMultiplyImplementation(value, inPlace: true); + } + public Int32DataFrameColumn Divide(sbyte value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.DivideImplementation(value, inPlace: true); + } + public Int32DataFrameColumn ReverseDivide(sbyte value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.ReverseDivideImplementation(value, inPlace: true); + } + public Int32DataFrameColumn Modulo(sbyte value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.ModuloImplementation(value, inPlace: true); + } + public Int32DataFrameColumn ReverseModulo(sbyte value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.ReverseModuloImplementation(value, inPlace: true); + } + public Int32DataFrameColumn Add(short value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.AddImplementation(value, inPlace: true); + } + public Int32DataFrameColumn ReverseAdd(short value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.ReverseAddImplementation(value, inPlace: true); + } + public Int32DataFrameColumn Subtract(short value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.SubtractImplementation(value, inPlace: true); + } + public Int32DataFrameColumn ReverseSubtract(short value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.ReverseSubtractImplementation(value, inPlace: true); + } + public Int32DataFrameColumn Multiply(short value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.MultiplyImplementation(value, inPlace: true); + } + public Int32DataFrameColumn ReverseMultiply(short value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.ReverseMultiplyImplementation(value, inPlace: true); + } + public Int32DataFrameColumn Divide(short value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.DivideImplementation(value, inPlace: true); + } + public Int32DataFrameColumn ReverseDivide(short value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.ReverseDivideImplementation(value, inPlace: true); + } + public Int32DataFrameColumn Modulo(short value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.ModuloImplementation(value, inPlace: true); + } + public Int32DataFrameColumn ReverseModulo(short value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.ReverseModuloImplementation(value, inPlace: true); + } + public Int64DataFrameColumn Add(uint value) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.AddImplementation(value, inPlace: true); + } + public Int64DataFrameColumn ReverseAdd(uint value) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.ReverseAddImplementation(value, inPlace: true); + } + public Int64DataFrameColumn Subtract(uint value) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.SubtractImplementation(value, inPlace: true); + } + public Int64DataFrameColumn ReverseSubtract(uint value) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.ReverseSubtractImplementation(value, inPlace: true); + } + public Int64DataFrameColumn Multiply(uint value) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.MultiplyImplementation(value, inPlace: true); + } + public Int64DataFrameColumn ReverseMultiply(uint value) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.ReverseMultiplyImplementation(value, inPlace: true); + } + public Int64DataFrameColumn Divide(uint value) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.DivideImplementation(value, inPlace: true); + } + public Int64DataFrameColumn ReverseDivide(uint value) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.ReverseDivideImplementation(value, inPlace: true); + } + public Int64DataFrameColumn Modulo(uint value) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.ModuloImplementation(value, inPlace: true); + } + public Int64DataFrameColumn ReverseModulo(uint value) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.ReverseModuloImplementation(value, inPlace: true); + } + public SingleDataFrameColumn Add(ulong value) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.AddImplementation(value, inPlace: true); + } + public SingleDataFrameColumn ReverseAdd(ulong value) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.ReverseAddImplementation(value, inPlace: true); + } + public SingleDataFrameColumn Subtract(ulong value) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.SubtractImplementation(value, inPlace: true); + } + public SingleDataFrameColumn ReverseSubtract(ulong value) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.ReverseSubtractImplementation(value, inPlace: true); + } + public SingleDataFrameColumn Multiply(ulong value) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.MultiplyImplementation(value, inPlace: true); + } + public SingleDataFrameColumn ReverseMultiply(ulong value) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.ReverseMultiplyImplementation(value, inPlace: true); + } + public SingleDataFrameColumn Divide(ulong value) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.DivideImplementation(value, inPlace: true); + } + public SingleDataFrameColumn ReverseDivide(ulong value) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.ReverseDivideImplementation(value, inPlace: true); + } + public SingleDataFrameColumn Modulo(ulong value) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.ModuloImplementation(value, inPlace: true); + } + public SingleDataFrameColumn ReverseModulo(ulong value) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.ReverseModuloImplementation(value, inPlace: true); + } + public Int32DataFrameColumn Add(ushort value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.AddImplementation(value, inPlace: true); + } + public Int32DataFrameColumn ReverseAdd(ushort value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.ReverseAddImplementation(value, inPlace: true); + } + public Int32DataFrameColumn Subtract(ushort value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.SubtractImplementation(value, inPlace: true); + } + public Int32DataFrameColumn ReverseSubtract(ushort value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.ReverseSubtractImplementation(value, inPlace: true); + } + public Int32DataFrameColumn Multiply(ushort value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.MultiplyImplementation(value, inPlace: true); + } + public Int32DataFrameColumn ReverseMultiply(ushort value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.ReverseMultiplyImplementation(value, inPlace: true); + } + public Int32DataFrameColumn Divide(ushort value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.DivideImplementation(value, inPlace: true); + } + public Int32DataFrameColumn ReverseDivide(ushort value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.ReverseDivideImplementation(value, inPlace: true); + } + public Int32DataFrameColumn Modulo(ushort value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.ModuloImplementation(value, inPlace: true); + } + public Int32DataFrameColumn ReverseModulo(ushort value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.ReverseModuloImplementation(value, inPlace: true); + } + } + public partial class UInt32DataFrameColumn + { + public UInt32DataFrameColumn Add(byte value, bool inPlace = false) + { + uint convertedValue = (uint)value; + return AddImplementation(convertedValue, inPlace); + } + public UInt32DataFrameColumn ReverseAdd(byte value, bool inPlace = false) + { + uint convertedValue = (uint)value; + return ReverseAddImplementation(convertedValue, inPlace); + } + public UInt32DataFrameColumn Subtract(byte value, bool inPlace = false) + { + uint convertedValue = (uint)value; + return SubtractImplementation(convertedValue, inPlace); + } + public UInt32DataFrameColumn ReverseSubtract(byte value, bool inPlace = false) + { + uint convertedValue = (uint)value; + return ReverseSubtractImplementation(convertedValue, inPlace); + } + public UInt32DataFrameColumn Multiply(byte value, bool inPlace = false) + { + uint convertedValue = (uint)value; + return MultiplyImplementation(convertedValue, inPlace); + } + public UInt32DataFrameColumn ReverseMultiply(byte value, bool inPlace = false) + { + uint convertedValue = (uint)value; + return ReverseMultiplyImplementation(convertedValue, inPlace); + } + public UInt32DataFrameColumn Divide(byte value, bool inPlace = false) + { + uint convertedValue = (uint)value; + return DivideImplementation(convertedValue, inPlace); + } + public UInt32DataFrameColumn ReverseDivide(byte value, bool inPlace = false) + { + uint convertedValue = (uint)value; + return ReverseDivideImplementation(convertedValue, inPlace); + } + public UInt32DataFrameColumn Modulo(byte value, bool inPlace = false) + { + uint convertedValue = (uint)value; + return ModuloImplementation(convertedValue, inPlace); + } + public UInt32DataFrameColumn ReverseModulo(byte value, bool inPlace = false) + { + uint convertedValue = (uint)value; + return ReverseModuloImplementation(convertedValue, inPlace); + } + public DecimalDataFrameColumn Add(decimal value) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.AddImplementation(value, inPlace: true); + } + public DecimalDataFrameColumn ReverseAdd(decimal value) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.ReverseAddImplementation(value, inPlace: true); + } + public DecimalDataFrameColumn Subtract(decimal value) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.SubtractImplementation(value, inPlace: true); + } + public DecimalDataFrameColumn ReverseSubtract(decimal value) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.ReverseSubtractImplementation(value, inPlace: true); + } + public DecimalDataFrameColumn Multiply(decimal value) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.MultiplyImplementation(value, inPlace: true); + } + public DecimalDataFrameColumn ReverseMultiply(decimal value) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.ReverseMultiplyImplementation(value, inPlace: true); + } + public DecimalDataFrameColumn Divide(decimal value) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.DivideImplementation(value, inPlace: true); + } + public DecimalDataFrameColumn ReverseDivide(decimal value) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.ReverseDivideImplementation(value, inPlace: true); + } + public DecimalDataFrameColumn Modulo(decimal value) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.ModuloImplementation(value, inPlace: true); + } + public DecimalDataFrameColumn ReverseModulo(decimal value) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.ReverseModuloImplementation(value, inPlace: true); + } + public DoubleDataFrameColumn Add(double value) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.AddImplementation(value, inPlace: true); + } + public DoubleDataFrameColumn ReverseAdd(double value) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.ReverseAddImplementation(value, inPlace: true); + } + public DoubleDataFrameColumn Subtract(double value) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.SubtractImplementation(value, inPlace: true); + } + public DoubleDataFrameColumn ReverseSubtract(double value) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.ReverseSubtractImplementation(value, inPlace: true); + } + public DoubleDataFrameColumn Multiply(double value) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.MultiplyImplementation(value, inPlace: true); + } + public DoubleDataFrameColumn ReverseMultiply(double value) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.ReverseMultiplyImplementation(value, inPlace: true); + } + public DoubleDataFrameColumn Divide(double value) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.DivideImplementation(value, inPlace: true); + } + public DoubleDataFrameColumn ReverseDivide(double value) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.ReverseDivideImplementation(value, inPlace: true); + } + public DoubleDataFrameColumn Modulo(double value) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.ModuloImplementation(value, inPlace: true); + } + public DoubleDataFrameColumn ReverseModulo(double value) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.ReverseModuloImplementation(value, inPlace: true); + } + public SingleDataFrameColumn Add(float value) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.AddImplementation(value, inPlace: true); + } + public SingleDataFrameColumn ReverseAdd(float value) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.ReverseAddImplementation(value, inPlace: true); + } + public SingleDataFrameColumn Subtract(float value) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.SubtractImplementation(value, inPlace: true); + } + public SingleDataFrameColumn ReverseSubtract(float value) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.ReverseSubtractImplementation(value, inPlace: true); + } + public SingleDataFrameColumn Multiply(float value) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.MultiplyImplementation(value, inPlace: true); + } + public SingleDataFrameColumn ReverseMultiply(float value) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.ReverseMultiplyImplementation(value, inPlace: true); + } + public SingleDataFrameColumn Divide(float value) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.DivideImplementation(value, inPlace: true); + } + public SingleDataFrameColumn ReverseDivide(float value) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.ReverseDivideImplementation(value, inPlace: true); + } + public SingleDataFrameColumn Modulo(float value) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.ModuloImplementation(value, inPlace: true); + } + public SingleDataFrameColumn ReverseModulo(float value) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.ReverseModuloImplementation(value, inPlace: true); + } + public Int64DataFrameColumn Add(int value) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.AddImplementation(value, inPlace: true); + } + public Int64DataFrameColumn ReverseAdd(int value) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.ReverseAddImplementation(value, inPlace: true); + } + public Int64DataFrameColumn Subtract(int value) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.SubtractImplementation(value, inPlace: true); + } + public Int64DataFrameColumn ReverseSubtract(int value) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.ReverseSubtractImplementation(value, inPlace: true); + } + public Int64DataFrameColumn Multiply(int value) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.MultiplyImplementation(value, inPlace: true); + } + public Int64DataFrameColumn ReverseMultiply(int value) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.ReverseMultiplyImplementation(value, inPlace: true); + } + public Int64DataFrameColumn Divide(int value) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.DivideImplementation(value, inPlace: true); + } + public Int64DataFrameColumn ReverseDivide(int value) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.ReverseDivideImplementation(value, inPlace: true); + } + public Int64DataFrameColumn Modulo(int value) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.ModuloImplementation(value, inPlace: true); + } + public Int64DataFrameColumn ReverseModulo(int value) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.ReverseModuloImplementation(value, inPlace: true); + } + public Int64DataFrameColumn Add(long value) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.AddImplementation(value, inPlace: true); + } + public Int64DataFrameColumn ReverseAdd(long value) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.ReverseAddImplementation(value, inPlace: true); + } + public Int64DataFrameColumn Subtract(long value) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.SubtractImplementation(value, inPlace: true); + } + public Int64DataFrameColumn ReverseSubtract(long value) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.ReverseSubtractImplementation(value, inPlace: true); + } + public Int64DataFrameColumn Multiply(long value) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.MultiplyImplementation(value, inPlace: true); + } + public Int64DataFrameColumn ReverseMultiply(long value) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.ReverseMultiplyImplementation(value, inPlace: true); + } + public Int64DataFrameColumn Divide(long value) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.DivideImplementation(value, inPlace: true); + } + public Int64DataFrameColumn ReverseDivide(long value) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.ReverseDivideImplementation(value, inPlace: true); + } + public Int64DataFrameColumn Modulo(long value) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.ModuloImplementation(value, inPlace: true); + } + public Int64DataFrameColumn ReverseModulo(long value) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.ReverseModuloImplementation(value, inPlace: true); + } + public Int64DataFrameColumn Add(sbyte value) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.AddImplementation(value, inPlace: true); + } + public Int64DataFrameColumn ReverseAdd(sbyte value) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.ReverseAddImplementation(value, inPlace: true); + } + public Int64DataFrameColumn Subtract(sbyte value) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.SubtractImplementation(value, inPlace: true); + } + public Int64DataFrameColumn ReverseSubtract(sbyte value) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.ReverseSubtractImplementation(value, inPlace: true); + } + public Int64DataFrameColumn Multiply(sbyte value) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.MultiplyImplementation(value, inPlace: true); + } + public Int64DataFrameColumn ReverseMultiply(sbyte value) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.ReverseMultiplyImplementation(value, inPlace: true); + } + public Int64DataFrameColumn Divide(sbyte value) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.DivideImplementation(value, inPlace: true); + } + public Int64DataFrameColumn ReverseDivide(sbyte value) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.ReverseDivideImplementation(value, inPlace: true); + } + public Int64DataFrameColumn Modulo(sbyte value) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.ModuloImplementation(value, inPlace: true); + } + public Int64DataFrameColumn ReverseModulo(sbyte value) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.ReverseModuloImplementation(value, inPlace: true); + } + public Int64DataFrameColumn Add(short value) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.AddImplementation(value, inPlace: true); + } + public Int64DataFrameColumn ReverseAdd(short value) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.ReverseAddImplementation(value, inPlace: true); + } + public Int64DataFrameColumn Subtract(short value) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.SubtractImplementation(value, inPlace: true); + } + public Int64DataFrameColumn ReverseSubtract(short value) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.ReverseSubtractImplementation(value, inPlace: true); + } + public Int64DataFrameColumn Multiply(short value) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.MultiplyImplementation(value, inPlace: true); + } + public Int64DataFrameColumn ReverseMultiply(short value) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.ReverseMultiplyImplementation(value, inPlace: true); + } + public Int64DataFrameColumn Divide(short value) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.DivideImplementation(value, inPlace: true); + } + public Int64DataFrameColumn ReverseDivide(short value) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.ReverseDivideImplementation(value, inPlace: true); + } + public Int64DataFrameColumn Modulo(short value) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.ModuloImplementation(value, inPlace: true); + } + public Int64DataFrameColumn ReverseModulo(short value) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.ReverseModuloImplementation(value, inPlace: true); + } + public UInt32DataFrameColumn Add(uint value, bool inPlace = false) + { + return AddImplementation(value, inPlace); + } + public UInt32DataFrameColumn ReverseAdd(uint value, bool inPlace = false) + { + return ReverseAddImplementation(value, inPlace); + } + public UInt32DataFrameColumn Subtract(uint value, bool inPlace = false) + { + return SubtractImplementation(value, inPlace); + } + public UInt32DataFrameColumn ReverseSubtract(uint value, bool inPlace = false) + { + return ReverseSubtractImplementation(value, inPlace); + } + public UInt32DataFrameColumn Multiply(uint value, bool inPlace = false) + { + return MultiplyImplementation(value, inPlace); + } + public UInt32DataFrameColumn ReverseMultiply(uint value, bool inPlace = false) + { + return ReverseMultiplyImplementation(value, inPlace); + } + public UInt32DataFrameColumn Divide(uint value, bool inPlace = false) + { + return DivideImplementation(value, inPlace); + } + public UInt32DataFrameColumn ReverseDivide(uint value, bool inPlace = false) + { + return ReverseDivideImplementation(value, inPlace); + } + public UInt32DataFrameColumn Modulo(uint value, bool inPlace = false) + { + return ModuloImplementation(value, inPlace); + } + public UInt32DataFrameColumn ReverseModulo(uint value, bool inPlace = false) + { + return ReverseModuloImplementation(value, inPlace); + } + public UInt64DataFrameColumn Add(ulong value) + { + UInt64DataFrameColumn ulongColumn = CloneAsUInt64Column(); + return ulongColumn.AddImplementation(value, inPlace: true); + } + public UInt64DataFrameColumn ReverseAdd(ulong value) + { + UInt64DataFrameColumn ulongColumn = CloneAsUInt64Column(); + return ulongColumn.ReverseAddImplementation(value, inPlace: true); + } + public UInt64DataFrameColumn Subtract(ulong value) + { + UInt64DataFrameColumn ulongColumn = CloneAsUInt64Column(); + return ulongColumn.SubtractImplementation(value, inPlace: true); + } + public UInt64DataFrameColumn ReverseSubtract(ulong value) + { + UInt64DataFrameColumn ulongColumn = CloneAsUInt64Column(); + return ulongColumn.ReverseSubtractImplementation(value, inPlace: true); + } + public UInt64DataFrameColumn Multiply(ulong value) + { + UInt64DataFrameColumn ulongColumn = CloneAsUInt64Column(); + return ulongColumn.MultiplyImplementation(value, inPlace: true); + } + public UInt64DataFrameColumn ReverseMultiply(ulong value) + { + UInt64DataFrameColumn ulongColumn = CloneAsUInt64Column(); + return ulongColumn.ReverseMultiplyImplementation(value, inPlace: true); + } + public UInt64DataFrameColumn Divide(ulong value) + { + UInt64DataFrameColumn ulongColumn = CloneAsUInt64Column(); + return ulongColumn.DivideImplementation(value, inPlace: true); + } + public UInt64DataFrameColumn ReverseDivide(ulong value) + { + UInt64DataFrameColumn ulongColumn = CloneAsUInt64Column(); + return ulongColumn.ReverseDivideImplementation(value, inPlace: true); + } + public UInt64DataFrameColumn Modulo(ulong value) + { + UInt64DataFrameColumn ulongColumn = CloneAsUInt64Column(); + return ulongColumn.ModuloImplementation(value, inPlace: true); + } + public UInt64DataFrameColumn ReverseModulo(ulong value) + { + UInt64DataFrameColumn ulongColumn = CloneAsUInt64Column(); + return ulongColumn.ReverseModuloImplementation(value, inPlace: true); + } + public UInt32DataFrameColumn Add(ushort value, bool inPlace = false) + { + uint convertedValue = (uint)value; + return AddImplementation(convertedValue, inPlace); + } + public UInt32DataFrameColumn ReverseAdd(ushort value, bool inPlace = false) + { + uint convertedValue = (uint)value; + return ReverseAddImplementation(convertedValue, inPlace); + } + public UInt32DataFrameColumn Subtract(ushort value, bool inPlace = false) + { + uint convertedValue = (uint)value; + return SubtractImplementation(convertedValue, inPlace); + } + public UInt32DataFrameColumn ReverseSubtract(ushort value, bool inPlace = false) + { + uint convertedValue = (uint)value; + return ReverseSubtractImplementation(convertedValue, inPlace); + } + public UInt32DataFrameColumn Multiply(ushort value, bool inPlace = false) + { + uint convertedValue = (uint)value; + return MultiplyImplementation(convertedValue, inPlace); + } + public UInt32DataFrameColumn ReverseMultiply(ushort value, bool inPlace = false) + { + uint convertedValue = (uint)value; + return ReverseMultiplyImplementation(convertedValue, inPlace); + } + public UInt32DataFrameColumn Divide(ushort value, bool inPlace = false) + { + uint convertedValue = (uint)value; + return DivideImplementation(convertedValue, inPlace); + } + public UInt32DataFrameColumn ReverseDivide(ushort value, bool inPlace = false) + { + uint convertedValue = (uint)value; + return ReverseDivideImplementation(convertedValue, inPlace); + } + public UInt32DataFrameColumn Modulo(ushort value, bool inPlace = false) + { + uint convertedValue = (uint)value; + return ModuloImplementation(convertedValue, inPlace); + } + public UInt32DataFrameColumn ReverseModulo(ushort value, bool inPlace = false) + { + uint convertedValue = (uint)value; + return ReverseModuloImplementation(convertedValue, inPlace); + } + } + public partial class UInt64DataFrameColumn + { + public UInt64DataFrameColumn Add(byte value, bool inPlace = false) + { + ulong convertedValue = (ulong)value; + return AddImplementation(convertedValue, inPlace); + } + public UInt64DataFrameColumn ReverseAdd(byte value, bool inPlace = false) + { + ulong convertedValue = (ulong)value; + return ReverseAddImplementation(convertedValue, inPlace); + } + public UInt64DataFrameColumn Subtract(byte value, bool inPlace = false) + { + ulong convertedValue = (ulong)value; + return SubtractImplementation(convertedValue, inPlace); + } + public UInt64DataFrameColumn ReverseSubtract(byte value, bool inPlace = false) + { + ulong convertedValue = (ulong)value; + return ReverseSubtractImplementation(convertedValue, inPlace); + } + public UInt64DataFrameColumn Multiply(byte value, bool inPlace = false) + { + ulong convertedValue = (ulong)value; + return MultiplyImplementation(convertedValue, inPlace); + } + public UInt64DataFrameColumn ReverseMultiply(byte value, bool inPlace = false) + { + ulong convertedValue = (ulong)value; + return ReverseMultiplyImplementation(convertedValue, inPlace); + } + public UInt64DataFrameColumn Divide(byte value, bool inPlace = false) + { + ulong convertedValue = (ulong)value; + return DivideImplementation(convertedValue, inPlace); + } + public UInt64DataFrameColumn ReverseDivide(byte value, bool inPlace = false) + { + ulong convertedValue = (ulong)value; + return ReverseDivideImplementation(convertedValue, inPlace); + } + public UInt64DataFrameColumn Modulo(byte value, bool inPlace = false) + { + ulong convertedValue = (ulong)value; + return ModuloImplementation(convertedValue, inPlace); + } + public UInt64DataFrameColumn ReverseModulo(byte value, bool inPlace = false) + { + ulong convertedValue = (ulong)value; + return ReverseModuloImplementation(convertedValue, inPlace); + } + public DecimalDataFrameColumn Add(decimal value) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.AddImplementation(value, inPlace: true); + } + public DecimalDataFrameColumn ReverseAdd(decimal value) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.ReverseAddImplementation(value, inPlace: true); + } + public DecimalDataFrameColumn Subtract(decimal value) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.SubtractImplementation(value, inPlace: true); + } + public DecimalDataFrameColumn ReverseSubtract(decimal value) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.ReverseSubtractImplementation(value, inPlace: true); + } + public DecimalDataFrameColumn Multiply(decimal value) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.MultiplyImplementation(value, inPlace: true); + } + public DecimalDataFrameColumn ReverseMultiply(decimal value) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.ReverseMultiplyImplementation(value, inPlace: true); + } + public DecimalDataFrameColumn Divide(decimal value) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.DivideImplementation(value, inPlace: true); + } + public DecimalDataFrameColumn ReverseDivide(decimal value) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.ReverseDivideImplementation(value, inPlace: true); + } + public DecimalDataFrameColumn Modulo(decimal value) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.ModuloImplementation(value, inPlace: true); + } + public DecimalDataFrameColumn ReverseModulo(decimal value) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.ReverseModuloImplementation(value, inPlace: true); + } + public DoubleDataFrameColumn Add(double value) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.AddImplementation(value, inPlace: true); + } + public DoubleDataFrameColumn ReverseAdd(double value) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.ReverseAddImplementation(value, inPlace: true); + } + public DoubleDataFrameColumn Subtract(double value) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.SubtractImplementation(value, inPlace: true); + } + public DoubleDataFrameColumn ReverseSubtract(double value) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.ReverseSubtractImplementation(value, inPlace: true); + } + public DoubleDataFrameColumn Multiply(double value) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.MultiplyImplementation(value, inPlace: true); + } + public DoubleDataFrameColumn ReverseMultiply(double value) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.ReverseMultiplyImplementation(value, inPlace: true); + } + public DoubleDataFrameColumn Divide(double value) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.DivideImplementation(value, inPlace: true); + } + public DoubleDataFrameColumn ReverseDivide(double value) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.ReverseDivideImplementation(value, inPlace: true); + } + public DoubleDataFrameColumn Modulo(double value) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.ModuloImplementation(value, inPlace: true); + } + public DoubleDataFrameColumn ReverseModulo(double value) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.ReverseModuloImplementation(value, inPlace: true); + } + public SingleDataFrameColumn Add(float value) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.AddImplementation(value, inPlace: true); + } + public SingleDataFrameColumn ReverseAdd(float value) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.ReverseAddImplementation(value, inPlace: true); + } + public SingleDataFrameColumn Subtract(float value) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.SubtractImplementation(value, inPlace: true); + } + public SingleDataFrameColumn ReverseSubtract(float value) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.ReverseSubtractImplementation(value, inPlace: true); + } + public SingleDataFrameColumn Multiply(float value) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.MultiplyImplementation(value, inPlace: true); + } + public SingleDataFrameColumn ReverseMultiply(float value) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.ReverseMultiplyImplementation(value, inPlace: true); + } + public SingleDataFrameColumn Divide(float value) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.DivideImplementation(value, inPlace: true); + } + public SingleDataFrameColumn ReverseDivide(float value) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.ReverseDivideImplementation(value, inPlace: true); + } + public SingleDataFrameColumn Modulo(float value) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.ModuloImplementation(value, inPlace: true); + } + public SingleDataFrameColumn ReverseModulo(float value) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.ReverseModuloImplementation(value, inPlace: true); + } + public SingleDataFrameColumn Add(int value) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.AddImplementation(value, inPlace: true); + } + public SingleDataFrameColumn ReverseAdd(int value) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.ReverseAddImplementation(value, inPlace: true); + } + public SingleDataFrameColumn Subtract(int value) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.SubtractImplementation(value, inPlace: true); + } + public SingleDataFrameColumn ReverseSubtract(int value) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.ReverseSubtractImplementation(value, inPlace: true); + } + public SingleDataFrameColumn Multiply(int value) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.MultiplyImplementation(value, inPlace: true); + } + public SingleDataFrameColumn ReverseMultiply(int value) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.ReverseMultiplyImplementation(value, inPlace: true); + } + public SingleDataFrameColumn Divide(int value) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.DivideImplementation(value, inPlace: true); + } + public SingleDataFrameColumn ReverseDivide(int value) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.ReverseDivideImplementation(value, inPlace: true); + } + public SingleDataFrameColumn Modulo(int value) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.ModuloImplementation(value, inPlace: true); + } + public SingleDataFrameColumn ReverseModulo(int value) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.ReverseModuloImplementation(value, inPlace: true); + } + public SingleDataFrameColumn Add(sbyte value) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.AddImplementation(value, inPlace: true); + } + public SingleDataFrameColumn ReverseAdd(sbyte value) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.ReverseAddImplementation(value, inPlace: true); + } + public SingleDataFrameColumn Subtract(sbyte value) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.SubtractImplementation(value, inPlace: true); + } + public SingleDataFrameColumn ReverseSubtract(sbyte value) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.ReverseSubtractImplementation(value, inPlace: true); + } + public SingleDataFrameColumn Multiply(sbyte value) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.MultiplyImplementation(value, inPlace: true); + } + public SingleDataFrameColumn ReverseMultiply(sbyte value) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.ReverseMultiplyImplementation(value, inPlace: true); + } + public SingleDataFrameColumn Divide(sbyte value) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.DivideImplementation(value, inPlace: true); + } + public SingleDataFrameColumn ReverseDivide(sbyte value) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.ReverseDivideImplementation(value, inPlace: true); + } + public SingleDataFrameColumn Modulo(sbyte value) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.ModuloImplementation(value, inPlace: true); + } + public SingleDataFrameColumn ReverseModulo(sbyte value) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.ReverseModuloImplementation(value, inPlace: true); + } + public SingleDataFrameColumn Add(short value) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.AddImplementation(value, inPlace: true); + } + public SingleDataFrameColumn ReverseAdd(short value) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.ReverseAddImplementation(value, inPlace: true); + } + public SingleDataFrameColumn Subtract(short value) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.SubtractImplementation(value, inPlace: true); + } + public SingleDataFrameColumn ReverseSubtract(short value) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.ReverseSubtractImplementation(value, inPlace: true); + } + public SingleDataFrameColumn Multiply(short value) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.MultiplyImplementation(value, inPlace: true); + } + public SingleDataFrameColumn ReverseMultiply(short value) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.ReverseMultiplyImplementation(value, inPlace: true); + } + public SingleDataFrameColumn Divide(short value) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.DivideImplementation(value, inPlace: true); + } + public SingleDataFrameColumn ReverseDivide(short value) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.ReverseDivideImplementation(value, inPlace: true); + } + public SingleDataFrameColumn Modulo(short value) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.ModuloImplementation(value, inPlace: true); + } + public SingleDataFrameColumn ReverseModulo(short value) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.ReverseModuloImplementation(value, inPlace: true); + } + public UInt64DataFrameColumn Add(uint value, bool inPlace = false) + { + ulong convertedValue = (ulong)value; + return AddImplementation(convertedValue, inPlace); + } + public UInt64DataFrameColumn ReverseAdd(uint value, bool inPlace = false) + { + ulong convertedValue = (ulong)value; + return ReverseAddImplementation(convertedValue, inPlace); + } + public UInt64DataFrameColumn Subtract(uint value, bool inPlace = false) + { + ulong convertedValue = (ulong)value; + return SubtractImplementation(convertedValue, inPlace); + } + public UInt64DataFrameColumn ReverseSubtract(uint value, bool inPlace = false) + { + ulong convertedValue = (ulong)value; + return ReverseSubtractImplementation(convertedValue, inPlace); + } + public UInt64DataFrameColumn Multiply(uint value, bool inPlace = false) + { + ulong convertedValue = (ulong)value; + return MultiplyImplementation(convertedValue, inPlace); + } + public UInt64DataFrameColumn ReverseMultiply(uint value, bool inPlace = false) + { + ulong convertedValue = (ulong)value; + return ReverseMultiplyImplementation(convertedValue, inPlace); + } + public UInt64DataFrameColumn Divide(uint value, bool inPlace = false) + { + ulong convertedValue = (ulong)value; + return DivideImplementation(convertedValue, inPlace); + } + public UInt64DataFrameColumn ReverseDivide(uint value, bool inPlace = false) + { + ulong convertedValue = (ulong)value; + return ReverseDivideImplementation(convertedValue, inPlace); + } + public UInt64DataFrameColumn Modulo(uint value, bool inPlace = false) + { + ulong convertedValue = (ulong)value; + return ModuloImplementation(convertedValue, inPlace); + } + public UInt64DataFrameColumn ReverseModulo(uint value, bool inPlace = false) + { + ulong convertedValue = (ulong)value; + return ReverseModuloImplementation(convertedValue, inPlace); + } + public UInt64DataFrameColumn Add(ulong value, bool inPlace = false) + { + return AddImplementation(value, inPlace); + } + public UInt64DataFrameColumn ReverseAdd(ulong value, bool inPlace = false) + { + return ReverseAddImplementation(value, inPlace); + } + public UInt64DataFrameColumn Subtract(ulong value, bool inPlace = false) + { + return SubtractImplementation(value, inPlace); + } + public UInt64DataFrameColumn ReverseSubtract(ulong value, bool inPlace = false) + { + return ReverseSubtractImplementation(value, inPlace); + } + public UInt64DataFrameColumn Multiply(ulong value, bool inPlace = false) + { + return MultiplyImplementation(value, inPlace); + } + public UInt64DataFrameColumn ReverseMultiply(ulong value, bool inPlace = false) + { + return ReverseMultiplyImplementation(value, inPlace); + } + public UInt64DataFrameColumn Divide(ulong value, bool inPlace = false) + { + return DivideImplementation(value, inPlace); + } + public UInt64DataFrameColumn ReverseDivide(ulong value, bool inPlace = false) + { + return ReverseDivideImplementation(value, inPlace); + } + public UInt64DataFrameColumn Modulo(ulong value, bool inPlace = false) + { + return ModuloImplementation(value, inPlace); + } + public UInt64DataFrameColumn ReverseModulo(ulong value, bool inPlace = false) + { + return ReverseModuloImplementation(value, inPlace); + } + public UInt64DataFrameColumn Add(ushort value, bool inPlace = false) + { + ulong convertedValue = (ulong)value; + return AddImplementation(convertedValue, inPlace); + } + public UInt64DataFrameColumn ReverseAdd(ushort value, bool inPlace = false) + { + ulong convertedValue = (ulong)value; + return ReverseAddImplementation(convertedValue, inPlace); + } + public UInt64DataFrameColumn Subtract(ushort value, bool inPlace = false) + { + ulong convertedValue = (ulong)value; + return SubtractImplementation(convertedValue, inPlace); + } + public UInt64DataFrameColumn ReverseSubtract(ushort value, bool inPlace = false) + { + ulong convertedValue = (ulong)value; + return ReverseSubtractImplementation(convertedValue, inPlace); + } + public UInt64DataFrameColumn Multiply(ushort value, bool inPlace = false) + { + ulong convertedValue = (ulong)value; + return MultiplyImplementation(convertedValue, inPlace); + } + public UInt64DataFrameColumn ReverseMultiply(ushort value, bool inPlace = false) + { + ulong convertedValue = (ulong)value; + return ReverseMultiplyImplementation(convertedValue, inPlace); + } + public UInt64DataFrameColumn Divide(ushort value, bool inPlace = false) + { + ulong convertedValue = (ulong)value; + return DivideImplementation(convertedValue, inPlace); + } + public UInt64DataFrameColumn ReverseDivide(ushort value, bool inPlace = false) + { + ulong convertedValue = (ulong)value; + return ReverseDivideImplementation(convertedValue, inPlace); + } + public UInt64DataFrameColumn Modulo(ushort value, bool inPlace = false) + { + ulong convertedValue = (ulong)value; + return ModuloImplementation(convertedValue, inPlace); + } + public UInt64DataFrameColumn ReverseModulo(ushort value, bool inPlace = false) + { + ulong convertedValue = (ulong)value; + return ReverseModuloImplementation(convertedValue, inPlace); + } + } + public partial class UInt16DataFrameColumn + { + public Int32DataFrameColumn Add(byte value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.AddImplementation(value, inPlace: true); + } + public Int32DataFrameColumn ReverseAdd(byte value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.ReverseAddImplementation(value, inPlace: true); + } + public Int32DataFrameColumn Subtract(byte value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.SubtractImplementation(value, inPlace: true); + } + public Int32DataFrameColumn ReverseSubtract(byte value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.ReverseSubtractImplementation(value, inPlace: true); + } + public Int32DataFrameColumn Multiply(byte value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.MultiplyImplementation(value, inPlace: true); + } + public Int32DataFrameColumn ReverseMultiply(byte value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.ReverseMultiplyImplementation(value, inPlace: true); + } + public Int32DataFrameColumn Divide(byte value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.DivideImplementation(value, inPlace: true); + } + public Int32DataFrameColumn ReverseDivide(byte value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.ReverseDivideImplementation(value, inPlace: true); + } + public Int32DataFrameColumn Modulo(byte value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.ModuloImplementation(value, inPlace: true); + } + public Int32DataFrameColumn ReverseModulo(byte value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.ReverseModuloImplementation(value, inPlace: true); + } + public DecimalDataFrameColumn Add(decimal value) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.AddImplementation(value, inPlace: true); + } + public DecimalDataFrameColumn ReverseAdd(decimal value) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.ReverseAddImplementation(value, inPlace: true); + } + public DecimalDataFrameColumn Subtract(decimal value) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.SubtractImplementation(value, inPlace: true); + } + public DecimalDataFrameColumn ReverseSubtract(decimal value) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.ReverseSubtractImplementation(value, inPlace: true); + } + public DecimalDataFrameColumn Multiply(decimal value) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.MultiplyImplementation(value, inPlace: true); + } + public DecimalDataFrameColumn ReverseMultiply(decimal value) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.ReverseMultiplyImplementation(value, inPlace: true); + } + public DecimalDataFrameColumn Divide(decimal value) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.DivideImplementation(value, inPlace: true); + } + public DecimalDataFrameColumn ReverseDivide(decimal value) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.ReverseDivideImplementation(value, inPlace: true); + } + public DecimalDataFrameColumn Modulo(decimal value) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.ModuloImplementation(value, inPlace: true); + } + public DecimalDataFrameColumn ReverseModulo(decimal value) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.ReverseModuloImplementation(value, inPlace: true); + } + public DoubleDataFrameColumn Add(double value) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.AddImplementation(value, inPlace: true); + } + public DoubleDataFrameColumn ReverseAdd(double value) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.ReverseAddImplementation(value, inPlace: true); + } + public DoubleDataFrameColumn Subtract(double value) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.SubtractImplementation(value, inPlace: true); + } + public DoubleDataFrameColumn ReverseSubtract(double value) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.ReverseSubtractImplementation(value, inPlace: true); + } + public DoubleDataFrameColumn Multiply(double value) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.MultiplyImplementation(value, inPlace: true); + } + public DoubleDataFrameColumn ReverseMultiply(double value) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.ReverseMultiplyImplementation(value, inPlace: true); + } + public DoubleDataFrameColumn Divide(double value) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.DivideImplementation(value, inPlace: true); + } + public DoubleDataFrameColumn ReverseDivide(double value) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.ReverseDivideImplementation(value, inPlace: true); + } + public DoubleDataFrameColumn Modulo(double value) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.ModuloImplementation(value, inPlace: true); + } + public DoubleDataFrameColumn ReverseModulo(double value) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.ReverseModuloImplementation(value, inPlace: true); + } + public SingleDataFrameColumn Add(float value) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.AddImplementation(value, inPlace: true); + } + public SingleDataFrameColumn ReverseAdd(float value) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.ReverseAddImplementation(value, inPlace: true); + } + public SingleDataFrameColumn Subtract(float value) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.SubtractImplementation(value, inPlace: true); + } + public SingleDataFrameColumn ReverseSubtract(float value) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.ReverseSubtractImplementation(value, inPlace: true); + } + public SingleDataFrameColumn Multiply(float value) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.MultiplyImplementation(value, inPlace: true); + } + public SingleDataFrameColumn ReverseMultiply(float value) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.ReverseMultiplyImplementation(value, inPlace: true); + } + public SingleDataFrameColumn Divide(float value) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.DivideImplementation(value, inPlace: true); + } + public SingleDataFrameColumn ReverseDivide(float value) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.ReverseDivideImplementation(value, inPlace: true); + } + public SingleDataFrameColumn Modulo(float value) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.ModuloImplementation(value, inPlace: true); + } + public SingleDataFrameColumn ReverseModulo(float value) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.ReverseModuloImplementation(value, inPlace: true); + } + public Int32DataFrameColumn Add(int value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.AddImplementation(value, inPlace: true); + } + public Int32DataFrameColumn ReverseAdd(int value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.ReverseAddImplementation(value, inPlace: true); + } + public Int32DataFrameColumn Subtract(int value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.SubtractImplementation(value, inPlace: true); + } + public Int32DataFrameColumn ReverseSubtract(int value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.ReverseSubtractImplementation(value, inPlace: true); + } + public Int32DataFrameColumn Multiply(int value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.MultiplyImplementation(value, inPlace: true); + } + public Int32DataFrameColumn ReverseMultiply(int value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.ReverseMultiplyImplementation(value, inPlace: true); + } + public Int32DataFrameColumn Divide(int value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.DivideImplementation(value, inPlace: true); + } + public Int32DataFrameColumn ReverseDivide(int value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.ReverseDivideImplementation(value, inPlace: true); + } + public Int32DataFrameColumn Modulo(int value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.ModuloImplementation(value, inPlace: true); + } + public Int32DataFrameColumn ReverseModulo(int value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.ReverseModuloImplementation(value, inPlace: true); + } + public Int64DataFrameColumn Add(long value) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.AddImplementation(value, inPlace: true); + } + public Int64DataFrameColumn ReverseAdd(long value) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.ReverseAddImplementation(value, inPlace: true); + } + public Int64DataFrameColumn Subtract(long value) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.SubtractImplementation(value, inPlace: true); + } + public Int64DataFrameColumn ReverseSubtract(long value) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.ReverseSubtractImplementation(value, inPlace: true); + } + public Int64DataFrameColumn Multiply(long value) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.MultiplyImplementation(value, inPlace: true); + } + public Int64DataFrameColumn ReverseMultiply(long value) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.ReverseMultiplyImplementation(value, inPlace: true); + } + public Int64DataFrameColumn Divide(long value) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.DivideImplementation(value, inPlace: true); + } + public Int64DataFrameColumn ReverseDivide(long value) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.ReverseDivideImplementation(value, inPlace: true); + } + public Int64DataFrameColumn Modulo(long value) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.ModuloImplementation(value, inPlace: true); + } + public Int64DataFrameColumn ReverseModulo(long value) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.ReverseModuloImplementation(value, inPlace: true); + } + public Int32DataFrameColumn Add(sbyte value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.AddImplementation(value, inPlace: true); + } + public Int32DataFrameColumn ReverseAdd(sbyte value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.ReverseAddImplementation(value, inPlace: true); + } + public Int32DataFrameColumn Subtract(sbyte value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.SubtractImplementation(value, inPlace: true); + } + public Int32DataFrameColumn ReverseSubtract(sbyte value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.ReverseSubtractImplementation(value, inPlace: true); + } + public Int32DataFrameColumn Multiply(sbyte value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.MultiplyImplementation(value, inPlace: true); + } + public Int32DataFrameColumn ReverseMultiply(sbyte value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.ReverseMultiplyImplementation(value, inPlace: true); + } + public Int32DataFrameColumn Divide(sbyte value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.DivideImplementation(value, inPlace: true); + } + public Int32DataFrameColumn ReverseDivide(sbyte value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.ReverseDivideImplementation(value, inPlace: true); + } + public Int32DataFrameColumn Modulo(sbyte value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.ModuloImplementation(value, inPlace: true); + } + public Int32DataFrameColumn ReverseModulo(sbyte value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.ReverseModuloImplementation(value, inPlace: true); + } + public Int32DataFrameColumn Add(short value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.AddImplementation(value, inPlace: true); + } + public Int32DataFrameColumn ReverseAdd(short value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.ReverseAddImplementation(value, inPlace: true); + } + public Int32DataFrameColumn Subtract(short value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.SubtractImplementation(value, inPlace: true); + } + public Int32DataFrameColumn ReverseSubtract(short value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.ReverseSubtractImplementation(value, inPlace: true); + } + public Int32DataFrameColumn Multiply(short value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.MultiplyImplementation(value, inPlace: true); + } + public Int32DataFrameColumn ReverseMultiply(short value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.ReverseMultiplyImplementation(value, inPlace: true); + } + public Int32DataFrameColumn Divide(short value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.DivideImplementation(value, inPlace: true); + } + public Int32DataFrameColumn ReverseDivide(short value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.ReverseDivideImplementation(value, inPlace: true); + } + public Int32DataFrameColumn Modulo(short value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.ModuloImplementation(value, inPlace: true); + } + public Int32DataFrameColumn ReverseModulo(short value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.ReverseModuloImplementation(value, inPlace: true); + } + public UInt32DataFrameColumn Add(uint value) + { + UInt32DataFrameColumn uintColumn = CloneAsUInt32Column(); + return uintColumn.AddImplementation(value, inPlace: true); + } + public UInt32DataFrameColumn ReverseAdd(uint value) + { + UInt32DataFrameColumn uintColumn = CloneAsUInt32Column(); + return uintColumn.ReverseAddImplementation(value, inPlace: true); + } + public UInt32DataFrameColumn Subtract(uint value) + { + UInt32DataFrameColumn uintColumn = CloneAsUInt32Column(); + return uintColumn.SubtractImplementation(value, inPlace: true); + } + public UInt32DataFrameColumn ReverseSubtract(uint value) + { + UInt32DataFrameColumn uintColumn = CloneAsUInt32Column(); + return uintColumn.ReverseSubtractImplementation(value, inPlace: true); + } + public UInt32DataFrameColumn Multiply(uint value) + { + UInt32DataFrameColumn uintColumn = CloneAsUInt32Column(); + return uintColumn.MultiplyImplementation(value, inPlace: true); + } + public UInt32DataFrameColumn ReverseMultiply(uint value) + { + UInt32DataFrameColumn uintColumn = CloneAsUInt32Column(); + return uintColumn.ReverseMultiplyImplementation(value, inPlace: true); + } + public UInt32DataFrameColumn Divide(uint value) + { + UInt32DataFrameColumn uintColumn = CloneAsUInt32Column(); + return uintColumn.DivideImplementation(value, inPlace: true); + } + public UInt32DataFrameColumn ReverseDivide(uint value) + { + UInt32DataFrameColumn uintColumn = CloneAsUInt32Column(); + return uintColumn.ReverseDivideImplementation(value, inPlace: true); + } + public UInt32DataFrameColumn Modulo(uint value) + { + UInt32DataFrameColumn uintColumn = CloneAsUInt32Column(); + return uintColumn.ModuloImplementation(value, inPlace: true); + } + public UInt32DataFrameColumn ReverseModulo(uint value) + { + UInt32DataFrameColumn uintColumn = CloneAsUInt32Column(); + return uintColumn.ReverseModuloImplementation(value, inPlace: true); + } + public UInt64DataFrameColumn Add(ulong value) + { + UInt64DataFrameColumn ulongColumn = CloneAsUInt64Column(); + return ulongColumn.AddImplementation(value, inPlace: true); + } + public UInt64DataFrameColumn ReverseAdd(ulong value) + { + UInt64DataFrameColumn ulongColumn = CloneAsUInt64Column(); + return ulongColumn.ReverseAddImplementation(value, inPlace: true); + } + public UInt64DataFrameColumn Subtract(ulong value) + { + UInt64DataFrameColumn ulongColumn = CloneAsUInt64Column(); + return ulongColumn.SubtractImplementation(value, inPlace: true); + } + public UInt64DataFrameColumn ReverseSubtract(ulong value) + { + UInt64DataFrameColumn ulongColumn = CloneAsUInt64Column(); + return ulongColumn.ReverseSubtractImplementation(value, inPlace: true); + } + public UInt64DataFrameColumn Multiply(ulong value) + { + UInt64DataFrameColumn ulongColumn = CloneAsUInt64Column(); + return ulongColumn.MultiplyImplementation(value, inPlace: true); + } + public UInt64DataFrameColumn ReverseMultiply(ulong value) + { + UInt64DataFrameColumn ulongColumn = CloneAsUInt64Column(); + return ulongColumn.ReverseMultiplyImplementation(value, inPlace: true); + } + public UInt64DataFrameColumn Divide(ulong value) + { + UInt64DataFrameColumn ulongColumn = CloneAsUInt64Column(); + return ulongColumn.DivideImplementation(value, inPlace: true); + } + public UInt64DataFrameColumn ReverseDivide(ulong value) + { + UInt64DataFrameColumn ulongColumn = CloneAsUInt64Column(); + return ulongColumn.ReverseDivideImplementation(value, inPlace: true); + } + public UInt64DataFrameColumn Modulo(ulong value) + { + UInt64DataFrameColumn ulongColumn = CloneAsUInt64Column(); + return ulongColumn.ModuloImplementation(value, inPlace: true); + } + public UInt64DataFrameColumn ReverseModulo(ulong value) + { + UInt64DataFrameColumn ulongColumn = CloneAsUInt64Column(); + return ulongColumn.ReverseModuloImplementation(value, inPlace: true); + } + public Int32DataFrameColumn Add(ushort value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.AddImplementation(value, inPlace: true); + } + public Int32DataFrameColumn ReverseAdd(ushort value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.ReverseAddImplementation(value, inPlace: true); + } + public Int32DataFrameColumn Subtract(ushort value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.SubtractImplementation(value, inPlace: true); + } + public Int32DataFrameColumn ReverseSubtract(ushort value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.ReverseSubtractImplementation(value, inPlace: true); + } + public Int32DataFrameColumn Multiply(ushort value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.MultiplyImplementation(value, inPlace: true); + } + public Int32DataFrameColumn ReverseMultiply(ushort value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.ReverseMultiplyImplementation(value, inPlace: true); + } + public Int32DataFrameColumn Divide(ushort value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.DivideImplementation(value, inPlace: true); + } + public Int32DataFrameColumn ReverseDivide(ushort value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.ReverseDivideImplementation(value, inPlace: true); + } + public Int32DataFrameColumn Modulo(ushort value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.ModuloImplementation(value, inPlace: true); + } + public Int32DataFrameColumn ReverseModulo(ushort value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.ReverseModuloImplementation(value, inPlace: true); + } + } + public partial class BooleanDataFrameColumn + { + public BooleanDataFrameColumn And(BooleanDataFrameColumn column, bool inPlace = false) + { + if (column.Length != Length) + { + throw new ArgumentException(Strings.MismatchedColumnLengths, nameof(column)); + } + BooleanDataFrameColumn retColumn = inPlace ? this : CloneAsBooleanColumn(); + retColumn.ColumnContainer.And(column.ColumnContainer); + return retColumn; + } + } + public partial class BooleanDataFrameColumn + { + public new BooleanDataFrameColumn And(bool value, bool inPlace = false) + { + BooleanDataFrameColumn retColumn = inPlace ? this : CloneAsBooleanColumn(); + retColumn.ColumnContainer.And(value); + return retColumn; + } + } + public partial class BooleanDataFrameColumn + { + public BooleanDataFrameColumn Or(BooleanDataFrameColumn column, bool inPlace = false) + { + if (column.Length != Length) + { + throw new ArgumentException(Strings.MismatchedColumnLengths, nameof(column)); + } + BooleanDataFrameColumn retColumn = inPlace ? this : CloneAsBooleanColumn(); + retColumn.ColumnContainer.Or(column.ColumnContainer); + return retColumn; + } + } + public partial class BooleanDataFrameColumn + { + public new BooleanDataFrameColumn Or(bool value, bool inPlace = false) + { + BooleanDataFrameColumn retColumn = inPlace ? this : CloneAsBooleanColumn(); + retColumn.ColumnContainer.Or(value); + return retColumn; + } + } + public partial class BooleanDataFrameColumn + { + public BooleanDataFrameColumn Xor(BooleanDataFrameColumn column, bool inPlace = false) + { + if (column.Length != Length) + { + throw new ArgumentException(Strings.MismatchedColumnLengths, nameof(column)); + } + BooleanDataFrameColumn retColumn = inPlace ? this : CloneAsBooleanColumn(); + retColumn.ColumnContainer.Xor(column.ColumnContainer); + return retColumn; + } + } + public partial class BooleanDataFrameColumn + { + public new BooleanDataFrameColumn Xor(bool value, bool inPlace = false) + { + BooleanDataFrameColumn retColumn = inPlace ? this : CloneAsBooleanColumn(); + retColumn.ColumnContainer.Xor(value); + return retColumn; + } + } + + public partial class BooleanDataFrameColumn + { + public BooleanDataFrameColumn ElementwiseEquals(BooleanDataFrameColumn column) + { + return ElementwiseEqualsImplementation(column); + } + public BooleanDataFrameColumn ElementwiseNotEquals(BooleanDataFrameColumn column) + { + return ElementwiseNotEqualsImplementation(column); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(BooleanDataFrameColumn column) + { + return ElementwiseGreaterThanOrEqualImplementation(column); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(BooleanDataFrameColumn column) + { + return ElementwiseLessThanOrEqualImplementation(column); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(BooleanDataFrameColumn column) + { + return ElementwiseGreaterThanImplementation(column); + } + public BooleanDataFrameColumn ElementwiseLessThan(BooleanDataFrameColumn column) + { + return ElementwiseLessThanImplementation(column); + } + } + public partial class ByteDataFrameColumn + { + public BooleanDataFrameColumn ElementwiseEquals(ByteDataFrameColumn column) + { + return ElementwiseEqualsImplementation(column); + } + public BooleanDataFrameColumn ElementwiseNotEquals(ByteDataFrameColumn column) + { + return ElementwiseNotEqualsImplementation(column); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(ByteDataFrameColumn column) + { + return ElementwiseGreaterThanOrEqualImplementation(column); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(ByteDataFrameColumn column) + { + return ElementwiseLessThanOrEqualImplementation(column); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(ByteDataFrameColumn column) + { + return ElementwiseGreaterThanImplementation(column); + } + public BooleanDataFrameColumn ElementwiseLessThan(ByteDataFrameColumn column) + { + return ElementwiseLessThanImplementation(column); + } + public BooleanDataFrameColumn ElementwiseEquals(DecimalDataFrameColumn column) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.ElementwiseEqualsImplementation(column); + } + public BooleanDataFrameColumn ElementwiseNotEquals(DecimalDataFrameColumn column) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.ElementwiseNotEqualsImplementation(column); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(DecimalDataFrameColumn column) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.ElementwiseGreaterThanOrEqualImplementation(column); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(DecimalDataFrameColumn column) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.ElementwiseLessThanOrEqualImplementation(column); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(DecimalDataFrameColumn column) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.ElementwiseGreaterThanImplementation(column); + } + public BooleanDataFrameColumn ElementwiseLessThan(DecimalDataFrameColumn column) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.ElementwiseLessThanImplementation(column); + } + public BooleanDataFrameColumn ElementwiseEquals(DoubleDataFrameColumn column) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.ElementwiseEqualsImplementation(column); + } + public BooleanDataFrameColumn ElementwiseNotEquals(DoubleDataFrameColumn column) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.ElementwiseNotEqualsImplementation(column); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(DoubleDataFrameColumn column) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.ElementwiseGreaterThanOrEqualImplementation(column); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(DoubleDataFrameColumn column) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.ElementwiseLessThanOrEqualImplementation(column); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(DoubleDataFrameColumn column) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.ElementwiseGreaterThanImplementation(column); + } + public BooleanDataFrameColumn ElementwiseLessThan(DoubleDataFrameColumn column) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.ElementwiseLessThanImplementation(column); + } + public BooleanDataFrameColumn ElementwiseEquals(SingleDataFrameColumn column) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.ElementwiseEqualsImplementation(column); + } + public BooleanDataFrameColumn ElementwiseNotEquals(SingleDataFrameColumn column) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.ElementwiseNotEqualsImplementation(column); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(SingleDataFrameColumn column) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.ElementwiseGreaterThanOrEqualImplementation(column); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(SingleDataFrameColumn column) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.ElementwiseLessThanOrEqualImplementation(column); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(SingleDataFrameColumn column) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.ElementwiseGreaterThanImplementation(column); + } + public BooleanDataFrameColumn ElementwiseLessThan(SingleDataFrameColumn column) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.ElementwiseLessThanImplementation(column); + } + public BooleanDataFrameColumn ElementwiseEquals(Int32DataFrameColumn column) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.ElementwiseEqualsImplementation(column); + } + public BooleanDataFrameColumn ElementwiseNotEquals(Int32DataFrameColumn column) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.ElementwiseNotEqualsImplementation(column); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(Int32DataFrameColumn column) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.ElementwiseGreaterThanOrEqualImplementation(column); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(Int32DataFrameColumn column) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.ElementwiseLessThanOrEqualImplementation(column); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(Int32DataFrameColumn column) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.ElementwiseGreaterThanImplementation(column); + } + public BooleanDataFrameColumn ElementwiseLessThan(Int32DataFrameColumn column) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.ElementwiseLessThanImplementation(column); + } + public BooleanDataFrameColumn ElementwiseEquals(Int64DataFrameColumn column) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.ElementwiseEqualsImplementation(column); + } + public BooleanDataFrameColumn ElementwiseNotEquals(Int64DataFrameColumn column) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.ElementwiseNotEqualsImplementation(column); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(Int64DataFrameColumn column) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.ElementwiseGreaterThanOrEqualImplementation(column); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(Int64DataFrameColumn column) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.ElementwiseLessThanOrEqualImplementation(column); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(Int64DataFrameColumn column) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.ElementwiseGreaterThanImplementation(column); + } + public BooleanDataFrameColumn ElementwiseLessThan(Int64DataFrameColumn column) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.ElementwiseLessThanImplementation(column); + } + public BooleanDataFrameColumn ElementwiseEquals(SByteDataFrameColumn column) + { + ByteDataFrameColumn otherbyteColumn = column.CloneAsByteColumn(); + return ElementwiseEqualsImplementation(otherbyteColumn); + } + public BooleanDataFrameColumn ElementwiseNotEquals(SByteDataFrameColumn column) + { + ByteDataFrameColumn otherbyteColumn = column.CloneAsByteColumn(); + return ElementwiseNotEqualsImplementation(otherbyteColumn); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(SByteDataFrameColumn column) + { + ByteDataFrameColumn otherbyteColumn = column.CloneAsByteColumn(); + return ElementwiseGreaterThanOrEqualImplementation(otherbyteColumn); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(SByteDataFrameColumn column) + { + ByteDataFrameColumn otherbyteColumn = column.CloneAsByteColumn(); + return ElementwiseLessThanOrEqualImplementation(otherbyteColumn); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(SByteDataFrameColumn column) + { + ByteDataFrameColumn otherbyteColumn = column.CloneAsByteColumn(); + return ElementwiseGreaterThanImplementation(otherbyteColumn); + } + public BooleanDataFrameColumn ElementwiseLessThan(SByteDataFrameColumn column) + { + ByteDataFrameColumn otherbyteColumn = column.CloneAsByteColumn(); + return ElementwiseLessThanImplementation(otherbyteColumn); + } + public BooleanDataFrameColumn ElementwiseEquals(Int16DataFrameColumn column) + { + Int16DataFrameColumn shortColumn = CloneAsInt16Column(); + return shortColumn.ElementwiseEqualsImplementation(column); + } + public BooleanDataFrameColumn ElementwiseNotEquals(Int16DataFrameColumn column) + { + Int16DataFrameColumn shortColumn = CloneAsInt16Column(); + return shortColumn.ElementwiseNotEqualsImplementation(column); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(Int16DataFrameColumn column) + { + Int16DataFrameColumn shortColumn = CloneAsInt16Column(); + return shortColumn.ElementwiseGreaterThanOrEqualImplementation(column); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(Int16DataFrameColumn column) + { + Int16DataFrameColumn shortColumn = CloneAsInt16Column(); + return shortColumn.ElementwiseLessThanOrEqualImplementation(column); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(Int16DataFrameColumn column) + { + Int16DataFrameColumn shortColumn = CloneAsInt16Column(); + return shortColumn.ElementwiseGreaterThanImplementation(column); + } + public BooleanDataFrameColumn ElementwiseLessThan(Int16DataFrameColumn column) + { + Int16DataFrameColumn shortColumn = CloneAsInt16Column(); + return shortColumn.ElementwiseLessThanImplementation(column); + } + public BooleanDataFrameColumn ElementwiseEquals(UInt32DataFrameColumn column) + { + UInt32DataFrameColumn uintColumn = CloneAsUInt32Column(); + return uintColumn.ElementwiseEqualsImplementation(column); + } + public BooleanDataFrameColumn ElementwiseNotEquals(UInt32DataFrameColumn column) + { + UInt32DataFrameColumn uintColumn = CloneAsUInt32Column(); + return uintColumn.ElementwiseNotEqualsImplementation(column); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(UInt32DataFrameColumn column) + { + UInt32DataFrameColumn uintColumn = CloneAsUInt32Column(); + return uintColumn.ElementwiseGreaterThanOrEqualImplementation(column); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(UInt32DataFrameColumn column) + { + UInt32DataFrameColumn uintColumn = CloneAsUInt32Column(); + return uintColumn.ElementwiseLessThanOrEqualImplementation(column); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(UInt32DataFrameColumn column) + { + UInt32DataFrameColumn uintColumn = CloneAsUInt32Column(); + return uintColumn.ElementwiseGreaterThanImplementation(column); + } + public BooleanDataFrameColumn ElementwiseLessThan(UInt32DataFrameColumn column) + { + UInt32DataFrameColumn uintColumn = CloneAsUInt32Column(); + return uintColumn.ElementwiseLessThanImplementation(column); + } + public BooleanDataFrameColumn ElementwiseEquals(UInt64DataFrameColumn column) + { + UInt64DataFrameColumn ulongColumn = CloneAsUInt64Column(); + return ulongColumn.ElementwiseEqualsImplementation(column); + } + public BooleanDataFrameColumn ElementwiseNotEquals(UInt64DataFrameColumn column) + { + UInt64DataFrameColumn ulongColumn = CloneAsUInt64Column(); + return ulongColumn.ElementwiseNotEqualsImplementation(column); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(UInt64DataFrameColumn column) + { + UInt64DataFrameColumn ulongColumn = CloneAsUInt64Column(); + return ulongColumn.ElementwiseGreaterThanOrEqualImplementation(column); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(UInt64DataFrameColumn column) + { + UInt64DataFrameColumn ulongColumn = CloneAsUInt64Column(); + return ulongColumn.ElementwiseLessThanOrEqualImplementation(column); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(UInt64DataFrameColumn column) + { + UInt64DataFrameColumn ulongColumn = CloneAsUInt64Column(); + return ulongColumn.ElementwiseGreaterThanImplementation(column); + } + public BooleanDataFrameColumn ElementwiseLessThan(UInt64DataFrameColumn column) + { + UInt64DataFrameColumn ulongColumn = CloneAsUInt64Column(); + return ulongColumn.ElementwiseLessThanImplementation(column); + } + public BooleanDataFrameColumn ElementwiseEquals(UInt16DataFrameColumn column) + { + UInt16DataFrameColumn ushortColumn = CloneAsUInt16Column(); + return ushortColumn.ElementwiseEqualsImplementation(column); + } + public BooleanDataFrameColumn ElementwiseNotEquals(UInt16DataFrameColumn column) + { + UInt16DataFrameColumn ushortColumn = CloneAsUInt16Column(); + return ushortColumn.ElementwiseNotEqualsImplementation(column); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(UInt16DataFrameColumn column) + { + UInt16DataFrameColumn ushortColumn = CloneAsUInt16Column(); + return ushortColumn.ElementwiseGreaterThanOrEqualImplementation(column); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(UInt16DataFrameColumn column) + { + UInt16DataFrameColumn ushortColumn = CloneAsUInt16Column(); + return ushortColumn.ElementwiseLessThanOrEqualImplementation(column); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(UInt16DataFrameColumn column) + { + UInt16DataFrameColumn ushortColumn = CloneAsUInt16Column(); + return ushortColumn.ElementwiseGreaterThanImplementation(column); + } + public BooleanDataFrameColumn ElementwiseLessThan(UInt16DataFrameColumn column) + { + UInt16DataFrameColumn ushortColumn = CloneAsUInt16Column(); + return ushortColumn.ElementwiseLessThanImplementation(column); + } + } + public partial class DecimalDataFrameColumn + { + public BooleanDataFrameColumn ElementwiseEquals(ByteDataFrameColumn column) + { + DecimalDataFrameColumn otherdecimalColumn = column.CloneAsDecimalColumn(); + return ElementwiseEqualsImplementation(otherdecimalColumn); + } + public BooleanDataFrameColumn ElementwiseNotEquals(ByteDataFrameColumn column) + { + DecimalDataFrameColumn otherdecimalColumn = column.CloneAsDecimalColumn(); + return ElementwiseNotEqualsImplementation(otherdecimalColumn); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(ByteDataFrameColumn column) + { + DecimalDataFrameColumn otherdecimalColumn = column.CloneAsDecimalColumn(); + return ElementwiseGreaterThanOrEqualImplementation(otherdecimalColumn); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(ByteDataFrameColumn column) + { + DecimalDataFrameColumn otherdecimalColumn = column.CloneAsDecimalColumn(); + return ElementwiseLessThanOrEqualImplementation(otherdecimalColumn); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(ByteDataFrameColumn column) + { + DecimalDataFrameColumn otherdecimalColumn = column.CloneAsDecimalColumn(); + return ElementwiseGreaterThanImplementation(otherdecimalColumn); + } + public BooleanDataFrameColumn ElementwiseLessThan(ByteDataFrameColumn column) + { + DecimalDataFrameColumn otherdecimalColumn = column.CloneAsDecimalColumn(); + return ElementwiseLessThanImplementation(otherdecimalColumn); + } + public BooleanDataFrameColumn ElementwiseEquals(DecimalDataFrameColumn column) + { + return ElementwiseEqualsImplementation(column); + } + public BooleanDataFrameColumn ElementwiseNotEquals(DecimalDataFrameColumn column) + { + return ElementwiseNotEqualsImplementation(column); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(DecimalDataFrameColumn column) + { + return ElementwiseGreaterThanOrEqualImplementation(column); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(DecimalDataFrameColumn column) + { + return ElementwiseLessThanOrEqualImplementation(column); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(DecimalDataFrameColumn column) + { + return ElementwiseGreaterThanImplementation(column); + } + public BooleanDataFrameColumn ElementwiseLessThan(DecimalDataFrameColumn column) + { + return ElementwiseLessThanImplementation(column); + } + public BooleanDataFrameColumn ElementwiseEquals(Int32DataFrameColumn column) + { + DecimalDataFrameColumn otherdecimalColumn = column.CloneAsDecimalColumn(); + return ElementwiseEqualsImplementation(otherdecimalColumn); + } + public BooleanDataFrameColumn ElementwiseNotEquals(Int32DataFrameColumn column) + { + DecimalDataFrameColumn otherdecimalColumn = column.CloneAsDecimalColumn(); + return ElementwiseNotEqualsImplementation(otherdecimalColumn); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(Int32DataFrameColumn column) + { + DecimalDataFrameColumn otherdecimalColumn = column.CloneAsDecimalColumn(); + return ElementwiseGreaterThanOrEqualImplementation(otherdecimalColumn); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(Int32DataFrameColumn column) + { + DecimalDataFrameColumn otherdecimalColumn = column.CloneAsDecimalColumn(); + return ElementwiseLessThanOrEqualImplementation(otherdecimalColumn); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(Int32DataFrameColumn column) + { + DecimalDataFrameColumn otherdecimalColumn = column.CloneAsDecimalColumn(); + return ElementwiseGreaterThanImplementation(otherdecimalColumn); + } + public BooleanDataFrameColumn ElementwiseLessThan(Int32DataFrameColumn column) + { + DecimalDataFrameColumn otherdecimalColumn = column.CloneAsDecimalColumn(); + return ElementwiseLessThanImplementation(otherdecimalColumn); + } + public BooleanDataFrameColumn ElementwiseEquals(Int64DataFrameColumn column) + { + DecimalDataFrameColumn otherdecimalColumn = column.CloneAsDecimalColumn(); + return ElementwiseEqualsImplementation(otherdecimalColumn); + } + public BooleanDataFrameColumn ElementwiseNotEquals(Int64DataFrameColumn column) + { + DecimalDataFrameColumn otherdecimalColumn = column.CloneAsDecimalColumn(); + return ElementwiseNotEqualsImplementation(otherdecimalColumn); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(Int64DataFrameColumn column) + { + DecimalDataFrameColumn otherdecimalColumn = column.CloneAsDecimalColumn(); + return ElementwiseGreaterThanOrEqualImplementation(otherdecimalColumn); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(Int64DataFrameColumn column) + { + DecimalDataFrameColumn otherdecimalColumn = column.CloneAsDecimalColumn(); + return ElementwiseLessThanOrEqualImplementation(otherdecimalColumn); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(Int64DataFrameColumn column) + { + DecimalDataFrameColumn otherdecimalColumn = column.CloneAsDecimalColumn(); + return ElementwiseGreaterThanImplementation(otherdecimalColumn); + } + public BooleanDataFrameColumn ElementwiseLessThan(Int64DataFrameColumn column) + { + DecimalDataFrameColumn otherdecimalColumn = column.CloneAsDecimalColumn(); + return ElementwiseLessThanImplementation(otherdecimalColumn); + } + public BooleanDataFrameColumn ElementwiseEquals(SByteDataFrameColumn column) + { + DecimalDataFrameColumn otherdecimalColumn = column.CloneAsDecimalColumn(); + return ElementwiseEqualsImplementation(otherdecimalColumn); + } + public BooleanDataFrameColumn ElementwiseNotEquals(SByteDataFrameColumn column) + { + DecimalDataFrameColumn otherdecimalColumn = column.CloneAsDecimalColumn(); + return ElementwiseNotEqualsImplementation(otherdecimalColumn); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(SByteDataFrameColumn column) + { + DecimalDataFrameColumn otherdecimalColumn = column.CloneAsDecimalColumn(); + return ElementwiseGreaterThanOrEqualImplementation(otherdecimalColumn); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(SByteDataFrameColumn column) + { + DecimalDataFrameColumn otherdecimalColumn = column.CloneAsDecimalColumn(); + return ElementwiseLessThanOrEqualImplementation(otherdecimalColumn); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(SByteDataFrameColumn column) + { + DecimalDataFrameColumn otherdecimalColumn = column.CloneAsDecimalColumn(); + return ElementwiseGreaterThanImplementation(otherdecimalColumn); + } + public BooleanDataFrameColumn ElementwiseLessThan(SByteDataFrameColumn column) + { + DecimalDataFrameColumn otherdecimalColumn = column.CloneAsDecimalColumn(); + return ElementwiseLessThanImplementation(otherdecimalColumn); + } + public BooleanDataFrameColumn ElementwiseEquals(Int16DataFrameColumn column) + { + DecimalDataFrameColumn otherdecimalColumn = column.CloneAsDecimalColumn(); + return ElementwiseEqualsImplementation(otherdecimalColumn); + } + public BooleanDataFrameColumn ElementwiseNotEquals(Int16DataFrameColumn column) + { + DecimalDataFrameColumn otherdecimalColumn = column.CloneAsDecimalColumn(); + return ElementwiseNotEqualsImplementation(otherdecimalColumn); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(Int16DataFrameColumn column) + { + DecimalDataFrameColumn otherdecimalColumn = column.CloneAsDecimalColumn(); + return ElementwiseGreaterThanOrEqualImplementation(otherdecimalColumn); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(Int16DataFrameColumn column) + { + DecimalDataFrameColumn otherdecimalColumn = column.CloneAsDecimalColumn(); + return ElementwiseLessThanOrEqualImplementation(otherdecimalColumn); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(Int16DataFrameColumn column) + { + DecimalDataFrameColumn otherdecimalColumn = column.CloneAsDecimalColumn(); + return ElementwiseGreaterThanImplementation(otherdecimalColumn); + } + public BooleanDataFrameColumn ElementwiseLessThan(Int16DataFrameColumn column) + { + DecimalDataFrameColumn otherdecimalColumn = column.CloneAsDecimalColumn(); + return ElementwiseLessThanImplementation(otherdecimalColumn); + } + public BooleanDataFrameColumn ElementwiseEquals(UInt32DataFrameColumn column) + { + DecimalDataFrameColumn otherdecimalColumn = column.CloneAsDecimalColumn(); + return ElementwiseEqualsImplementation(otherdecimalColumn); + } + public BooleanDataFrameColumn ElementwiseNotEquals(UInt32DataFrameColumn column) + { + DecimalDataFrameColumn otherdecimalColumn = column.CloneAsDecimalColumn(); + return ElementwiseNotEqualsImplementation(otherdecimalColumn); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(UInt32DataFrameColumn column) + { + DecimalDataFrameColumn otherdecimalColumn = column.CloneAsDecimalColumn(); + return ElementwiseGreaterThanOrEqualImplementation(otherdecimalColumn); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(UInt32DataFrameColumn column) + { + DecimalDataFrameColumn otherdecimalColumn = column.CloneAsDecimalColumn(); + return ElementwiseLessThanOrEqualImplementation(otherdecimalColumn); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(UInt32DataFrameColumn column) + { + DecimalDataFrameColumn otherdecimalColumn = column.CloneAsDecimalColumn(); + return ElementwiseGreaterThanImplementation(otherdecimalColumn); + } + public BooleanDataFrameColumn ElementwiseLessThan(UInt32DataFrameColumn column) + { + DecimalDataFrameColumn otherdecimalColumn = column.CloneAsDecimalColumn(); + return ElementwiseLessThanImplementation(otherdecimalColumn); + } + public BooleanDataFrameColumn ElementwiseEquals(UInt64DataFrameColumn column) + { + DecimalDataFrameColumn otherdecimalColumn = column.CloneAsDecimalColumn(); + return ElementwiseEqualsImplementation(otherdecimalColumn); + } + public BooleanDataFrameColumn ElementwiseNotEquals(UInt64DataFrameColumn column) + { + DecimalDataFrameColumn otherdecimalColumn = column.CloneAsDecimalColumn(); + return ElementwiseNotEqualsImplementation(otherdecimalColumn); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(UInt64DataFrameColumn column) + { + DecimalDataFrameColumn otherdecimalColumn = column.CloneAsDecimalColumn(); + return ElementwiseGreaterThanOrEqualImplementation(otherdecimalColumn); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(UInt64DataFrameColumn column) + { + DecimalDataFrameColumn otherdecimalColumn = column.CloneAsDecimalColumn(); + return ElementwiseLessThanOrEqualImplementation(otherdecimalColumn); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(UInt64DataFrameColumn column) + { + DecimalDataFrameColumn otherdecimalColumn = column.CloneAsDecimalColumn(); + return ElementwiseGreaterThanImplementation(otherdecimalColumn); + } + public BooleanDataFrameColumn ElementwiseLessThan(UInt64DataFrameColumn column) + { + DecimalDataFrameColumn otherdecimalColumn = column.CloneAsDecimalColumn(); + return ElementwiseLessThanImplementation(otherdecimalColumn); + } + public BooleanDataFrameColumn ElementwiseEquals(UInt16DataFrameColumn column) + { + DecimalDataFrameColumn otherdecimalColumn = column.CloneAsDecimalColumn(); + return ElementwiseEqualsImplementation(otherdecimalColumn); + } + public BooleanDataFrameColumn ElementwiseNotEquals(UInt16DataFrameColumn column) + { + DecimalDataFrameColumn otherdecimalColumn = column.CloneAsDecimalColumn(); + return ElementwiseNotEqualsImplementation(otherdecimalColumn); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(UInt16DataFrameColumn column) + { + DecimalDataFrameColumn otherdecimalColumn = column.CloneAsDecimalColumn(); + return ElementwiseGreaterThanOrEqualImplementation(otherdecimalColumn); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(UInt16DataFrameColumn column) + { + DecimalDataFrameColumn otherdecimalColumn = column.CloneAsDecimalColumn(); + return ElementwiseLessThanOrEqualImplementation(otherdecimalColumn); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(UInt16DataFrameColumn column) + { + DecimalDataFrameColumn otherdecimalColumn = column.CloneAsDecimalColumn(); + return ElementwiseGreaterThanImplementation(otherdecimalColumn); + } + public BooleanDataFrameColumn ElementwiseLessThan(UInt16DataFrameColumn column) + { + DecimalDataFrameColumn otherdecimalColumn = column.CloneAsDecimalColumn(); + return ElementwiseLessThanImplementation(otherdecimalColumn); + } + } + public partial class DoubleDataFrameColumn + { + public BooleanDataFrameColumn ElementwiseEquals(ByteDataFrameColumn column) + { + DoubleDataFrameColumn otherdoubleColumn = column.CloneAsDoubleColumn(); + return ElementwiseEqualsImplementation(otherdoubleColumn); + } + public BooleanDataFrameColumn ElementwiseNotEquals(ByteDataFrameColumn column) + { + DoubleDataFrameColumn otherdoubleColumn = column.CloneAsDoubleColumn(); + return ElementwiseNotEqualsImplementation(otherdoubleColumn); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(ByteDataFrameColumn column) + { + DoubleDataFrameColumn otherdoubleColumn = column.CloneAsDoubleColumn(); + return ElementwiseGreaterThanOrEqualImplementation(otherdoubleColumn); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(ByteDataFrameColumn column) + { + DoubleDataFrameColumn otherdoubleColumn = column.CloneAsDoubleColumn(); + return ElementwiseLessThanOrEqualImplementation(otherdoubleColumn); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(ByteDataFrameColumn column) + { + DoubleDataFrameColumn otherdoubleColumn = column.CloneAsDoubleColumn(); + return ElementwiseGreaterThanImplementation(otherdoubleColumn); + } + public BooleanDataFrameColumn ElementwiseLessThan(ByteDataFrameColumn column) + { + DoubleDataFrameColumn otherdoubleColumn = column.CloneAsDoubleColumn(); + return ElementwiseLessThanImplementation(otherdoubleColumn); + } + public BooleanDataFrameColumn ElementwiseEquals(DoubleDataFrameColumn column) + { + return ElementwiseEqualsImplementation(column); + } + public BooleanDataFrameColumn ElementwiseNotEquals(DoubleDataFrameColumn column) + { + return ElementwiseNotEqualsImplementation(column); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(DoubleDataFrameColumn column) + { + return ElementwiseGreaterThanOrEqualImplementation(column); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(DoubleDataFrameColumn column) + { + return ElementwiseLessThanOrEqualImplementation(column); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(DoubleDataFrameColumn column) + { + return ElementwiseGreaterThanImplementation(column); + } + public BooleanDataFrameColumn ElementwiseLessThan(DoubleDataFrameColumn column) + { + return ElementwiseLessThanImplementation(column); + } + public BooleanDataFrameColumn ElementwiseEquals(SingleDataFrameColumn column) + { + DoubleDataFrameColumn otherdoubleColumn = column.CloneAsDoubleColumn(); + return ElementwiseEqualsImplementation(otherdoubleColumn); + } + public BooleanDataFrameColumn ElementwiseNotEquals(SingleDataFrameColumn column) + { + DoubleDataFrameColumn otherdoubleColumn = column.CloneAsDoubleColumn(); + return ElementwiseNotEqualsImplementation(otherdoubleColumn); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(SingleDataFrameColumn column) + { + DoubleDataFrameColumn otherdoubleColumn = column.CloneAsDoubleColumn(); + return ElementwiseGreaterThanOrEqualImplementation(otherdoubleColumn); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(SingleDataFrameColumn column) + { + DoubleDataFrameColumn otherdoubleColumn = column.CloneAsDoubleColumn(); + return ElementwiseLessThanOrEqualImplementation(otherdoubleColumn); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(SingleDataFrameColumn column) + { + DoubleDataFrameColumn otherdoubleColumn = column.CloneAsDoubleColumn(); + return ElementwiseGreaterThanImplementation(otherdoubleColumn); + } + public BooleanDataFrameColumn ElementwiseLessThan(SingleDataFrameColumn column) + { + DoubleDataFrameColumn otherdoubleColumn = column.CloneAsDoubleColumn(); + return ElementwiseLessThanImplementation(otherdoubleColumn); + } + public BooleanDataFrameColumn ElementwiseEquals(Int32DataFrameColumn column) + { + DoubleDataFrameColumn otherdoubleColumn = column.CloneAsDoubleColumn(); + return ElementwiseEqualsImplementation(otherdoubleColumn); + } + public BooleanDataFrameColumn ElementwiseNotEquals(Int32DataFrameColumn column) + { + DoubleDataFrameColumn otherdoubleColumn = column.CloneAsDoubleColumn(); + return ElementwiseNotEqualsImplementation(otherdoubleColumn); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(Int32DataFrameColumn column) + { + DoubleDataFrameColumn otherdoubleColumn = column.CloneAsDoubleColumn(); + return ElementwiseGreaterThanOrEqualImplementation(otherdoubleColumn); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(Int32DataFrameColumn column) + { + DoubleDataFrameColumn otherdoubleColumn = column.CloneAsDoubleColumn(); + return ElementwiseLessThanOrEqualImplementation(otherdoubleColumn); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(Int32DataFrameColumn column) + { + DoubleDataFrameColumn otherdoubleColumn = column.CloneAsDoubleColumn(); + return ElementwiseGreaterThanImplementation(otherdoubleColumn); + } + public BooleanDataFrameColumn ElementwiseLessThan(Int32DataFrameColumn column) + { + DoubleDataFrameColumn otherdoubleColumn = column.CloneAsDoubleColumn(); + return ElementwiseLessThanImplementation(otherdoubleColumn); + } + public BooleanDataFrameColumn ElementwiseEquals(Int64DataFrameColumn column) + { + DoubleDataFrameColumn otherdoubleColumn = column.CloneAsDoubleColumn(); + return ElementwiseEqualsImplementation(otherdoubleColumn); + } + public BooleanDataFrameColumn ElementwiseNotEquals(Int64DataFrameColumn column) + { + DoubleDataFrameColumn otherdoubleColumn = column.CloneAsDoubleColumn(); + return ElementwiseNotEqualsImplementation(otherdoubleColumn); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(Int64DataFrameColumn column) + { + DoubleDataFrameColumn otherdoubleColumn = column.CloneAsDoubleColumn(); + return ElementwiseGreaterThanOrEqualImplementation(otherdoubleColumn); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(Int64DataFrameColumn column) + { + DoubleDataFrameColumn otherdoubleColumn = column.CloneAsDoubleColumn(); + return ElementwiseLessThanOrEqualImplementation(otherdoubleColumn); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(Int64DataFrameColumn column) + { + DoubleDataFrameColumn otherdoubleColumn = column.CloneAsDoubleColumn(); + return ElementwiseGreaterThanImplementation(otherdoubleColumn); + } + public BooleanDataFrameColumn ElementwiseLessThan(Int64DataFrameColumn column) + { + DoubleDataFrameColumn otherdoubleColumn = column.CloneAsDoubleColumn(); + return ElementwiseLessThanImplementation(otherdoubleColumn); + } + public BooleanDataFrameColumn ElementwiseEquals(SByteDataFrameColumn column) + { + DoubleDataFrameColumn otherdoubleColumn = column.CloneAsDoubleColumn(); + return ElementwiseEqualsImplementation(otherdoubleColumn); + } + public BooleanDataFrameColumn ElementwiseNotEquals(SByteDataFrameColumn column) + { + DoubleDataFrameColumn otherdoubleColumn = column.CloneAsDoubleColumn(); + return ElementwiseNotEqualsImplementation(otherdoubleColumn); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(SByteDataFrameColumn column) + { + DoubleDataFrameColumn otherdoubleColumn = column.CloneAsDoubleColumn(); + return ElementwiseGreaterThanOrEqualImplementation(otherdoubleColumn); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(SByteDataFrameColumn column) + { + DoubleDataFrameColumn otherdoubleColumn = column.CloneAsDoubleColumn(); + return ElementwiseLessThanOrEqualImplementation(otherdoubleColumn); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(SByteDataFrameColumn column) + { + DoubleDataFrameColumn otherdoubleColumn = column.CloneAsDoubleColumn(); + return ElementwiseGreaterThanImplementation(otherdoubleColumn); + } + public BooleanDataFrameColumn ElementwiseLessThan(SByteDataFrameColumn column) + { + DoubleDataFrameColumn otherdoubleColumn = column.CloneAsDoubleColumn(); + return ElementwiseLessThanImplementation(otherdoubleColumn); + } + public BooleanDataFrameColumn ElementwiseEquals(Int16DataFrameColumn column) + { + DoubleDataFrameColumn otherdoubleColumn = column.CloneAsDoubleColumn(); + return ElementwiseEqualsImplementation(otherdoubleColumn); + } + public BooleanDataFrameColumn ElementwiseNotEquals(Int16DataFrameColumn column) + { + DoubleDataFrameColumn otherdoubleColumn = column.CloneAsDoubleColumn(); + return ElementwiseNotEqualsImplementation(otherdoubleColumn); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(Int16DataFrameColumn column) + { + DoubleDataFrameColumn otherdoubleColumn = column.CloneAsDoubleColumn(); + return ElementwiseGreaterThanOrEqualImplementation(otherdoubleColumn); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(Int16DataFrameColumn column) + { + DoubleDataFrameColumn otherdoubleColumn = column.CloneAsDoubleColumn(); + return ElementwiseLessThanOrEqualImplementation(otherdoubleColumn); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(Int16DataFrameColumn column) + { + DoubleDataFrameColumn otherdoubleColumn = column.CloneAsDoubleColumn(); + return ElementwiseGreaterThanImplementation(otherdoubleColumn); + } + public BooleanDataFrameColumn ElementwiseLessThan(Int16DataFrameColumn column) + { + DoubleDataFrameColumn otherdoubleColumn = column.CloneAsDoubleColumn(); + return ElementwiseLessThanImplementation(otherdoubleColumn); + } + public BooleanDataFrameColumn ElementwiseEquals(UInt32DataFrameColumn column) + { + DoubleDataFrameColumn otherdoubleColumn = column.CloneAsDoubleColumn(); + return ElementwiseEqualsImplementation(otherdoubleColumn); + } + public BooleanDataFrameColumn ElementwiseNotEquals(UInt32DataFrameColumn column) + { + DoubleDataFrameColumn otherdoubleColumn = column.CloneAsDoubleColumn(); + return ElementwiseNotEqualsImplementation(otherdoubleColumn); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(UInt32DataFrameColumn column) + { + DoubleDataFrameColumn otherdoubleColumn = column.CloneAsDoubleColumn(); + return ElementwiseGreaterThanOrEqualImplementation(otherdoubleColumn); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(UInt32DataFrameColumn column) + { + DoubleDataFrameColumn otherdoubleColumn = column.CloneAsDoubleColumn(); + return ElementwiseLessThanOrEqualImplementation(otherdoubleColumn); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(UInt32DataFrameColumn column) + { + DoubleDataFrameColumn otherdoubleColumn = column.CloneAsDoubleColumn(); + return ElementwiseGreaterThanImplementation(otherdoubleColumn); + } + public BooleanDataFrameColumn ElementwiseLessThan(UInt32DataFrameColumn column) + { + DoubleDataFrameColumn otherdoubleColumn = column.CloneAsDoubleColumn(); + return ElementwiseLessThanImplementation(otherdoubleColumn); + } + public BooleanDataFrameColumn ElementwiseEquals(UInt64DataFrameColumn column) + { + DoubleDataFrameColumn otherdoubleColumn = column.CloneAsDoubleColumn(); + return ElementwiseEqualsImplementation(otherdoubleColumn); + } + public BooleanDataFrameColumn ElementwiseNotEquals(UInt64DataFrameColumn column) + { + DoubleDataFrameColumn otherdoubleColumn = column.CloneAsDoubleColumn(); + return ElementwiseNotEqualsImplementation(otherdoubleColumn); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(UInt64DataFrameColumn column) + { + DoubleDataFrameColumn otherdoubleColumn = column.CloneAsDoubleColumn(); + return ElementwiseGreaterThanOrEqualImplementation(otherdoubleColumn); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(UInt64DataFrameColumn column) + { + DoubleDataFrameColumn otherdoubleColumn = column.CloneAsDoubleColumn(); + return ElementwiseLessThanOrEqualImplementation(otherdoubleColumn); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(UInt64DataFrameColumn column) + { + DoubleDataFrameColumn otherdoubleColumn = column.CloneAsDoubleColumn(); + return ElementwiseGreaterThanImplementation(otherdoubleColumn); + } + public BooleanDataFrameColumn ElementwiseLessThan(UInt64DataFrameColumn column) + { + DoubleDataFrameColumn otherdoubleColumn = column.CloneAsDoubleColumn(); + return ElementwiseLessThanImplementation(otherdoubleColumn); + } + public BooleanDataFrameColumn ElementwiseEquals(UInt16DataFrameColumn column) + { + DoubleDataFrameColumn otherdoubleColumn = column.CloneAsDoubleColumn(); + return ElementwiseEqualsImplementation(otherdoubleColumn); + } + public BooleanDataFrameColumn ElementwiseNotEquals(UInt16DataFrameColumn column) + { + DoubleDataFrameColumn otherdoubleColumn = column.CloneAsDoubleColumn(); + return ElementwiseNotEqualsImplementation(otherdoubleColumn); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(UInt16DataFrameColumn column) + { + DoubleDataFrameColumn otherdoubleColumn = column.CloneAsDoubleColumn(); + return ElementwiseGreaterThanOrEqualImplementation(otherdoubleColumn); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(UInt16DataFrameColumn column) + { + DoubleDataFrameColumn otherdoubleColumn = column.CloneAsDoubleColumn(); + return ElementwiseLessThanOrEqualImplementation(otherdoubleColumn); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(UInt16DataFrameColumn column) + { + DoubleDataFrameColumn otherdoubleColumn = column.CloneAsDoubleColumn(); + return ElementwiseGreaterThanImplementation(otherdoubleColumn); + } + public BooleanDataFrameColumn ElementwiseLessThan(UInt16DataFrameColumn column) + { + DoubleDataFrameColumn otherdoubleColumn = column.CloneAsDoubleColumn(); + return ElementwiseLessThanImplementation(otherdoubleColumn); + } + } + public partial class SingleDataFrameColumn + { + public BooleanDataFrameColumn ElementwiseEquals(ByteDataFrameColumn column) + { + SingleDataFrameColumn otherfloatColumn = column.CloneAsSingleColumn(); + return ElementwiseEqualsImplementation(otherfloatColumn); + } + public BooleanDataFrameColumn ElementwiseNotEquals(ByteDataFrameColumn column) + { + SingleDataFrameColumn otherfloatColumn = column.CloneAsSingleColumn(); + return ElementwiseNotEqualsImplementation(otherfloatColumn); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(ByteDataFrameColumn column) + { + SingleDataFrameColumn otherfloatColumn = column.CloneAsSingleColumn(); + return ElementwiseGreaterThanOrEqualImplementation(otherfloatColumn); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(ByteDataFrameColumn column) + { + SingleDataFrameColumn otherfloatColumn = column.CloneAsSingleColumn(); + return ElementwiseLessThanOrEqualImplementation(otherfloatColumn); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(ByteDataFrameColumn column) + { + SingleDataFrameColumn otherfloatColumn = column.CloneAsSingleColumn(); + return ElementwiseGreaterThanImplementation(otherfloatColumn); + } + public BooleanDataFrameColumn ElementwiseLessThan(ByteDataFrameColumn column) + { + SingleDataFrameColumn otherfloatColumn = column.CloneAsSingleColumn(); + return ElementwiseLessThanImplementation(otherfloatColumn); + } + public BooleanDataFrameColumn ElementwiseEquals(DoubleDataFrameColumn column) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.ElementwiseEqualsImplementation(column); + } + public BooleanDataFrameColumn ElementwiseNotEquals(DoubleDataFrameColumn column) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.ElementwiseNotEqualsImplementation(column); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(DoubleDataFrameColumn column) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.ElementwiseGreaterThanOrEqualImplementation(column); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(DoubleDataFrameColumn column) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.ElementwiseLessThanOrEqualImplementation(column); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(DoubleDataFrameColumn column) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.ElementwiseGreaterThanImplementation(column); + } + public BooleanDataFrameColumn ElementwiseLessThan(DoubleDataFrameColumn column) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.ElementwiseLessThanImplementation(column); + } + public BooleanDataFrameColumn ElementwiseEquals(SingleDataFrameColumn column) + { + return ElementwiseEqualsImplementation(column); + } + public BooleanDataFrameColumn ElementwiseNotEquals(SingleDataFrameColumn column) + { + return ElementwiseNotEqualsImplementation(column); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(SingleDataFrameColumn column) + { + return ElementwiseGreaterThanOrEqualImplementation(column); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(SingleDataFrameColumn column) + { + return ElementwiseLessThanOrEqualImplementation(column); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(SingleDataFrameColumn column) + { + return ElementwiseGreaterThanImplementation(column); + } + public BooleanDataFrameColumn ElementwiseLessThan(SingleDataFrameColumn column) + { + return ElementwiseLessThanImplementation(column); + } + public BooleanDataFrameColumn ElementwiseEquals(Int32DataFrameColumn column) + { + SingleDataFrameColumn otherfloatColumn = column.CloneAsSingleColumn(); + return ElementwiseEqualsImplementation(otherfloatColumn); + } + public BooleanDataFrameColumn ElementwiseNotEquals(Int32DataFrameColumn column) + { + SingleDataFrameColumn otherfloatColumn = column.CloneAsSingleColumn(); + return ElementwiseNotEqualsImplementation(otherfloatColumn); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(Int32DataFrameColumn column) + { + SingleDataFrameColumn otherfloatColumn = column.CloneAsSingleColumn(); + return ElementwiseGreaterThanOrEqualImplementation(otherfloatColumn); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(Int32DataFrameColumn column) + { + SingleDataFrameColumn otherfloatColumn = column.CloneAsSingleColumn(); + return ElementwiseLessThanOrEqualImplementation(otherfloatColumn); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(Int32DataFrameColumn column) + { + SingleDataFrameColumn otherfloatColumn = column.CloneAsSingleColumn(); + return ElementwiseGreaterThanImplementation(otherfloatColumn); + } + public BooleanDataFrameColumn ElementwiseLessThan(Int32DataFrameColumn column) + { + SingleDataFrameColumn otherfloatColumn = column.CloneAsSingleColumn(); + return ElementwiseLessThanImplementation(otherfloatColumn); + } + public BooleanDataFrameColumn ElementwiseEquals(Int64DataFrameColumn column) + { + SingleDataFrameColumn otherfloatColumn = column.CloneAsSingleColumn(); + return ElementwiseEqualsImplementation(otherfloatColumn); + } + public BooleanDataFrameColumn ElementwiseNotEquals(Int64DataFrameColumn column) + { + SingleDataFrameColumn otherfloatColumn = column.CloneAsSingleColumn(); + return ElementwiseNotEqualsImplementation(otherfloatColumn); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(Int64DataFrameColumn column) + { + SingleDataFrameColumn otherfloatColumn = column.CloneAsSingleColumn(); + return ElementwiseGreaterThanOrEqualImplementation(otherfloatColumn); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(Int64DataFrameColumn column) + { + SingleDataFrameColumn otherfloatColumn = column.CloneAsSingleColumn(); + return ElementwiseLessThanOrEqualImplementation(otherfloatColumn); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(Int64DataFrameColumn column) + { + SingleDataFrameColumn otherfloatColumn = column.CloneAsSingleColumn(); + return ElementwiseGreaterThanImplementation(otherfloatColumn); + } + public BooleanDataFrameColumn ElementwiseLessThan(Int64DataFrameColumn column) + { + SingleDataFrameColumn otherfloatColumn = column.CloneAsSingleColumn(); + return ElementwiseLessThanImplementation(otherfloatColumn); + } + public BooleanDataFrameColumn ElementwiseEquals(SByteDataFrameColumn column) + { + SingleDataFrameColumn otherfloatColumn = column.CloneAsSingleColumn(); + return ElementwiseEqualsImplementation(otherfloatColumn); + } + public BooleanDataFrameColumn ElementwiseNotEquals(SByteDataFrameColumn column) + { + SingleDataFrameColumn otherfloatColumn = column.CloneAsSingleColumn(); + return ElementwiseNotEqualsImplementation(otherfloatColumn); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(SByteDataFrameColumn column) + { + SingleDataFrameColumn otherfloatColumn = column.CloneAsSingleColumn(); + return ElementwiseGreaterThanOrEqualImplementation(otherfloatColumn); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(SByteDataFrameColumn column) + { + SingleDataFrameColumn otherfloatColumn = column.CloneAsSingleColumn(); + return ElementwiseLessThanOrEqualImplementation(otherfloatColumn); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(SByteDataFrameColumn column) + { + SingleDataFrameColumn otherfloatColumn = column.CloneAsSingleColumn(); + return ElementwiseGreaterThanImplementation(otherfloatColumn); + } + public BooleanDataFrameColumn ElementwiseLessThan(SByteDataFrameColumn column) + { + SingleDataFrameColumn otherfloatColumn = column.CloneAsSingleColumn(); + return ElementwiseLessThanImplementation(otherfloatColumn); + } + public BooleanDataFrameColumn ElementwiseEquals(Int16DataFrameColumn column) + { + SingleDataFrameColumn otherfloatColumn = column.CloneAsSingleColumn(); + return ElementwiseEqualsImplementation(otherfloatColumn); + } + public BooleanDataFrameColumn ElementwiseNotEquals(Int16DataFrameColumn column) + { + SingleDataFrameColumn otherfloatColumn = column.CloneAsSingleColumn(); + return ElementwiseNotEqualsImplementation(otherfloatColumn); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(Int16DataFrameColumn column) + { + SingleDataFrameColumn otherfloatColumn = column.CloneAsSingleColumn(); + return ElementwiseGreaterThanOrEqualImplementation(otherfloatColumn); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(Int16DataFrameColumn column) + { + SingleDataFrameColumn otherfloatColumn = column.CloneAsSingleColumn(); + return ElementwiseLessThanOrEqualImplementation(otherfloatColumn); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(Int16DataFrameColumn column) + { + SingleDataFrameColumn otherfloatColumn = column.CloneAsSingleColumn(); + return ElementwiseGreaterThanImplementation(otherfloatColumn); + } + public BooleanDataFrameColumn ElementwiseLessThan(Int16DataFrameColumn column) + { + SingleDataFrameColumn otherfloatColumn = column.CloneAsSingleColumn(); + return ElementwiseLessThanImplementation(otherfloatColumn); + } + public BooleanDataFrameColumn ElementwiseEquals(UInt32DataFrameColumn column) + { + SingleDataFrameColumn otherfloatColumn = column.CloneAsSingleColumn(); + return ElementwiseEqualsImplementation(otherfloatColumn); + } + public BooleanDataFrameColumn ElementwiseNotEquals(UInt32DataFrameColumn column) + { + SingleDataFrameColumn otherfloatColumn = column.CloneAsSingleColumn(); + return ElementwiseNotEqualsImplementation(otherfloatColumn); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(UInt32DataFrameColumn column) + { + SingleDataFrameColumn otherfloatColumn = column.CloneAsSingleColumn(); + return ElementwiseGreaterThanOrEqualImplementation(otherfloatColumn); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(UInt32DataFrameColumn column) + { + SingleDataFrameColumn otherfloatColumn = column.CloneAsSingleColumn(); + return ElementwiseLessThanOrEqualImplementation(otherfloatColumn); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(UInt32DataFrameColumn column) + { + SingleDataFrameColumn otherfloatColumn = column.CloneAsSingleColumn(); + return ElementwiseGreaterThanImplementation(otherfloatColumn); + } + public BooleanDataFrameColumn ElementwiseLessThan(UInt32DataFrameColumn column) + { + SingleDataFrameColumn otherfloatColumn = column.CloneAsSingleColumn(); + return ElementwiseLessThanImplementation(otherfloatColumn); + } + public BooleanDataFrameColumn ElementwiseEquals(UInt64DataFrameColumn column) + { + SingleDataFrameColumn otherfloatColumn = column.CloneAsSingleColumn(); + return ElementwiseEqualsImplementation(otherfloatColumn); + } + public BooleanDataFrameColumn ElementwiseNotEquals(UInt64DataFrameColumn column) + { + SingleDataFrameColumn otherfloatColumn = column.CloneAsSingleColumn(); + return ElementwiseNotEqualsImplementation(otherfloatColumn); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(UInt64DataFrameColumn column) + { + SingleDataFrameColumn otherfloatColumn = column.CloneAsSingleColumn(); + return ElementwiseGreaterThanOrEqualImplementation(otherfloatColumn); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(UInt64DataFrameColumn column) + { + SingleDataFrameColumn otherfloatColumn = column.CloneAsSingleColumn(); + return ElementwiseLessThanOrEqualImplementation(otherfloatColumn); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(UInt64DataFrameColumn column) + { + SingleDataFrameColumn otherfloatColumn = column.CloneAsSingleColumn(); + return ElementwiseGreaterThanImplementation(otherfloatColumn); + } + public BooleanDataFrameColumn ElementwiseLessThan(UInt64DataFrameColumn column) + { + SingleDataFrameColumn otherfloatColumn = column.CloneAsSingleColumn(); + return ElementwiseLessThanImplementation(otherfloatColumn); + } + public BooleanDataFrameColumn ElementwiseEquals(UInt16DataFrameColumn column) + { + SingleDataFrameColumn otherfloatColumn = column.CloneAsSingleColumn(); + return ElementwiseEqualsImplementation(otherfloatColumn); + } + public BooleanDataFrameColumn ElementwiseNotEquals(UInt16DataFrameColumn column) + { + SingleDataFrameColumn otherfloatColumn = column.CloneAsSingleColumn(); + return ElementwiseNotEqualsImplementation(otherfloatColumn); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(UInt16DataFrameColumn column) + { + SingleDataFrameColumn otherfloatColumn = column.CloneAsSingleColumn(); + return ElementwiseGreaterThanOrEqualImplementation(otherfloatColumn); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(UInt16DataFrameColumn column) + { + SingleDataFrameColumn otherfloatColumn = column.CloneAsSingleColumn(); + return ElementwiseLessThanOrEqualImplementation(otherfloatColumn); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(UInt16DataFrameColumn column) + { + SingleDataFrameColumn otherfloatColumn = column.CloneAsSingleColumn(); + return ElementwiseGreaterThanImplementation(otherfloatColumn); + } + public BooleanDataFrameColumn ElementwiseLessThan(UInt16DataFrameColumn column) + { + SingleDataFrameColumn otherfloatColumn = column.CloneAsSingleColumn(); + return ElementwiseLessThanImplementation(otherfloatColumn); + } + } + public partial class Int32DataFrameColumn + { + public BooleanDataFrameColumn ElementwiseEquals(ByteDataFrameColumn column) + { + Int32DataFrameColumn otherintColumn = column.CloneAsInt32Column(); + return ElementwiseEqualsImplementation(otherintColumn); + } + public BooleanDataFrameColumn ElementwiseNotEquals(ByteDataFrameColumn column) + { + Int32DataFrameColumn otherintColumn = column.CloneAsInt32Column(); + return ElementwiseNotEqualsImplementation(otherintColumn); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(ByteDataFrameColumn column) + { + Int32DataFrameColumn otherintColumn = column.CloneAsInt32Column(); + return ElementwiseGreaterThanOrEqualImplementation(otherintColumn); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(ByteDataFrameColumn column) + { + Int32DataFrameColumn otherintColumn = column.CloneAsInt32Column(); + return ElementwiseLessThanOrEqualImplementation(otherintColumn); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(ByteDataFrameColumn column) + { + Int32DataFrameColumn otherintColumn = column.CloneAsInt32Column(); + return ElementwiseGreaterThanImplementation(otherintColumn); + } + public BooleanDataFrameColumn ElementwiseLessThan(ByteDataFrameColumn column) + { + Int32DataFrameColumn otherintColumn = column.CloneAsInt32Column(); + return ElementwiseLessThanImplementation(otherintColumn); + } + public BooleanDataFrameColumn ElementwiseEquals(DecimalDataFrameColumn column) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.ElementwiseEqualsImplementation(column); + } + public BooleanDataFrameColumn ElementwiseNotEquals(DecimalDataFrameColumn column) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.ElementwiseNotEqualsImplementation(column); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(DecimalDataFrameColumn column) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.ElementwiseGreaterThanOrEqualImplementation(column); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(DecimalDataFrameColumn column) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.ElementwiseLessThanOrEqualImplementation(column); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(DecimalDataFrameColumn column) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.ElementwiseGreaterThanImplementation(column); + } + public BooleanDataFrameColumn ElementwiseLessThan(DecimalDataFrameColumn column) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.ElementwiseLessThanImplementation(column); + } + public BooleanDataFrameColumn ElementwiseEquals(DoubleDataFrameColumn column) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.ElementwiseEqualsImplementation(column); + } + public BooleanDataFrameColumn ElementwiseNotEquals(DoubleDataFrameColumn column) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.ElementwiseNotEqualsImplementation(column); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(DoubleDataFrameColumn column) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.ElementwiseGreaterThanOrEqualImplementation(column); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(DoubleDataFrameColumn column) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.ElementwiseLessThanOrEqualImplementation(column); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(DoubleDataFrameColumn column) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.ElementwiseGreaterThanImplementation(column); + } + public BooleanDataFrameColumn ElementwiseLessThan(DoubleDataFrameColumn column) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.ElementwiseLessThanImplementation(column); + } + public BooleanDataFrameColumn ElementwiseEquals(SingleDataFrameColumn column) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.ElementwiseEqualsImplementation(column); + } + public BooleanDataFrameColumn ElementwiseNotEquals(SingleDataFrameColumn column) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.ElementwiseNotEqualsImplementation(column); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(SingleDataFrameColumn column) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.ElementwiseGreaterThanOrEqualImplementation(column); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(SingleDataFrameColumn column) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.ElementwiseLessThanOrEqualImplementation(column); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(SingleDataFrameColumn column) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.ElementwiseGreaterThanImplementation(column); + } + public BooleanDataFrameColumn ElementwiseLessThan(SingleDataFrameColumn column) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.ElementwiseLessThanImplementation(column); + } + public BooleanDataFrameColumn ElementwiseEquals(Int32DataFrameColumn column) + { + return ElementwiseEqualsImplementation(column); + } + public BooleanDataFrameColumn ElementwiseNotEquals(Int32DataFrameColumn column) + { + return ElementwiseNotEqualsImplementation(column); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(Int32DataFrameColumn column) + { + return ElementwiseGreaterThanOrEqualImplementation(column); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(Int32DataFrameColumn column) + { + return ElementwiseLessThanOrEqualImplementation(column); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(Int32DataFrameColumn column) + { + return ElementwiseGreaterThanImplementation(column); + } + public BooleanDataFrameColumn ElementwiseLessThan(Int32DataFrameColumn column) + { + return ElementwiseLessThanImplementation(column); + } + public BooleanDataFrameColumn ElementwiseEquals(Int64DataFrameColumn column) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.ElementwiseEqualsImplementation(column); + } + public BooleanDataFrameColumn ElementwiseNotEquals(Int64DataFrameColumn column) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.ElementwiseNotEqualsImplementation(column); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(Int64DataFrameColumn column) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.ElementwiseGreaterThanOrEqualImplementation(column); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(Int64DataFrameColumn column) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.ElementwiseLessThanOrEqualImplementation(column); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(Int64DataFrameColumn column) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.ElementwiseGreaterThanImplementation(column); + } + public BooleanDataFrameColumn ElementwiseLessThan(Int64DataFrameColumn column) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.ElementwiseLessThanImplementation(column); + } + public BooleanDataFrameColumn ElementwiseEquals(SByteDataFrameColumn column) + { + Int32DataFrameColumn otherintColumn = column.CloneAsInt32Column(); + return ElementwiseEqualsImplementation(otherintColumn); + } + public BooleanDataFrameColumn ElementwiseNotEquals(SByteDataFrameColumn column) + { + Int32DataFrameColumn otherintColumn = column.CloneAsInt32Column(); + return ElementwiseNotEqualsImplementation(otherintColumn); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(SByteDataFrameColumn column) + { + Int32DataFrameColumn otherintColumn = column.CloneAsInt32Column(); + return ElementwiseGreaterThanOrEqualImplementation(otherintColumn); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(SByteDataFrameColumn column) + { + Int32DataFrameColumn otherintColumn = column.CloneAsInt32Column(); + return ElementwiseLessThanOrEqualImplementation(otherintColumn); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(SByteDataFrameColumn column) + { + Int32DataFrameColumn otherintColumn = column.CloneAsInt32Column(); + return ElementwiseGreaterThanImplementation(otherintColumn); + } + public BooleanDataFrameColumn ElementwiseLessThan(SByteDataFrameColumn column) + { + Int32DataFrameColumn otherintColumn = column.CloneAsInt32Column(); + return ElementwiseLessThanImplementation(otherintColumn); + } + public BooleanDataFrameColumn ElementwiseEquals(Int16DataFrameColumn column) + { + Int32DataFrameColumn otherintColumn = column.CloneAsInt32Column(); + return ElementwiseEqualsImplementation(otherintColumn); + } + public BooleanDataFrameColumn ElementwiseNotEquals(Int16DataFrameColumn column) + { + Int32DataFrameColumn otherintColumn = column.CloneAsInt32Column(); + return ElementwiseNotEqualsImplementation(otherintColumn); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(Int16DataFrameColumn column) + { + Int32DataFrameColumn otherintColumn = column.CloneAsInt32Column(); + return ElementwiseGreaterThanOrEqualImplementation(otherintColumn); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(Int16DataFrameColumn column) + { + Int32DataFrameColumn otherintColumn = column.CloneAsInt32Column(); + return ElementwiseLessThanOrEqualImplementation(otherintColumn); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(Int16DataFrameColumn column) + { + Int32DataFrameColumn otherintColumn = column.CloneAsInt32Column(); + return ElementwiseGreaterThanImplementation(otherintColumn); + } + public BooleanDataFrameColumn ElementwiseLessThan(Int16DataFrameColumn column) + { + Int32DataFrameColumn otherintColumn = column.CloneAsInt32Column(); + return ElementwiseLessThanImplementation(otherintColumn); + } + public BooleanDataFrameColumn ElementwiseEquals(UInt32DataFrameColumn column) + { + Int32DataFrameColumn otherintColumn = column.CloneAsInt32Column(); + return ElementwiseEqualsImplementation(otherintColumn); + } + public BooleanDataFrameColumn ElementwiseNotEquals(UInt32DataFrameColumn column) + { + Int32DataFrameColumn otherintColumn = column.CloneAsInt32Column(); + return ElementwiseNotEqualsImplementation(otherintColumn); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(UInt32DataFrameColumn column) + { + Int32DataFrameColumn otherintColumn = column.CloneAsInt32Column(); + return ElementwiseGreaterThanOrEqualImplementation(otherintColumn); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(UInt32DataFrameColumn column) + { + Int32DataFrameColumn otherintColumn = column.CloneAsInt32Column(); + return ElementwiseLessThanOrEqualImplementation(otherintColumn); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(UInt32DataFrameColumn column) + { + Int32DataFrameColumn otherintColumn = column.CloneAsInt32Column(); + return ElementwiseGreaterThanImplementation(otherintColumn); + } + public BooleanDataFrameColumn ElementwiseLessThan(UInt32DataFrameColumn column) + { + Int32DataFrameColumn otherintColumn = column.CloneAsInt32Column(); + return ElementwiseLessThanImplementation(otherintColumn); + } + public BooleanDataFrameColumn ElementwiseEquals(UInt64DataFrameColumn column) + { + UInt64DataFrameColumn ulongColumn = CloneAsUInt64Column(); + return ulongColumn.ElementwiseEqualsImplementation(column); + } + public BooleanDataFrameColumn ElementwiseNotEquals(UInt64DataFrameColumn column) + { + UInt64DataFrameColumn ulongColumn = CloneAsUInt64Column(); + return ulongColumn.ElementwiseNotEqualsImplementation(column); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(UInt64DataFrameColumn column) + { + UInt64DataFrameColumn ulongColumn = CloneAsUInt64Column(); + return ulongColumn.ElementwiseGreaterThanOrEqualImplementation(column); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(UInt64DataFrameColumn column) + { + UInt64DataFrameColumn ulongColumn = CloneAsUInt64Column(); + return ulongColumn.ElementwiseLessThanOrEqualImplementation(column); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(UInt64DataFrameColumn column) + { + UInt64DataFrameColumn ulongColumn = CloneAsUInt64Column(); + return ulongColumn.ElementwiseGreaterThanImplementation(column); + } + public BooleanDataFrameColumn ElementwiseLessThan(UInt64DataFrameColumn column) + { + UInt64DataFrameColumn ulongColumn = CloneAsUInt64Column(); + return ulongColumn.ElementwiseLessThanImplementation(column); + } + public BooleanDataFrameColumn ElementwiseEquals(UInt16DataFrameColumn column) + { + Int32DataFrameColumn otherintColumn = column.CloneAsInt32Column(); + return ElementwiseEqualsImplementation(otherintColumn); + } + public BooleanDataFrameColumn ElementwiseNotEquals(UInt16DataFrameColumn column) + { + Int32DataFrameColumn otherintColumn = column.CloneAsInt32Column(); + return ElementwiseNotEqualsImplementation(otherintColumn); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(UInt16DataFrameColumn column) + { + Int32DataFrameColumn otherintColumn = column.CloneAsInt32Column(); + return ElementwiseGreaterThanOrEqualImplementation(otherintColumn); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(UInt16DataFrameColumn column) + { + Int32DataFrameColumn otherintColumn = column.CloneAsInt32Column(); + return ElementwiseLessThanOrEqualImplementation(otherintColumn); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(UInt16DataFrameColumn column) + { + Int32DataFrameColumn otherintColumn = column.CloneAsInt32Column(); + return ElementwiseGreaterThanImplementation(otherintColumn); + } + public BooleanDataFrameColumn ElementwiseLessThan(UInt16DataFrameColumn column) + { + Int32DataFrameColumn otherintColumn = column.CloneAsInt32Column(); + return ElementwiseLessThanImplementation(otherintColumn); + } + } + public partial class Int64DataFrameColumn + { + public BooleanDataFrameColumn ElementwiseEquals(ByteDataFrameColumn column) + { + Int64DataFrameColumn otherlongColumn = column.CloneAsInt64Column(); + return ElementwiseEqualsImplementation(otherlongColumn); + } + public BooleanDataFrameColumn ElementwiseNotEquals(ByteDataFrameColumn column) + { + Int64DataFrameColumn otherlongColumn = column.CloneAsInt64Column(); + return ElementwiseNotEqualsImplementation(otherlongColumn); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(ByteDataFrameColumn column) + { + Int64DataFrameColumn otherlongColumn = column.CloneAsInt64Column(); + return ElementwiseGreaterThanOrEqualImplementation(otherlongColumn); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(ByteDataFrameColumn column) + { + Int64DataFrameColumn otherlongColumn = column.CloneAsInt64Column(); + return ElementwiseLessThanOrEqualImplementation(otherlongColumn); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(ByteDataFrameColumn column) + { + Int64DataFrameColumn otherlongColumn = column.CloneAsInt64Column(); + return ElementwiseGreaterThanImplementation(otherlongColumn); + } + public BooleanDataFrameColumn ElementwiseLessThan(ByteDataFrameColumn column) + { + Int64DataFrameColumn otherlongColumn = column.CloneAsInt64Column(); + return ElementwiseLessThanImplementation(otherlongColumn); + } + public BooleanDataFrameColumn ElementwiseEquals(DecimalDataFrameColumn column) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.ElementwiseEqualsImplementation(column); + } + public BooleanDataFrameColumn ElementwiseNotEquals(DecimalDataFrameColumn column) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.ElementwiseNotEqualsImplementation(column); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(DecimalDataFrameColumn column) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.ElementwiseGreaterThanOrEqualImplementation(column); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(DecimalDataFrameColumn column) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.ElementwiseLessThanOrEqualImplementation(column); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(DecimalDataFrameColumn column) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.ElementwiseGreaterThanImplementation(column); + } + public BooleanDataFrameColumn ElementwiseLessThan(DecimalDataFrameColumn column) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.ElementwiseLessThanImplementation(column); + } + public BooleanDataFrameColumn ElementwiseEquals(DoubleDataFrameColumn column) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.ElementwiseEqualsImplementation(column); + } + public BooleanDataFrameColumn ElementwiseNotEquals(DoubleDataFrameColumn column) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.ElementwiseNotEqualsImplementation(column); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(DoubleDataFrameColumn column) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.ElementwiseGreaterThanOrEqualImplementation(column); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(DoubleDataFrameColumn column) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.ElementwiseLessThanOrEqualImplementation(column); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(DoubleDataFrameColumn column) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.ElementwiseGreaterThanImplementation(column); + } + public BooleanDataFrameColumn ElementwiseLessThan(DoubleDataFrameColumn column) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.ElementwiseLessThanImplementation(column); + } + public BooleanDataFrameColumn ElementwiseEquals(SingleDataFrameColumn column) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.ElementwiseEqualsImplementation(column); + } + public BooleanDataFrameColumn ElementwiseNotEquals(SingleDataFrameColumn column) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.ElementwiseNotEqualsImplementation(column); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(SingleDataFrameColumn column) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.ElementwiseGreaterThanOrEqualImplementation(column); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(SingleDataFrameColumn column) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.ElementwiseLessThanOrEqualImplementation(column); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(SingleDataFrameColumn column) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.ElementwiseGreaterThanImplementation(column); + } + public BooleanDataFrameColumn ElementwiseLessThan(SingleDataFrameColumn column) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.ElementwiseLessThanImplementation(column); + } + public BooleanDataFrameColumn ElementwiseEquals(Int32DataFrameColumn column) + { + Int64DataFrameColumn otherlongColumn = column.CloneAsInt64Column(); + return ElementwiseEqualsImplementation(otherlongColumn); + } + public BooleanDataFrameColumn ElementwiseNotEquals(Int32DataFrameColumn column) + { + Int64DataFrameColumn otherlongColumn = column.CloneAsInt64Column(); + return ElementwiseNotEqualsImplementation(otherlongColumn); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(Int32DataFrameColumn column) + { + Int64DataFrameColumn otherlongColumn = column.CloneAsInt64Column(); + return ElementwiseGreaterThanOrEqualImplementation(otherlongColumn); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(Int32DataFrameColumn column) + { + Int64DataFrameColumn otherlongColumn = column.CloneAsInt64Column(); + return ElementwiseLessThanOrEqualImplementation(otherlongColumn); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(Int32DataFrameColumn column) + { + Int64DataFrameColumn otherlongColumn = column.CloneAsInt64Column(); + return ElementwiseGreaterThanImplementation(otherlongColumn); + } + public BooleanDataFrameColumn ElementwiseLessThan(Int32DataFrameColumn column) + { + Int64DataFrameColumn otherlongColumn = column.CloneAsInt64Column(); + return ElementwiseLessThanImplementation(otherlongColumn); + } + public BooleanDataFrameColumn ElementwiseEquals(Int64DataFrameColumn column) + { + return ElementwiseEqualsImplementation(column); + } + public BooleanDataFrameColumn ElementwiseNotEquals(Int64DataFrameColumn column) + { + return ElementwiseNotEqualsImplementation(column); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(Int64DataFrameColumn column) + { + return ElementwiseGreaterThanOrEqualImplementation(column); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(Int64DataFrameColumn column) + { + return ElementwiseLessThanOrEqualImplementation(column); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(Int64DataFrameColumn column) + { + return ElementwiseGreaterThanImplementation(column); + } + public BooleanDataFrameColumn ElementwiseLessThan(Int64DataFrameColumn column) + { + return ElementwiseLessThanImplementation(column); + } + public BooleanDataFrameColumn ElementwiseEquals(SByteDataFrameColumn column) + { + Int64DataFrameColumn otherlongColumn = column.CloneAsInt64Column(); + return ElementwiseEqualsImplementation(otherlongColumn); + } + public BooleanDataFrameColumn ElementwiseNotEquals(SByteDataFrameColumn column) + { + Int64DataFrameColumn otherlongColumn = column.CloneAsInt64Column(); + return ElementwiseNotEqualsImplementation(otherlongColumn); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(SByteDataFrameColumn column) + { + Int64DataFrameColumn otherlongColumn = column.CloneAsInt64Column(); + return ElementwiseGreaterThanOrEqualImplementation(otherlongColumn); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(SByteDataFrameColumn column) + { + Int64DataFrameColumn otherlongColumn = column.CloneAsInt64Column(); + return ElementwiseLessThanOrEqualImplementation(otherlongColumn); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(SByteDataFrameColumn column) + { + Int64DataFrameColumn otherlongColumn = column.CloneAsInt64Column(); + return ElementwiseGreaterThanImplementation(otherlongColumn); + } + public BooleanDataFrameColumn ElementwiseLessThan(SByteDataFrameColumn column) + { + Int64DataFrameColumn otherlongColumn = column.CloneAsInt64Column(); + return ElementwiseLessThanImplementation(otherlongColumn); + } + public BooleanDataFrameColumn ElementwiseEquals(Int16DataFrameColumn column) + { + Int64DataFrameColumn otherlongColumn = column.CloneAsInt64Column(); + return ElementwiseEqualsImplementation(otherlongColumn); + } + public BooleanDataFrameColumn ElementwiseNotEquals(Int16DataFrameColumn column) + { + Int64DataFrameColumn otherlongColumn = column.CloneAsInt64Column(); + return ElementwiseNotEqualsImplementation(otherlongColumn); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(Int16DataFrameColumn column) + { + Int64DataFrameColumn otherlongColumn = column.CloneAsInt64Column(); + return ElementwiseGreaterThanOrEqualImplementation(otherlongColumn); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(Int16DataFrameColumn column) + { + Int64DataFrameColumn otherlongColumn = column.CloneAsInt64Column(); + return ElementwiseLessThanOrEqualImplementation(otherlongColumn); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(Int16DataFrameColumn column) + { + Int64DataFrameColumn otherlongColumn = column.CloneAsInt64Column(); + return ElementwiseGreaterThanImplementation(otherlongColumn); + } + public BooleanDataFrameColumn ElementwiseLessThan(Int16DataFrameColumn column) + { + Int64DataFrameColumn otherlongColumn = column.CloneAsInt64Column(); + return ElementwiseLessThanImplementation(otherlongColumn); + } + public BooleanDataFrameColumn ElementwiseEquals(UInt32DataFrameColumn column) + { + Int64DataFrameColumn otherlongColumn = column.CloneAsInt64Column(); + return ElementwiseEqualsImplementation(otherlongColumn); + } + public BooleanDataFrameColumn ElementwiseNotEquals(UInt32DataFrameColumn column) + { + Int64DataFrameColumn otherlongColumn = column.CloneAsInt64Column(); + return ElementwiseNotEqualsImplementation(otherlongColumn); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(UInt32DataFrameColumn column) + { + Int64DataFrameColumn otherlongColumn = column.CloneAsInt64Column(); + return ElementwiseGreaterThanOrEqualImplementation(otherlongColumn); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(UInt32DataFrameColumn column) + { + Int64DataFrameColumn otherlongColumn = column.CloneAsInt64Column(); + return ElementwiseLessThanOrEqualImplementation(otherlongColumn); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(UInt32DataFrameColumn column) + { + Int64DataFrameColumn otherlongColumn = column.CloneAsInt64Column(); + return ElementwiseGreaterThanImplementation(otherlongColumn); + } + public BooleanDataFrameColumn ElementwiseLessThan(UInt32DataFrameColumn column) + { + Int64DataFrameColumn otherlongColumn = column.CloneAsInt64Column(); + return ElementwiseLessThanImplementation(otherlongColumn); + } + public BooleanDataFrameColumn ElementwiseEquals(UInt16DataFrameColumn column) + { + Int64DataFrameColumn otherlongColumn = column.CloneAsInt64Column(); + return ElementwiseEqualsImplementation(otherlongColumn); + } + public BooleanDataFrameColumn ElementwiseNotEquals(UInt16DataFrameColumn column) + { + Int64DataFrameColumn otherlongColumn = column.CloneAsInt64Column(); + return ElementwiseNotEqualsImplementation(otherlongColumn); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(UInt16DataFrameColumn column) + { + Int64DataFrameColumn otherlongColumn = column.CloneAsInt64Column(); + return ElementwiseGreaterThanOrEqualImplementation(otherlongColumn); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(UInt16DataFrameColumn column) + { + Int64DataFrameColumn otherlongColumn = column.CloneAsInt64Column(); + return ElementwiseLessThanOrEqualImplementation(otherlongColumn); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(UInt16DataFrameColumn column) + { + Int64DataFrameColumn otherlongColumn = column.CloneAsInt64Column(); + return ElementwiseGreaterThanImplementation(otherlongColumn); + } + public BooleanDataFrameColumn ElementwiseLessThan(UInt16DataFrameColumn column) + { + Int64DataFrameColumn otherlongColumn = column.CloneAsInt64Column(); + return ElementwiseLessThanImplementation(otherlongColumn); + } + } + public partial class SByteDataFrameColumn + { + public BooleanDataFrameColumn ElementwiseEquals(ByteDataFrameColumn column) + { + SByteDataFrameColumn othersbyteColumn = column.CloneAsSByteColumn(); + return ElementwiseEqualsImplementation(othersbyteColumn); + } + public BooleanDataFrameColumn ElementwiseNotEquals(ByteDataFrameColumn column) + { + SByteDataFrameColumn othersbyteColumn = column.CloneAsSByteColumn(); + return ElementwiseNotEqualsImplementation(othersbyteColumn); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(ByteDataFrameColumn column) + { + SByteDataFrameColumn othersbyteColumn = column.CloneAsSByteColumn(); + return ElementwiseGreaterThanOrEqualImplementation(othersbyteColumn); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(ByteDataFrameColumn column) + { + SByteDataFrameColumn othersbyteColumn = column.CloneAsSByteColumn(); + return ElementwiseLessThanOrEqualImplementation(othersbyteColumn); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(ByteDataFrameColumn column) + { + SByteDataFrameColumn othersbyteColumn = column.CloneAsSByteColumn(); + return ElementwiseGreaterThanImplementation(othersbyteColumn); + } + public BooleanDataFrameColumn ElementwiseLessThan(ByteDataFrameColumn column) + { + SByteDataFrameColumn othersbyteColumn = column.CloneAsSByteColumn(); + return ElementwiseLessThanImplementation(othersbyteColumn); + } + public BooleanDataFrameColumn ElementwiseEquals(DecimalDataFrameColumn column) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.ElementwiseEqualsImplementation(column); + } + public BooleanDataFrameColumn ElementwiseNotEquals(DecimalDataFrameColumn column) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.ElementwiseNotEqualsImplementation(column); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(DecimalDataFrameColumn column) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.ElementwiseGreaterThanOrEqualImplementation(column); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(DecimalDataFrameColumn column) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.ElementwiseLessThanOrEqualImplementation(column); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(DecimalDataFrameColumn column) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.ElementwiseGreaterThanImplementation(column); + } + public BooleanDataFrameColumn ElementwiseLessThan(DecimalDataFrameColumn column) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.ElementwiseLessThanImplementation(column); + } + public BooleanDataFrameColumn ElementwiseEquals(DoubleDataFrameColumn column) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.ElementwiseEqualsImplementation(column); + } + public BooleanDataFrameColumn ElementwiseNotEquals(DoubleDataFrameColumn column) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.ElementwiseNotEqualsImplementation(column); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(DoubleDataFrameColumn column) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.ElementwiseGreaterThanOrEqualImplementation(column); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(DoubleDataFrameColumn column) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.ElementwiseLessThanOrEqualImplementation(column); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(DoubleDataFrameColumn column) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.ElementwiseGreaterThanImplementation(column); + } + public BooleanDataFrameColumn ElementwiseLessThan(DoubleDataFrameColumn column) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.ElementwiseLessThanImplementation(column); + } + public BooleanDataFrameColumn ElementwiseEquals(SingleDataFrameColumn column) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.ElementwiseEqualsImplementation(column); + } + public BooleanDataFrameColumn ElementwiseNotEquals(SingleDataFrameColumn column) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.ElementwiseNotEqualsImplementation(column); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(SingleDataFrameColumn column) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.ElementwiseGreaterThanOrEqualImplementation(column); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(SingleDataFrameColumn column) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.ElementwiseLessThanOrEqualImplementation(column); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(SingleDataFrameColumn column) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.ElementwiseGreaterThanImplementation(column); + } + public BooleanDataFrameColumn ElementwiseLessThan(SingleDataFrameColumn column) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.ElementwiseLessThanImplementation(column); + } + public BooleanDataFrameColumn ElementwiseEquals(Int32DataFrameColumn column) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.ElementwiseEqualsImplementation(column); + } + public BooleanDataFrameColumn ElementwiseNotEquals(Int32DataFrameColumn column) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.ElementwiseNotEqualsImplementation(column); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(Int32DataFrameColumn column) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.ElementwiseGreaterThanOrEqualImplementation(column); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(Int32DataFrameColumn column) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.ElementwiseLessThanOrEqualImplementation(column); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(Int32DataFrameColumn column) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.ElementwiseGreaterThanImplementation(column); + } + public BooleanDataFrameColumn ElementwiseLessThan(Int32DataFrameColumn column) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.ElementwiseLessThanImplementation(column); + } + public BooleanDataFrameColumn ElementwiseEquals(Int64DataFrameColumn column) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.ElementwiseEqualsImplementation(column); + } + public BooleanDataFrameColumn ElementwiseNotEquals(Int64DataFrameColumn column) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.ElementwiseNotEqualsImplementation(column); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(Int64DataFrameColumn column) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.ElementwiseGreaterThanOrEqualImplementation(column); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(Int64DataFrameColumn column) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.ElementwiseLessThanOrEqualImplementation(column); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(Int64DataFrameColumn column) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.ElementwiseGreaterThanImplementation(column); + } + public BooleanDataFrameColumn ElementwiseLessThan(Int64DataFrameColumn column) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.ElementwiseLessThanImplementation(column); + } + public BooleanDataFrameColumn ElementwiseEquals(SByteDataFrameColumn column) + { + return ElementwiseEqualsImplementation(column); + } + public BooleanDataFrameColumn ElementwiseNotEquals(SByteDataFrameColumn column) + { + return ElementwiseNotEqualsImplementation(column); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(SByteDataFrameColumn column) + { + return ElementwiseGreaterThanOrEqualImplementation(column); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(SByteDataFrameColumn column) + { + return ElementwiseLessThanOrEqualImplementation(column); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(SByteDataFrameColumn column) + { + return ElementwiseGreaterThanImplementation(column); + } + public BooleanDataFrameColumn ElementwiseLessThan(SByteDataFrameColumn column) + { + return ElementwiseLessThanImplementation(column); + } + public BooleanDataFrameColumn ElementwiseEquals(Int16DataFrameColumn column) + { + Int16DataFrameColumn shortColumn = CloneAsInt16Column(); + return shortColumn.ElementwiseEqualsImplementation(column); + } + public BooleanDataFrameColumn ElementwiseNotEquals(Int16DataFrameColumn column) + { + Int16DataFrameColumn shortColumn = CloneAsInt16Column(); + return shortColumn.ElementwiseNotEqualsImplementation(column); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(Int16DataFrameColumn column) + { + Int16DataFrameColumn shortColumn = CloneAsInt16Column(); + return shortColumn.ElementwiseGreaterThanOrEqualImplementation(column); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(Int16DataFrameColumn column) + { + Int16DataFrameColumn shortColumn = CloneAsInt16Column(); + return shortColumn.ElementwiseLessThanOrEqualImplementation(column); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(Int16DataFrameColumn column) + { + Int16DataFrameColumn shortColumn = CloneAsInt16Column(); + return shortColumn.ElementwiseGreaterThanImplementation(column); + } + public BooleanDataFrameColumn ElementwiseLessThan(Int16DataFrameColumn column) + { + Int16DataFrameColumn shortColumn = CloneAsInt16Column(); + return shortColumn.ElementwiseLessThanImplementation(column); + } + public BooleanDataFrameColumn ElementwiseEquals(UInt32DataFrameColumn column) + { + UInt32DataFrameColumn uintColumn = CloneAsUInt32Column(); + return uintColumn.ElementwiseEqualsImplementation(column); + } + public BooleanDataFrameColumn ElementwiseNotEquals(UInt32DataFrameColumn column) + { + UInt32DataFrameColumn uintColumn = CloneAsUInt32Column(); + return uintColumn.ElementwiseNotEqualsImplementation(column); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(UInt32DataFrameColumn column) + { + UInt32DataFrameColumn uintColumn = CloneAsUInt32Column(); + return uintColumn.ElementwiseGreaterThanOrEqualImplementation(column); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(UInt32DataFrameColumn column) + { + UInt32DataFrameColumn uintColumn = CloneAsUInt32Column(); + return uintColumn.ElementwiseLessThanOrEqualImplementation(column); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(UInt32DataFrameColumn column) + { + UInt32DataFrameColumn uintColumn = CloneAsUInt32Column(); + return uintColumn.ElementwiseGreaterThanImplementation(column); + } + public BooleanDataFrameColumn ElementwiseLessThan(UInt32DataFrameColumn column) + { + UInt32DataFrameColumn uintColumn = CloneAsUInt32Column(); + return uintColumn.ElementwiseLessThanImplementation(column); + } + public BooleanDataFrameColumn ElementwiseEquals(UInt64DataFrameColumn column) + { + UInt64DataFrameColumn ulongColumn = CloneAsUInt64Column(); + return ulongColumn.ElementwiseEqualsImplementation(column); + } + public BooleanDataFrameColumn ElementwiseNotEquals(UInt64DataFrameColumn column) + { + UInt64DataFrameColumn ulongColumn = CloneAsUInt64Column(); + return ulongColumn.ElementwiseNotEqualsImplementation(column); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(UInt64DataFrameColumn column) + { + UInt64DataFrameColumn ulongColumn = CloneAsUInt64Column(); + return ulongColumn.ElementwiseGreaterThanOrEqualImplementation(column); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(UInt64DataFrameColumn column) + { + UInt64DataFrameColumn ulongColumn = CloneAsUInt64Column(); + return ulongColumn.ElementwiseLessThanOrEqualImplementation(column); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(UInt64DataFrameColumn column) + { + UInt64DataFrameColumn ulongColumn = CloneAsUInt64Column(); + return ulongColumn.ElementwiseGreaterThanImplementation(column); + } + public BooleanDataFrameColumn ElementwiseLessThan(UInt64DataFrameColumn column) + { + UInt64DataFrameColumn ulongColumn = CloneAsUInt64Column(); + return ulongColumn.ElementwiseLessThanImplementation(column); + } + public BooleanDataFrameColumn ElementwiseEquals(UInt16DataFrameColumn column) + { + UInt16DataFrameColumn ushortColumn = CloneAsUInt16Column(); + return ushortColumn.ElementwiseEqualsImplementation(column); + } + public BooleanDataFrameColumn ElementwiseNotEquals(UInt16DataFrameColumn column) + { + UInt16DataFrameColumn ushortColumn = CloneAsUInt16Column(); + return ushortColumn.ElementwiseNotEqualsImplementation(column); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(UInt16DataFrameColumn column) + { + UInt16DataFrameColumn ushortColumn = CloneAsUInt16Column(); + return ushortColumn.ElementwiseGreaterThanOrEqualImplementation(column); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(UInt16DataFrameColumn column) + { + UInt16DataFrameColumn ushortColumn = CloneAsUInt16Column(); + return ushortColumn.ElementwiseLessThanOrEqualImplementation(column); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(UInt16DataFrameColumn column) + { + UInt16DataFrameColumn ushortColumn = CloneAsUInt16Column(); + return ushortColumn.ElementwiseGreaterThanImplementation(column); + } + public BooleanDataFrameColumn ElementwiseLessThan(UInt16DataFrameColumn column) + { + UInt16DataFrameColumn ushortColumn = CloneAsUInt16Column(); + return ushortColumn.ElementwiseLessThanImplementation(column); + } + } + public partial class Int16DataFrameColumn + { + public BooleanDataFrameColumn ElementwiseEquals(ByteDataFrameColumn column) + { + Int16DataFrameColumn othershortColumn = column.CloneAsInt16Column(); + return ElementwiseEqualsImplementation(othershortColumn); + } + public BooleanDataFrameColumn ElementwiseNotEquals(ByteDataFrameColumn column) + { + Int16DataFrameColumn othershortColumn = column.CloneAsInt16Column(); + return ElementwiseNotEqualsImplementation(othershortColumn); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(ByteDataFrameColumn column) + { + Int16DataFrameColumn othershortColumn = column.CloneAsInt16Column(); + return ElementwiseGreaterThanOrEqualImplementation(othershortColumn); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(ByteDataFrameColumn column) + { + Int16DataFrameColumn othershortColumn = column.CloneAsInt16Column(); + return ElementwiseLessThanOrEqualImplementation(othershortColumn); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(ByteDataFrameColumn column) + { + Int16DataFrameColumn othershortColumn = column.CloneAsInt16Column(); + return ElementwiseGreaterThanImplementation(othershortColumn); + } + public BooleanDataFrameColumn ElementwiseLessThan(ByteDataFrameColumn column) + { + Int16DataFrameColumn othershortColumn = column.CloneAsInt16Column(); + return ElementwiseLessThanImplementation(othershortColumn); + } + public BooleanDataFrameColumn ElementwiseEquals(DecimalDataFrameColumn column) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.ElementwiseEqualsImplementation(column); + } + public BooleanDataFrameColumn ElementwiseNotEquals(DecimalDataFrameColumn column) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.ElementwiseNotEqualsImplementation(column); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(DecimalDataFrameColumn column) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.ElementwiseGreaterThanOrEqualImplementation(column); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(DecimalDataFrameColumn column) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.ElementwiseLessThanOrEqualImplementation(column); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(DecimalDataFrameColumn column) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.ElementwiseGreaterThanImplementation(column); + } + public BooleanDataFrameColumn ElementwiseLessThan(DecimalDataFrameColumn column) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.ElementwiseLessThanImplementation(column); + } + public BooleanDataFrameColumn ElementwiseEquals(DoubleDataFrameColumn column) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.ElementwiseEqualsImplementation(column); + } + public BooleanDataFrameColumn ElementwiseNotEquals(DoubleDataFrameColumn column) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.ElementwiseNotEqualsImplementation(column); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(DoubleDataFrameColumn column) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.ElementwiseGreaterThanOrEqualImplementation(column); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(DoubleDataFrameColumn column) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.ElementwiseLessThanOrEqualImplementation(column); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(DoubleDataFrameColumn column) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.ElementwiseGreaterThanImplementation(column); + } + public BooleanDataFrameColumn ElementwiseLessThan(DoubleDataFrameColumn column) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.ElementwiseLessThanImplementation(column); + } + public BooleanDataFrameColumn ElementwiseEquals(SingleDataFrameColumn column) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.ElementwiseEqualsImplementation(column); + } + public BooleanDataFrameColumn ElementwiseNotEquals(SingleDataFrameColumn column) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.ElementwiseNotEqualsImplementation(column); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(SingleDataFrameColumn column) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.ElementwiseGreaterThanOrEqualImplementation(column); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(SingleDataFrameColumn column) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.ElementwiseLessThanOrEqualImplementation(column); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(SingleDataFrameColumn column) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.ElementwiseGreaterThanImplementation(column); + } + public BooleanDataFrameColumn ElementwiseLessThan(SingleDataFrameColumn column) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.ElementwiseLessThanImplementation(column); + } + public BooleanDataFrameColumn ElementwiseEquals(Int32DataFrameColumn column) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.ElementwiseEqualsImplementation(column); + } + public BooleanDataFrameColumn ElementwiseNotEquals(Int32DataFrameColumn column) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.ElementwiseNotEqualsImplementation(column); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(Int32DataFrameColumn column) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.ElementwiseGreaterThanOrEqualImplementation(column); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(Int32DataFrameColumn column) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.ElementwiseLessThanOrEqualImplementation(column); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(Int32DataFrameColumn column) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.ElementwiseGreaterThanImplementation(column); + } + public BooleanDataFrameColumn ElementwiseLessThan(Int32DataFrameColumn column) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.ElementwiseLessThanImplementation(column); + } + public BooleanDataFrameColumn ElementwiseEquals(Int64DataFrameColumn column) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.ElementwiseEqualsImplementation(column); + } + public BooleanDataFrameColumn ElementwiseNotEquals(Int64DataFrameColumn column) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.ElementwiseNotEqualsImplementation(column); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(Int64DataFrameColumn column) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.ElementwiseGreaterThanOrEqualImplementation(column); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(Int64DataFrameColumn column) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.ElementwiseLessThanOrEqualImplementation(column); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(Int64DataFrameColumn column) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.ElementwiseGreaterThanImplementation(column); + } + public BooleanDataFrameColumn ElementwiseLessThan(Int64DataFrameColumn column) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.ElementwiseLessThanImplementation(column); + } + public BooleanDataFrameColumn ElementwiseEquals(SByteDataFrameColumn column) + { + Int16DataFrameColumn othershortColumn = column.CloneAsInt16Column(); + return ElementwiseEqualsImplementation(othershortColumn); + } + public BooleanDataFrameColumn ElementwiseNotEquals(SByteDataFrameColumn column) + { + Int16DataFrameColumn othershortColumn = column.CloneAsInt16Column(); + return ElementwiseNotEqualsImplementation(othershortColumn); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(SByteDataFrameColumn column) + { + Int16DataFrameColumn othershortColumn = column.CloneAsInt16Column(); + return ElementwiseGreaterThanOrEqualImplementation(othershortColumn); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(SByteDataFrameColumn column) + { + Int16DataFrameColumn othershortColumn = column.CloneAsInt16Column(); + return ElementwiseLessThanOrEqualImplementation(othershortColumn); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(SByteDataFrameColumn column) + { + Int16DataFrameColumn othershortColumn = column.CloneAsInt16Column(); + return ElementwiseGreaterThanImplementation(othershortColumn); + } + public BooleanDataFrameColumn ElementwiseLessThan(SByteDataFrameColumn column) + { + Int16DataFrameColumn othershortColumn = column.CloneAsInt16Column(); + return ElementwiseLessThanImplementation(othershortColumn); + } + public BooleanDataFrameColumn ElementwiseEquals(Int16DataFrameColumn column) + { + return ElementwiseEqualsImplementation(column); + } + public BooleanDataFrameColumn ElementwiseNotEquals(Int16DataFrameColumn column) + { + return ElementwiseNotEqualsImplementation(column); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(Int16DataFrameColumn column) + { + return ElementwiseGreaterThanOrEqualImplementation(column); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(Int16DataFrameColumn column) + { + return ElementwiseLessThanOrEqualImplementation(column); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(Int16DataFrameColumn column) + { + return ElementwiseGreaterThanImplementation(column); + } + public BooleanDataFrameColumn ElementwiseLessThan(Int16DataFrameColumn column) + { + return ElementwiseLessThanImplementation(column); + } + public BooleanDataFrameColumn ElementwiseEquals(UInt32DataFrameColumn column) + { + UInt32DataFrameColumn uintColumn = CloneAsUInt32Column(); + return uintColumn.ElementwiseEqualsImplementation(column); + } + public BooleanDataFrameColumn ElementwiseNotEquals(UInt32DataFrameColumn column) + { + UInt32DataFrameColumn uintColumn = CloneAsUInt32Column(); + return uintColumn.ElementwiseNotEqualsImplementation(column); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(UInt32DataFrameColumn column) + { + UInt32DataFrameColumn uintColumn = CloneAsUInt32Column(); + return uintColumn.ElementwiseGreaterThanOrEqualImplementation(column); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(UInt32DataFrameColumn column) + { + UInt32DataFrameColumn uintColumn = CloneAsUInt32Column(); + return uintColumn.ElementwiseLessThanOrEqualImplementation(column); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(UInt32DataFrameColumn column) + { + UInt32DataFrameColumn uintColumn = CloneAsUInt32Column(); + return uintColumn.ElementwiseGreaterThanImplementation(column); + } + public BooleanDataFrameColumn ElementwiseLessThan(UInt32DataFrameColumn column) + { + UInt32DataFrameColumn uintColumn = CloneAsUInt32Column(); + return uintColumn.ElementwiseLessThanImplementation(column); + } + public BooleanDataFrameColumn ElementwiseEquals(UInt64DataFrameColumn column) + { + UInt64DataFrameColumn ulongColumn = CloneAsUInt64Column(); + return ulongColumn.ElementwiseEqualsImplementation(column); + } + public BooleanDataFrameColumn ElementwiseNotEquals(UInt64DataFrameColumn column) + { + UInt64DataFrameColumn ulongColumn = CloneAsUInt64Column(); + return ulongColumn.ElementwiseNotEqualsImplementation(column); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(UInt64DataFrameColumn column) + { + UInt64DataFrameColumn ulongColumn = CloneAsUInt64Column(); + return ulongColumn.ElementwiseGreaterThanOrEqualImplementation(column); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(UInt64DataFrameColumn column) + { + UInt64DataFrameColumn ulongColumn = CloneAsUInt64Column(); + return ulongColumn.ElementwiseLessThanOrEqualImplementation(column); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(UInt64DataFrameColumn column) + { + UInt64DataFrameColumn ulongColumn = CloneAsUInt64Column(); + return ulongColumn.ElementwiseGreaterThanImplementation(column); + } + public BooleanDataFrameColumn ElementwiseLessThan(UInt64DataFrameColumn column) + { + UInt64DataFrameColumn ulongColumn = CloneAsUInt64Column(); + return ulongColumn.ElementwiseLessThanImplementation(column); + } + public BooleanDataFrameColumn ElementwiseEquals(UInt16DataFrameColumn column) + { + Int16DataFrameColumn othershortColumn = column.CloneAsInt16Column(); + return ElementwiseEqualsImplementation(othershortColumn); + } + public BooleanDataFrameColumn ElementwiseNotEquals(UInt16DataFrameColumn column) + { + Int16DataFrameColumn othershortColumn = column.CloneAsInt16Column(); + return ElementwiseNotEqualsImplementation(othershortColumn); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(UInt16DataFrameColumn column) + { + Int16DataFrameColumn othershortColumn = column.CloneAsInt16Column(); + return ElementwiseGreaterThanOrEqualImplementation(othershortColumn); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(UInt16DataFrameColumn column) + { + Int16DataFrameColumn othershortColumn = column.CloneAsInt16Column(); + return ElementwiseLessThanOrEqualImplementation(othershortColumn); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(UInt16DataFrameColumn column) + { + Int16DataFrameColumn othershortColumn = column.CloneAsInt16Column(); + return ElementwiseGreaterThanImplementation(othershortColumn); + } + public BooleanDataFrameColumn ElementwiseLessThan(UInt16DataFrameColumn column) + { + Int16DataFrameColumn othershortColumn = column.CloneAsInt16Column(); + return ElementwiseLessThanImplementation(othershortColumn); + } + } + public partial class UInt32DataFrameColumn + { + public BooleanDataFrameColumn ElementwiseEquals(ByteDataFrameColumn column) + { + UInt32DataFrameColumn otheruintColumn = column.CloneAsUInt32Column(); + return ElementwiseEqualsImplementation(otheruintColumn); + } + public BooleanDataFrameColumn ElementwiseNotEquals(ByteDataFrameColumn column) + { + UInt32DataFrameColumn otheruintColumn = column.CloneAsUInt32Column(); + return ElementwiseNotEqualsImplementation(otheruintColumn); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(ByteDataFrameColumn column) + { + UInt32DataFrameColumn otheruintColumn = column.CloneAsUInt32Column(); + return ElementwiseGreaterThanOrEqualImplementation(otheruintColumn); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(ByteDataFrameColumn column) + { + UInt32DataFrameColumn otheruintColumn = column.CloneAsUInt32Column(); + return ElementwiseLessThanOrEqualImplementation(otheruintColumn); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(ByteDataFrameColumn column) + { + UInt32DataFrameColumn otheruintColumn = column.CloneAsUInt32Column(); + return ElementwiseGreaterThanImplementation(otheruintColumn); + } + public BooleanDataFrameColumn ElementwiseLessThan(ByteDataFrameColumn column) + { + UInt32DataFrameColumn otheruintColumn = column.CloneAsUInt32Column(); + return ElementwiseLessThanImplementation(otheruintColumn); + } + public BooleanDataFrameColumn ElementwiseEquals(DecimalDataFrameColumn column) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.ElementwiseEqualsImplementation(column); + } + public BooleanDataFrameColumn ElementwiseNotEquals(DecimalDataFrameColumn column) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.ElementwiseNotEqualsImplementation(column); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(DecimalDataFrameColumn column) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.ElementwiseGreaterThanOrEqualImplementation(column); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(DecimalDataFrameColumn column) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.ElementwiseLessThanOrEqualImplementation(column); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(DecimalDataFrameColumn column) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.ElementwiseGreaterThanImplementation(column); + } + public BooleanDataFrameColumn ElementwiseLessThan(DecimalDataFrameColumn column) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.ElementwiseLessThanImplementation(column); + } + public BooleanDataFrameColumn ElementwiseEquals(DoubleDataFrameColumn column) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.ElementwiseEqualsImplementation(column); + } + public BooleanDataFrameColumn ElementwiseNotEquals(DoubleDataFrameColumn column) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.ElementwiseNotEqualsImplementation(column); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(DoubleDataFrameColumn column) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.ElementwiseGreaterThanOrEqualImplementation(column); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(DoubleDataFrameColumn column) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.ElementwiseLessThanOrEqualImplementation(column); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(DoubleDataFrameColumn column) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.ElementwiseGreaterThanImplementation(column); + } + public BooleanDataFrameColumn ElementwiseLessThan(DoubleDataFrameColumn column) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.ElementwiseLessThanImplementation(column); + } + public BooleanDataFrameColumn ElementwiseEquals(SingleDataFrameColumn column) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.ElementwiseEqualsImplementation(column); + } + public BooleanDataFrameColumn ElementwiseNotEquals(SingleDataFrameColumn column) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.ElementwiseNotEqualsImplementation(column); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(SingleDataFrameColumn column) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.ElementwiseGreaterThanOrEqualImplementation(column); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(SingleDataFrameColumn column) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.ElementwiseLessThanOrEqualImplementation(column); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(SingleDataFrameColumn column) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.ElementwiseGreaterThanImplementation(column); + } + public BooleanDataFrameColumn ElementwiseLessThan(SingleDataFrameColumn column) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.ElementwiseLessThanImplementation(column); + } + public BooleanDataFrameColumn ElementwiseEquals(Int32DataFrameColumn column) + { + UInt32DataFrameColumn otheruintColumn = column.CloneAsUInt32Column(); + return ElementwiseEqualsImplementation(otheruintColumn); + } + public BooleanDataFrameColumn ElementwiseNotEquals(Int32DataFrameColumn column) + { + UInt32DataFrameColumn otheruintColumn = column.CloneAsUInt32Column(); + return ElementwiseNotEqualsImplementation(otheruintColumn); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(Int32DataFrameColumn column) + { + UInt32DataFrameColumn otheruintColumn = column.CloneAsUInt32Column(); + return ElementwiseGreaterThanOrEqualImplementation(otheruintColumn); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(Int32DataFrameColumn column) + { + UInt32DataFrameColumn otheruintColumn = column.CloneAsUInt32Column(); + return ElementwiseLessThanOrEqualImplementation(otheruintColumn); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(Int32DataFrameColumn column) + { + UInt32DataFrameColumn otheruintColumn = column.CloneAsUInt32Column(); + return ElementwiseGreaterThanImplementation(otheruintColumn); + } + public BooleanDataFrameColumn ElementwiseLessThan(Int32DataFrameColumn column) + { + UInt32DataFrameColumn otheruintColumn = column.CloneAsUInt32Column(); + return ElementwiseLessThanImplementation(otheruintColumn); + } + public BooleanDataFrameColumn ElementwiseEquals(Int64DataFrameColumn column) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.ElementwiseEqualsImplementation(column); + } + public BooleanDataFrameColumn ElementwiseNotEquals(Int64DataFrameColumn column) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.ElementwiseNotEqualsImplementation(column); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(Int64DataFrameColumn column) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.ElementwiseGreaterThanOrEqualImplementation(column); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(Int64DataFrameColumn column) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.ElementwiseLessThanOrEqualImplementation(column); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(Int64DataFrameColumn column) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.ElementwiseGreaterThanImplementation(column); + } + public BooleanDataFrameColumn ElementwiseLessThan(Int64DataFrameColumn column) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.ElementwiseLessThanImplementation(column); + } + public BooleanDataFrameColumn ElementwiseEquals(SByteDataFrameColumn column) + { + UInt32DataFrameColumn otheruintColumn = column.CloneAsUInt32Column(); + return ElementwiseEqualsImplementation(otheruintColumn); + } + public BooleanDataFrameColumn ElementwiseNotEquals(SByteDataFrameColumn column) + { + UInt32DataFrameColumn otheruintColumn = column.CloneAsUInt32Column(); + return ElementwiseNotEqualsImplementation(otheruintColumn); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(SByteDataFrameColumn column) + { + UInt32DataFrameColumn otheruintColumn = column.CloneAsUInt32Column(); + return ElementwiseGreaterThanOrEqualImplementation(otheruintColumn); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(SByteDataFrameColumn column) + { + UInt32DataFrameColumn otheruintColumn = column.CloneAsUInt32Column(); + return ElementwiseLessThanOrEqualImplementation(otheruintColumn); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(SByteDataFrameColumn column) + { + UInt32DataFrameColumn otheruintColumn = column.CloneAsUInt32Column(); + return ElementwiseGreaterThanImplementation(otheruintColumn); + } + public BooleanDataFrameColumn ElementwiseLessThan(SByteDataFrameColumn column) + { + UInt32DataFrameColumn otheruintColumn = column.CloneAsUInt32Column(); + return ElementwiseLessThanImplementation(otheruintColumn); + } + public BooleanDataFrameColumn ElementwiseEquals(Int16DataFrameColumn column) + { + UInt32DataFrameColumn otheruintColumn = column.CloneAsUInt32Column(); + return ElementwiseEqualsImplementation(otheruintColumn); + } + public BooleanDataFrameColumn ElementwiseNotEquals(Int16DataFrameColumn column) + { + UInt32DataFrameColumn otheruintColumn = column.CloneAsUInt32Column(); + return ElementwiseNotEqualsImplementation(otheruintColumn); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(Int16DataFrameColumn column) + { + UInt32DataFrameColumn otheruintColumn = column.CloneAsUInt32Column(); + return ElementwiseGreaterThanOrEqualImplementation(otheruintColumn); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(Int16DataFrameColumn column) + { + UInt32DataFrameColumn otheruintColumn = column.CloneAsUInt32Column(); + return ElementwiseLessThanOrEqualImplementation(otheruintColumn); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(Int16DataFrameColumn column) + { + UInt32DataFrameColumn otheruintColumn = column.CloneAsUInt32Column(); + return ElementwiseGreaterThanImplementation(otheruintColumn); + } + public BooleanDataFrameColumn ElementwiseLessThan(Int16DataFrameColumn column) + { + UInt32DataFrameColumn otheruintColumn = column.CloneAsUInt32Column(); + return ElementwiseLessThanImplementation(otheruintColumn); + } + public BooleanDataFrameColumn ElementwiseEquals(UInt32DataFrameColumn column) + { + return ElementwiseEqualsImplementation(column); + } + public BooleanDataFrameColumn ElementwiseNotEquals(UInt32DataFrameColumn column) + { + return ElementwiseNotEqualsImplementation(column); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(UInt32DataFrameColumn column) + { + return ElementwiseGreaterThanOrEqualImplementation(column); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(UInt32DataFrameColumn column) + { + return ElementwiseLessThanOrEqualImplementation(column); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(UInt32DataFrameColumn column) + { + return ElementwiseGreaterThanImplementation(column); + } + public BooleanDataFrameColumn ElementwiseLessThan(UInt32DataFrameColumn column) + { + return ElementwiseLessThanImplementation(column); + } + public BooleanDataFrameColumn ElementwiseEquals(UInt64DataFrameColumn column) + { + UInt64DataFrameColumn ulongColumn = CloneAsUInt64Column(); + return ulongColumn.ElementwiseEqualsImplementation(column); + } + public BooleanDataFrameColumn ElementwiseNotEquals(UInt64DataFrameColumn column) + { + UInt64DataFrameColumn ulongColumn = CloneAsUInt64Column(); + return ulongColumn.ElementwiseNotEqualsImplementation(column); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(UInt64DataFrameColumn column) + { + UInt64DataFrameColumn ulongColumn = CloneAsUInt64Column(); + return ulongColumn.ElementwiseGreaterThanOrEqualImplementation(column); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(UInt64DataFrameColumn column) + { + UInt64DataFrameColumn ulongColumn = CloneAsUInt64Column(); + return ulongColumn.ElementwiseLessThanOrEqualImplementation(column); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(UInt64DataFrameColumn column) + { + UInt64DataFrameColumn ulongColumn = CloneAsUInt64Column(); + return ulongColumn.ElementwiseGreaterThanImplementation(column); + } + public BooleanDataFrameColumn ElementwiseLessThan(UInt64DataFrameColumn column) + { + UInt64DataFrameColumn ulongColumn = CloneAsUInt64Column(); + return ulongColumn.ElementwiseLessThanImplementation(column); + } + public BooleanDataFrameColumn ElementwiseEquals(UInt16DataFrameColumn column) + { + UInt32DataFrameColumn otheruintColumn = column.CloneAsUInt32Column(); + return ElementwiseEqualsImplementation(otheruintColumn); + } + public BooleanDataFrameColumn ElementwiseNotEquals(UInt16DataFrameColumn column) + { + UInt32DataFrameColumn otheruintColumn = column.CloneAsUInt32Column(); + return ElementwiseNotEqualsImplementation(otheruintColumn); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(UInt16DataFrameColumn column) + { + UInt32DataFrameColumn otheruintColumn = column.CloneAsUInt32Column(); + return ElementwiseGreaterThanOrEqualImplementation(otheruintColumn); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(UInt16DataFrameColumn column) + { + UInt32DataFrameColumn otheruintColumn = column.CloneAsUInt32Column(); + return ElementwiseLessThanOrEqualImplementation(otheruintColumn); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(UInt16DataFrameColumn column) + { + UInt32DataFrameColumn otheruintColumn = column.CloneAsUInt32Column(); + return ElementwiseGreaterThanImplementation(otheruintColumn); + } + public BooleanDataFrameColumn ElementwiseLessThan(UInt16DataFrameColumn column) + { + UInt32DataFrameColumn otheruintColumn = column.CloneAsUInt32Column(); + return ElementwiseLessThanImplementation(otheruintColumn); + } + } + public partial class UInt64DataFrameColumn + { + public BooleanDataFrameColumn ElementwiseEquals(ByteDataFrameColumn column) + { + UInt64DataFrameColumn otherulongColumn = column.CloneAsUInt64Column(); + return ElementwiseEqualsImplementation(otherulongColumn); + } + public BooleanDataFrameColumn ElementwiseNotEquals(ByteDataFrameColumn column) + { + UInt64DataFrameColumn otherulongColumn = column.CloneAsUInt64Column(); + return ElementwiseNotEqualsImplementation(otherulongColumn); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(ByteDataFrameColumn column) + { + UInt64DataFrameColumn otherulongColumn = column.CloneAsUInt64Column(); + return ElementwiseGreaterThanOrEqualImplementation(otherulongColumn); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(ByteDataFrameColumn column) + { + UInt64DataFrameColumn otherulongColumn = column.CloneAsUInt64Column(); + return ElementwiseLessThanOrEqualImplementation(otherulongColumn); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(ByteDataFrameColumn column) + { + UInt64DataFrameColumn otherulongColumn = column.CloneAsUInt64Column(); + return ElementwiseGreaterThanImplementation(otherulongColumn); + } + public BooleanDataFrameColumn ElementwiseLessThan(ByteDataFrameColumn column) + { + UInt64DataFrameColumn otherulongColumn = column.CloneAsUInt64Column(); + return ElementwiseLessThanImplementation(otherulongColumn); + } + public BooleanDataFrameColumn ElementwiseEquals(DecimalDataFrameColumn column) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.ElementwiseEqualsImplementation(column); + } + public BooleanDataFrameColumn ElementwiseNotEquals(DecimalDataFrameColumn column) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.ElementwiseNotEqualsImplementation(column); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(DecimalDataFrameColumn column) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.ElementwiseGreaterThanOrEqualImplementation(column); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(DecimalDataFrameColumn column) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.ElementwiseLessThanOrEqualImplementation(column); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(DecimalDataFrameColumn column) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.ElementwiseGreaterThanImplementation(column); + } + public BooleanDataFrameColumn ElementwiseLessThan(DecimalDataFrameColumn column) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.ElementwiseLessThanImplementation(column); + } + public BooleanDataFrameColumn ElementwiseEquals(DoubleDataFrameColumn column) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.ElementwiseEqualsImplementation(column); + } + public BooleanDataFrameColumn ElementwiseNotEquals(DoubleDataFrameColumn column) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.ElementwiseNotEqualsImplementation(column); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(DoubleDataFrameColumn column) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.ElementwiseGreaterThanOrEqualImplementation(column); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(DoubleDataFrameColumn column) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.ElementwiseLessThanOrEqualImplementation(column); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(DoubleDataFrameColumn column) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.ElementwiseGreaterThanImplementation(column); + } + public BooleanDataFrameColumn ElementwiseLessThan(DoubleDataFrameColumn column) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.ElementwiseLessThanImplementation(column); + } + public BooleanDataFrameColumn ElementwiseEquals(SingleDataFrameColumn column) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.ElementwiseEqualsImplementation(column); + } + public BooleanDataFrameColumn ElementwiseNotEquals(SingleDataFrameColumn column) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.ElementwiseNotEqualsImplementation(column); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(SingleDataFrameColumn column) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.ElementwiseGreaterThanOrEqualImplementation(column); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(SingleDataFrameColumn column) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.ElementwiseLessThanOrEqualImplementation(column); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(SingleDataFrameColumn column) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.ElementwiseGreaterThanImplementation(column); + } + public BooleanDataFrameColumn ElementwiseLessThan(SingleDataFrameColumn column) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.ElementwiseLessThanImplementation(column); + } + public BooleanDataFrameColumn ElementwiseEquals(Int32DataFrameColumn column) + { + UInt64DataFrameColumn otherulongColumn = column.CloneAsUInt64Column(); + return ElementwiseEqualsImplementation(otherulongColumn); + } + public BooleanDataFrameColumn ElementwiseNotEquals(Int32DataFrameColumn column) + { + UInt64DataFrameColumn otherulongColumn = column.CloneAsUInt64Column(); + return ElementwiseNotEqualsImplementation(otherulongColumn); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(Int32DataFrameColumn column) + { + UInt64DataFrameColumn otherulongColumn = column.CloneAsUInt64Column(); + return ElementwiseGreaterThanOrEqualImplementation(otherulongColumn); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(Int32DataFrameColumn column) + { + UInt64DataFrameColumn otherulongColumn = column.CloneAsUInt64Column(); + return ElementwiseLessThanOrEqualImplementation(otherulongColumn); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(Int32DataFrameColumn column) + { + UInt64DataFrameColumn otherulongColumn = column.CloneAsUInt64Column(); + return ElementwiseGreaterThanImplementation(otherulongColumn); + } + public BooleanDataFrameColumn ElementwiseLessThan(Int32DataFrameColumn column) + { + UInt64DataFrameColumn otherulongColumn = column.CloneAsUInt64Column(); + return ElementwiseLessThanImplementation(otherulongColumn); + } + public BooleanDataFrameColumn ElementwiseEquals(SByteDataFrameColumn column) + { + UInt64DataFrameColumn otherulongColumn = column.CloneAsUInt64Column(); + return ElementwiseEqualsImplementation(otherulongColumn); + } + public BooleanDataFrameColumn ElementwiseNotEquals(SByteDataFrameColumn column) + { + UInt64DataFrameColumn otherulongColumn = column.CloneAsUInt64Column(); + return ElementwiseNotEqualsImplementation(otherulongColumn); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(SByteDataFrameColumn column) + { + UInt64DataFrameColumn otherulongColumn = column.CloneAsUInt64Column(); + return ElementwiseGreaterThanOrEqualImplementation(otherulongColumn); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(SByteDataFrameColumn column) + { + UInt64DataFrameColumn otherulongColumn = column.CloneAsUInt64Column(); + return ElementwiseLessThanOrEqualImplementation(otherulongColumn); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(SByteDataFrameColumn column) + { + UInt64DataFrameColumn otherulongColumn = column.CloneAsUInt64Column(); + return ElementwiseGreaterThanImplementation(otherulongColumn); + } + public BooleanDataFrameColumn ElementwiseLessThan(SByteDataFrameColumn column) + { + UInt64DataFrameColumn otherulongColumn = column.CloneAsUInt64Column(); + return ElementwiseLessThanImplementation(otherulongColumn); + } + public BooleanDataFrameColumn ElementwiseEquals(Int16DataFrameColumn column) + { + UInt64DataFrameColumn otherulongColumn = column.CloneAsUInt64Column(); + return ElementwiseEqualsImplementation(otherulongColumn); + } + public BooleanDataFrameColumn ElementwiseNotEquals(Int16DataFrameColumn column) + { + UInt64DataFrameColumn otherulongColumn = column.CloneAsUInt64Column(); + return ElementwiseNotEqualsImplementation(otherulongColumn); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(Int16DataFrameColumn column) + { + UInt64DataFrameColumn otherulongColumn = column.CloneAsUInt64Column(); + return ElementwiseGreaterThanOrEqualImplementation(otherulongColumn); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(Int16DataFrameColumn column) + { + UInt64DataFrameColumn otherulongColumn = column.CloneAsUInt64Column(); + return ElementwiseLessThanOrEqualImplementation(otherulongColumn); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(Int16DataFrameColumn column) + { + UInt64DataFrameColumn otherulongColumn = column.CloneAsUInt64Column(); + return ElementwiseGreaterThanImplementation(otherulongColumn); + } + public BooleanDataFrameColumn ElementwiseLessThan(Int16DataFrameColumn column) + { + UInt64DataFrameColumn otherulongColumn = column.CloneAsUInt64Column(); + return ElementwiseLessThanImplementation(otherulongColumn); + } + public BooleanDataFrameColumn ElementwiseEquals(UInt32DataFrameColumn column) + { + UInt64DataFrameColumn otherulongColumn = column.CloneAsUInt64Column(); + return ElementwiseEqualsImplementation(otherulongColumn); + } + public BooleanDataFrameColumn ElementwiseNotEquals(UInt32DataFrameColumn column) + { + UInt64DataFrameColumn otherulongColumn = column.CloneAsUInt64Column(); + return ElementwiseNotEqualsImplementation(otherulongColumn); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(UInt32DataFrameColumn column) + { + UInt64DataFrameColumn otherulongColumn = column.CloneAsUInt64Column(); + return ElementwiseGreaterThanOrEqualImplementation(otherulongColumn); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(UInt32DataFrameColumn column) + { + UInt64DataFrameColumn otherulongColumn = column.CloneAsUInt64Column(); + return ElementwiseLessThanOrEqualImplementation(otherulongColumn); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(UInt32DataFrameColumn column) + { + UInt64DataFrameColumn otherulongColumn = column.CloneAsUInt64Column(); + return ElementwiseGreaterThanImplementation(otherulongColumn); + } + public BooleanDataFrameColumn ElementwiseLessThan(UInt32DataFrameColumn column) + { + UInt64DataFrameColumn otherulongColumn = column.CloneAsUInt64Column(); + return ElementwiseLessThanImplementation(otherulongColumn); + } + public BooleanDataFrameColumn ElementwiseEquals(UInt64DataFrameColumn column) + { + return ElementwiseEqualsImplementation(column); + } + public BooleanDataFrameColumn ElementwiseNotEquals(UInt64DataFrameColumn column) + { + return ElementwiseNotEqualsImplementation(column); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(UInt64DataFrameColumn column) + { + return ElementwiseGreaterThanOrEqualImplementation(column); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(UInt64DataFrameColumn column) + { + return ElementwiseLessThanOrEqualImplementation(column); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(UInt64DataFrameColumn column) + { + return ElementwiseGreaterThanImplementation(column); + } + public BooleanDataFrameColumn ElementwiseLessThan(UInt64DataFrameColumn column) + { + return ElementwiseLessThanImplementation(column); + } + public BooleanDataFrameColumn ElementwiseEquals(UInt16DataFrameColumn column) + { + UInt64DataFrameColumn otherulongColumn = column.CloneAsUInt64Column(); + return ElementwiseEqualsImplementation(otherulongColumn); + } + public BooleanDataFrameColumn ElementwiseNotEquals(UInt16DataFrameColumn column) + { + UInt64DataFrameColumn otherulongColumn = column.CloneAsUInt64Column(); + return ElementwiseNotEqualsImplementation(otherulongColumn); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(UInt16DataFrameColumn column) + { + UInt64DataFrameColumn otherulongColumn = column.CloneAsUInt64Column(); + return ElementwiseGreaterThanOrEqualImplementation(otherulongColumn); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(UInt16DataFrameColumn column) + { + UInt64DataFrameColumn otherulongColumn = column.CloneAsUInt64Column(); + return ElementwiseLessThanOrEqualImplementation(otherulongColumn); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(UInt16DataFrameColumn column) + { + UInt64DataFrameColumn otherulongColumn = column.CloneAsUInt64Column(); + return ElementwiseGreaterThanImplementation(otherulongColumn); + } + public BooleanDataFrameColumn ElementwiseLessThan(UInt16DataFrameColumn column) + { + UInt64DataFrameColumn otherulongColumn = column.CloneAsUInt64Column(); + return ElementwiseLessThanImplementation(otherulongColumn); + } + } + public partial class UInt16DataFrameColumn + { + public BooleanDataFrameColumn ElementwiseEquals(ByteDataFrameColumn column) + { + UInt16DataFrameColumn otherushortColumn = column.CloneAsUInt16Column(); + return ElementwiseEqualsImplementation(otherushortColumn); + } + public BooleanDataFrameColumn ElementwiseNotEquals(ByteDataFrameColumn column) + { + UInt16DataFrameColumn otherushortColumn = column.CloneAsUInt16Column(); + return ElementwiseNotEqualsImplementation(otherushortColumn); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(ByteDataFrameColumn column) + { + UInt16DataFrameColumn otherushortColumn = column.CloneAsUInt16Column(); + return ElementwiseGreaterThanOrEqualImplementation(otherushortColumn); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(ByteDataFrameColumn column) + { + UInt16DataFrameColumn otherushortColumn = column.CloneAsUInt16Column(); + return ElementwiseLessThanOrEqualImplementation(otherushortColumn); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(ByteDataFrameColumn column) + { + UInt16DataFrameColumn otherushortColumn = column.CloneAsUInt16Column(); + return ElementwiseGreaterThanImplementation(otherushortColumn); + } + public BooleanDataFrameColumn ElementwiseLessThan(ByteDataFrameColumn column) + { + UInt16DataFrameColumn otherushortColumn = column.CloneAsUInt16Column(); + return ElementwiseLessThanImplementation(otherushortColumn); + } + public BooleanDataFrameColumn ElementwiseEquals(DecimalDataFrameColumn column) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.ElementwiseEqualsImplementation(column); + } + public BooleanDataFrameColumn ElementwiseNotEquals(DecimalDataFrameColumn column) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.ElementwiseNotEqualsImplementation(column); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(DecimalDataFrameColumn column) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.ElementwiseGreaterThanOrEqualImplementation(column); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(DecimalDataFrameColumn column) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.ElementwiseLessThanOrEqualImplementation(column); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(DecimalDataFrameColumn column) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.ElementwiseGreaterThanImplementation(column); + } + public BooleanDataFrameColumn ElementwiseLessThan(DecimalDataFrameColumn column) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.ElementwiseLessThanImplementation(column); + } + public BooleanDataFrameColumn ElementwiseEquals(DoubleDataFrameColumn column) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.ElementwiseEqualsImplementation(column); + } + public BooleanDataFrameColumn ElementwiseNotEquals(DoubleDataFrameColumn column) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.ElementwiseNotEqualsImplementation(column); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(DoubleDataFrameColumn column) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.ElementwiseGreaterThanOrEqualImplementation(column); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(DoubleDataFrameColumn column) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.ElementwiseLessThanOrEqualImplementation(column); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(DoubleDataFrameColumn column) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.ElementwiseGreaterThanImplementation(column); + } + public BooleanDataFrameColumn ElementwiseLessThan(DoubleDataFrameColumn column) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.ElementwiseLessThanImplementation(column); + } + public BooleanDataFrameColumn ElementwiseEquals(SingleDataFrameColumn column) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.ElementwiseEqualsImplementation(column); + } + public BooleanDataFrameColumn ElementwiseNotEquals(SingleDataFrameColumn column) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.ElementwiseNotEqualsImplementation(column); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(SingleDataFrameColumn column) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.ElementwiseGreaterThanOrEqualImplementation(column); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(SingleDataFrameColumn column) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.ElementwiseLessThanOrEqualImplementation(column); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(SingleDataFrameColumn column) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.ElementwiseGreaterThanImplementation(column); + } + public BooleanDataFrameColumn ElementwiseLessThan(SingleDataFrameColumn column) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.ElementwiseLessThanImplementation(column); + } + public BooleanDataFrameColumn ElementwiseEquals(Int32DataFrameColumn column) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.ElementwiseEqualsImplementation(column); + } + public BooleanDataFrameColumn ElementwiseNotEquals(Int32DataFrameColumn column) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.ElementwiseNotEqualsImplementation(column); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(Int32DataFrameColumn column) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.ElementwiseGreaterThanOrEqualImplementation(column); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(Int32DataFrameColumn column) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.ElementwiseLessThanOrEqualImplementation(column); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(Int32DataFrameColumn column) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.ElementwiseGreaterThanImplementation(column); + } + public BooleanDataFrameColumn ElementwiseLessThan(Int32DataFrameColumn column) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.ElementwiseLessThanImplementation(column); + } + public BooleanDataFrameColumn ElementwiseEquals(Int64DataFrameColumn column) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.ElementwiseEqualsImplementation(column); + } + public BooleanDataFrameColumn ElementwiseNotEquals(Int64DataFrameColumn column) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.ElementwiseNotEqualsImplementation(column); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(Int64DataFrameColumn column) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.ElementwiseGreaterThanOrEqualImplementation(column); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(Int64DataFrameColumn column) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.ElementwiseLessThanOrEqualImplementation(column); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(Int64DataFrameColumn column) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.ElementwiseGreaterThanImplementation(column); + } + public BooleanDataFrameColumn ElementwiseLessThan(Int64DataFrameColumn column) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.ElementwiseLessThanImplementation(column); + } + public BooleanDataFrameColumn ElementwiseEquals(SByteDataFrameColumn column) + { + UInt16DataFrameColumn otherushortColumn = column.CloneAsUInt16Column(); + return ElementwiseEqualsImplementation(otherushortColumn); + } + public BooleanDataFrameColumn ElementwiseNotEquals(SByteDataFrameColumn column) + { + UInt16DataFrameColumn otherushortColumn = column.CloneAsUInt16Column(); + return ElementwiseNotEqualsImplementation(otherushortColumn); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(SByteDataFrameColumn column) + { + UInt16DataFrameColumn otherushortColumn = column.CloneAsUInt16Column(); + return ElementwiseGreaterThanOrEqualImplementation(otherushortColumn); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(SByteDataFrameColumn column) + { + UInt16DataFrameColumn otherushortColumn = column.CloneAsUInt16Column(); + return ElementwiseLessThanOrEqualImplementation(otherushortColumn); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(SByteDataFrameColumn column) + { + UInt16DataFrameColumn otherushortColumn = column.CloneAsUInt16Column(); + return ElementwiseGreaterThanImplementation(otherushortColumn); + } + public BooleanDataFrameColumn ElementwiseLessThan(SByteDataFrameColumn column) + { + UInt16DataFrameColumn otherushortColumn = column.CloneAsUInt16Column(); + return ElementwiseLessThanImplementation(otherushortColumn); + } + public BooleanDataFrameColumn ElementwiseEquals(Int16DataFrameColumn column) + { + UInt16DataFrameColumn otherushortColumn = column.CloneAsUInt16Column(); + return ElementwiseEqualsImplementation(otherushortColumn); + } + public BooleanDataFrameColumn ElementwiseNotEquals(Int16DataFrameColumn column) + { + UInt16DataFrameColumn otherushortColumn = column.CloneAsUInt16Column(); + return ElementwiseNotEqualsImplementation(otherushortColumn); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(Int16DataFrameColumn column) + { + UInt16DataFrameColumn otherushortColumn = column.CloneAsUInt16Column(); + return ElementwiseGreaterThanOrEqualImplementation(otherushortColumn); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(Int16DataFrameColumn column) + { + UInt16DataFrameColumn otherushortColumn = column.CloneAsUInt16Column(); + return ElementwiseLessThanOrEqualImplementation(otherushortColumn); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(Int16DataFrameColumn column) + { + UInt16DataFrameColumn otherushortColumn = column.CloneAsUInt16Column(); + return ElementwiseGreaterThanImplementation(otherushortColumn); + } + public BooleanDataFrameColumn ElementwiseLessThan(Int16DataFrameColumn column) + { + UInt16DataFrameColumn otherushortColumn = column.CloneAsUInt16Column(); + return ElementwiseLessThanImplementation(otherushortColumn); + } + public BooleanDataFrameColumn ElementwiseEquals(UInt32DataFrameColumn column) + { + UInt32DataFrameColumn uintColumn = CloneAsUInt32Column(); + return uintColumn.ElementwiseEqualsImplementation(column); + } + public BooleanDataFrameColumn ElementwiseNotEquals(UInt32DataFrameColumn column) + { + UInt32DataFrameColumn uintColumn = CloneAsUInt32Column(); + return uintColumn.ElementwiseNotEqualsImplementation(column); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(UInt32DataFrameColumn column) + { + UInt32DataFrameColumn uintColumn = CloneAsUInt32Column(); + return uintColumn.ElementwiseGreaterThanOrEqualImplementation(column); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(UInt32DataFrameColumn column) + { + UInt32DataFrameColumn uintColumn = CloneAsUInt32Column(); + return uintColumn.ElementwiseLessThanOrEqualImplementation(column); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(UInt32DataFrameColumn column) + { + UInt32DataFrameColumn uintColumn = CloneAsUInt32Column(); + return uintColumn.ElementwiseGreaterThanImplementation(column); + } + public BooleanDataFrameColumn ElementwiseLessThan(UInt32DataFrameColumn column) + { + UInt32DataFrameColumn uintColumn = CloneAsUInt32Column(); + return uintColumn.ElementwiseLessThanImplementation(column); + } + public BooleanDataFrameColumn ElementwiseEquals(UInt64DataFrameColumn column) + { + UInt64DataFrameColumn ulongColumn = CloneAsUInt64Column(); + return ulongColumn.ElementwiseEqualsImplementation(column); + } + public BooleanDataFrameColumn ElementwiseNotEquals(UInt64DataFrameColumn column) + { + UInt64DataFrameColumn ulongColumn = CloneAsUInt64Column(); + return ulongColumn.ElementwiseNotEqualsImplementation(column); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(UInt64DataFrameColumn column) + { + UInt64DataFrameColumn ulongColumn = CloneAsUInt64Column(); + return ulongColumn.ElementwiseGreaterThanOrEqualImplementation(column); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(UInt64DataFrameColumn column) + { + UInt64DataFrameColumn ulongColumn = CloneAsUInt64Column(); + return ulongColumn.ElementwiseLessThanOrEqualImplementation(column); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(UInt64DataFrameColumn column) + { + UInt64DataFrameColumn ulongColumn = CloneAsUInt64Column(); + return ulongColumn.ElementwiseGreaterThanImplementation(column); + } + public BooleanDataFrameColumn ElementwiseLessThan(UInt64DataFrameColumn column) + { + UInt64DataFrameColumn ulongColumn = CloneAsUInt64Column(); + return ulongColumn.ElementwiseLessThanImplementation(column); + } + public BooleanDataFrameColumn ElementwiseEquals(UInt16DataFrameColumn column) + { + return ElementwiseEqualsImplementation(column); + } + public BooleanDataFrameColumn ElementwiseNotEquals(UInt16DataFrameColumn column) + { + return ElementwiseNotEqualsImplementation(column); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(UInt16DataFrameColumn column) + { + return ElementwiseGreaterThanOrEqualImplementation(column); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(UInt16DataFrameColumn column) + { + return ElementwiseLessThanOrEqualImplementation(column); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(UInt16DataFrameColumn column) + { + return ElementwiseGreaterThanImplementation(column); + } + public BooleanDataFrameColumn ElementwiseLessThan(UInt16DataFrameColumn column) + { + return ElementwiseLessThanImplementation(column); + } + } + public partial class BooleanDataFrameColumn + { + public BooleanDataFrameColumn ElementwiseEquals(bool value) + { + return ElementwiseEqualsImplementation(value); + } + public BooleanDataFrameColumn ElementwiseNotEquals(bool value) + { + return ElementwiseNotEqualsImplementation(value); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(bool value) + { + return ElementwiseGreaterThanOrEqualImplementation(value); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(bool value) + { + return ElementwiseLessThanOrEqualImplementation(value); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(bool value) + { + return ElementwiseGreaterThanImplementation(value); + } + public BooleanDataFrameColumn ElementwiseLessThan(bool value) + { + return ElementwiseLessThanImplementation(value); + } + } + public partial class ByteDataFrameColumn + { + public BooleanDataFrameColumn ElementwiseEquals(byte value) + { + return ElementwiseEqualsImplementation(value); + } + public BooleanDataFrameColumn ElementwiseNotEquals(byte value) + { + return ElementwiseNotEqualsImplementation(value); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(byte value) + { + return ElementwiseGreaterThanOrEqualImplementation(value); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(byte value) + { + return ElementwiseLessThanOrEqualImplementation(value); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(byte value) + { + return ElementwiseGreaterThanImplementation(value); + } + public BooleanDataFrameColumn ElementwiseLessThan(byte value) + { + return ElementwiseLessThanImplementation(value); + } + public BooleanDataFrameColumn ElementwiseEquals(decimal value) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.ElementwiseEqualsImplementation(value); + } + public BooleanDataFrameColumn ElementwiseNotEquals(decimal value) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.ElementwiseNotEqualsImplementation(value); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(decimal value) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.ElementwiseGreaterThanOrEqualImplementation(value); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(decimal value) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.ElementwiseLessThanOrEqualImplementation(value); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(decimal value) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.ElementwiseGreaterThanImplementation(value); + } + public BooleanDataFrameColumn ElementwiseLessThan(decimal value) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.ElementwiseLessThanImplementation(value); + } + public BooleanDataFrameColumn ElementwiseEquals(double value) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.ElementwiseEqualsImplementation(value); + } + public BooleanDataFrameColumn ElementwiseNotEquals(double value) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.ElementwiseNotEqualsImplementation(value); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(double value) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.ElementwiseGreaterThanOrEqualImplementation(value); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(double value) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.ElementwiseLessThanOrEqualImplementation(value); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(double value) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.ElementwiseGreaterThanImplementation(value); + } + public BooleanDataFrameColumn ElementwiseLessThan(double value) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.ElementwiseLessThanImplementation(value); + } + public BooleanDataFrameColumn ElementwiseEquals(float value) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.ElementwiseEqualsImplementation(value); + } + public BooleanDataFrameColumn ElementwiseNotEquals(float value) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.ElementwiseNotEqualsImplementation(value); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(float value) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.ElementwiseGreaterThanOrEqualImplementation(value); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(float value) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.ElementwiseLessThanOrEqualImplementation(value); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(float value) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.ElementwiseGreaterThanImplementation(value); + } + public BooleanDataFrameColumn ElementwiseLessThan(float value) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.ElementwiseLessThanImplementation(value); + } + public BooleanDataFrameColumn ElementwiseEquals(int value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.ElementwiseEqualsImplementation(value); + } + public BooleanDataFrameColumn ElementwiseNotEquals(int value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.ElementwiseNotEqualsImplementation(value); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(int value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.ElementwiseGreaterThanOrEqualImplementation(value); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(int value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.ElementwiseLessThanOrEqualImplementation(value); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(int value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.ElementwiseGreaterThanImplementation(value); + } + public BooleanDataFrameColumn ElementwiseLessThan(int value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.ElementwiseLessThanImplementation(value); + } + public BooleanDataFrameColumn ElementwiseEquals(long value) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.ElementwiseEqualsImplementation(value); + } + public BooleanDataFrameColumn ElementwiseNotEquals(long value) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.ElementwiseNotEqualsImplementation(value); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(long value) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.ElementwiseGreaterThanOrEqualImplementation(value); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(long value) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.ElementwiseLessThanOrEqualImplementation(value); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(long value) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.ElementwiseGreaterThanImplementation(value); + } + public BooleanDataFrameColumn ElementwiseLessThan(long value) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.ElementwiseLessThanImplementation(value); + } + public BooleanDataFrameColumn ElementwiseEquals(sbyte value) + { + byte otherbyteValue = (byte)value; + return ElementwiseEqualsImplementation(otherbyteValue); + } + public BooleanDataFrameColumn ElementwiseNotEquals(sbyte value) + { + byte otherbyteValue = (byte)value; + return ElementwiseNotEqualsImplementation(otherbyteValue); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(sbyte value) + { + byte otherbyteValue = (byte)value; + return ElementwiseGreaterThanOrEqualImplementation(otherbyteValue); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(sbyte value) + { + byte otherbyteValue = (byte)value; + return ElementwiseLessThanOrEqualImplementation(otherbyteValue); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(sbyte value) + { + byte otherbyteValue = (byte)value; + return ElementwiseGreaterThanImplementation(otherbyteValue); + } + public BooleanDataFrameColumn ElementwiseLessThan(sbyte value) + { + byte otherbyteValue = (byte)value; + return ElementwiseLessThanImplementation(otherbyteValue); + } + public BooleanDataFrameColumn ElementwiseEquals(short value) + { + Int16DataFrameColumn shortColumn = CloneAsInt16Column(); + return shortColumn.ElementwiseEqualsImplementation(value); + } + public BooleanDataFrameColumn ElementwiseNotEquals(short value) + { + Int16DataFrameColumn shortColumn = CloneAsInt16Column(); + return shortColumn.ElementwiseNotEqualsImplementation(value); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(short value) + { + Int16DataFrameColumn shortColumn = CloneAsInt16Column(); + return shortColumn.ElementwiseGreaterThanOrEqualImplementation(value); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(short value) + { + Int16DataFrameColumn shortColumn = CloneAsInt16Column(); + return shortColumn.ElementwiseLessThanOrEqualImplementation(value); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(short value) + { + Int16DataFrameColumn shortColumn = CloneAsInt16Column(); + return shortColumn.ElementwiseGreaterThanImplementation(value); + } + public BooleanDataFrameColumn ElementwiseLessThan(short value) + { + Int16DataFrameColumn shortColumn = CloneAsInt16Column(); + return shortColumn.ElementwiseLessThanImplementation(value); + } + public BooleanDataFrameColumn ElementwiseEquals(uint value) + { + UInt32DataFrameColumn uintColumn = CloneAsUInt32Column(); + return uintColumn.ElementwiseEqualsImplementation(value); + } + public BooleanDataFrameColumn ElementwiseNotEquals(uint value) + { + UInt32DataFrameColumn uintColumn = CloneAsUInt32Column(); + return uintColumn.ElementwiseNotEqualsImplementation(value); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(uint value) + { + UInt32DataFrameColumn uintColumn = CloneAsUInt32Column(); + return uintColumn.ElementwiseGreaterThanOrEqualImplementation(value); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(uint value) + { + UInt32DataFrameColumn uintColumn = CloneAsUInt32Column(); + return uintColumn.ElementwiseLessThanOrEqualImplementation(value); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(uint value) + { + UInt32DataFrameColumn uintColumn = CloneAsUInt32Column(); + return uintColumn.ElementwiseGreaterThanImplementation(value); + } + public BooleanDataFrameColumn ElementwiseLessThan(uint value) + { + UInt32DataFrameColumn uintColumn = CloneAsUInt32Column(); + return uintColumn.ElementwiseLessThanImplementation(value); + } + public BooleanDataFrameColumn ElementwiseEquals(ulong value) + { + UInt64DataFrameColumn ulongColumn = CloneAsUInt64Column(); + return ulongColumn.ElementwiseEqualsImplementation(value); + } + public BooleanDataFrameColumn ElementwiseNotEquals(ulong value) + { + UInt64DataFrameColumn ulongColumn = CloneAsUInt64Column(); + return ulongColumn.ElementwiseNotEqualsImplementation(value); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(ulong value) + { + UInt64DataFrameColumn ulongColumn = CloneAsUInt64Column(); + return ulongColumn.ElementwiseGreaterThanOrEqualImplementation(value); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(ulong value) + { + UInt64DataFrameColumn ulongColumn = CloneAsUInt64Column(); + return ulongColumn.ElementwiseLessThanOrEqualImplementation(value); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(ulong value) + { + UInt64DataFrameColumn ulongColumn = CloneAsUInt64Column(); + return ulongColumn.ElementwiseGreaterThanImplementation(value); + } + public BooleanDataFrameColumn ElementwiseLessThan(ulong value) + { + UInt64DataFrameColumn ulongColumn = CloneAsUInt64Column(); + return ulongColumn.ElementwiseLessThanImplementation(value); + } + public BooleanDataFrameColumn ElementwiseEquals(ushort value) + { + UInt16DataFrameColumn ushortColumn = CloneAsUInt16Column(); + return ushortColumn.ElementwiseEqualsImplementation(value); + } + public BooleanDataFrameColumn ElementwiseNotEquals(ushort value) + { + UInt16DataFrameColumn ushortColumn = CloneAsUInt16Column(); + return ushortColumn.ElementwiseNotEqualsImplementation(value); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(ushort value) + { + UInt16DataFrameColumn ushortColumn = CloneAsUInt16Column(); + return ushortColumn.ElementwiseGreaterThanOrEqualImplementation(value); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(ushort value) + { + UInt16DataFrameColumn ushortColumn = CloneAsUInt16Column(); + return ushortColumn.ElementwiseLessThanOrEqualImplementation(value); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(ushort value) + { + UInt16DataFrameColumn ushortColumn = CloneAsUInt16Column(); + return ushortColumn.ElementwiseGreaterThanImplementation(value); + } + public BooleanDataFrameColumn ElementwiseLessThan(ushort value) + { + UInt16DataFrameColumn ushortColumn = CloneAsUInt16Column(); + return ushortColumn.ElementwiseLessThanImplementation(value); + } + } + public partial class DecimalDataFrameColumn + { + public BooleanDataFrameColumn ElementwiseEquals(byte value) + { + decimal otherdecimalValue = (decimal)value; + return ElementwiseEqualsImplementation(otherdecimalValue); + } + public BooleanDataFrameColumn ElementwiseNotEquals(byte value) + { + decimal otherdecimalValue = (decimal)value; + return ElementwiseNotEqualsImplementation(otherdecimalValue); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(byte value) + { + decimal otherdecimalValue = (decimal)value; + return ElementwiseGreaterThanOrEqualImplementation(otherdecimalValue); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(byte value) + { + decimal otherdecimalValue = (decimal)value; + return ElementwiseLessThanOrEqualImplementation(otherdecimalValue); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(byte value) + { + decimal otherdecimalValue = (decimal)value; + return ElementwiseGreaterThanImplementation(otherdecimalValue); + } + public BooleanDataFrameColumn ElementwiseLessThan(byte value) + { + decimal otherdecimalValue = (decimal)value; + return ElementwiseLessThanImplementation(otherdecimalValue); + } + public BooleanDataFrameColumn ElementwiseEquals(decimal value) + { + return ElementwiseEqualsImplementation(value); + } + public BooleanDataFrameColumn ElementwiseNotEquals(decimal value) + { + return ElementwiseNotEqualsImplementation(value); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(decimal value) + { + return ElementwiseGreaterThanOrEqualImplementation(value); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(decimal value) + { + return ElementwiseLessThanOrEqualImplementation(value); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(decimal value) + { + return ElementwiseGreaterThanImplementation(value); + } + public BooleanDataFrameColumn ElementwiseLessThan(decimal value) + { + return ElementwiseLessThanImplementation(value); + } + public BooleanDataFrameColumn ElementwiseEquals(int value) + { + decimal otherdecimalValue = (decimal)value; + return ElementwiseEqualsImplementation(otherdecimalValue); + } + public BooleanDataFrameColumn ElementwiseNotEquals(int value) + { + decimal otherdecimalValue = (decimal)value; + return ElementwiseNotEqualsImplementation(otherdecimalValue); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(int value) + { + decimal otherdecimalValue = (decimal)value; + return ElementwiseGreaterThanOrEqualImplementation(otherdecimalValue); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(int value) + { + decimal otherdecimalValue = (decimal)value; + return ElementwiseLessThanOrEqualImplementation(otherdecimalValue); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(int value) + { + decimal otherdecimalValue = (decimal)value; + return ElementwiseGreaterThanImplementation(otherdecimalValue); + } + public BooleanDataFrameColumn ElementwiseLessThan(int value) + { + decimal otherdecimalValue = (decimal)value; + return ElementwiseLessThanImplementation(otherdecimalValue); + } + public BooleanDataFrameColumn ElementwiseEquals(long value) + { + decimal otherdecimalValue = (decimal)value; + return ElementwiseEqualsImplementation(otherdecimalValue); + } + public BooleanDataFrameColumn ElementwiseNotEquals(long value) + { + decimal otherdecimalValue = (decimal)value; + return ElementwiseNotEqualsImplementation(otherdecimalValue); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(long value) + { + decimal otherdecimalValue = (decimal)value; + return ElementwiseGreaterThanOrEqualImplementation(otherdecimalValue); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(long value) + { + decimal otherdecimalValue = (decimal)value; + return ElementwiseLessThanOrEqualImplementation(otherdecimalValue); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(long value) + { + decimal otherdecimalValue = (decimal)value; + return ElementwiseGreaterThanImplementation(otherdecimalValue); + } + public BooleanDataFrameColumn ElementwiseLessThan(long value) + { + decimal otherdecimalValue = (decimal)value; + return ElementwiseLessThanImplementation(otherdecimalValue); + } + public BooleanDataFrameColumn ElementwiseEquals(sbyte value) + { + decimal otherdecimalValue = (decimal)value; + return ElementwiseEqualsImplementation(otherdecimalValue); + } + public BooleanDataFrameColumn ElementwiseNotEquals(sbyte value) + { + decimal otherdecimalValue = (decimal)value; + return ElementwiseNotEqualsImplementation(otherdecimalValue); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(sbyte value) + { + decimal otherdecimalValue = (decimal)value; + return ElementwiseGreaterThanOrEqualImplementation(otherdecimalValue); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(sbyte value) + { + decimal otherdecimalValue = (decimal)value; + return ElementwiseLessThanOrEqualImplementation(otherdecimalValue); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(sbyte value) + { + decimal otherdecimalValue = (decimal)value; + return ElementwiseGreaterThanImplementation(otherdecimalValue); + } + public BooleanDataFrameColumn ElementwiseLessThan(sbyte value) + { + decimal otherdecimalValue = (decimal)value; + return ElementwiseLessThanImplementation(otherdecimalValue); + } + public BooleanDataFrameColumn ElementwiseEquals(short value) + { + decimal otherdecimalValue = (decimal)value; + return ElementwiseEqualsImplementation(otherdecimalValue); + } + public BooleanDataFrameColumn ElementwiseNotEquals(short value) + { + decimal otherdecimalValue = (decimal)value; + return ElementwiseNotEqualsImplementation(otherdecimalValue); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(short value) + { + decimal otherdecimalValue = (decimal)value; + return ElementwiseGreaterThanOrEqualImplementation(otherdecimalValue); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(short value) + { + decimal otherdecimalValue = (decimal)value; + return ElementwiseLessThanOrEqualImplementation(otherdecimalValue); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(short value) + { + decimal otherdecimalValue = (decimal)value; + return ElementwiseGreaterThanImplementation(otherdecimalValue); + } + public BooleanDataFrameColumn ElementwiseLessThan(short value) + { + decimal otherdecimalValue = (decimal)value; + return ElementwiseLessThanImplementation(otherdecimalValue); + } + public BooleanDataFrameColumn ElementwiseEquals(uint value) + { + decimal otherdecimalValue = (decimal)value; + return ElementwiseEqualsImplementation(otherdecimalValue); + } + public BooleanDataFrameColumn ElementwiseNotEquals(uint value) + { + decimal otherdecimalValue = (decimal)value; + return ElementwiseNotEqualsImplementation(otherdecimalValue); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(uint value) + { + decimal otherdecimalValue = (decimal)value; + return ElementwiseGreaterThanOrEqualImplementation(otherdecimalValue); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(uint value) + { + decimal otherdecimalValue = (decimal)value; + return ElementwiseLessThanOrEqualImplementation(otherdecimalValue); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(uint value) + { + decimal otherdecimalValue = (decimal)value; + return ElementwiseGreaterThanImplementation(otherdecimalValue); + } + public BooleanDataFrameColumn ElementwiseLessThan(uint value) + { + decimal otherdecimalValue = (decimal)value; + return ElementwiseLessThanImplementation(otherdecimalValue); + } + public BooleanDataFrameColumn ElementwiseEquals(ulong value) + { + decimal otherdecimalValue = (decimal)value; + return ElementwiseEqualsImplementation(otherdecimalValue); + } + public BooleanDataFrameColumn ElementwiseNotEquals(ulong value) + { + decimal otherdecimalValue = (decimal)value; + return ElementwiseNotEqualsImplementation(otherdecimalValue); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(ulong value) + { + decimal otherdecimalValue = (decimal)value; + return ElementwiseGreaterThanOrEqualImplementation(otherdecimalValue); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(ulong value) + { + decimal otherdecimalValue = (decimal)value; + return ElementwiseLessThanOrEqualImplementation(otherdecimalValue); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(ulong value) + { + decimal otherdecimalValue = (decimal)value; + return ElementwiseGreaterThanImplementation(otherdecimalValue); + } + public BooleanDataFrameColumn ElementwiseLessThan(ulong value) + { + decimal otherdecimalValue = (decimal)value; + return ElementwiseLessThanImplementation(otherdecimalValue); + } + public BooleanDataFrameColumn ElementwiseEquals(ushort value) + { + decimal otherdecimalValue = (decimal)value; + return ElementwiseEqualsImplementation(otherdecimalValue); + } + public BooleanDataFrameColumn ElementwiseNotEquals(ushort value) + { + decimal otherdecimalValue = (decimal)value; + return ElementwiseNotEqualsImplementation(otherdecimalValue); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(ushort value) + { + decimal otherdecimalValue = (decimal)value; + return ElementwiseGreaterThanOrEqualImplementation(otherdecimalValue); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(ushort value) + { + decimal otherdecimalValue = (decimal)value; + return ElementwiseLessThanOrEqualImplementation(otherdecimalValue); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(ushort value) + { + decimal otherdecimalValue = (decimal)value; + return ElementwiseGreaterThanImplementation(otherdecimalValue); + } + public BooleanDataFrameColumn ElementwiseLessThan(ushort value) + { + decimal otherdecimalValue = (decimal)value; + return ElementwiseLessThanImplementation(otherdecimalValue); + } + } + public partial class DoubleDataFrameColumn + { + public BooleanDataFrameColumn ElementwiseEquals(byte value) + { + double otherdoubleValue = (double)value; + return ElementwiseEqualsImplementation(otherdoubleValue); + } + public BooleanDataFrameColumn ElementwiseNotEquals(byte value) + { + double otherdoubleValue = (double)value; + return ElementwiseNotEqualsImplementation(otherdoubleValue); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(byte value) + { + double otherdoubleValue = (double)value; + return ElementwiseGreaterThanOrEqualImplementation(otherdoubleValue); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(byte value) + { + double otherdoubleValue = (double)value; + return ElementwiseLessThanOrEqualImplementation(otherdoubleValue); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(byte value) + { + double otherdoubleValue = (double)value; + return ElementwiseGreaterThanImplementation(otherdoubleValue); + } + public BooleanDataFrameColumn ElementwiseLessThan(byte value) + { + double otherdoubleValue = (double)value; + return ElementwiseLessThanImplementation(otherdoubleValue); + } + public BooleanDataFrameColumn ElementwiseEquals(double value) + { + return ElementwiseEqualsImplementation(value); + } + public BooleanDataFrameColumn ElementwiseNotEquals(double value) + { + return ElementwiseNotEqualsImplementation(value); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(double value) + { + return ElementwiseGreaterThanOrEqualImplementation(value); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(double value) + { + return ElementwiseLessThanOrEqualImplementation(value); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(double value) + { + return ElementwiseGreaterThanImplementation(value); + } + public BooleanDataFrameColumn ElementwiseLessThan(double value) + { + return ElementwiseLessThanImplementation(value); + } + public BooleanDataFrameColumn ElementwiseEquals(float value) + { + double otherdoubleValue = (double)value; + return ElementwiseEqualsImplementation(otherdoubleValue); + } + public BooleanDataFrameColumn ElementwiseNotEquals(float value) + { + double otherdoubleValue = (double)value; + return ElementwiseNotEqualsImplementation(otherdoubleValue); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(float value) + { + double otherdoubleValue = (double)value; + return ElementwiseGreaterThanOrEqualImplementation(otherdoubleValue); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(float value) + { + double otherdoubleValue = (double)value; + return ElementwiseLessThanOrEqualImplementation(otherdoubleValue); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(float value) + { + double otherdoubleValue = (double)value; + return ElementwiseGreaterThanImplementation(otherdoubleValue); + } + public BooleanDataFrameColumn ElementwiseLessThan(float value) + { + double otherdoubleValue = (double)value; + return ElementwiseLessThanImplementation(otherdoubleValue); + } + public BooleanDataFrameColumn ElementwiseEquals(int value) + { + double otherdoubleValue = (double)value; + return ElementwiseEqualsImplementation(otherdoubleValue); + } + public BooleanDataFrameColumn ElementwiseNotEquals(int value) + { + double otherdoubleValue = (double)value; + return ElementwiseNotEqualsImplementation(otherdoubleValue); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(int value) + { + double otherdoubleValue = (double)value; + return ElementwiseGreaterThanOrEqualImplementation(otherdoubleValue); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(int value) + { + double otherdoubleValue = (double)value; + return ElementwiseLessThanOrEqualImplementation(otherdoubleValue); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(int value) + { + double otherdoubleValue = (double)value; + return ElementwiseGreaterThanImplementation(otherdoubleValue); + } + public BooleanDataFrameColumn ElementwiseLessThan(int value) + { + double otherdoubleValue = (double)value; + return ElementwiseLessThanImplementation(otherdoubleValue); + } + public BooleanDataFrameColumn ElementwiseEquals(long value) + { + double otherdoubleValue = (double)value; + return ElementwiseEqualsImplementation(otherdoubleValue); + } + public BooleanDataFrameColumn ElementwiseNotEquals(long value) + { + double otherdoubleValue = (double)value; + return ElementwiseNotEqualsImplementation(otherdoubleValue); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(long value) + { + double otherdoubleValue = (double)value; + return ElementwiseGreaterThanOrEqualImplementation(otherdoubleValue); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(long value) + { + double otherdoubleValue = (double)value; + return ElementwiseLessThanOrEqualImplementation(otherdoubleValue); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(long value) + { + double otherdoubleValue = (double)value; + return ElementwiseGreaterThanImplementation(otherdoubleValue); + } + public BooleanDataFrameColumn ElementwiseLessThan(long value) + { + double otherdoubleValue = (double)value; + return ElementwiseLessThanImplementation(otherdoubleValue); + } + public BooleanDataFrameColumn ElementwiseEquals(sbyte value) + { + double otherdoubleValue = (double)value; + return ElementwiseEqualsImplementation(otherdoubleValue); + } + public BooleanDataFrameColumn ElementwiseNotEquals(sbyte value) + { + double otherdoubleValue = (double)value; + return ElementwiseNotEqualsImplementation(otherdoubleValue); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(sbyte value) + { + double otherdoubleValue = (double)value; + return ElementwiseGreaterThanOrEqualImplementation(otherdoubleValue); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(sbyte value) + { + double otherdoubleValue = (double)value; + return ElementwiseLessThanOrEqualImplementation(otherdoubleValue); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(sbyte value) + { + double otherdoubleValue = (double)value; + return ElementwiseGreaterThanImplementation(otherdoubleValue); + } + public BooleanDataFrameColumn ElementwiseLessThan(sbyte value) + { + double otherdoubleValue = (double)value; + return ElementwiseLessThanImplementation(otherdoubleValue); + } + public BooleanDataFrameColumn ElementwiseEquals(short value) + { + double otherdoubleValue = (double)value; + return ElementwiseEqualsImplementation(otherdoubleValue); + } + public BooleanDataFrameColumn ElementwiseNotEquals(short value) + { + double otherdoubleValue = (double)value; + return ElementwiseNotEqualsImplementation(otherdoubleValue); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(short value) + { + double otherdoubleValue = (double)value; + return ElementwiseGreaterThanOrEqualImplementation(otherdoubleValue); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(short value) + { + double otherdoubleValue = (double)value; + return ElementwiseLessThanOrEqualImplementation(otherdoubleValue); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(short value) + { + double otherdoubleValue = (double)value; + return ElementwiseGreaterThanImplementation(otherdoubleValue); + } + public BooleanDataFrameColumn ElementwiseLessThan(short value) + { + double otherdoubleValue = (double)value; + return ElementwiseLessThanImplementation(otherdoubleValue); + } + public BooleanDataFrameColumn ElementwiseEquals(uint value) + { + double otherdoubleValue = (double)value; + return ElementwiseEqualsImplementation(otherdoubleValue); + } + public BooleanDataFrameColumn ElementwiseNotEquals(uint value) + { + double otherdoubleValue = (double)value; + return ElementwiseNotEqualsImplementation(otherdoubleValue); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(uint value) + { + double otherdoubleValue = (double)value; + return ElementwiseGreaterThanOrEqualImplementation(otherdoubleValue); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(uint value) + { + double otherdoubleValue = (double)value; + return ElementwiseLessThanOrEqualImplementation(otherdoubleValue); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(uint value) + { + double otherdoubleValue = (double)value; + return ElementwiseGreaterThanImplementation(otherdoubleValue); + } + public BooleanDataFrameColumn ElementwiseLessThan(uint value) + { + double otherdoubleValue = (double)value; + return ElementwiseLessThanImplementation(otherdoubleValue); + } + public BooleanDataFrameColumn ElementwiseEquals(ulong value) + { + double otherdoubleValue = (double)value; + return ElementwiseEqualsImplementation(otherdoubleValue); + } + public BooleanDataFrameColumn ElementwiseNotEquals(ulong value) + { + double otherdoubleValue = (double)value; + return ElementwiseNotEqualsImplementation(otherdoubleValue); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(ulong value) + { + double otherdoubleValue = (double)value; + return ElementwiseGreaterThanOrEqualImplementation(otherdoubleValue); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(ulong value) + { + double otherdoubleValue = (double)value; + return ElementwiseLessThanOrEqualImplementation(otherdoubleValue); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(ulong value) + { + double otherdoubleValue = (double)value; + return ElementwiseGreaterThanImplementation(otherdoubleValue); + } + public BooleanDataFrameColumn ElementwiseLessThan(ulong value) + { + double otherdoubleValue = (double)value; + return ElementwiseLessThanImplementation(otherdoubleValue); + } + public BooleanDataFrameColumn ElementwiseEquals(ushort value) + { + double otherdoubleValue = (double)value; + return ElementwiseEqualsImplementation(otherdoubleValue); + } + public BooleanDataFrameColumn ElementwiseNotEquals(ushort value) + { + double otherdoubleValue = (double)value; + return ElementwiseNotEqualsImplementation(otherdoubleValue); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(ushort value) + { + double otherdoubleValue = (double)value; + return ElementwiseGreaterThanOrEqualImplementation(otherdoubleValue); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(ushort value) + { + double otherdoubleValue = (double)value; + return ElementwiseLessThanOrEqualImplementation(otherdoubleValue); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(ushort value) + { + double otherdoubleValue = (double)value; + return ElementwiseGreaterThanImplementation(otherdoubleValue); + } + public BooleanDataFrameColumn ElementwiseLessThan(ushort value) + { + double otherdoubleValue = (double)value; + return ElementwiseLessThanImplementation(otherdoubleValue); + } + } + public partial class SingleDataFrameColumn + { + public BooleanDataFrameColumn ElementwiseEquals(byte value) + { + float otherfloatValue = (float)value; + return ElementwiseEqualsImplementation(otherfloatValue); + } + public BooleanDataFrameColumn ElementwiseNotEquals(byte value) + { + float otherfloatValue = (float)value; + return ElementwiseNotEqualsImplementation(otherfloatValue); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(byte value) + { + float otherfloatValue = (float)value; + return ElementwiseGreaterThanOrEqualImplementation(otherfloatValue); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(byte value) + { + float otherfloatValue = (float)value; + return ElementwiseLessThanOrEqualImplementation(otherfloatValue); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(byte value) + { + float otherfloatValue = (float)value; + return ElementwiseGreaterThanImplementation(otherfloatValue); + } + public BooleanDataFrameColumn ElementwiseLessThan(byte value) + { + float otherfloatValue = (float)value; + return ElementwiseLessThanImplementation(otherfloatValue); + } + public BooleanDataFrameColumn ElementwiseEquals(double value) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.ElementwiseEqualsImplementation(value); + } + public BooleanDataFrameColumn ElementwiseNotEquals(double value) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.ElementwiseNotEqualsImplementation(value); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(double value) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.ElementwiseGreaterThanOrEqualImplementation(value); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(double value) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.ElementwiseLessThanOrEqualImplementation(value); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(double value) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.ElementwiseGreaterThanImplementation(value); + } + public BooleanDataFrameColumn ElementwiseLessThan(double value) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.ElementwiseLessThanImplementation(value); + } + public BooleanDataFrameColumn ElementwiseEquals(float value) + { + return ElementwiseEqualsImplementation(value); + } + public BooleanDataFrameColumn ElementwiseNotEquals(float value) + { + return ElementwiseNotEqualsImplementation(value); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(float value) + { + return ElementwiseGreaterThanOrEqualImplementation(value); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(float value) + { + return ElementwiseLessThanOrEqualImplementation(value); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(float value) + { + return ElementwiseGreaterThanImplementation(value); + } + public BooleanDataFrameColumn ElementwiseLessThan(float value) + { + return ElementwiseLessThanImplementation(value); + } + public BooleanDataFrameColumn ElementwiseEquals(int value) + { + float otherfloatValue = (float)value; + return ElementwiseEqualsImplementation(otherfloatValue); + } + public BooleanDataFrameColumn ElementwiseNotEquals(int value) + { + float otherfloatValue = (float)value; + return ElementwiseNotEqualsImplementation(otherfloatValue); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(int value) + { + float otherfloatValue = (float)value; + return ElementwiseGreaterThanOrEqualImplementation(otherfloatValue); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(int value) + { + float otherfloatValue = (float)value; + return ElementwiseLessThanOrEqualImplementation(otherfloatValue); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(int value) + { + float otherfloatValue = (float)value; + return ElementwiseGreaterThanImplementation(otherfloatValue); + } + public BooleanDataFrameColumn ElementwiseLessThan(int value) + { + float otherfloatValue = (float)value; + return ElementwiseLessThanImplementation(otherfloatValue); + } + public BooleanDataFrameColumn ElementwiseEquals(long value) + { + float otherfloatValue = (float)value; + return ElementwiseEqualsImplementation(otherfloatValue); + } + public BooleanDataFrameColumn ElementwiseNotEquals(long value) + { + float otherfloatValue = (float)value; + return ElementwiseNotEqualsImplementation(otherfloatValue); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(long value) + { + float otherfloatValue = (float)value; + return ElementwiseGreaterThanOrEqualImplementation(otherfloatValue); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(long value) + { + float otherfloatValue = (float)value; + return ElementwiseLessThanOrEqualImplementation(otherfloatValue); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(long value) + { + float otherfloatValue = (float)value; + return ElementwiseGreaterThanImplementation(otherfloatValue); + } + public BooleanDataFrameColumn ElementwiseLessThan(long value) + { + float otherfloatValue = (float)value; + return ElementwiseLessThanImplementation(otherfloatValue); + } + public BooleanDataFrameColumn ElementwiseEquals(sbyte value) + { + float otherfloatValue = (float)value; + return ElementwiseEqualsImplementation(otherfloatValue); + } + public BooleanDataFrameColumn ElementwiseNotEquals(sbyte value) + { + float otherfloatValue = (float)value; + return ElementwiseNotEqualsImplementation(otherfloatValue); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(sbyte value) + { + float otherfloatValue = (float)value; + return ElementwiseGreaterThanOrEqualImplementation(otherfloatValue); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(sbyte value) + { + float otherfloatValue = (float)value; + return ElementwiseLessThanOrEqualImplementation(otherfloatValue); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(sbyte value) + { + float otherfloatValue = (float)value; + return ElementwiseGreaterThanImplementation(otherfloatValue); + } + public BooleanDataFrameColumn ElementwiseLessThan(sbyte value) + { + float otherfloatValue = (float)value; + return ElementwiseLessThanImplementation(otherfloatValue); + } + public BooleanDataFrameColumn ElementwiseEquals(short value) + { + float otherfloatValue = (float)value; + return ElementwiseEqualsImplementation(otherfloatValue); + } + public BooleanDataFrameColumn ElementwiseNotEquals(short value) + { + float otherfloatValue = (float)value; + return ElementwiseNotEqualsImplementation(otherfloatValue); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(short value) + { + float otherfloatValue = (float)value; + return ElementwiseGreaterThanOrEqualImplementation(otherfloatValue); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(short value) + { + float otherfloatValue = (float)value; + return ElementwiseLessThanOrEqualImplementation(otherfloatValue); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(short value) + { + float otherfloatValue = (float)value; + return ElementwiseGreaterThanImplementation(otherfloatValue); + } + public BooleanDataFrameColumn ElementwiseLessThan(short value) + { + float otherfloatValue = (float)value; + return ElementwiseLessThanImplementation(otherfloatValue); + } + public BooleanDataFrameColumn ElementwiseEquals(uint value) + { + float otherfloatValue = (float)value; + return ElementwiseEqualsImplementation(otherfloatValue); + } + public BooleanDataFrameColumn ElementwiseNotEquals(uint value) + { + float otherfloatValue = (float)value; + return ElementwiseNotEqualsImplementation(otherfloatValue); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(uint value) + { + float otherfloatValue = (float)value; + return ElementwiseGreaterThanOrEqualImplementation(otherfloatValue); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(uint value) + { + float otherfloatValue = (float)value; + return ElementwiseLessThanOrEqualImplementation(otherfloatValue); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(uint value) + { + float otherfloatValue = (float)value; + return ElementwiseGreaterThanImplementation(otherfloatValue); + } + public BooleanDataFrameColumn ElementwiseLessThan(uint value) + { + float otherfloatValue = (float)value; + return ElementwiseLessThanImplementation(otherfloatValue); + } + public BooleanDataFrameColumn ElementwiseEquals(ulong value) + { + float otherfloatValue = (float)value; + return ElementwiseEqualsImplementation(otherfloatValue); + } + public BooleanDataFrameColumn ElementwiseNotEquals(ulong value) + { + float otherfloatValue = (float)value; + return ElementwiseNotEqualsImplementation(otherfloatValue); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(ulong value) + { + float otherfloatValue = (float)value; + return ElementwiseGreaterThanOrEqualImplementation(otherfloatValue); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(ulong value) + { + float otherfloatValue = (float)value; + return ElementwiseLessThanOrEqualImplementation(otherfloatValue); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(ulong value) + { + float otherfloatValue = (float)value; + return ElementwiseGreaterThanImplementation(otherfloatValue); + } + public BooleanDataFrameColumn ElementwiseLessThan(ulong value) + { + float otherfloatValue = (float)value; + return ElementwiseLessThanImplementation(otherfloatValue); + } + public BooleanDataFrameColumn ElementwiseEquals(ushort value) + { + float otherfloatValue = (float)value; + return ElementwiseEqualsImplementation(otherfloatValue); + } + public BooleanDataFrameColumn ElementwiseNotEquals(ushort value) + { + float otherfloatValue = (float)value; + return ElementwiseNotEqualsImplementation(otherfloatValue); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(ushort value) + { + float otherfloatValue = (float)value; + return ElementwiseGreaterThanOrEqualImplementation(otherfloatValue); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(ushort value) + { + float otherfloatValue = (float)value; + return ElementwiseLessThanOrEqualImplementation(otherfloatValue); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(ushort value) + { + float otherfloatValue = (float)value; + return ElementwiseGreaterThanImplementation(otherfloatValue); + } + public BooleanDataFrameColumn ElementwiseLessThan(ushort value) + { + float otherfloatValue = (float)value; + return ElementwiseLessThanImplementation(otherfloatValue); + } + } + public partial class Int32DataFrameColumn + { + public BooleanDataFrameColumn ElementwiseEquals(byte value) + { + int otherintValue = (int)value; + return ElementwiseEqualsImplementation(otherintValue); + } + public BooleanDataFrameColumn ElementwiseNotEquals(byte value) + { + int otherintValue = (int)value; + return ElementwiseNotEqualsImplementation(otherintValue); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(byte value) + { + int otherintValue = (int)value; + return ElementwiseGreaterThanOrEqualImplementation(otherintValue); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(byte value) + { + int otherintValue = (int)value; + return ElementwiseLessThanOrEqualImplementation(otherintValue); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(byte value) + { + int otherintValue = (int)value; + return ElementwiseGreaterThanImplementation(otherintValue); + } + public BooleanDataFrameColumn ElementwiseLessThan(byte value) + { + int otherintValue = (int)value; + return ElementwiseLessThanImplementation(otherintValue); + } + public BooleanDataFrameColumn ElementwiseEquals(decimal value) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.ElementwiseEqualsImplementation(value); + } + public BooleanDataFrameColumn ElementwiseNotEquals(decimal value) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.ElementwiseNotEqualsImplementation(value); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(decimal value) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.ElementwiseGreaterThanOrEqualImplementation(value); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(decimal value) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.ElementwiseLessThanOrEqualImplementation(value); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(decimal value) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.ElementwiseGreaterThanImplementation(value); + } + public BooleanDataFrameColumn ElementwiseLessThan(decimal value) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.ElementwiseLessThanImplementation(value); + } + public BooleanDataFrameColumn ElementwiseEquals(double value) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.ElementwiseEqualsImplementation(value); + } + public BooleanDataFrameColumn ElementwiseNotEquals(double value) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.ElementwiseNotEqualsImplementation(value); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(double value) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.ElementwiseGreaterThanOrEqualImplementation(value); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(double value) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.ElementwiseLessThanOrEqualImplementation(value); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(double value) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.ElementwiseGreaterThanImplementation(value); + } + public BooleanDataFrameColumn ElementwiseLessThan(double value) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.ElementwiseLessThanImplementation(value); + } + public BooleanDataFrameColumn ElementwiseEquals(float value) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.ElementwiseEqualsImplementation(value); + } + public BooleanDataFrameColumn ElementwiseNotEquals(float value) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.ElementwiseNotEqualsImplementation(value); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(float value) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.ElementwiseGreaterThanOrEqualImplementation(value); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(float value) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.ElementwiseLessThanOrEqualImplementation(value); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(float value) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.ElementwiseGreaterThanImplementation(value); + } + public BooleanDataFrameColumn ElementwiseLessThan(float value) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.ElementwiseLessThanImplementation(value); + } + public BooleanDataFrameColumn ElementwiseEquals(int value) + { + return ElementwiseEqualsImplementation(value); + } + public BooleanDataFrameColumn ElementwiseNotEquals(int value) + { + return ElementwiseNotEqualsImplementation(value); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(int value) + { + return ElementwiseGreaterThanOrEqualImplementation(value); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(int value) + { + return ElementwiseLessThanOrEqualImplementation(value); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(int value) + { + return ElementwiseGreaterThanImplementation(value); + } + public BooleanDataFrameColumn ElementwiseLessThan(int value) + { + return ElementwiseLessThanImplementation(value); + } + public BooleanDataFrameColumn ElementwiseEquals(long value) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.ElementwiseEqualsImplementation(value); + } + public BooleanDataFrameColumn ElementwiseNotEquals(long value) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.ElementwiseNotEqualsImplementation(value); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(long value) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.ElementwiseGreaterThanOrEqualImplementation(value); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(long value) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.ElementwiseLessThanOrEqualImplementation(value); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(long value) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.ElementwiseGreaterThanImplementation(value); + } + public BooleanDataFrameColumn ElementwiseLessThan(long value) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.ElementwiseLessThanImplementation(value); + } + public BooleanDataFrameColumn ElementwiseEquals(sbyte value) + { + int otherintValue = (int)value; + return ElementwiseEqualsImplementation(otherintValue); + } + public BooleanDataFrameColumn ElementwiseNotEquals(sbyte value) + { + int otherintValue = (int)value; + return ElementwiseNotEqualsImplementation(otherintValue); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(sbyte value) + { + int otherintValue = (int)value; + return ElementwiseGreaterThanOrEqualImplementation(otherintValue); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(sbyte value) + { + int otherintValue = (int)value; + return ElementwiseLessThanOrEqualImplementation(otherintValue); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(sbyte value) + { + int otherintValue = (int)value; + return ElementwiseGreaterThanImplementation(otherintValue); + } + public BooleanDataFrameColumn ElementwiseLessThan(sbyte value) + { + int otherintValue = (int)value; + return ElementwiseLessThanImplementation(otherintValue); + } + public BooleanDataFrameColumn ElementwiseEquals(short value) + { + int otherintValue = (int)value; + return ElementwiseEqualsImplementation(otherintValue); + } + public BooleanDataFrameColumn ElementwiseNotEquals(short value) + { + int otherintValue = (int)value; + return ElementwiseNotEqualsImplementation(otherintValue); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(short value) + { + int otherintValue = (int)value; + return ElementwiseGreaterThanOrEqualImplementation(otherintValue); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(short value) + { + int otherintValue = (int)value; + return ElementwiseLessThanOrEqualImplementation(otherintValue); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(short value) + { + int otherintValue = (int)value; + return ElementwiseGreaterThanImplementation(otherintValue); + } + public BooleanDataFrameColumn ElementwiseLessThan(short value) + { + int otherintValue = (int)value; + return ElementwiseLessThanImplementation(otherintValue); + } + public BooleanDataFrameColumn ElementwiseEquals(uint value) + { + int otherintValue = (int)value; + return ElementwiseEqualsImplementation(otherintValue); + } + public BooleanDataFrameColumn ElementwiseNotEquals(uint value) + { + int otherintValue = (int)value; + return ElementwiseNotEqualsImplementation(otherintValue); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(uint value) + { + int otherintValue = (int)value; + return ElementwiseGreaterThanOrEqualImplementation(otherintValue); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(uint value) + { + int otherintValue = (int)value; + return ElementwiseLessThanOrEqualImplementation(otherintValue); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(uint value) + { + int otherintValue = (int)value; + return ElementwiseGreaterThanImplementation(otherintValue); + } + public BooleanDataFrameColumn ElementwiseLessThan(uint value) + { + int otherintValue = (int)value; + return ElementwiseLessThanImplementation(otherintValue); + } + public BooleanDataFrameColumn ElementwiseEquals(ulong value) + { + UInt64DataFrameColumn ulongColumn = CloneAsUInt64Column(); + return ulongColumn.ElementwiseEqualsImplementation(value); + } + public BooleanDataFrameColumn ElementwiseNotEquals(ulong value) + { + UInt64DataFrameColumn ulongColumn = CloneAsUInt64Column(); + return ulongColumn.ElementwiseNotEqualsImplementation(value); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(ulong value) + { + UInt64DataFrameColumn ulongColumn = CloneAsUInt64Column(); + return ulongColumn.ElementwiseGreaterThanOrEqualImplementation(value); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(ulong value) + { + UInt64DataFrameColumn ulongColumn = CloneAsUInt64Column(); + return ulongColumn.ElementwiseLessThanOrEqualImplementation(value); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(ulong value) + { + UInt64DataFrameColumn ulongColumn = CloneAsUInt64Column(); + return ulongColumn.ElementwiseGreaterThanImplementation(value); + } + public BooleanDataFrameColumn ElementwiseLessThan(ulong value) + { + UInt64DataFrameColumn ulongColumn = CloneAsUInt64Column(); + return ulongColumn.ElementwiseLessThanImplementation(value); + } + public BooleanDataFrameColumn ElementwiseEquals(ushort value) + { + int otherintValue = (int)value; + return ElementwiseEqualsImplementation(otherintValue); + } + public BooleanDataFrameColumn ElementwiseNotEquals(ushort value) + { + int otherintValue = (int)value; + return ElementwiseNotEqualsImplementation(otherintValue); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(ushort value) + { + int otherintValue = (int)value; + return ElementwiseGreaterThanOrEqualImplementation(otherintValue); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(ushort value) + { + int otherintValue = (int)value; + return ElementwiseLessThanOrEqualImplementation(otherintValue); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(ushort value) + { + int otherintValue = (int)value; + return ElementwiseGreaterThanImplementation(otherintValue); + } + public BooleanDataFrameColumn ElementwiseLessThan(ushort value) + { + int otherintValue = (int)value; + return ElementwiseLessThanImplementation(otherintValue); + } + } + public partial class Int64DataFrameColumn + { + public BooleanDataFrameColumn ElementwiseEquals(byte value) + { + long otherlongValue = (long)value; + return ElementwiseEqualsImplementation(otherlongValue); + } + public BooleanDataFrameColumn ElementwiseNotEquals(byte value) + { + long otherlongValue = (long)value; + return ElementwiseNotEqualsImplementation(otherlongValue); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(byte value) + { + long otherlongValue = (long)value; + return ElementwiseGreaterThanOrEqualImplementation(otherlongValue); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(byte value) + { + long otherlongValue = (long)value; + return ElementwiseLessThanOrEqualImplementation(otherlongValue); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(byte value) + { + long otherlongValue = (long)value; + return ElementwiseGreaterThanImplementation(otherlongValue); + } + public BooleanDataFrameColumn ElementwiseLessThan(byte value) + { + long otherlongValue = (long)value; + return ElementwiseLessThanImplementation(otherlongValue); + } + public BooleanDataFrameColumn ElementwiseEquals(decimal value) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.ElementwiseEqualsImplementation(value); + } + public BooleanDataFrameColumn ElementwiseNotEquals(decimal value) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.ElementwiseNotEqualsImplementation(value); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(decimal value) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.ElementwiseGreaterThanOrEqualImplementation(value); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(decimal value) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.ElementwiseLessThanOrEqualImplementation(value); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(decimal value) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.ElementwiseGreaterThanImplementation(value); + } + public BooleanDataFrameColumn ElementwiseLessThan(decimal value) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.ElementwiseLessThanImplementation(value); + } + public BooleanDataFrameColumn ElementwiseEquals(double value) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.ElementwiseEqualsImplementation(value); + } + public BooleanDataFrameColumn ElementwiseNotEquals(double value) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.ElementwiseNotEqualsImplementation(value); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(double value) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.ElementwiseGreaterThanOrEqualImplementation(value); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(double value) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.ElementwiseLessThanOrEqualImplementation(value); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(double value) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.ElementwiseGreaterThanImplementation(value); + } + public BooleanDataFrameColumn ElementwiseLessThan(double value) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.ElementwiseLessThanImplementation(value); + } + public BooleanDataFrameColumn ElementwiseEquals(float value) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.ElementwiseEqualsImplementation(value); + } + public BooleanDataFrameColumn ElementwiseNotEquals(float value) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.ElementwiseNotEqualsImplementation(value); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(float value) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.ElementwiseGreaterThanOrEqualImplementation(value); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(float value) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.ElementwiseLessThanOrEqualImplementation(value); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(float value) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.ElementwiseGreaterThanImplementation(value); + } + public BooleanDataFrameColumn ElementwiseLessThan(float value) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.ElementwiseLessThanImplementation(value); + } + public BooleanDataFrameColumn ElementwiseEquals(int value) + { + long otherlongValue = (long)value; + return ElementwiseEqualsImplementation(otherlongValue); + } + public BooleanDataFrameColumn ElementwiseNotEquals(int value) + { + long otherlongValue = (long)value; + return ElementwiseNotEqualsImplementation(otherlongValue); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(int value) + { + long otherlongValue = (long)value; + return ElementwiseGreaterThanOrEqualImplementation(otherlongValue); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(int value) + { + long otherlongValue = (long)value; + return ElementwiseLessThanOrEqualImplementation(otherlongValue); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(int value) + { + long otherlongValue = (long)value; + return ElementwiseGreaterThanImplementation(otherlongValue); + } + public BooleanDataFrameColumn ElementwiseLessThan(int value) + { + long otherlongValue = (long)value; + return ElementwiseLessThanImplementation(otherlongValue); + } + public BooleanDataFrameColumn ElementwiseEquals(long value) + { + return ElementwiseEqualsImplementation(value); + } + public BooleanDataFrameColumn ElementwiseNotEquals(long value) + { + return ElementwiseNotEqualsImplementation(value); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(long value) + { + return ElementwiseGreaterThanOrEqualImplementation(value); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(long value) + { + return ElementwiseLessThanOrEqualImplementation(value); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(long value) + { + return ElementwiseGreaterThanImplementation(value); + } + public BooleanDataFrameColumn ElementwiseLessThan(long value) + { + return ElementwiseLessThanImplementation(value); + } + public BooleanDataFrameColumn ElementwiseEquals(sbyte value) + { + long otherlongValue = (long)value; + return ElementwiseEqualsImplementation(otherlongValue); + } + public BooleanDataFrameColumn ElementwiseNotEquals(sbyte value) + { + long otherlongValue = (long)value; + return ElementwiseNotEqualsImplementation(otherlongValue); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(sbyte value) + { + long otherlongValue = (long)value; + return ElementwiseGreaterThanOrEqualImplementation(otherlongValue); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(sbyte value) + { + long otherlongValue = (long)value; + return ElementwiseLessThanOrEqualImplementation(otherlongValue); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(sbyte value) + { + long otherlongValue = (long)value; + return ElementwiseGreaterThanImplementation(otherlongValue); + } + public BooleanDataFrameColumn ElementwiseLessThan(sbyte value) + { + long otherlongValue = (long)value; + return ElementwiseLessThanImplementation(otherlongValue); + } + public BooleanDataFrameColumn ElementwiseEquals(short value) + { + long otherlongValue = (long)value; + return ElementwiseEqualsImplementation(otherlongValue); + } + public BooleanDataFrameColumn ElementwiseNotEquals(short value) + { + long otherlongValue = (long)value; + return ElementwiseNotEqualsImplementation(otherlongValue); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(short value) + { + long otherlongValue = (long)value; + return ElementwiseGreaterThanOrEqualImplementation(otherlongValue); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(short value) + { + long otherlongValue = (long)value; + return ElementwiseLessThanOrEqualImplementation(otherlongValue); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(short value) + { + long otherlongValue = (long)value; + return ElementwiseGreaterThanImplementation(otherlongValue); + } + public BooleanDataFrameColumn ElementwiseLessThan(short value) + { + long otherlongValue = (long)value; + return ElementwiseLessThanImplementation(otherlongValue); + } + public BooleanDataFrameColumn ElementwiseEquals(uint value) + { + long otherlongValue = (long)value; + return ElementwiseEqualsImplementation(otherlongValue); + } + public BooleanDataFrameColumn ElementwiseNotEquals(uint value) + { + long otherlongValue = (long)value; + return ElementwiseNotEqualsImplementation(otherlongValue); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(uint value) + { + long otherlongValue = (long)value; + return ElementwiseGreaterThanOrEqualImplementation(otherlongValue); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(uint value) + { + long otherlongValue = (long)value; + return ElementwiseLessThanOrEqualImplementation(otherlongValue); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(uint value) + { + long otherlongValue = (long)value; + return ElementwiseGreaterThanImplementation(otherlongValue); + } + public BooleanDataFrameColumn ElementwiseLessThan(uint value) + { + long otherlongValue = (long)value; + return ElementwiseLessThanImplementation(otherlongValue); + } + public BooleanDataFrameColumn ElementwiseEquals(ushort value) + { + long otherlongValue = (long)value; + return ElementwiseEqualsImplementation(otherlongValue); + } + public BooleanDataFrameColumn ElementwiseNotEquals(ushort value) + { + long otherlongValue = (long)value; + return ElementwiseNotEqualsImplementation(otherlongValue); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(ushort value) + { + long otherlongValue = (long)value; + return ElementwiseGreaterThanOrEqualImplementation(otherlongValue); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(ushort value) + { + long otherlongValue = (long)value; + return ElementwiseLessThanOrEqualImplementation(otherlongValue); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(ushort value) + { + long otherlongValue = (long)value; + return ElementwiseGreaterThanImplementation(otherlongValue); + } + public BooleanDataFrameColumn ElementwiseLessThan(ushort value) + { + long otherlongValue = (long)value; + return ElementwiseLessThanImplementation(otherlongValue); + } + } + public partial class SByteDataFrameColumn + { + public BooleanDataFrameColumn ElementwiseEquals(byte value) + { + sbyte othersbyteValue = (sbyte)value; + return ElementwiseEqualsImplementation(othersbyteValue); + } + public BooleanDataFrameColumn ElementwiseNotEquals(byte value) + { + sbyte othersbyteValue = (sbyte)value; + return ElementwiseNotEqualsImplementation(othersbyteValue); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(byte value) + { + sbyte othersbyteValue = (sbyte)value; + return ElementwiseGreaterThanOrEqualImplementation(othersbyteValue); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(byte value) + { + sbyte othersbyteValue = (sbyte)value; + return ElementwiseLessThanOrEqualImplementation(othersbyteValue); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(byte value) + { + sbyte othersbyteValue = (sbyte)value; + return ElementwiseGreaterThanImplementation(othersbyteValue); + } + public BooleanDataFrameColumn ElementwiseLessThan(byte value) + { + sbyte othersbyteValue = (sbyte)value; + return ElementwiseLessThanImplementation(othersbyteValue); + } + public BooleanDataFrameColumn ElementwiseEquals(decimal value) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.ElementwiseEqualsImplementation(value); + } + public BooleanDataFrameColumn ElementwiseNotEquals(decimal value) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.ElementwiseNotEqualsImplementation(value); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(decimal value) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.ElementwiseGreaterThanOrEqualImplementation(value); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(decimal value) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.ElementwiseLessThanOrEqualImplementation(value); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(decimal value) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.ElementwiseGreaterThanImplementation(value); + } + public BooleanDataFrameColumn ElementwiseLessThan(decimal value) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.ElementwiseLessThanImplementation(value); + } + public BooleanDataFrameColumn ElementwiseEquals(double value) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.ElementwiseEqualsImplementation(value); + } + public BooleanDataFrameColumn ElementwiseNotEquals(double value) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.ElementwiseNotEqualsImplementation(value); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(double value) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.ElementwiseGreaterThanOrEqualImplementation(value); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(double value) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.ElementwiseLessThanOrEqualImplementation(value); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(double value) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.ElementwiseGreaterThanImplementation(value); + } + public BooleanDataFrameColumn ElementwiseLessThan(double value) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.ElementwiseLessThanImplementation(value); + } + public BooleanDataFrameColumn ElementwiseEquals(float value) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.ElementwiseEqualsImplementation(value); + } + public BooleanDataFrameColumn ElementwiseNotEquals(float value) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.ElementwiseNotEqualsImplementation(value); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(float value) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.ElementwiseGreaterThanOrEqualImplementation(value); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(float value) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.ElementwiseLessThanOrEqualImplementation(value); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(float value) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.ElementwiseGreaterThanImplementation(value); + } + public BooleanDataFrameColumn ElementwiseLessThan(float value) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.ElementwiseLessThanImplementation(value); + } + public BooleanDataFrameColumn ElementwiseEquals(int value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.ElementwiseEqualsImplementation(value); + } + public BooleanDataFrameColumn ElementwiseNotEquals(int value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.ElementwiseNotEqualsImplementation(value); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(int value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.ElementwiseGreaterThanOrEqualImplementation(value); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(int value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.ElementwiseLessThanOrEqualImplementation(value); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(int value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.ElementwiseGreaterThanImplementation(value); + } + public BooleanDataFrameColumn ElementwiseLessThan(int value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.ElementwiseLessThanImplementation(value); + } + public BooleanDataFrameColumn ElementwiseEquals(long value) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.ElementwiseEqualsImplementation(value); + } + public BooleanDataFrameColumn ElementwiseNotEquals(long value) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.ElementwiseNotEqualsImplementation(value); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(long value) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.ElementwiseGreaterThanOrEqualImplementation(value); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(long value) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.ElementwiseLessThanOrEqualImplementation(value); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(long value) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.ElementwiseGreaterThanImplementation(value); + } + public BooleanDataFrameColumn ElementwiseLessThan(long value) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.ElementwiseLessThanImplementation(value); + } + public BooleanDataFrameColumn ElementwiseEquals(sbyte value) + { + return ElementwiseEqualsImplementation(value); + } + public BooleanDataFrameColumn ElementwiseNotEquals(sbyte value) + { + return ElementwiseNotEqualsImplementation(value); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(sbyte value) + { + return ElementwiseGreaterThanOrEqualImplementation(value); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(sbyte value) + { + return ElementwiseLessThanOrEqualImplementation(value); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(sbyte value) + { + return ElementwiseGreaterThanImplementation(value); + } + public BooleanDataFrameColumn ElementwiseLessThan(sbyte value) + { + return ElementwiseLessThanImplementation(value); + } + public BooleanDataFrameColumn ElementwiseEquals(short value) + { + Int16DataFrameColumn shortColumn = CloneAsInt16Column(); + return shortColumn.ElementwiseEqualsImplementation(value); + } + public BooleanDataFrameColumn ElementwiseNotEquals(short value) + { + Int16DataFrameColumn shortColumn = CloneAsInt16Column(); + return shortColumn.ElementwiseNotEqualsImplementation(value); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(short value) + { + Int16DataFrameColumn shortColumn = CloneAsInt16Column(); + return shortColumn.ElementwiseGreaterThanOrEqualImplementation(value); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(short value) + { + Int16DataFrameColumn shortColumn = CloneAsInt16Column(); + return shortColumn.ElementwiseLessThanOrEqualImplementation(value); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(short value) + { + Int16DataFrameColumn shortColumn = CloneAsInt16Column(); + return shortColumn.ElementwiseGreaterThanImplementation(value); + } + public BooleanDataFrameColumn ElementwiseLessThan(short value) + { + Int16DataFrameColumn shortColumn = CloneAsInt16Column(); + return shortColumn.ElementwiseLessThanImplementation(value); + } + public BooleanDataFrameColumn ElementwiseEquals(uint value) + { + UInt32DataFrameColumn uintColumn = CloneAsUInt32Column(); + return uintColumn.ElementwiseEqualsImplementation(value); + } + public BooleanDataFrameColumn ElementwiseNotEquals(uint value) + { + UInt32DataFrameColumn uintColumn = CloneAsUInt32Column(); + return uintColumn.ElementwiseNotEqualsImplementation(value); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(uint value) + { + UInt32DataFrameColumn uintColumn = CloneAsUInt32Column(); + return uintColumn.ElementwiseGreaterThanOrEqualImplementation(value); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(uint value) + { + UInt32DataFrameColumn uintColumn = CloneAsUInt32Column(); + return uintColumn.ElementwiseLessThanOrEqualImplementation(value); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(uint value) + { + UInt32DataFrameColumn uintColumn = CloneAsUInt32Column(); + return uintColumn.ElementwiseGreaterThanImplementation(value); + } + public BooleanDataFrameColumn ElementwiseLessThan(uint value) + { + UInt32DataFrameColumn uintColumn = CloneAsUInt32Column(); + return uintColumn.ElementwiseLessThanImplementation(value); + } + public BooleanDataFrameColumn ElementwiseEquals(ulong value) + { + UInt64DataFrameColumn ulongColumn = CloneAsUInt64Column(); + return ulongColumn.ElementwiseEqualsImplementation(value); + } + public BooleanDataFrameColumn ElementwiseNotEquals(ulong value) + { + UInt64DataFrameColumn ulongColumn = CloneAsUInt64Column(); + return ulongColumn.ElementwiseNotEqualsImplementation(value); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(ulong value) + { + UInt64DataFrameColumn ulongColumn = CloneAsUInt64Column(); + return ulongColumn.ElementwiseGreaterThanOrEqualImplementation(value); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(ulong value) + { + UInt64DataFrameColumn ulongColumn = CloneAsUInt64Column(); + return ulongColumn.ElementwiseLessThanOrEqualImplementation(value); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(ulong value) + { + UInt64DataFrameColumn ulongColumn = CloneAsUInt64Column(); + return ulongColumn.ElementwiseGreaterThanImplementation(value); + } + public BooleanDataFrameColumn ElementwiseLessThan(ulong value) + { + UInt64DataFrameColumn ulongColumn = CloneAsUInt64Column(); + return ulongColumn.ElementwiseLessThanImplementation(value); + } + public BooleanDataFrameColumn ElementwiseEquals(ushort value) + { + UInt16DataFrameColumn ushortColumn = CloneAsUInt16Column(); + return ushortColumn.ElementwiseEqualsImplementation(value); + } + public BooleanDataFrameColumn ElementwiseNotEquals(ushort value) + { + UInt16DataFrameColumn ushortColumn = CloneAsUInt16Column(); + return ushortColumn.ElementwiseNotEqualsImplementation(value); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(ushort value) + { + UInt16DataFrameColumn ushortColumn = CloneAsUInt16Column(); + return ushortColumn.ElementwiseGreaterThanOrEqualImplementation(value); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(ushort value) + { + UInt16DataFrameColumn ushortColumn = CloneAsUInt16Column(); + return ushortColumn.ElementwiseLessThanOrEqualImplementation(value); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(ushort value) + { + UInt16DataFrameColumn ushortColumn = CloneAsUInt16Column(); + return ushortColumn.ElementwiseGreaterThanImplementation(value); + } + public BooleanDataFrameColumn ElementwiseLessThan(ushort value) + { + UInt16DataFrameColumn ushortColumn = CloneAsUInt16Column(); + return ushortColumn.ElementwiseLessThanImplementation(value); + } + } + public partial class Int16DataFrameColumn + { + public BooleanDataFrameColumn ElementwiseEquals(byte value) + { + short othershortValue = (short)value; + return ElementwiseEqualsImplementation(othershortValue); + } + public BooleanDataFrameColumn ElementwiseNotEquals(byte value) + { + short othershortValue = (short)value; + return ElementwiseNotEqualsImplementation(othershortValue); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(byte value) + { + short othershortValue = (short)value; + return ElementwiseGreaterThanOrEqualImplementation(othershortValue); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(byte value) + { + short othershortValue = (short)value; + return ElementwiseLessThanOrEqualImplementation(othershortValue); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(byte value) + { + short othershortValue = (short)value; + return ElementwiseGreaterThanImplementation(othershortValue); + } + public BooleanDataFrameColumn ElementwiseLessThan(byte value) + { + short othershortValue = (short)value; + return ElementwiseLessThanImplementation(othershortValue); + } + public BooleanDataFrameColumn ElementwiseEquals(decimal value) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.ElementwiseEqualsImplementation(value); + } + public BooleanDataFrameColumn ElementwiseNotEquals(decimal value) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.ElementwiseNotEqualsImplementation(value); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(decimal value) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.ElementwiseGreaterThanOrEqualImplementation(value); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(decimal value) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.ElementwiseLessThanOrEqualImplementation(value); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(decimal value) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.ElementwiseGreaterThanImplementation(value); + } + public BooleanDataFrameColumn ElementwiseLessThan(decimal value) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.ElementwiseLessThanImplementation(value); + } + public BooleanDataFrameColumn ElementwiseEquals(double value) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.ElementwiseEqualsImplementation(value); + } + public BooleanDataFrameColumn ElementwiseNotEquals(double value) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.ElementwiseNotEqualsImplementation(value); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(double value) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.ElementwiseGreaterThanOrEqualImplementation(value); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(double value) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.ElementwiseLessThanOrEqualImplementation(value); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(double value) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.ElementwiseGreaterThanImplementation(value); + } + public BooleanDataFrameColumn ElementwiseLessThan(double value) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.ElementwiseLessThanImplementation(value); + } + public BooleanDataFrameColumn ElementwiseEquals(float value) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.ElementwiseEqualsImplementation(value); + } + public BooleanDataFrameColumn ElementwiseNotEquals(float value) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.ElementwiseNotEqualsImplementation(value); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(float value) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.ElementwiseGreaterThanOrEqualImplementation(value); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(float value) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.ElementwiseLessThanOrEqualImplementation(value); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(float value) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.ElementwiseGreaterThanImplementation(value); + } + public BooleanDataFrameColumn ElementwiseLessThan(float value) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.ElementwiseLessThanImplementation(value); + } + public BooleanDataFrameColumn ElementwiseEquals(int value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.ElementwiseEqualsImplementation(value); + } + public BooleanDataFrameColumn ElementwiseNotEquals(int value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.ElementwiseNotEqualsImplementation(value); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(int value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.ElementwiseGreaterThanOrEqualImplementation(value); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(int value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.ElementwiseLessThanOrEqualImplementation(value); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(int value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.ElementwiseGreaterThanImplementation(value); + } + public BooleanDataFrameColumn ElementwiseLessThan(int value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.ElementwiseLessThanImplementation(value); + } + public BooleanDataFrameColumn ElementwiseEquals(long value) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.ElementwiseEqualsImplementation(value); + } + public BooleanDataFrameColumn ElementwiseNotEquals(long value) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.ElementwiseNotEqualsImplementation(value); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(long value) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.ElementwiseGreaterThanOrEqualImplementation(value); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(long value) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.ElementwiseLessThanOrEqualImplementation(value); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(long value) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.ElementwiseGreaterThanImplementation(value); + } + public BooleanDataFrameColumn ElementwiseLessThan(long value) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.ElementwiseLessThanImplementation(value); + } + public BooleanDataFrameColumn ElementwiseEquals(sbyte value) + { + short othershortValue = (short)value; + return ElementwiseEqualsImplementation(othershortValue); + } + public BooleanDataFrameColumn ElementwiseNotEquals(sbyte value) + { + short othershortValue = (short)value; + return ElementwiseNotEqualsImplementation(othershortValue); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(sbyte value) + { + short othershortValue = (short)value; + return ElementwiseGreaterThanOrEqualImplementation(othershortValue); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(sbyte value) + { + short othershortValue = (short)value; + return ElementwiseLessThanOrEqualImplementation(othershortValue); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(sbyte value) + { + short othershortValue = (short)value; + return ElementwiseGreaterThanImplementation(othershortValue); + } + public BooleanDataFrameColumn ElementwiseLessThan(sbyte value) + { + short othershortValue = (short)value; + return ElementwiseLessThanImplementation(othershortValue); + } + public BooleanDataFrameColumn ElementwiseEquals(short value) + { + return ElementwiseEqualsImplementation(value); + } + public BooleanDataFrameColumn ElementwiseNotEquals(short value) + { + return ElementwiseNotEqualsImplementation(value); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(short value) + { + return ElementwiseGreaterThanOrEqualImplementation(value); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(short value) + { + return ElementwiseLessThanOrEqualImplementation(value); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(short value) + { + return ElementwiseGreaterThanImplementation(value); + } + public BooleanDataFrameColumn ElementwiseLessThan(short value) + { + return ElementwiseLessThanImplementation(value); + } + public BooleanDataFrameColumn ElementwiseEquals(uint value) + { + UInt32DataFrameColumn uintColumn = CloneAsUInt32Column(); + return uintColumn.ElementwiseEqualsImplementation(value); + } + public BooleanDataFrameColumn ElementwiseNotEquals(uint value) + { + UInt32DataFrameColumn uintColumn = CloneAsUInt32Column(); + return uintColumn.ElementwiseNotEqualsImplementation(value); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(uint value) + { + UInt32DataFrameColumn uintColumn = CloneAsUInt32Column(); + return uintColumn.ElementwiseGreaterThanOrEqualImplementation(value); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(uint value) + { + UInt32DataFrameColumn uintColumn = CloneAsUInt32Column(); + return uintColumn.ElementwiseLessThanOrEqualImplementation(value); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(uint value) + { + UInt32DataFrameColumn uintColumn = CloneAsUInt32Column(); + return uintColumn.ElementwiseGreaterThanImplementation(value); + } + public BooleanDataFrameColumn ElementwiseLessThan(uint value) + { + UInt32DataFrameColumn uintColumn = CloneAsUInt32Column(); + return uintColumn.ElementwiseLessThanImplementation(value); + } + public BooleanDataFrameColumn ElementwiseEquals(ulong value) + { + UInt64DataFrameColumn ulongColumn = CloneAsUInt64Column(); + return ulongColumn.ElementwiseEqualsImplementation(value); + } + public BooleanDataFrameColumn ElementwiseNotEquals(ulong value) + { + UInt64DataFrameColumn ulongColumn = CloneAsUInt64Column(); + return ulongColumn.ElementwiseNotEqualsImplementation(value); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(ulong value) + { + UInt64DataFrameColumn ulongColumn = CloneAsUInt64Column(); + return ulongColumn.ElementwiseGreaterThanOrEqualImplementation(value); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(ulong value) + { + UInt64DataFrameColumn ulongColumn = CloneAsUInt64Column(); + return ulongColumn.ElementwiseLessThanOrEqualImplementation(value); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(ulong value) + { + UInt64DataFrameColumn ulongColumn = CloneAsUInt64Column(); + return ulongColumn.ElementwiseGreaterThanImplementation(value); + } + public BooleanDataFrameColumn ElementwiseLessThan(ulong value) + { + UInt64DataFrameColumn ulongColumn = CloneAsUInt64Column(); + return ulongColumn.ElementwiseLessThanImplementation(value); + } + public BooleanDataFrameColumn ElementwiseEquals(ushort value) + { + short othershortValue = (short)value; + return ElementwiseEqualsImplementation(othershortValue); + } + public BooleanDataFrameColumn ElementwiseNotEquals(ushort value) + { + short othershortValue = (short)value; + return ElementwiseNotEqualsImplementation(othershortValue); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(ushort value) + { + short othershortValue = (short)value; + return ElementwiseGreaterThanOrEqualImplementation(othershortValue); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(ushort value) + { + short othershortValue = (short)value; + return ElementwiseLessThanOrEqualImplementation(othershortValue); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(ushort value) + { + short othershortValue = (short)value; + return ElementwiseGreaterThanImplementation(othershortValue); + } + public BooleanDataFrameColumn ElementwiseLessThan(ushort value) + { + short othershortValue = (short)value; + return ElementwiseLessThanImplementation(othershortValue); + } + } + public partial class UInt32DataFrameColumn + { + public BooleanDataFrameColumn ElementwiseEquals(byte value) + { + uint otheruintValue = (uint)value; + return ElementwiseEqualsImplementation(otheruintValue); + } + public BooleanDataFrameColumn ElementwiseNotEquals(byte value) + { + uint otheruintValue = (uint)value; + return ElementwiseNotEqualsImplementation(otheruintValue); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(byte value) + { + uint otheruintValue = (uint)value; + return ElementwiseGreaterThanOrEqualImplementation(otheruintValue); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(byte value) + { + uint otheruintValue = (uint)value; + return ElementwiseLessThanOrEqualImplementation(otheruintValue); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(byte value) + { + uint otheruintValue = (uint)value; + return ElementwiseGreaterThanImplementation(otheruintValue); + } + public BooleanDataFrameColumn ElementwiseLessThan(byte value) + { + uint otheruintValue = (uint)value; + return ElementwiseLessThanImplementation(otheruintValue); + } + public BooleanDataFrameColumn ElementwiseEquals(decimal value) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.ElementwiseEqualsImplementation(value); + } + public BooleanDataFrameColumn ElementwiseNotEquals(decimal value) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.ElementwiseNotEqualsImplementation(value); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(decimal value) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.ElementwiseGreaterThanOrEqualImplementation(value); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(decimal value) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.ElementwiseLessThanOrEqualImplementation(value); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(decimal value) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.ElementwiseGreaterThanImplementation(value); + } + public BooleanDataFrameColumn ElementwiseLessThan(decimal value) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.ElementwiseLessThanImplementation(value); + } + public BooleanDataFrameColumn ElementwiseEquals(double value) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.ElementwiseEqualsImplementation(value); + } + public BooleanDataFrameColumn ElementwiseNotEquals(double value) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.ElementwiseNotEqualsImplementation(value); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(double value) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.ElementwiseGreaterThanOrEqualImplementation(value); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(double value) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.ElementwiseLessThanOrEqualImplementation(value); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(double value) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.ElementwiseGreaterThanImplementation(value); + } + public BooleanDataFrameColumn ElementwiseLessThan(double value) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.ElementwiseLessThanImplementation(value); + } + public BooleanDataFrameColumn ElementwiseEquals(float value) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.ElementwiseEqualsImplementation(value); + } + public BooleanDataFrameColumn ElementwiseNotEquals(float value) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.ElementwiseNotEqualsImplementation(value); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(float value) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.ElementwiseGreaterThanOrEqualImplementation(value); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(float value) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.ElementwiseLessThanOrEqualImplementation(value); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(float value) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.ElementwiseGreaterThanImplementation(value); + } + public BooleanDataFrameColumn ElementwiseLessThan(float value) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.ElementwiseLessThanImplementation(value); + } + public BooleanDataFrameColumn ElementwiseEquals(int value) + { + uint otheruintValue = (uint)value; + return ElementwiseEqualsImplementation(otheruintValue); + } + public BooleanDataFrameColumn ElementwiseNotEquals(int value) + { + uint otheruintValue = (uint)value; + return ElementwiseNotEqualsImplementation(otheruintValue); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(int value) + { + uint otheruintValue = (uint)value; + return ElementwiseGreaterThanOrEqualImplementation(otheruintValue); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(int value) + { + uint otheruintValue = (uint)value; + return ElementwiseLessThanOrEqualImplementation(otheruintValue); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(int value) + { + uint otheruintValue = (uint)value; + return ElementwiseGreaterThanImplementation(otheruintValue); + } + public BooleanDataFrameColumn ElementwiseLessThan(int value) + { + uint otheruintValue = (uint)value; + return ElementwiseLessThanImplementation(otheruintValue); + } + public BooleanDataFrameColumn ElementwiseEquals(long value) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.ElementwiseEqualsImplementation(value); + } + public BooleanDataFrameColumn ElementwiseNotEquals(long value) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.ElementwiseNotEqualsImplementation(value); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(long value) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.ElementwiseGreaterThanOrEqualImplementation(value); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(long value) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.ElementwiseLessThanOrEqualImplementation(value); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(long value) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.ElementwiseGreaterThanImplementation(value); + } + public BooleanDataFrameColumn ElementwiseLessThan(long value) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.ElementwiseLessThanImplementation(value); + } + public BooleanDataFrameColumn ElementwiseEquals(sbyte value) + { + uint otheruintValue = (uint)value; + return ElementwiseEqualsImplementation(otheruintValue); + } + public BooleanDataFrameColumn ElementwiseNotEquals(sbyte value) + { + uint otheruintValue = (uint)value; + return ElementwiseNotEqualsImplementation(otheruintValue); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(sbyte value) + { + uint otheruintValue = (uint)value; + return ElementwiseGreaterThanOrEqualImplementation(otheruintValue); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(sbyte value) + { + uint otheruintValue = (uint)value; + return ElementwiseLessThanOrEqualImplementation(otheruintValue); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(sbyte value) + { + uint otheruintValue = (uint)value; + return ElementwiseGreaterThanImplementation(otheruintValue); + } + public BooleanDataFrameColumn ElementwiseLessThan(sbyte value) + { + uint otheruintValue = (uint)value; + return ElementwiseLessThanImplementation(otheruintValue); + } + public BooleanDataFrameColumn ElementwiseEquals(short value) + { + uint otheruintValue = (uint)value; + return ElementwiseEqualsImplementation(otheruintValue); + } + public BooleanDataFrameColumn ElementwiseNotEquals(short value) + { + uint otheruintValue = (uint)value; + return ElementwiseNotEqualsImplementation(otheruintValue); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(short value) + { + uint otheruintValue = (uint)value; + return ElementwiseGreaterThanOrEqualImplementation(otheruintValue); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(short value) + { + uint otheruintValue = (uint)value; + return ElementwiseLessThanOrEqualImplementation(otheruintValue); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(short value) + { + uint otheruintValue = (uint)value; + return ElementwiseGreaterThanImplementation(otheruintValue); + } + public BooleanDataFrameColumn ElementwiseLessThan(short value) + { + uint otheruintValue = (uint)value; + return ElementwiseLessThanImplementation(otheruintValue); + } + public BooleanDataFrameColumn ElementwiseEquals(uint value) + { + return ElementwiseEqualsImplementation(value); + } + public BooleanDataFrameColumn ElementwiseNotEquals(uint value) + { + return ElementwiseNotEqualsImplementation(value); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(uint value) + { + return ElementwiseGreaterThanOrEqualImplementation(value); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(uint value) + { + return ElementwiseLessThanOrEqualImplementation(value); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(uint value) + { + return ElementwiseGreaterThanImplementation(value); + } + public BooleanDataFrameColumn ElementwiseLessThan(uint value) + { + return ElementwiseLessThanImplementation(value); + } + public BooleanDataFrameColumn ElementwiseEquals(ulong value) + { + UInt64DataFrameColumn ulongColumn = CloneAsUInt64Column(); + return ulongColumn.ElementwiseEqualsImplementation(value); + } + public BooleanDataFrameColumn ElementwiseNotEquals(ulong value) + { + UInt64DataFrameColumn ulongColumn = CloneAsUInt64Column(); + return ulongColumn.ElementwiseNotEqualsImplementation(value); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(ulong value) + { + UInt64DataFrameColumn ulongColumn = CloneAsUInt64Column(); + return ulongColumn.ElementwiseGreaterThanOrEqualImplementation(value); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(ulong value) + { + UInt64DataFrameColumn ulongColumn = CloneAsUInt64Column(); + return ulongColumn.ElementwiseLessThanOrEqualImplementation(value); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(ulong value) + { + UInt64DataFrameColumn ulongColumn = CloneAsUInt64Column(); + return ulongColumn.ElementwiseGreaterThanImplementation(value); + } + public BooleanDataFrameColumn ElementwiseLessThan(ulong value) + { + UInt64DataFrameColumn ulongColumn = CloneAsUInt64Column(); + return ulongColumn.ElementwiseLessThanImplementation(value); + } + public BooleanDataFrameColumn ElementwiseEquals(ushort value) + { + uint otheruintValue = (uint)value; + return ElementwiseEqualsImplementation(otheruintValue); + } + public BooleanDataFrameColumn ElementwiseNotEquals(ushort value) + { + uint otheruintValue = (uint)value; + return ElementwiseNotEqualsImplementation(otheruintValue); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(ushort value) + { + uint otheruintValue = (uint)value; + return ElementwiseGreaterThanOrEqualImplementation(otheruintValue); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(ushort value) + { + uint otheruintValue = (uint)value; + return ElementwiseLessThanOrEqualImplementation(otheruintValue); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(ushort value) + { + uint otheruintValue = (uint)value; + return ElementwiseGreaterThanImplementation(otheruintValue); + } + public BooleanDataFrameColumn ElementwiseLessThan(ushort value) + { + uint otheruintValue = (uint)value; + return ElementwiseLessThanImplementation(otheruintValue); + } + } + public partial class UInt64DataFrameColumn + { + public BooleanDataFrameColumn ElementwiseEquals(byte value) + { + ulong otherulongValue = (ulong)value; + return ElementwiseEqualsImplementation(otherulongValue); + } + public BooleanDataFrameColumn ElementwiseNotEquals(byte value) + { + ulong otherulongValue = (ulong)value; + return ElementwiseNotEqualsImplementation(otherulongValue); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(byte value) + { + ulong otherulongValue = (ulong)value; + return ElementwiseGreaterThanOrEqualImplementation(otherulongValue); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(byte value) + { + ulong otherulongValue = (ulong)value; + return ElementwiseLessThanOrEqualImplementation(otherulongValue); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(byte value) + { + ulong otherulongValue = (ulong)value; + return ElementwiseGreaterThanImplementation(otherulongValue); + } + public BooleanDataFrameColumn ElementwiseLessThan(byte value) + { + ulong otherulongValue = (ulong)value; + return ElementwiseLessThanImplementation(otherulongValue); + } + public BooleanDataFrameColumn ElementwiseEquals(decimal value) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.ElementwiseEqualsImplementation(value); + } + public BooleanDataFrameColumn ElementwiseNotEquals(decimal value) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.ElementwiseNotEqualsImplementation(value); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(decimal value) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.ElementwiseGreaterThanOrEqualImplementation(value); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(decimal value) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.ElementwiseLessThanOrEqualImplementation(value); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(decimal value) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.ElementwiseGreaterThanImplementation(value); + } + public BooleanDataFrameColumn ElementwiseLessThan(decimal value) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.ElementwiseLessThanImplementation(value); + } + public BooleanDataFrameColumn ElementwiseEquals(double value) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.ElementwiseEqualsImplementation(value); + } + public BooleanDataFrameColumn ElementwiseNotEquals(double value) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.ElementwiseNotEqualsImplementation(value); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(double value) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.ElementwiseGreaterThanOrEqualImplementation(value); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(double value) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.ElementwiseLessThanOrEqualImplementation(value); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(double value) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.ElementwiseGreaterThanImplementation(value); + } + public BooleanDataFrameColumn ElementwiseLessThan(double value) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.ElementwiseLessThanImplementation(value); + } + public BooleanDataFrameColumn ElementwiseEquals(float value) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.ElementwiseEqualsImplementation(value); + } + public BooleanDataFrameColumn ElementwiseNotEquals(float value) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.ElementwiseNotEqualsImplementation(value); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(float value) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.ElementwiseGreaterThanOrEqualImplementation(value); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(float value) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.ElementwiseLessThanOrEqualImplementation(value); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(float value) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.ElementwiseGreaterThanImplementation(value); + } + public BooleanDataFrameColumn ElementwiseLessThan(float value) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.ElementwiseLessThanImplementation(value); + } + public BooleanDataFrameColumn ElementwiseEquals(int value) + { + ulong otherulongValue = (ulong)value; + return ElementwiseEqualsImplementation(otherulongValue); + } + public BooleanDataFrameColumn ElementwiseNotEquals(int value) + { + ulong otherulongValue = (ulong)value; + return ElementwiseNotEqualsImplementation(otherulongValue); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(int value) + { + ulong otherulongValue = (ulong)value; + return ElementwiseGreaterThanOrEqualImplementation(otherulongValue); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(int value) + { + ulong otherulongValue = (ulong)value; + return ElementwiseLessThanOrEqualImplementation(otherulongValue); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(int value) + { + ulong otherulongValue = (ulong)value; + return ElementwiseGreaterThanImplementation(otherulongValue); + } + public BooleanDataFrameColumn ElementwiseLessThan(int value) + { + ulong otherulongValue = (ulong)value; + return ElementwiseLessThanImplementation(otherulongValue); + } + public BooleanDataFrameColumn ElementwiseEquals(sbyte value) + { + ulong otherulongValue = (ulong)value; + return ElementwiseEqualsImplementation(otherulongValue); + } + public BooleanDataFrameColumn ElementwiseNotEquals(sbyte value) + { + ulong otherulongValue = (ulong)value; + return ElementwiseNotEqualsImplementation(otherulongValue); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(sbyte value) + { + ulong otherulongValue = (ulong)value; + return ElementwiseGreaterThanOrEqualImplementation(otherulongValue); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(sbyte value) + { + ulong otherulongValue = (ulong)value; + return ElementwiseLessThanOrEqualImplementation(otherulongValue); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(sbyte value) + { + ulong otherulongValue = (ulong)value; + return ElementwiseGreaterThanImplementation(otherulongValue); + } + public BooleanDataFrameColumn ElementwiseLessThan(sbyte value) + { + ulong otherulongValue = (ulong)value; + return ElementwiseLessThanImplementation(otherulongValue); + } + public BooleanDataFrameColumn ElementwiseEquals(short value) + { + ulong otherulongValue = (ulong)value; + return ElementwiseEqualsImplementation(otherulongValue); + } + public BooleanDataFrameColumn ElementwiseNotEquals(short value) + { + ulong otherulongValue = (ulong)value; + return ElementwiseNotEqualsImplementation(otherulongValue); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(short value) + { + ulong otherulongValue = (ulong)value; + return ElementwiseGreaterThanOrEqualImplementation(otherulongValue); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(short value) + { + ulong otherulongValue = (ulong)value; + return ElementwiseLessThanOrEqualImplementation(otherulongValue); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(short value) + { + ulong otherulongValue = (ulong)value; + return ElementwiseGreaterThanImplementation(otherulongValue); + } + public BooleanDataFrameColumn ElementwiseLessThan(short value) + { + ulong otherulongValue = (ulong)value; + return ElementwiseLessThanImplementation(otherulongValue); + } + public BooleanDataFrameColumn ElementwiseEquals(uint value) + { + ulong otherulongValue = (ulong)value; + return ElementwiseEqualsImplementation(otherulongValue); + } + public BooleanDataFrameColumn ElementwiseNotEquals(uint value) + { + ulong otherulongValue = (ulong)value; + return ElementwiseNotEqualsImplementation(otherulongValue); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(uint value) + { + ulong otherulongValue = (ulong)value; + return ElementwiseGreaterThanOrEqualImplementation(otherulongValue); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(uint value) + { + ulong otherulongValue = (ulong)value; + return ElementwiseLessThanOrEqualImplementation(otherulongValue); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(uint value) + { + ulong otherulongValue = (ulong)value; + return ElementwiseGreaterThanImplementation(otherulongValue); + } + public BooleanDataFrameColumn ElementwiseLessThan(uint value) + { + ulong otherulongValue = (ulong)value; + return ElementwiseLessThanImplementation(otherulongValue); + } + public BooleanDataFrameColumn ElementwiseEquals(ulong value) + { + return ElementwiseEqualsImplementation(value); + } + public BooleanDataFrameColumn ElementwiseNotEquals(ulong value) + { + return ElementwiseNotEqualsImplementation(value); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(ulong value) + { + return ElementwiseGreaterThanOrEqualImplementation(value); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(ulong value) + { + return ElementwiseLessThanOrEqualImplementation(value); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(ulong value) + { + return ElementwiseGreaterThanImplementation(value); + } + public BooleanDataFrameColumn ElementwiseLessThan(ulong value) + { + return ElementwiseLessThanImplementation(value); + } + public BooleanDataFrameColumn ElementwiseEquals(ushort value) + { + ulong otherulongValue = (ulong)value; + return ElementwiseEqualsImplementation(otherulongValue); + } + public BooleanDataFrameColumn ElementwiseNotEquals(ushort value) + { + ulong otherulongValue = (ulong)value; + return ElementwiseNotEqualsImplementation(otherulongValue); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(ushort value) + { + ulong otherulongValue = (ulong)value; + return ElementwiseGreaterThanOrEqualImplementation(otherulongValue); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(ushort value) + { + ulong otherulongValue = (ulong)value; + return ElementwiseLessThanOrEqualImplementation(otherulongValue); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(ushort value) + { + ulong otherulongValue = (ulong)value; + return ElementwiseGreaterThanImplementation(otherulongValue); + } + public BooleanDataFrameColumn ElementwiseLessThan(ushort value) + { + ulong otherulongValue = (ulong)value; + return ElementwiseLessThanImplementation(otherulongValue); + } + } + public partial class UInt16DataFrameColumn + { + public BooleanDataFrameColumn ElementwiseEquals(byte value) + { + ushort otherushortValue = (ushort)value; + return ElementwiseEqualsImplementation(otherushortValue); + } + public BooleanDataFrameColumn ElementwiseNotEquals(byte value) + { + ushort otherushortValue = (ushort)value; + return ElementwiseNotEqualsImplementation(otherushortValue); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(byte value) + { + ushort otherushortValue = (ushort)value; + return ElementwiseGreaterThanOrEqualImplementation(otherushortValue); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(byte value) + { + ushort otherushortValue = (ushort)value; + return ElementwiseLessThanOrEqualImplementation(otherushortValue); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(byte value) + { + ushort otherushortValue = (ushort)value; + return ElementwiseGreaterThanImplementation(otherushortValue); + } + public BooleanDataFrameColumn ElementwiseLessThan(byte value) + { + ushort otherushortValue = (ushort)value; + return ElementwiseLessThanImplementation(otherushortValue); + } + public BooleanDataFrameColumn ElementwiseEquals(decimal value) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.ElementwiseEqualsImplementation(value); + } + public BooleanDataFrameColumn ElementwiseNotEquals(decimal value) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.ElementwiseNotEqualsImplementation(value); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(decimal value) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.ElementwiseGreaterThanOrEqualImplementation(value); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(decimal value) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.ElementwiseLessThanOrEqualImplementation(value); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(decimal value) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.ElementwiseGreaterThanImplementation(value); + } + public BooleanDataFrameColumn ElementwiseLessThan(decimal value) + { + DecimalDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + return decimalColumn.ElementwiseLessThanImplementation(value); + } + public BooleanDataFrameColumn ElementwiseEquals(double value) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.ElementwiseEqualsImplementation(value); + } + public BooleanDataFrameColumn ElementwiseNotEquals(double value) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.ElementwiseNotEqualsImplementation(value); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(double value) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.ElementwiseGreaterThanOrEqualImplementation(value); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(double value) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.ElementwiseLessThanOrEqualImplementation(value); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(double value) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.ElementwiseGreaterThanImplementation(value); + } + public BooleanDataFrameColumn ElementwiseLessThan(double value) + { + DoubleDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + return doubleColumn.ElementwiseLessThanImplementation(value); + } + public BooleanDataFrameColumn ElementwiseEquals(float value) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.ElementwiseEqualsImplementation(value); + } + public BooleanDataFrameColumn ElementwiseNotEquals(float value) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.ElementwiseNotEqualsImplementation(value); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(float value) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.ElementwiseGreaterThanOrEqualImplementation(value); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(float value) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.ElementwiseLessThanOrEqualImplementation(value); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(float value) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.ElementwiseGreaterThanImplementation(value); + } + public BooleanDataFrameColumn ElementwiseLessThan(float value) + { + SingleDataFrameColumn floatColumn = CloneAsSingleColumn(); + return floatColumn.ElementwiseLessThanImplementation(value); + } + public BooleanDataFrameColumn ElementwiseEquals(int value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.ElementwiseEqualsImplementation(value); + } + public BooleanDataFrameColumn ElementwiseNotEquals(int value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.ElementwiseNotEqualsImplementation(value); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(int value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.ElementwiseGreaterThanOrEqualImplementation(value); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(int value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.ElementwiseLessThanOrEqualImplementation(value); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(int value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.ElementwiseGreaterThanImplementation(value); + } + public BooleanDataFrameColumn ElementwiseLessThan(int value) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + return intColumn.ElementwiseLessThanImplementation(value); + } + public BooleanDataFrameColumn ElementwiseEquals(long value) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.ElementwiseEqualsImplementation(value); + } + public BooleanDataFrameColumn ElementwiseNotEquals(long value) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.ElementwiseNotEqualsImplementation(value); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(long value) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.ElementwiseGreaterThanOrEqualImplementation(value); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(long value) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.ElementwiseLessThanOrEqualImplementation(value); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(long value) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.ElementwiseGreaterThanImplementation(value); + } + public BooleanDataFrameColumn ElementwiseLessThan(long value) + { + Int64DataFrameColumn longColumn = CloneAsInt64Column(); + return longColumn.ElementwiseLessThanImplementation(value); + } + public BooleanDataFrameColumn ElementwiseEquals(sbyte value) + { + ushort otherushortValue = (ushort)value; + return ElementwiseEqualsImplementation(otherushortValue); + } + public BooleanDataFrameColumn ElementwiseNotEquals(sbyte value) + { + ushort otherushortValue = (ushort)value; + return ElementwiseNotEqualsImplementation(otherushortValue); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(sbyte value) + { + ushort otherushortValue = (ushort)value; + return ElementwiseGreaterThanOrEqualImplementation(otherushortValue); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(sbyte value) + { + ushort otherushortValue = (ushort)value; + return ElementwiseLessThanOrEqualImplementation(otherushortValue); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(sbyte value) + { + ushort otherushortValue = (ushort)value; + return ElementwiseGreaterThanImplementation(otherushortValue); + } + public BooleanDataFrameColumn ElementwiseLessThan(sbyte value) + { + ushort otherushortValue = (ushort)value; + return ElementwiseLessThanImplementation(otherushortValue); + } + public BooleanDataFrameColumn ElementwiseEquals(short value) + { + ushort otherushortValue = (ushort)value; + return ElementwiseEqualsImplementation(otherushortValue); + } + public BooleanDataFrameColumn ElementwiseNotEquals(short value) + { + ushort otherushortValue = (ushort)value; + return ElementwiseNotEqualsImplementation(otherushortValue); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(short value) + { + ushort otherushortValue = (ushort)value; + return ElementwiseGreaterThanOrEqualImplementation(otherushortValue); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(short value) + { + ushort otherushortValue = (ushort)value; + return ElementwiseLessThanOrEqualImplementation(otherushortValue); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(short value) + { + ushort otherushortValue = (ushort)value; + return ElementwiseGreaterThanImplementation(otherushortValue); + } + public BooleanDataFrameColumn ElementwiseLessThan(short value) + { + ushort otherushortValue = (ushort)value; + return ElementwiseLessThanImplementation(otherushortValue); + } + public BooleanDataFrameColumn ElementwiseEquals(uint value) + { + UInt32DataFrameColumn uintColumn = CloneAsUInt32Column(); + return uintColumn.ElementwiseEqualsImplementation(value); + } + public BooleanDataFrameColumn ElementwiseNotEquals(uint value) + { + UInt32DataFrameColumn uintColumn = CloneAsUInt32Column(); + return uintColumn.ElementwiseNotEqualsImplementation(value); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(uint value) + { + UInt32DataFrameColumn uintColumn = CloneAsUInt32Column(); + return uintColumn.ElementwiseGreaterThanOrEqualImplementation(value); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(uint value) + { + UInt32DataFrameColumn uintColumn = CloneAsUInt32Column(); + return uintColumn.ElementwiseLessThanOrEqualImplementation(value); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(uint value) + { + UInt32DataFrameColumn uintColumn = CloneAsUInt32Column(); + return uintColumn.ElementwiseGreaterThanImplementation(value); + } + public BooleanDataFrameColumn ElementwiseLessThan(uint value) + { + UInt32DataFrameColumn uintColumn = CloneAsUInt32Column(); + return uintColumn.ElementwiseLessThanImplementation(value); + } + public BooleanDataFrameColumn ElementwiseEquals(ulong value) + { + UInt64DataFrameColumn ulongColumn = CloneAsUInt64Column(); + return ulongColumn.ElementwiseEqualsImplementation(value); + } + public BooleanDataFrameColumn ElementwiseNotEquals(ulong value) + { + UInt64DataFrameColumn ulongColumn = CloneAsUInt64Column(); + return ulongColumn.ElementwiseNotEqualsImplementation(value); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(ulong value) + { + UInt64DataFrameColumn ulongColumn = CloneAsUInt64Column(); + return ulongColumn.ElementwiseGreaterThanOrEqualImplementation(value); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(ulong value) + { + UInt64DataFrameColumn ulongColumn = CloneAsUInt64Column(); + return ulongColumn.ElementwiseLessThanOrEqualImplementation(value); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(ulong value) + { + UInt64DataFrameColumn ulongColumn = CloneAsUInt64Column(); + return ulongColumn.ElementwiseGreaterThanImplementation(value); + } + public BooleanDataFrameColumn ElementwiseLessThan(ulong value) + { + UInt64DataFrameColumn ulongColumn = CloneAsUInt64Column(); + return ulongColumn.ElementwiseLessThanImplementation(value); + } + public BooleanDataFrameColumn ElementwiseEquals(ushort value) + { + return ElementwiseEqualsImplementation(value); + } + public BooleanDataFrameColumn ElementwiseNotEquals(ushort value) + { + return ElementwiseNotEqualsImplementation(value); + } + public BooleanDataFrameColumn ElementwiseGreaterThanOrEqual(ushort value) + { + return ElementwiseGreaterThanOrEqualImplementation(value); + } + public BooleanDataFrameColumn ElementwiseLessThanOrEqual(ushort value) + { + return ElementwiseLessThanOrEqualImplementation(value); + } + public BooleanDataFrameColumn ElementwiseGreaterThan(ushort value) + { + return ElementwiseGreaterThanImplementation(value); + } + public BooleanDataFrameColumn ElementwiseLessThan(ushort value) + { + return ElementwiseLessThanImplementation(value); + } + } + + public partial class ByteDataFrameColumn + { + public new Int32DataFrameColumn LeftShift(int value, bool inPlace = false) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + var result = (PrimitiveDataFrameColumn)(intColumn.LeftShift(value, inPlace)); + return new Int32DataFrameColumn(result.Name, result.ColumnContainer); + } + } + public partial class Int32DataFrameColumn + { + public new Int32DataFrameColumn LeftShift(int value, bool inPlace = false) + { + var result = (PrimitiveDataFrameColumn)base.LeftShift(value, inPlace); + return new Int32DataFrameColumn(result.Name, result.ColumnContainer); + } + } + public partial class Int64DataFrameColumn + { + public new Int64DataFrameColumn LeftShift(int value, bool inPlace = false) + { + var result = (PrimitiveDataFrameColumn)base.LeftShift(value, inPlace); + return new Int64DataFrameColumn(result.Name, result.ColumnContainer); + } + } + public partial class SByteDataFrameColumn + { + public new Int32DataFrameColumn LeftShift(int value, bool inPlace = false) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + var result = (PrimitiveDataFrameColumn)(intColumn.LeftShift(value, inPlace)); + return new Int32DataFrameColumn(result.Name, result.ColumnContainer); + } + } + public partial class Int16DataFrameColumn + { + public new Int32DataFrameColumn LeftShift(int value, bool inPlace = false) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + var result = (PrimitiveDataFrameColumn)(intColumn.LeftShift(value, inPlace)); + return new Int32DataFrameColumn(result.Name, result.ColumnContainer); + } + } + public partial class UInt32DataFrameColumn + { + public new UInt32DataFrameColumn LeftShift(int value, bool inPlace = false) + { + var result = (PrimitiveDataFrameColumn)base.LeftShift(value, inPlace); + return new UInt32DataFrameColumn(result.Name, result.ColumnContainer); + } + } + public partial class UInt64DataFrameColumn + { + public new UInt64DataFrameColumn LeftShift(int value, bool inPlace = false) + { + var result = (PrimitiveDataFrameColumn)base.LeftShift(value, inPlace); + return new UInt64DataFrameColumn(result.Name, result.ColumnContainer); + } + } + public partial class UInt16DataFrameColumn + { + public new Int32DataFrameColumn LeftShift(int value, bool inPlace = false) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + var result = (PrimitiveDataFrameColumn)(intColumn.LeftShift(value, inPlace)); + return new Int32DataFrameColumn(result.Name, result.ColumnContainer); + } + } + public partial class ByteDataFrameColumn + { + public new Int32DataFrameColumn RightShift(int value, bool inPlace = false) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + var result = (PrimitiveDataFrameColumn)(intColumn.RightShift(value, inPlace)); + return new Int32DataFrameColumn(result.Name, result.ColumnContainer); + } + } + public partial class Int32DataFrameColumn + { + public new Int32DataFrameColumn RightShift(int value, bool inPlace = false) + { + var result = (PrimitiveDataFrameColumn)base.RightShift(value, inPlace); + return new Int32DataFrameColumn(result.Name, result.ColumnContainer); + } + } + public partial class Int64DataFrameColumn + { + public new Int64DataFrameColumn RightShift(int value, bool inPlace = false) + { + var result = (PrimitiveDataFrameColumn)base.RightShift(value, inPlace); + return new Int64DataFrameColumn(result.Name, result.ColumnContainer); + } + } + public partial class SByteDataFrameColumn + { + public new Int32DataFrameColumn RightShift(int value, bool inPlace = false) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + var result = (PrimitiveDataFrameColumn)(intColumn.RightShift(value, inPlace)); + return new Int32DataFrameColumn(result.Name, result.ColumnContainer); + } + } + public partial class Int16DataFrameColumn + { + public new Int32DataFrameColumn RightShift(int value, bool inPlace = false) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + var result = (PrimitiveDataFrameColumn)(intColumn.RightShift(value, inPlace)); + return new Int32DataFrameColumn(result.Name, result.ColumnContainer); + } + } + public partial class UInt32DataFrameColumn + { + public new UInt32DataFrameColumn RightShift(int value, bool inPlace = false) + { + var result = (PrimitiveDataFrameColumn)base.RightShift(value, inPlace); + return new UInt32DataFrameColumn(result.Name, result.ColumnContainer); + } + } + public partial class UInt64DataFrameColumn + { + public new UInt64DataFrameColumn RightShift(int value, bool inPlace = false) + { + var result = (PrimitiveDataFrameColumn)base.RightShift(value, inPlace); + return new UInt64DataFrameColumn(result.Name, result.ColumnContainer); + } + } + public partial class UInt16DataFrameColumn + { + public new Int32DataFrameColumn RightShift(int value, bool inPlace = false) + { + Int32DataFrameColumn intColumn = CloneAsInt32Column(); + var result = (PrimitiveDataFrameColumn)(intColumn.RightShift(value, inPlace)); + return new Int32DataFrameColumn(result.Name, result.ColumnContainer); + } + } +} diff --git a/src/Microsoft.Data.Analysis/PrimitiveDataFrameColumn.BinaryOperationAPIs.ExplodedColumns.tt b/src/Microsoft.Data.Analysis/PrimitiveDataFrameColumn.BinaryOperationAPIs.ExplodedColumns.tt new file mode 100644 index 0000000000..e0e9067917 --- /dev/null +++ b/src/Microsoft.Data.Analysis/PrimitiveDataFrameColumn.BinaryOperationAPIs.ExplodedColumns.tt @@ -0,0 +1,606 @@ +<#@ template debug="false" hostspecific="false" language="C#" #> +<#@ assembly name="System.Core" #> +<#@ import namespace="System.Linq" #> +<#@ import namespace="System.Text" #> +<#@ import namespace="System.Collections.Generic" #> +<#@ output extension=".cs" #> +<#@ include file="ColumnArithmeticTemplate.ttinclude"#> +<#@ include file="PrimitiveDataFrameColumn.BinaryOperations.Combinations.ttinclude" #> +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +// Generated from DataFrameColumn.BinaryOperationAPIs.ExplodedColumns.tt. Do not modify directly + +using System; +using System.Collections.Generic; + +namespace Microsoft.Data.Analysis +{ +<# +bool supportedInPlace(string type1, string type2) +{ + string ret = GetBinaryOperationReturnType(type1, type2); + if (ret == type1) + { + return true; + } + return false; +} +#> +<# +void GenerateAllBinaryCombinationsForMethod() +{ + HashSet visited = new HashSet { }; + foreach (TypeCombination outer in BinaryOperationCombinations.binaryOperationCombinations) + { + string outerColumnType = outer.ThisColumnType; + if (visited.Contains(outerColumnType)) + { + continue; + } + visited.Add(outerColumnType); + string fullOuterColumnType = GetCapitalizedPrimitiveTypes(outerColumnType) + "DataFrameColumn"; +#> + public partial class <#=fullOuterColumnType#> + { +<# + foreach (TypeCombination types in BinaryOperationCombinations.binaryOperationCombinations.Where((ACombination) => ACombination.ThisColumnType == outerColumnType)) + { + foreach (MethodConfiguration method in methodConfiguration) + { + if (method.MethodType == MethodType.Binary && method.IsNumeric) + { + string methodName = method.MethodName; + string returnType = types.ReturnColumnType; + string columnType = types.ThisColumnType; + string otherColumnType = types.OtherColumnType; + + string fullColumnType = GetCapitalizedPrimitiveTypes(columnType) + "DataFrameColumn"; + string fullReturnType = GetCapitalizedPrimitiveTypes(returnType) + "DataFrameColumn"; + string fullOtherColumnType = GetCapitalizedPrimitiveTypes(otherColumnType) + "DataFrameColumn"; + + string capitalizedReturnType = GetCapitalizedPrimitiveTypes(returnType); +#> +<# + if (supportedInPlace(columnType, otherColumnType)) + { +#> + public <#=fullReturnType#> <#=methodName#>(<#=fullOtherColumnType#> column, bool inPlace = false) +<# + } + else + { +#> + public <#=fullReturnType#> <#=methodName#>(<#=fullOtherColumnType#> column) +<# + } +#> + { +<# + if (columnType == otherColumnType) + { + // Handle the straightforward cases such as int + int resulting in int + if (fullReturnType == fullColumnType || fullReturnType == fullOtherColumnType) + { +#> + return <#=methodName#>Implementation(column, inPlace); +<# + } + else + { + // Cases such as byte + byte resulting in int. Needs 2 clones +#> + <#=fullReturnType#> <#=returnType#>Column = CloneAs<#=capitalizedReturnType#>Column(); + <#=fullReturnType#> other<#=returnType#>Column = column.CloneAs<#=capitalizedReturnType#>Column(); + return <#=returnType#>Column.<#=methodName#>Implementation(other<#=returnType#>Column, inPlace: true); +<# + } + } + else + { + // Handle the straightforward cases + if (fullReturnType == fullColumnType || fullReturnType == fullOtherColumnType) + { + primitiveTypeToPrimitivityLevelMap.TryGetValue(columnType, out int columnTypeLevel); + primitiveTypeToPrimitivityLevelMap.TryGetValue(otherColumnType, out int otherColumnTypeLevel); + if (otherColumnTypeLevel > columnTypeLevel) + { +#> + <#=fullReturnType#> <#=returnType#>Column = CloneAs<#=capitalizedReturnType#>Column(); + return <#=returnType#>Column.<#=methodName#>Implementation(column, inPlace: true); +<# + } + else + { +#> + <#=fullReturnType#> other<#=returnType#>Column = column.CloneAs<#=capitalizedReturnType#>Column(); + return <#=methodName#>Implementation(other<#=returnType#>Column, inPlace); +<# + } + } + else + { + // Cases such as byte + short resulting in int. Needs 2 clones +#> + <#=fullReturnType#> <#=returnType#>Column = CloneAs<#=capitalizedReturnType#>Column(); + <#=fullReturnType#> other<#=returnType#>Column = column.CloneAs<#=capitalizedReturnType#>Column(); + return <#=returnType#>Column.<#=methodName#>Implementation(other<#=returnType#>Column, inPlace: true); +<# + } + } +#> + } +<# + } + } + } +#> + } +<# +} +} +#> +<# +void GenerateAllBinaryScalarCombinationsForMethod() +{ + HashSet visited = new HashSet { }; + foreach (TypeCombination outer in BinaryOperationCombinations.binaryOperationCombinations) + { + string outerColumnType = outer.ThisColumnType; + if (visited.Contains(outerColumnType)) + { + continue; + } + visited.Add(outerColumnType); + string fullOuterColumnType = GetCapitalizedPrimitiveTypes(outerColumnType) + "DataFrameColumn"; +#> + public partial class <#=fullOuterColumnType#> + { +<# + foreach (TypeCombination types in BinaryOperationCombinations.binaryOperationCombinations.Where((ACombination) => ACombination.ThisColumnType == outerColumnType)) + { + foreach (MethodConfiguration method in methodConfiguration) + { + if (method.MethodType == MethodType.BinaryScalar && method.IsNumeric) + { + string methodName = method.MethodName; + string returnType = types.ReturnColumnType; + string columnType = types.ThisColumnType; + string valueType = types.OtherColumnType; + + string fullColumnType = GetCapitalizedPrimitiveTypes(columnType) + "DataFrameColumn"; + string fullReturnType = GetCapitalizedPrimitiveTypes(returnType) + "DataFrameColumn"; + + string capitalizedReturnType = GetCapitalizedPrimitiveTypes(returnType); + +#> +<# + if (supportedInPlace(columnType, valueType)) + { +#> + public <#=fullReturnType#> <#=methodName#>(<#=valueType#> value, bool inPlace = false) +<# + } + else + { +#> + public <#=fullReturnType#> <#=methodName#>(<#=valueType#> value) +<# + } +#> + { +<# + if (columnType == valueType) + { + // Handle the straightforward cases such as int + int resulting in int + if (fullReturnType == fullColumnType) + { +#> + return <#=methodName#>Implementation(value, inPlace); +<# + } + else + { + // Cases such as byte + byte resulting in int. Needs 2 clones +#> + <#=fullReturnType#> <#=returnType#>Column = CloneAs<#=capitalizedReturnType#>Column(); + return <#=returnType#>Column.<#=methodName#>Implementation(value, inPlace: true); +<# + } + } + else + { + // Handle the straightforward cases + if (fullReturnType == fullColumnType) + { + primitiveTypeToPrimitivityLevelMap.TryGetValue(columnType, out int columnTypeLevel); + primitiveTypeToPrimitivityLevelMap.TryGetValue(valueType, out int valueTypeLevel); + if (valueTypeLevel > columnTypeLevel) + { +#> + <#=fullReturnType#> <#=returnType#>Column = CloneAs<#=capitalizedReturnType#>Column(); + return <#=returnType#>Column.<#=methodName#>Implementation(value, inPlace: true); +<# + } + else + { +#> + <#=returnType#> convertedValue = (<#=returnType#>)value; + return <#=methodName#>Implementation(convertedValue, inPlace); +<# + } + } + else + { + // Cases such as byte + short resulting in int. Needs 2 clones +#> + <#=fullReturnType#> <#=returnType#>Column = CloneAs<#=capitalizedReturnType#>Column(); + return <#=returnType#>Column.<#=methodName#>Implementation(value, inPlace: true); +<# + } + } +#> + } +<# + } + if (method.MethodType == MethodType.BinaryScalar && method.IsNumeric) + { + string methodName = "Reverse" + method.MethodName; + string returnType = types.ReturnColumnType; + string columnType = types.ThisColumnType; + string valueType = types.OtherColumnType; + + string fullColumnType = GetCapitalizedPrimitiveTypes(columnType) + "DataFrameColumn"; + string fullReturnType = GetCapitalizedPrimitiveTypes(returnType) + "DataFrameColumn"; + + string capitalizedReturnType = GetCapitalizedPrimitiveTypes(returnType); + +#> +<# + if (supportedInPlace(columnType, valueType)) + { +#> + public <#=fullReturnType#> <#=methodName#>(<#=valueType#> value, bool inPlace = false) +<# + } + else + { +#> + public <#=fullReturnType#> <#=methodName#>(<#=valueType#> value) +<# + } +#> + { +<# + if (columnType == valueType) + { + // Handle the straightforward cases such as int + int resulting in int + if (fullReturnType == fullColumnType) + { +#> + return <#=methodName#>Implementation(value, inPlace); +<# + } + else + { + // Cases such as byte + byte resulting in int. Needs 2 clones +#> + <#=fullReturnType#> <#=returnType#>Column = CloneAs<#=capitalizedReturnType#>Column(); + return <#=returnType#>Column.<#=methodName#>Implementation(value, inPlace: true); +<# + } + } + else + { + // Handle the straightforward cases + if (fullReturnType == fullColumnType) + { + primitiveTypeToPrimitivityLevelMap.TryGetValue(columnType, out int columnTypeLevel); + primitiveTypeToPrimitivityLevelMap.TryGetValue(valueType, out int valueTypeLevel); + if (valueTypeLevel > columnTypeLevel) + { +#> + <#=fullReturnType#> <#=returnType#>Column = CloneAs<#=capitalizedReturnType#>Column(); + return <#=returnType#>Column.<#=methodName#>Implementation(value, inPlace: true); +<# + } + else + { +#> + <#=returnType#> convertedValue = (<#=returnType#>)value; + return <#=methodName#>Implementation(convertedValue, inPlace); +<# + } + } + else + { + // Cases such as byte + short resulting in int. Needs 2 clones +#> + <#=fullReturnType#> <#=returnType#>Column = CloneAs<#=capitalizedReturnType#>Column(); + return <#=returnType#>Column.<#=methodName#>Implementation(value, inPlace: true); +<# + } + } +#> + } +<# + } + } + } +#> + } +<# +} +} +#> +<# +void GenerateAllBinaryBitwiseOperationsForMethod(string methodName) +{ +#> + public partial class BooleanDataFrameColumn + { + public BooleanDataFrameColumn <#=methodName#>(BooleanDataFrameColumn column, bool inPlace = false) + { + if (column.Length != Length) + { + throw new ArgumentException(Strings.MismatchedColumnLengths, nameof(column)); + } + BooleanDataFrameColumn retColumn = inPlace ? this : CloneAsBooleanColumn(); + retColumn.ColumnContainer.<#=methodName#>(column.ColumnContainer); + return retColumn; + } + } +<# +} +#> +<# +void GenerateAllBinaryScalarBitwiseOperationsForMethod(string methodName) +{ +#> + public partial class BooleanDataFrameColumn + { + public new BooleanDataFrameColumn <#=methodName#>(bool value, bool inPlace = false) + { + BooleanDataFrameColumn retColumn = inPlace ? this : CloneAsBooleanColumn(); + retColumn.ColumnContainer.<#=methodName#>(value); + return retColumn; + } + } +<# +} +#> +<# + GenerateAllBinaryCombinationsForMethod(); + GenerateAllBinaryScalarCombinationsForMethod(); +foreach (MethodConfiguration method in methodConfiguration) +{ + if (method.MethodType == MethodType.Binary && method.IsBitwise) + { + GenerateAllBinaryBitwiseOperationsForMethod(method.MethodName); + } + else if (method.MethodType == MethodType.BinaryScalar && method.IsBitwise) + { + GenerateAllBinaryScalarBitwiseOperationsForMethod(method.MethodName); + } +} +#> +<# +void GenerateAllComparisonCombinationsForMethod() +{ + HashSet visited = new HashSet { }; + foreach (TypeCombination outer in ComparisonOperationCombinations.comparisonOperationCombinations) + { + string outerColumnType = outer.ThisColumnType; + if (visited.Contains(outerColumnType)) + { + continue; + } + visited.Add(outerColumnType); + string fullOuterColumnType = GetCapitalizedPrimitiveTypes(outerColumnType) + "DataFrameColumn"; +#> + public partial class <#=fullOuterColumnType#> + { +<# + foreach (TypeCombination types in ComparisonOperationCombinations.comparisonOperationCombinations.Where((ACombination) => ACombination.ThisColumnType == outerColumnType)) + { +foreach (MethodConfiguration method in methodConfiguration) +{ + if (method.MethodType == MethodType.ComparisonScalar) + { + string methodName = method.MethodName; + string returnType = types.ReturnColumnType; + string columnType = types.ThisColumnType; + string otherColumnType = types.OtherColumnType; + + string fullColumnType = GetCapitalizedPrimitiveTypes(columnType) + "DataFrameColumn"; + string fullReturnType = GetCapitalizedPrimitiveTypes(returnType) + "DataFrameColumn"; + string fullOtherColumnType = GetCapitalizedPrimitiveTypes(otherColumnType) + "DataFrameColumn"; + + string capitalizedReturnType = GetCapitalizedPrimitiveTypes(returnType); + string capitalizedOtherColumnType = GetCapitalizedPrimitiveTypes(otherColumnType); + string capitalizedColumnType = GetCapitalizedPrimitiveTypes(columnType); + +#> + public <#=fullReturnType#> <#=methodName#>(<#=fullOtherColumnType#> column) + { +<# + if (columnType == otherColumnType) + { +#> + return <#=methodName#>Implementation(column); +<# + } + else + { + primitiveTypeToPrimitivityLevelMap.TryGetValue(columnType, out int columnTypeLevel); + primitiveTypeToPrimitivityLevelMap.TryGetValue(otherColumnType, out int otherColumnTypeLevel); + if (otherColumnTypeLevel > columnTypeLevel) + { +#> + <#=fullOtherColumnType#> <#=otherColumnType#>Column = CloneAs<#=capitalizedOtherColumnType#>Column(); + return <#=otherColumnType#>Column.<#=methodName#>Implementation(column); +<# + } + else + { +#> + <#=fullColumnType#> other<#=columnType#>Column = column.CloneAs<#=capitalizedColumnType#>Column(); + return <#=methodName#>Implementation(other<#=columnType#>Column); +<# + } +#> +<# + } +#> + } +<# + } + } + } +#> + } +<# + } + } +#> + +<# +void GenerateAllComparisonScalarCombinationsForMethod() +{ + HashSet visited = new HashSet { }; + foreach (TypeCombination outer in ComparisonOperationCombinations.comparisonOperationCombinations) + { + string outerColumnType = outer.ThisColumnType; + if (visited.Contains(outerColumnType)) + { + continue; + } + visited.Add(outerColumnType); + string fullOuterColumnType = GetCapitalizedPrimitiveTypes(outerColumnType) + "DataFrameColumn"; +#> + public partial class <#=fullOuterColumnType#> + { +<# + foreach (TypeCombination types in ComparisonOperationCombinations.comparisonOperationCombinations.Where((ACombination) => ACombination.ThisColumnType == outerColumnType)) +{ +foreach (MethodConfiguration method in methodConfiguration) +{ + if (method.MethodType == MethodType.Comparison) + { + string methodName = method.MethodName; + string returnType = types.ReturnColumnType; + string columnType = types.ThisColumnType; + string otherColumnType = types.OtherColumnType; + + string fullColumnType = GetCapitalizedPrimitiveTypes(columnType) + "DataFrameColumn"; + string fullReturnType = GetCapitalizedPrimitiveTypes(returnType) + "DataFrameColumn"; + string fullOtherColumnType = GetCapitalizedPrimitiveTypes(otherColumnType) + "DataFrameColumn"; + + string capitalizedReturnType = GetCapitalizedPrimitiveTypes(returnType); + string capitalizedOtherColumnType = GetCapitalizedPrimitiveTypes(otherColumnType); + string capitalizedColumnType = GetCapitalizedPrimitiveTypes(columnType); +#> + public <#=fullReturnType#> <#=methodName#>(<#=otherColumnType#> value) + { +<# + if (columnType == otherColumnType) + { +#> + return <#=methodName#>Implementation(value); +<# + } + else + { + primitiveTypeToPrimitivityLevelMap.TryGetValue(columnType, out int columnTypeLevel); + primitiveTypeToPrimitivityLevelMap.TryGetValue(otherColumnType, out int otherColumnTypeLevel); + if (otherColumnTypeLevel > columnTypeLevel) + { +#> + <#=fullOtherColumnType#> <#=otherColumnType#>Column = CloneAs<#=capitalizedOtherColumnType#>Column(); + return <#=otherColumnType#>Column.<#=methodName#>Implementation(value); +<# + } + else + { +#> + <#=columnType#> other<#=columnType#>Value = (<#=columnType#>)value; + return <#=methodName#>Implementation(other<#=columnType#>Value); +<# + } +#> +<# + } +#> + } +<# + } + } + } +#> + } +<# +} +} +#> +<# + GenerateAllComparisonCombinationsForMethod(); + GenerateAllComparisonScalarCombinationsForMethod(); +#> + +<# +void GenerateAllBinaryShiftCombinationsForMethod(string methodName) +{ + foreach (var type in typeConfiguration) + { + if (!type.SupportsNumeric || !type.SupportsBitwise || type.TypeName == "char") + { + continue; + } + + string returnType = GetBinaryShiftOperationReturnType(type); + if (returnType == string.Empty) + { + continue; + } + string fullReturnType = GetCapitalizedPrimitiveTypes(returnType) + "DataFrameColumn"; + string fullColumnType = GetCapitalizedPrimitiveTypes(type.TypeName) + "DataFrameColumn"; + string capitalizedReturnType = GetCapitalizedPrimitiveTypes(returnType); +#> + public partial class <#=fullColumnType#> + { + public new <#=fullReturnType#> <#=methodName#>(int value, bool inPlace = false) + { +<# + if (fullColumnType == fullReturnType) + { +#> + var result = (PrimitiveDataFrameColumn<<#=returnType#>>)base.<#=methodName#>(value, inPlace); + return new <#=fullReturnType#>(result.Name, result.ColumnContainer); +<# + } + else + { +#> + <#=fullReturnType#> <#=returnType#>Column = CloneAs<#=capitalizedReturnType#>Column(); + var result = (PrimitiveDataFrameColumn<<#=returnType#>>)(<#=returnType#>Column.<#=methodName#>(value, inPlace)); + return new <#=fullReturnType#>(result.Name, result.ColumnContainer); +<# + } +#> + } + } +<# + } +} +#> +<# +foreach (MethodConfiguration method in methodConfiguration) +{ + if (method.MethodType == MethodType.BinaryInt) + { + GenerateAllBinaryShiftCombinationsForMethod(method.MethodName); + } +} +#> +} diff --git a/src/Microsoft.Data.Analysis/PrimitiveDataFrameColumn.BinaryOperationImplementations.Exploded.cs b/src/Microsoft.Data.Analysis/PrimitiveDataFrameColumn.BinaryOperationImplementations.Exploded.cs new file mode 100644 index 0000000000..9dd963a338 --- /dev/null +++ b/src/Microsoft.Data.Analysis/PrimitiveDataFrameColumn.BinaryOperationImplementations.Exploded.cs @@ -0,0 +1,2395 @@ + + +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +// Generated from DataFrameColumn.BinaryOperationImplementations.ExplodedColumns.tt. Do not modify directly + +using System; +using System.Collections.Generic; + +namespace Microsoft.Data.Analysis +{ + public partial class DecimalDataFrameColumn + { + internal DecimalDataFrameColumn AddImplementation(DecimalDataFrameColumn column, bool inPlace = false) + { + if (column.Length != Length) + { + throw new ArgumentException(Strings.MismatchedColumnLengths, nameof(column)); + } + DecimalDataFrameColumn newColumn = inPlace ? this : CloneAsDecimalColumn(); + newColumn.ColumnContainer.Add(column.ColumnContainer); + return newColumn; + } + } + public partial class DoubleDataFrameColumn + { + internal DoubleDataFrameColumn AddImplementation(DoubleDataFrameColumn column, bool inPlace = false) + { + if (column.Length != Length) + { + throw new ArgumentException(Strings.MismatchedColumnLengths, nameof(column)); + } + DoubleDataFrameColumn newColumn = inPlace ? this : CloneAsDoubleColumn(); + newColumn.ColumnContainer.Add(column.ColumnContainer); + return newColumn; + } + } + public partial class SingleDataFrameColumn + { + internal SingleDataFrameColumn AddImplementation(SingleDataFrameColumn column, bool inPlace = false) + { + if (column.Length != Length) + { + throw new ArgumentException(Strings.MismatchedColumnLengths, nameof(column)); + } + SingleDataFrameColumn newColumn = inPlace ? this : CloneAsSingleColumn(); + newColumn.ColumnContainer.Add(column.ColumnContainer); + return newColumn; + } + } + public partial class Int32DataFrameColumn + { + internal Int32DataFrameColumn AddImplementation(Int32DataFrameColumn column, bool inPlace = false) + { + if (column.Length != Length) + { + throw new ArgumentException(Strings.MismatchedColumnLengths, nameof(column)); + } + Int32DataFrameColumn newColumn = inPlace ? this : CloneAsInt32Column(); + newColumn.ColumnContainer.Add(column.ColumnContainer); + return newColumn; + } + } + public partial class Int64DataFrameColumn + { + internal Int64DataFrameColumn AddImplementation(Int64DataFrameColumn column, bool inPlace = false) + { + if (column.Length != Length) + { + throw new ArgumentException(Strings.MismatchedColumnLengths, nameof(column)); + } + Int64DataFrameColumn newColumn = inPlace ? this : CloneAsInt64Column(); + newColumn.ColumnContainer.Add(column.ColumnContainer); + return newColumn; + } + } + public partial class UInt32DataFrameColumn + { + internal UInt32DataFrameColumn AddImplementation(UInt32DataFrameColumn column, bool inPlace = false) + { + if (column.Length != Length) + { + throw new ArgumentException(Strings.MismatchedColumnLengths, nameof(column)); + } + UInt32DataFrameColumn newColumn = inPlace ? this : CloneAsUInt32Column(); + newColumn.ColumnContainer.Add(column.ColumnContainer); + return newColumn; + } + } + public partial class UInt64DataFrameColumn + { + internal UInt64DataFrameColumn AddImplementation(UInt64DataFrameColumn column, bool inPlace = false) + { + if (column.Length != Length) + { + throw new ArgumentException(Strings.MismatchedColumnLengths, nameof(column)); + } + UInt64DataFrameColumn newColumn = inPlace ? this : CloneAsUInt64Column(); + newColumn.ColumnContainer.Add(column.ColumnContainer); + return newColumn; + } + } + public partial class DecimalDataFrameColumn + { + internal DecimalDataFrameColumn AddImplementation(decimal value, bool inPlace = false) + { + DecimalDataFrameColumn newColumn = inPlace ? this : CloneAsDecimalColumn(); + newColumn.ColumnContainer.Add(value); + return newColumn; + } + } + public partial class DoubleDataFrameColumn + { + internal DoubleDataFrameColumn AddImplementation(double value, bool inPlace = false) + { + DoubleDataFrameColumn newColumn = inPlace ? this : CloneAsDoubleColumn(); + newColumn.ColumnContainer.Add(value); + return newColumn; + } + } + public partial class SingleDataFrameColumn + { + internal SingleDataFrameColumn AddImplementation(float value, bool inPlace = false) + { + SingleDataFrameColumn newColumn = inPlace ? this : CloneAsSingleColumn(); + newColumn.ColumnContainer.Add(value); + return newColumn; + } + } + public partial class Int32DataFrameColumn + { + internal Int32DataFrameColumn AddImplementation(int value, bool inPlace = false) + { + Int32DataFrameColumn newColumn = inPlace ? this : CloneAsInt32Column(); + newColumn.ColumnContainer.Add(value); + return newColumn; + } + } + public partial class Int64DataFrameColumn + { + internal Int64DataFrameColumn AddImplementation(long value, bool inPlace = false) + { + Int64DataFrameColumn newColumn = inPlace ? this : CloneAsInt64Column(); + newColumn.ColumnContainer.Add(value); + return newColumn; + } + } + public partial class UInt32DataFrameColumn + { + internal UInt32DataFrameColumn AddImplementation(uint value, bool inPlace = false) + { + UInt32DataFrameColumn newColumn = inPlace ? this : CloneAsUInt32Column(); + newColumn.ColumnContainer.Add(value); + return newColumn; + } + } + public partial class UInt64DataFrameColumn + { + internal UInt64DataFrameColumn AddImplementation(ulong value, bool inPlace = false) + { + UInt64DataFrameColumn newColumn = inPlace ? this : CloneAsUInt64Column(); + newColumn.ColumnContainer.Add(value); + return newColumn; + } + } + public partial class DecimalDataFrameColumn + { + internal DecimalDataFrameColumn ReverseAddImplementation(decimal value, bool inPlace = false) + { + DecimalDataFrameColumn newColumn = inPlace ? this : CloneAsDecimalColumn(); + newColumn.ColumnContainer.ReverseAdd(value); + return newColumn; + } + } + public partial class DoubleDataFrameColumn + { + internal DoubleDataFrameColumn ReverseAddImplementation(double value, bool inPlace = false) + { + DoubleDataFrameColumn newColumn = inPlace ? this : CloneAsDoubleColumn(); + newColumn.ColumnContainer.ReverseAdd(value); + return newColumn; + } + } + public partial class SingleDataFrameColumn + { + internal SingleDataFrameColumn ReverseAddImplementation(float value, bool inPlace = false) + { + SingleDataFrameColumn newColumn = inPlace ? this : CloneAsSingleColumn(); + newColumn.ColumnContainer.ReverseAdd(value); + return newColumn; + } + } + public partial class Int32DataFrameColumn + { + internal Int32DataFrameColumn ReverseAddImplementation(int value, bool inPlace = false) + { + Int32DataFrameColumn newColumn = inPlace ? this : CloneAsInt32Column(); + newColumn.ColumnContainer.ReverseAdd(value); + return newColumn; + } + } + public partial class Int64DataFrameColumn + { + internal Int64DataFrameColumn ReverseAddImplementation(long value, bool inPlace = false) + { + Int64DataFrameColumn newColumn = inPlace ? this : CloneAsInt64Column(); + newColumn.ColumnContainer.ReverseAdd(value); + return newColumn; + } + } + public partial class UInt32DataFrameColumn + { + internal UInt32DataFrameColumn ReverseAddImplementation(uint value, bool inPlace = false) + { + UInt32DataFrameColumn newColumn = inPlace ? this : CloneAsUInt32Column(); + newColumn.ColumnContainer.ReverseAdd(value); + return newColumn; + } + } + public partial class UInt64DataFrameColumn + { + internal UInt64DataFrameColumn ReverseAddImplementation(ulong value, bool inPlace = false) + { + UInt64DataFrameColumn newColumn = inPlace ? this : CloneAsUInt64Column(); + newColumn.ColumnContainer.ReverseAdd(value); + return newColumn; + } + } + public partial class DecimalDataFrameColumn + { + internal DecimalDataFrameColumn SubtractImplementation(DecimalDataFrameColumn column, bool inPlace = false) + { + if (column.Length != Length) + { + throw new ArgumentException(Strings.MismatchedColumnLengths, nameof(column)); + } + DecimalDataFrameColumn newColumn = inPlace ? this : CloneAsDecimalColumn(); + newColumn.ColumnContainer.Subtract(column.ColumnContainer); + return newColumn; + } + } + public partial class DoubleDataFrameColumn + { + internal DoubleDataFrameColumn SubtractImplementation(DoubleDataFrameColumn column, bool inPlace = false) + { + if (column.Length != Length) + { + throw new ArgumentException(Strings.MismatchedColumnLengths, nameof(column)); + } + DoubleDataFrameColumn newColumn = inPlace ? this : CloneAsDoubleColumn(); + newColumn.ColumnContainer.Subtract(column.ColumnContainer); + return newColumn; + } + } + public partial class SingleDataFrameColumn + { + internal SingleDataFrameColumn SubtractImplementation(SingleDataFrameColumn column, bool inPlace = false) + { + if (column.Length != Length) + { + throw new ArgumentException(Strings.MismatchedColumnLengths, nameof(column)); + } + SingleDataFrameColumn newColumn = inPlace ? this : CloneAsSingleColumn(); + newColumn.ColumnContainer.Subtract(column.ColumnContainer); + return newColumn; + } + } + public partial class Int32DataFrameColumn + { + internal Int32DataFrameColumn SubtractImplementation(Int32DataFrameColumn column, bool inPlace = false) + { + if (column.Length != Length) + { + throw new ArgumentException(Strings.MismatchedColumnLengths, nameof(column)); + } + Int32DataFrameColumn newColumn = inPlace ? this : CloneAsInt32Column(); + newColumn.ColumnContainer.Subtract(column.ColumnContainer); + return newColumn; + } + } + public partial class Int64DataFrameColumn + { + internal Int64DataFrameColumn SubtractImplementation(Int64DataFrameColumn column, bool inPlace = false) + { + if (column.Length != Length) + { + throw new ArgumentException(Strings.MismatchedColumnLengths, nameof(column)); + } + Int64DataFrameColumn newColumn = inPlace ? this : CloneAsInt64Column(); + newColumn.ColumnContainer.Subtract(column.ColumnContainer); + return newColumn; + } + } + public partial class UInt32DataFrameColumn + { + internal UInt32DataFrameColumn SubtractImplementation(UInt32DataFrameColumn column, bool inPlace = false) + { + if (column.Length != Length) + { + throw new ArgumentException(Strings.MismatchedColumnLengths, nameof(column)); + } + UInt32DataFrameColumn newColumn = inPlace ? this : CloneAsUInt32Column(); + newColumn.ColumnContainer.Subtract(column.ColumnContainer); + return newColumn; + } + } + public partial class UInt64DataFrameColumn + { + internal UInt64DataFrameColumn SubtractImplementation(UInt64DataFrameColumn column, bool inPlace = false) + { + if (column.Length != Length) + { + throw new ArgumentException(Strings.MismatchedColumnLengths, nameof(column)); + } + UInt64DataFrameColumn newColumn = inPlace ? this : CloneAsUInt64Column(); + newColumn.ColumnContainer.Subtract(column.ColumnContainer); + return newColumn; + } + } + public partial class DecimalDataFrameColumn + { + internal DecimalDataFrameColumn SubtractImplementation(decimal value, bool inPlace = false) + { + DecimalDataFrameColumn newColumn = inPlace ? this : CloneAsDecimalColumn(); + newColumn.ColumnContainer.Subtract(value); + return newColumn; + } + } + public partial class DoubleDataFrameColumn + { + internal DoubleDataFrameColumn SubtractImplementation(double value, bool inPlace = false) + { + DoubleDataFrameColumn newColumn = inPlace ? this : CloneAsDoubleColumn(); + newColumn.ColumnContainer.Subtract(value); + return newColumn; + } + } + public partial class SingleDataFrameColumn + { + internal SingleDataFrameColumn SubtractImplementation(float value, bool inPlace = false) + { + SingleDataFrameColumn newColumn = inPlace ? this : CloneAsSingleColumn(); + newColumn.ColumnContainer.Subtract(value); + return newColumn; + } + } + public partial class Int32DataFrameColumn + { + internal Int32DataFrameColumn SubtractImplementation(int value, bool inPlace = false) + { + Int32DataFrameColumn newColumn = inPlace ? this : CloneAsInt32Column(); + newColumn.ColumnContainer.Subtract(value); + return newColumn; + } + } + public partial class Int64DataFrameColumn + { + internal Int64DataFrameColumn SubtractImplementation(long value, bool inPlace = false) + { + Int64DataFrameColumn newColumn = inPlace ? this : CloneAsInt64Column(); + newColumn.ColumnContainer.Subtract(value); + return newColumn; + } + } + public partial class UInt32DataFrameColumn + { + internal UInt32DataFrameColumn SubtractImplementation(uint value, bool inPlace = false) + { + UInt32DataFrameColumn newColumn = inPlace ? this : CloneAsUInt32Column(); + newColumn.ColumnContainer.Subtract(value); + return newColumn; + } + } + public partial class UInt64DataFrameColumn + { + internal UInt64DataFrameColumn SubtractImplementation(ulong value, bool inPlace = false) + { + UInt64DataFrameColumn newColumn = inPlace ? this : CloneAsUInt64Column(); + newColumn.ColumnContainer.Subtract(value); + return newColumn; + } + } + public partial class DecimalDataFrameColumn + { + internal DecimalDataFrameColumn ReverseSubtractImplementation(decimal value, bool inPlace = false) + { + DecimalDataFrameColumn newColumn = inPlace ? this : CloneAsDecimalColumn(); + newColumn.ColumnContainer.ReverseSubtract(value); + return newColumn; + } + } + public partial class DoubleDataFrameColumn + { + internal DoubleDataFrameColumn ReverseSubtractImplementation(double value, bool inPlace = false) + { + DoubleDataFrameColumn newColumn = inPlace ? this : CloneAsDoubleColumn(); + newColumn.ColumnContainer.ReverseSubtract(value); + return newColumn; + } + } + public partial class SingleDataFrameColumn + { + internal SingleDataFrameColumn ReverseSubtractImplementation(float value, bool inPlace = false) + { + SingleDataFrameColumn newColumn = inPlace ? this : CloneAsSingleColumn(); + newColumn.ColumnContainer.ReverseSubtract(value); + return newColumn; + } + } + public partial class Int32DataFrameColumn + { + internal Int32DataFrameColumn ReverseSubtractImplementation(int value, bool inPlace = false) + { + Int32DataFrameColumn newColumn = inPlace ? this : CloneAsInt32Column(); + newColumn.ColumnContainer.ReverseSubtract(value); + return newColumn; + } + } + public partial class Int64DataFrameColumn + { + internal Int64DataFrameColumn ReverseSubtractImplementation(long value, bool inPlace = false) + { + Int64DataFrameColumn newColumn = inPlace ? this : CloneAsInt64Column(); + newColumn.ColumnContainer.ReverseSubtract(value); + return newColumn; + } + } + public partial class UInt32DataFrameColumn + { + internal UInt32DataFrameColumn ReverseSubtractImplementation(uint value, bool inPlace = false) + { + UInt32DataFrameColumn newColumn = inPlace ? this : CloneAsUInt32Column(); + newColumn.ColumnContainer.ReverseSubtract(value); + return newColumn; + } + } + public partial class UInt64DataFrameColumn + { + internal UInt64DataFrameColumn ReverseSubtractImplementation(ulong value, bool inPlace = false) + { + UInt64DataFrameColumn newColumn = inPlace ? this : CloneAsUInt64Column(); + newColumn.ColumnContainer.ReverseSubtract(value); + return newColumn; + } + } + public partial class DecimalDataFrameColumn + { + internal DecimalDataFrameColumn MultiplyImplementation(DecimalDataFrameColumn column, bool inPlace = false) + { + if (column.Length != Length) + { + throw new ArgumentException(Strings.MismatchedColumnLengths, nameof(column)); + } + DecimalDataFrameColumn newColumn = inPlace ? this : CloneAsDecimalColumn(); + newColumn.ColumnContainer.Multiply(column.ColumnContainer); + return newColumn; + } + } + public partial class DoubleDataFrameColumn + { + internal DoubleDataFrameColumn MultiplyImplementation(DoubleDataFrameColumn column, bool inPlace = false) + { + if (column.Length != Length) + { + throw new ArgumentException(Strings.MismatchedColumnLengths, nameof(column)); + } + DoubleDataFrameColumn newColumn = inPlace ? this : CloneAsDoubleColumn(); + newColumn.ColumnContainer.Multiply(column.ColumnContainer); + return newColumn; + } + } + public partial class SingleDataFrameColumn + { + internal SingleDataFrameColumn MultiplyImplementation(SingleDataFrameColumn column, bool inPlace = false) + { + if (column.Length != Length) + { + throw new ArgumentException(Strings.MismatchedColumnLengths, nameof(column)); + } + SingleDataFrameColumn newColumn = inPlace ? this : CloneAsSingleColumn(); + newColumn.ColumnContainer.Multiply(column.ColumnContainer); + return newColumn; + } + } + public partial class Int32DataFrameColumn + { + internal Int32DataFrameColumn MultiplyImplementation(Int32DataFrameColumn column, bool inPlace = false) + { + if (column.Length != Length) + { + throw new ArgumentException(Strings.MismatchedColumnLengths, nameof(column)); + } + Int32DataFrameColumn newColumn = inPlace ? this : CloneAsInt32Column(); + newColumn.ColumnContainer.Multiply(column.ColumnContainer); + return newColumn; + } + } + public partial class Int64DataFrameColumn + { + internal Int64DataFrameColumn MultiplyImplementation(Int64DataFrameColumn column, bool inPlace = false) + { + if (column.Length != Length) + { + throw new ArgumentException(Strings.MismatchedColumnLengths, nameof(column)); + } + Int64DataFrameColumn newColumn = inPlace ? this : CloneAsInt64Column(); + newColumn.ColumnContainer.Multiply(column.ColumnContainer); + return newColumn; + } + } + public partial class UInt32DataFrameColumn + { + internal UInt32DataFrameColumn MultiplyImplementation(UInt32DataFrameColumn column, bool inPlace = false) + { + if (column.Length != Length) + { + throw new ArgumentException(Strings.MismatchedColumnLengths, nameof(column)); + } + UInt32DataFrameColumn newColumn = inPlace ? this : CloneAsUInt32Column(); + newColumn.ColumnContainer.Multiply(column.ColumnContainer); + return newColumn; + } + } + public partial class UInt64DataFrameColumn + { + internal UInt64DataFrameColumn MultiplyImplementation(UInt64DataFrameColumn column, bool inPlace = false) + { + if (column.Length != Length) + { + throw new ArgumentException(Strings.MismatchedColumnLengths, nameof(column)); + } + UInt64DataFrameColumn newColumn = inPlace ? this : CloneAsUInt64Column(); + newColumn.ColumnContainer.Multiply(column.ColumnContainer); + return newColumn; + } + } + public partial class DecimalDataFrameColumn + { + internal DecimalDataFrameColumn MultiplyImplementation(decimal value, bool inPlace = false) + { + DecimalDataFrameColumn newColumn = inPlace ? this : CloneAsDecimalColumn(); + newColumn.ColumnContainer.Multiply(value); + return newColumn; + } + } + public partial class DoubleDataFrameColumn + { + internal DoubleDataFrameColumn MultiplyImplementation(double value, bool inPlace = false) + { + DoubleDataFrameColumn newColumn = inPlace ? this : CloneAsDoubleColumn(); + newColumn.ColumnContainer.Multiply(value); + return newColumn; + } + } + public partial class SingleDataFrameColumn + { + internal SingleDataFrameColumn MultiplyImplementation(float value, bool inPlace = false) + { + SingleDataFrameColumn newColumn = inPlace ? this : CloneAsSingleColumn(); + newColumn.ColumnContainer.Multiply(value); + return newColumn; + } + } + public partial class Int32DataFrameColumn + { + internal Int32DataFrameColumn MultiplyImplementation(int value, bool inPlace = false) + { + Int32DataFrameColumn newColumn = inPlace ? this : CloneAsInt32Column(); + newColumn.ColumnContainer.Multiply(value); + return newColumn; + } + } + public partial class Int64DataFrameColumn + { + internal Int64DataFrameColumn MultiplyImplementation(long value, bool inPlace = false) + { + Int64DataFrameColumn newColumn = inPlace ? this : CloneAsInt64Column(); + newColumn.ColumnContainer.Multiply(value); + return newColumn; + } + } + public partial class UInt32DataFrameColumn + { + internal UInt32DataFrameColumn MultiplyImplementation(uint value, bool inPlace = false) + { + UInt32DataFrameColumn newColumn = inPlace ? this : CloneAsUInt32Column(); + newColumn.ColumnContainer.Multiply(value); + return newColumn; + } + } + public partial class UInt64DataFrameColumn + { + internal UInt64DataFrameColumn MultiplyImplementation(ulong value, bool inPlace = false) + { + UInt64DataFrameColumn newColumn = inPlace ? this : CloneAsUInt64Column(); + newColumn.ColumnContainer.Multiply(value); + return newColumn; + } + } + public partial class DecimalDataFrameColumn + { + internal DecimalDataFrameColumn ReverseMultiplyImplementation(decimal value, bool inPlace = false) + { + DecimalDataFrameColumn newColumn = inPlace ? this : CloneAsDecimalColumn(); + newColumn.ColumnContainer.ReverseMultiply(value); + return newColumn; + } + } + public partial class DoubleDataFrameColumn + { + internal DoubleDataFrameColumn ReverseMultiplyImplementation(double value, bool inPlace = false) + { + DoubleDataFrameColumn newColumn = inPlace ? this : CloneAsDoubleColumn(); + newColumn.ColumnContainer.ReverseMultiply(value); + return newColumn; + } + } + public partial class SingleDataFrameColumn + { + internal SingleDataFrameColumn ReverseMultiplyImplementation(float value, bool inPlace = false) + { + SingleDataFrameColumn newColumn = inPlace ? this : CloneAsSingleColumn(); + newColumn.ColumnContainer.ReverseMultiply(value); + return newColumn; + } + } + public partial class Int32DataFrameColumn + { + internal Int32DataFrameColumn ReverseMultiplyImplementation(int value, bool inPlace = false) + { + Int32DataFrameColumn newColumn = inPlace ? this : CloneAsInt32Column(); + newColumn.ColumnContainer.ReverseMultiply(value); + return newColumn; + } + } + public partial class Int64DataFrameColumn + { + internal Int64DataFrameColumn ReverseMultiplyImplementation(long value, bool inPlace = false) + { + Int64DataFrameColumn newColumn = inPlace ? this : CloneAsInt64Column(); + newColumn.ColumnContainer.ReverseMultiply(value); + return newColumn; + } + } + public partial class UInt32DataFrameColumn + { + internal UInt32DataFrameColumn ReverseMultiplyImplementation(uint value, bool inPlace = false) + { + UInt32DataFrameColumn newColumn = inPlace ? this : CloneAsUInt32Column(); + newColumn.ColumnContainer.ReverseMultiply(value); + return newColumn; + } + } + public partial class UInt64DataFrameColumn + { + internal UInt64DataFrameColumn ReverseMultiplyImplementation(ulong value, bool inPlace = false) + { + UInt64DataFrameColumn newColumn = inPlace ? this : CloneAsUInt64Column(); + newColumn.ColumnContainer.ReverseMultiply(value); + return newColumn; + } + } + public partial class DecimalDataFrameColumn + { + internal DecimalDataFrameColumn DivideImplementation(DecimalDataFrameColumn column, bool inPlace = false) + { + if (column.Length != Length) + { + throw new ArgumentException(Strings.MismatchedColumnLengths, nameof(column)); + } + DecimalDataFrameColumn newColumn = inPlace ? this : CloneAsDecimalColumn(); + newColumn.ColumnContainer.Divide(column.ColumnContainer); + return newColumn; + } + } + public partial class DoubleDataFrameColumn + { + internal DoubleDataFrameColumn DivideImplementation(DoubleDataFrameColumn column, bool inPlace = false) + { + if (column.Length != Length) + { + throw new ArgumentException(Strings.MismatchedColumnLengths, nameof(column)); + } + DoubleDataFrameColumn newColumn = inPlace ? this : CloneAsDoubleColumn(); + newColumn.ColumnContainer.Divide(column.ColumnContainer); + return newColumn; + } + } + public partial class SingleDataFrameColumn + { + internal SingleDataFrameColumn DivideImplementation(SingleDataFrameColumn column, bool inPlace = false) + { + if (column.Length != Length) + { + throw new ArgumentException(Strings.MismatchedColumnLengths, nameof(column)); + } + SingleDataFrameColumn newColumn = inPlace ? this : CloneAsSingleColumn(); + newColumn.ColumnContainer.Divide(column.ColumnContainer); + return newColumn; + } + } + public partial class Int32DataFrameColumn + { + internal Int32DataFrameColumn DivideImplementation(Int32DataFrameColumn column, bool inPlace = false) + { + if (column.Length != Length) + { + throw new ArgumentException(Strings.MismatchedColumnLengths, nameof(column)); + } + Int32DataFrameColumn newColumn = inPlace ? this : CloneAsInt32Column(); + newColumn.ColumnContainer.Divide(column.ColumnContainer); + return newColumn; + } + } + public partial class Int64DataFrameColumn + { + internal Int64DataFrameColumn DivideImplementation(Int64DataFrameColumn column, bool inPlace = false) + { + if (column.Length != Length) + { + throw new ArgumentException(Strings.MismatchedColumnLengths, nameof(column)); + } + Int64DataFrameColumn newColumn = inPlace ? this : CloneAsInt64Column(); + newColumn.ColumnContainer.Divide(column.ColumnContainer); + return newColumn; + } + } + public partial class UInt32DataFrameColumn + { + internal UInt32DataFrameColumn DivideImplementation(UInt32DataFrameColumn column, bool inPlace = false) + { + if (column.Length != Length) + { + throw new ArgumentException(Strings.MismatchedColumnLengths, nameof(column)); + } + UInt32DataFrameColumn newColumn = inPlace ? this : CloneAsUInt32Column(); + newColumn.ColumnContainer.Divide(column.ColumnContainer); + return newColumn; + } + } + public partial class UInt64DataFrameColumn + { + internal UInt64DataFrameColumn DivideImplementation(UInt64DataFrameColumn column, bool inPlace = false) + { + if (column.Length != Length) + { + throw new ArgumentException(Strings.MismatchedColumnLengths, nameof(column)); + } + UInt64DataFrameColumn newColumn = inPlace ? this : CloneAsUInt64Column(); + newColumn.ColumnContainer.Divide(column.ColumnContainer); + return newColumn; + } + } + public partial class DecimalDataFrameColumn + { + internal DecimalDataFrameColumn DivideImplementation(decimal value, bool inPlace = false) + { + DecimalDataFrameColumn newColumn = inPlace ? this : CloneAsDecimalColumn(); + newColumn.ColumnContainer.Divide(value); + return newColumn; + } + } + public partial class DoubleDataFrameColumn + { + internal DoubleDataFrameColumn DivideImplementation(double value, bool inPlace = false) + { + DoubleDataFrameColumn newColumn = inPlace ? this : CloneAsDoubleColumn(); + newColumn.ColumnContainer.Divide(value); + return newColumn; + } + } + public partial class SingleDataFrameColumn + { + internal SingleDataFrameColumn DivideImplementation(float value, bool inPlace = false) + { + SingleDataFrameColumn newColumn = inPlace ? this : CloneAsSingleColumn(); + newColumn.ColumnContainer.Divide(value); + return newColumn; + } + } + public partial class Int32DataFrameColumn + { + internal Int32DataFrameColumn DivideImplementation(int value, bool inPlace = false) + { + Int32DataFrameColumn newColumn = inPlace ? this : CloneAsInt32Column(); + newColumn.ColumnContainer.Divide(value); + return newColumn; + } + } + public partial class Int64DataFrameColumn + { + internal Int64DataFrameColumn DivideImplementation(long value, bool inPlace = false) + { + Int64DataFrameColumn newColumn = inPlace ? this : CloneAsInt64Column(); + newColumn.ColumnContainer.Divide(value); + return newColumn; + } + } + public partial class UInt32DataFrameColumn + { + internal UInt32DataFrameColumn DivideImplementation(uint value, bool inPlace = false) + { + UInt32DataFrameColumn newColumn = inPlace ? this : CloneAsUInt32Column(); + newColumn.ColumnContainer.Divide(value); + return newColumn; + } + } + public partial class UInt64DataFrameColumn + { + internal UInt64DataFrameColumn DivideImplementation(ulong value, bool inPlace = false) + { + UInt64DataFrameColumn newColumn = inPlace ? this : CloneAsUInt64Column(); + newColumn.ColumnContainer.Divide(value); + return newColumn; + } + } + public partial class DecimalDataFrameColumn + { + internal DecimalDataFrameColumn ReverseDivideImplementation(decimal value, bool inPlace = false) + { + DecimalDataFrameColumn newColumn = inPlace ? this : CloneAsDecimalColumn(); + newColumn.ColumnContainer.ReverseDivide(value); + return newColumn; + } + } + public partial class DoubleDataFrameColumn + { + internal DoubleDataFrameColumn ReverseDivideImplementation(double value, bool inPlace = false) + { + DoubleDataFrameColumn newColumn = inPlace ? this : CloneAsDoubleColumn(); + newColumn.ColumnContainer.ReverseDivide(value); + return newColumn; + } + } + public partial class SingleDataFrameColumn + { + internal SingleDataFrameColumn ReverseDivideImplementation(float value, bool inPlace = false) + { + SingleDataFrameColumn newColumn = inPlace ? this : CloneAsSingleColumn(); + newColumn.ColumnContainer.ReverseDivide(value); + return newColumn; + } + } + public partial class Int32DataFrameColumn + { + internal Int32DataFrameColumn ReverseDivideImplementation(int value, bool inPlace = false) + { + Int32DataFrameColumn newColumn = inPlace ? this : CloneAsInt32Column(); + newColumn.ColumnContainer.ReverseDivide(value); + return newColumn; + } + } + public partial class Int64DataFrameColumn + { + internal Int64DataFrameColumn ReverseDivideImplementation(long value, bool inPlace = false) + { + Int64DataFrameColumn newColumn = inPlace ? this : CloneAsInt64Column(); + newColumn.ColumnContainer.ReverseDivide(value); + return newColumn; + } + } + public partial class UInt32DataFrameColumn + { + internal UInt32DataFrameColumn ReverseDivideImplementation(uint value, bool inPlace = false) + { + UInt32DataFrameColumn newColumn = inPlace ? this : CloneAsUInt32Column(); + newColumn.ColumnContainer.ReverseDivide(value); + return newColumn; + } + } + public partial class UInt64DataFrameColumn + { + internal UInt64DataFrameColumn ReverseDivideImplementation(ulong value, bool inPlace = false) + { + UInt64DataFrameColumn newColumn = inPlace ? this : CloneAsUInt64Column(); + newColumn.ColumnContainer.ReverseDivide(value); + return newColumn; + } + } + public partial class DecimalDataFrameColumn + { + internal DecimalDataFrameColumn ModuloImplementation(DecimalDataFrameColumn column, bool inPlace = false) + { + if (column.Length != Length) + { + throw new ArgumentException(Strings.MismatchedColumnLengths, nameof(column)); + } + DecimalDataFrameColumn newColumn = inPlace ? this : CloneAsDecimalColumn(); + newColumn.ColumnContainer.Modulo(column.ColumnContainer); + return newColumn; + } + } + public partial class DoubleDataFrameColumn + { + internal DoubleDataFrameColumn ModuloImplementation(DoubleDataFrameColumn column, bool inPlace = false) + { + if (column.Length != Length) + { + throw new ArgumentException(Strings.MismatchedColumnLengths, nameof(column)); + } + DoubleDataFrameColumn newColumn = inPlace ? this : CloneAsDoubleColumn(); + newColumn.ColumnContainer.Modulo(column.ColumnContainer); + return newColumn; + } + } + public partial class SingleDataFrameColumn + { + internal SingleDataFrameColumn ModuloImplementation(SingleDataFrameColumn column, bool inPlace = false) + { + if (column.Length != Length) + { + throw new ArgumentException(Strings.MismatchedColumnLengths, nameof(column)); + } + SingleDataFrameColumn newColumn = inPlace ? this : CloneAsSingleColumn(); + newColumn.ColumnContainer.Modulo(column.ColumnContainer); + return newColumn; + } + } + public partial class Int32DataFrameColumn + { + internal Int32DataFrameColumn ModuloImplementation(Int32DataFrameColumn column, bool inPlace = false) + { + if (column.Length != Length) + { + throw new ArgumentException(Strings.MismatchedColumnLengths, nameof(column)); + } + Int32DataFrameColumn newColumn = inPlace ? this : CloneAsInt32Column(); + newColumn.ColumnContainer.Modulo(column.ColumnContainer); + return newColumn; + } + } + public partial class Int64DataFrameColumn + { + internal Int64DataFrameColumn ModuloImplementation(Int64DataFrameColumn column, bool inPlace = false) + { + if (column.Length != Length) + { + throw new ArgumentException(Strings.MismatchedColumnLengths, nameof(column)); + } + Int64DataFrameColumn newColumn = inPlace ? this : CloneAsInt64Column(); + newColumn.ColumnContainer.Modulo(column.ColumnContainer); + return newColumn; + } + } + public partial class UInt32DataFrameColumn + { + internal UInt32DataFrameColumn ModuloImplementation(UInt32DataFrameColumn column, bool inPlace = false) + { + if (column.Length != Length) + { + throw new ArgumentException(Strings.MismatchedColumnLengths, nameof(column)); + } + UInt32DataFrameColumn newColumn = inPlace ? this : CloneAsUInt32Column(); + newColumn.ColumnContainer.Modulo(column.ColumnContainer); + return newColumn; + } + } + public partial class UInt64DataFrameColumn + { + internal UInt64DataFrameColumn ModuloImplementation(UInt64DataFrameColumn column, bool inPlace = false) + { + if (column.Length != Length) + { + throw new ArgumentException(Strings.MismatchedColumnLengths, nameof(column)); + } + UInt64DataFrameColumn newColumn = inPlace ? this : CloneAsUInt64Column(); + newColumn.ColumnContainer.Modulo(column.ColumnContainer); + return newColumn; + } + } + public partial class DecimalDataFrameColumn + { + internal DecimalDataFrameColumn ModuloImplementation(decimal value, bool inPlace = false) + { + DecimalDataFrameColumn newColumn = inPlace ? this : CloneAsDecimalColumn(); + newColumn.ColumnContainer.Modulo(value); + return newColumn; + } + } + public partial class DoubleDataFrameColumn + { + internal DoubleDataFrameColumn ModuloImplementation(double value, bool inPlace = false) + { + DoubleDataFrameColumn newColumn = inPlace ? this : CloneAsDoubleColumn(); + newColumn.ColumnContainer.Modulo(value); + return newColumn; + } + } + public partial class SingleDataFrameColumn + { + internal SingleDataFrameColumn ModuloImplementation(float value, bool inPlace = false) + { + SingleDataFrameColumn newColumn = inPlace ? this : CloneAsSingleColumn(); + newColumn.ColumnContainer.Modulo(value); + return newColumn; + } + } + public partial class Int32DataFrameColumn + { + internal Int32DataFrameColumn ModuloImplementation(int value, bool inPlace = false) + { + Int32DataFrameColumn newColumn = inPlace ? this : CloneAsInt32Column(); + newColumn.ColumnContainer.Modulo(value); + return newColumn; + } + } + public partial class Int64DataFrameColumn + { + internal Int64DataFrameColumn ModuloImplementation(long value, bool inPlace = false) + { + Int64DataFrameColumn newColumn = inPlace ? this : CloneAsInt64Column(); + newColumn.ColumnContainer.Modulo(value); + return newColumn; + } + } + public partial class UInt32DataFrameColumn + { + internal UInt32DataFrameColumn ModuloImplementation(uint value, bool inPlace = false) + { + UInt32DataFrameColumn newColumn = inPlace ? this : CloneAsUInt32Column(); + newColumn.ColumnContainer.Modulo(value); + return newColumn; + } + } + public partial class UInt64DataFrameColumn + { + internal UInt64DataFrameColumn ModuloImplementation(ulong value, bool inPlace = false) + { + UInt64DataFrameColumn newColumn = inPlace ? this : CloneAsUInt64Column(); + newColumn.ColumnContainer.Modulo(value); + return newColumn; + } + } + public partial class DecimalDataFrameColumn + { + internal DecimalDataFrameColumn ReverseModuloImplementation(decimal value, bool inPlace = false) + { + DecimalDataFrameColumn newColumn = inPlace ? this : CloneAsDecimalColumn(); + newColumn.ColumnContainer.ReverseModulo(value); + return newColumn; + } + } + public partial class DoubleDataFrameColumn + { + internal DoubleDataFrameColumn ReverseModuloImplementation(double value, bool inPlace = false) + { + DoubleDataFrameColumn newColumn = inPlace ? this : CloneAsDoubleColumn(); + newColumn.ColumnContainer.ReverseModulo(value); + return newColumn; + } + } + public partial class SingleDataFrameColumn + { + internal SingleDataFrameColumn ReverseModuloImplementation(float value, bool inPlace = false) + { + SingleDataFrameColumn newColumn = inPlace ? this : CloneAsSingleColumn(); + newColumn.ColumnContainer.ReverseModulo(value); + return newColumn; + } + } + public partial class Int32DataFrameColumn + { + internal Int32DataFrameColumn ReverseModuloImplementation(int value, bool inPlace = false) + { + Int32DataFrameColumn newColumn = inPlace ? this : CloneAsInt32Column(); + newColumn.ColumnContainer.ReverseModulo(value); + return newColumn; + } + } + public partial class Int64DataFrameColumn + { + internal Int64DataFrameColumn ReverseModuloImplementation(long value, bool inPlace = false) + { + Int64DataFrameColumn newColumn = inPlace ? this : CloneAsInt64Column(); + newColumn.ColumnContainer.ReverseModulo(value); + return newColumn; + } + } + public partial class UInt32DataFrameColumn + { + internal UInt32DataFrameColumn ReverseModuloImplementation(uint value, bool inPlace = false) + { + UInt32DataFrameColumn newColumn = inPlace ? this : CloneAsUInt32Column(); + newColumn.ColumnContainer.ReverseModulo(value); + return newColumn; + } + } + public partial class UInt64DataFrameColumn + { + internal UInt64DataFrameColumn ReverseModuloImplementation(ulong value, bool inPlace = false) + { + UInt64DataFrameColumn newColumn = inPlace ? this : CloneAsUInt64Column(); + newColumn.ColumnContainer.ReverseModulo(value); + return newColumn; + } + } + public partial class BooleanDataFrameColumn + { + internal BooleanDataFrameColumn ElementwiseEqualsImplementation(BooleanDataFrameColumn column) + { + BooleanDataFrameColumn newColumn = CloneAsBooleanColumn(); + ColumnContainer.ElementwiseEquals(column.ColumnContainer, newColumn.ColumnContainer); + return newColumn; + } + } + public partial class ByteDataFrameColumn + { + internal BooleanDataFrameColumn ElementwiseEqualsImplementation(ByteDataFrameColumn column) + { + BooleanDataFrameColumn newColumn = CloneAsBooleanColumn(); + ColumnContainer.ElementwiseEquals(column.ColumnContainer, newColumn.ColumnContainer); + return newColumn; + } + } + public partial class DecimalDataFrameColumn + { + internal BooleanDataFrameColumn ElementwiseEqualsImplementation(DecimalDataFrameColumn column) + { + BooleanDataFrameColumn newColumn = CloneAsBooleanColumn(); + ColumnContainer.ElementwiseEquals(column.ColumnContainer, newColumn.ColumnContainer); + return newColumn; + } + } + public partial class DoubleDataFrameColumn + { + internal BooleanDataFrameColumn ElementwiseEqualsImplementation(DoubleDataFrameColumn column) + { + BooleanDataFrameColumn newColumn = CloneAsBooleanColumn(); + ColumnContainer.ElementwiseEquals(column.ColumnContainer, newColumn.ColumnContainer); + return newColumn; + } + } + public partial class SingleDataFrameColumn + { + internal BooleanDataFrameColumn ElementwiseEqualsImplementation(SingleDataFrameColumn column) + { + BooleanDataFrameColumn newColumn = CloneAsBooleanColumn(); + ColumnContainer.ElementwiseEquals(column.ColumnContainer, newColumn.ColumnContainer); + return newColumn; + } + } + public partial class Int32DataFrameColumn + { + internal BooleanDataFrameColumn ElementwiseEqualsImplementation(Int32DataFrameColumn column) + { + BooleanDataFrameColumn newColumn = CloneAsBooleanColumn(); + ColumnContainer.ElementwiseEquals(column.ColumnContainer, newColumn.ColumnContainer); + return newColumn; + } + } + public partial class Int64DataFrameColumn + { + internal BooleanDataFrameColumn ElementwiseEqualsImplementation(Int64DataFrameColumn column) + { + BooleanDataFrameColumn newColumn = CloneAsBooleanColumn(); + ColumnContainer.ElementwiseEquals(column.ColumnContainer, newColumn.ColumnContainer); + return newColumn; + } + } + public partial class SByteDataFrameColumn + { + internal BooleanDataFrameColumn ElementwiseEqualsImplementation(SByteDataFrameColumn column) + { + BooleanDataFrameColumn newColumn = CloneAsBooleanColumn(); + ColumnContainer.ElementwiseEquals(column.ColumnContainer, newColumn.ColumnContainer); + return newColumn; + } + } + public partial class Int16DataFrameColumn + { + internal BooleanDataFrameColumn ElementwiseEqualsImplementation(Int16DataFrameColumn column) + { + BooleanDataFrameColumn newColumn = CloneAsBooleanColumn(); + ColumnContainer.ElementwiseEquals(column.ColumnContainer, newColumn.ColumnContainer); + return newColumn; + } + } + public partial class UInt32DataFrameColumn + { + internal BooleanDataFrameColumn ElementwiseEqualsImplementation(UInt32DataFrameColumn column) + { + BooleanDataFrameColumn newColumn = CloneAsBooleanColumn(); + ColumnContainer.ElementwiseEquals(column.ColumnContainer, newColumn.ColumnContainer); + return newColumn; + } + } + public partial class UInt64DataFrameColumn + { + internal BooleanDataFrameColumn ElementwiseEqualsImplementation(UInt64DataFrameColumn column) + { + BooleanDataFrameColumn newColumn = CloneAsBooleanColumn(); + ColumnContainer.ElementwiseEquals(column.ColumnContainer, newColumn.ColumnContainer); + return newColumn; + } + } + public partial class UInt16DataFrameColumn + { + internal BooleanDataFrameColumn ElementwiseEqualsImplementation(UInt16DataFrameColumn column) + { + BooleanDataFrameColumn newColumn = CloneAsBooleanColumn(); + ColumnContainer.ElementwiseEquals(column.ColumnContainer, newColumn.ColumnContainer); + return newColumn; + } + } + public partial class BooleanDataFrameColumn + { + internal BooleanDataFrameColumn ElementwiseEqualsImplementation(bool value) + { + BooleanDataFrameColumn newColumn = CloneAsBooleanColumn(); + ColumnContainer.ElementwiseEquals(value, newColumn.ColumnContainer); + return newColumn; + } + } + public partial class ByteDataFrameColumn + { + internal BooleanDataFrameColumn ElementwiseEqualsImplementation(byte value) + { + BooleanDataFrameColumn newColumn = CloneAsBooleanColumn(); + ColumnContainer.ElementwiseEquals(value, newColumn.ColumnContainer); + return newColumn; + } + } + public partial class DecimalDataFrameColumn + { + internal BooleanDataFrameColumn ElementwiseEqualsImplementation(decimal value) + { + BooleanDataFrameColumn newColumn = CloneAsBooleanColumn(); + ColumnContainer.ElementwiseEquals(value, newColumn.ColumnContainer); + return newColumn; + } + } + public partial class DoubleDataFrameColumn + { + internal BooleanDataFrameColumn ElementwiseEqualsImplementation(double value) + { + BooleanDataFrameColumn newColumn = CloneAsBooleanColumn(); + ColumnContainer.ElementwiseEquals(value, newColumn.ColumnContainer); + return newColumn; + } + } + public partial class SingleDataFrameColumn + { + internal BooleanDataFrameColumn ElementwiseEqualsImplementation(float value) + { + BooleanDataFrameColumn newColumn = CloneAsBooleanColumn(); + ColumnContainer.ElementwiseEquals(value, newColumn.ColumnContainer); + return newColumn; + } + } + public partial class Int32DataFrameColumn + { + internal BooleanDataFrameColumn ElementwiseEqualsImplementation(int value) + { + BooleanDataFrameColumn newColumn = CloneAsBooleanColumn(); + ColumnContainer.ElementwiseEquals(value, newColumn.ColumnContainer); + return newColumn; + } + } + public partial class Int64DataFrameColumn + { + internal BooleanDataFrameColumn ElementwiseEqualsImplementation(long value) + { + BooleanDataFrameColumn newColumn = CloneAsBooleanColumn(); + ColumnContainer.ElementwiseEquals(value, newColumn.ColumnContainer); + return newColumn; + } + } + public partial class SByteDataFrameColumn + { + internal BooleanDataFrameColumn ElementwiseEqualsImplementation(sbyte value) + { + BooleanDataFrameColumn newColumn = CloneAsBooleanColumn(); + ColumnContainer.ElementwiseEquals(value, newColumn.ColumnContainer); + return newColumn; + } + } + public partial class Int16DataFrameColumn + { + internal BooleanDataFrameColumn ElementwiseEqualsImplementation(short value) + { + BooleanDataFrameColumn newColumn = CloneAsBooleanColumn(); + ColumnContainer.ElementwiseEquals(value, newColumn.ColumnContainer); + return newColumn; + } + } + public partial class UInt32DataFrameColumn + { + internal BooleanDataFrameColumn ElementwiseEqualsImplementation(uint value) + { + BooleanDataFrameColumn newColumn = CloneAsBooleanColumn(); + ColumnContainer.ElementwiseEquals(value, newColumn.ColumnContainer); + return newColumn; + } + } + public partial class UInt64DataFrameColumn + { + internal BooleanDataFrameColumn ElementwiseEqualsImplementation(ulong value) + { + BooleanDataFrameColumn newColumn = CloneAsBooleanColumn(); + ColumnContainer.ElementwiseEquals(value, newColumn.ColumnContainer); + return newColumn; + } + } + public partial class UInt16DataFrameColumn + { + internal BooleanDataFrameColumn ElementwiseEqualsImplementation(ushort value) + { + BooleanDataFrameColumn newColumn = CloneAsBooleanColumn(); + ColumnContainer.ElementwiseEquals(value, newColumn.ColumnContainer); + return newColumn; + } + } + public partial class BooleanDataFrameColumn + { + internal BooleanDataFrameColumn ElementwiseNotEqualsImplementation(BooleanDataFrameColumn column) + { + BooleanDataFrameColumn newColumn = CloneAsBooleanColumn(); + ColumnContainer.ElementwiseNotEquals(column.ColumnContainer, newColumn.ColumnContainer); + return newColumn; + } + } + public partial class ByteDataFrameColumn + { + internal BooleanDataFrameColumn ElementwiseNotEqualsImplementation(ByteDataFrameColumn column) + { + BooleanDataFrameColumn newColumn = CloneAsBooleanColumn(); + ColumnContainer.ElementwiseNotEquals(column.ColumnContainer, newColumn.ColumnContainer); + return newColumn; + } + } + public partial class DecimalDataFrameColumn + { + internal BooleanDataFrameColumn ElementwiseNotEqualsImplementation(DecimalDataFrameColumn column) + { + BooleanDataFrameColumn newColumn = CloneAsBooleanColumn(); + ColumnContainer.ElementwiseNotEquals(column.ColumnContainer, newColumn.ColumnContainer); + return newColumn; + } + } + public partial class DoubleDataFrameColumn + { + internal BooleanDataFrameColumn ElementwiseNotEqualsImplementation(DoubleDataFrameColumn column) + { + BooleanDataFrameColumn newColumn = CloneAsBooleanColumn(); + ColumnContainer.ElementwiseNotEquals(column.ColumnContainer, newColumn.ColumnContainer); + return newColumn; + } + } + public partial class SingleDataFrameColumn + { + internal BooleanDataFrameColumn ElementwiseNotEqualsImplementation(SingleDataFrameColumn column) + { + BooleanDataFrameColumn newColumn = CloneAsBooleanColumn(); + ColumnContainer.ElementwiseNotEquals(column.ColumnContainer, newColumn.ColumnContainer); + return newColumn; + } + } + public partial class Int32DataFrameColumn + { + internal BooleanDataFrameColumn ElementwiseNotEqualsImplementation(Int32DataFrameColumn column) + { + BooleanDataFrameColumn newColumn = CloneAsBooleanColumn(); + ColumnContainer.ElementwiseNotEquals(column.ColumnContainer, newColumn.ColumnContainer); + return newColumn; + } + } + public partial class Int64DataFrameColumn + { + internal BooleanDataFrameColumn ElementwiseNotEqualsImplementation(Int64DataFrameColumn column) + { + BooleanDataFrameColumn newColumn = CloneAsBooleanColumn(); + ColumnContainer.ElementwiseNotEquals(column.ColumnContainer, newColumn.ColumnContainer); + return newColumn; + } + } + public partial class SByteDataFrameColumn + { + internal BooleanDataFrameColumn ElementwiseNotEqualsImplementation(SByteDataFrameColumn column) + { + BooleanDataFrameColumn newColumn = CloneAsBooleanColumn(); + ColumnContainer.ElementwiseNotEquals(column.ColumnContainer, newColumn.ColumnContainer); + return newColumn; + } + } + public partial class Int16DataFrameColumn + { + internal BooleanDataFrameColumn ElementwiseNotEqualsImplementation(Int16DataFrameColumn column) + { + BooleanDataFrameColumn newColumn = CloneAsBooleanColumn(); + ColumnContainer.ElementwiseNotEquals(column.ColumnContainer, newColumn.ColumnContainer); + return newColumn; + } + } + public partial class UInt32DataFrameColumn + { + internal BooleanDataFrameColumn ElementwiseNotEqualsImplementation(UInt32DataFrameColumn column) + { + BooleanDataFrameColumn newColumn = CloneAsBooleanColumn(); + ColumnContainer.ElementwiseNotEquals(column.ColumnContainer, newColumn.ColumnContainer); + return newColumn; + } + } + public partial class UInt64DataFrameColumn + { + internal BooleanDataFrameColumn ElementwiseNotEqualsImplementation(UInt64DataFrameColumn column) + { + BooleanDataFrameColumn newColumn = CloneAsBooleanColumn(); + ColumnContainer.ElementwiseNotEquals(column.ColumnContainer, newColumn.ColumnContainer); + return newColumn; + } + } + public partial class UInt16DataFrameColumn + { + internal BooleanDataFrameColumn ElementwiseNotEqualsImplementation(UInt16DataFrameColumn column) + { + BooleanDataFrameColumn newColumn = CloneAsBooleanColumn(); + ColumnContainer.ElementwiseNotEquals(column.ColumnContainer, newColumn.ColumnContainer); + return newColumn; + } + } + public partial class BooleanDataFrameColumn + { + internal BooleanDataFrameColumn ElementwiseNotEqualsImplementation(bool value) + { + BooleanDataFrameColumn newColumn = CloneAsBooleanColumn(); + ColumnContainer.ElementwiseNotEquals(value, newColumn.ColumnContainer); + return newColumn; + } + } + public partial class ByteDataFrameColumn + { + internal BooleanDataFrameColumn ElementwiseNotEqualsImplementation(byte value) + { + BooleanDataFrameColumn newColumn = CloneAsBooleanColumn(); + ColumnContainer.ElementwiseNotEquals(value, newColumn.ColumnContainer); + return newColumn; + } + } + public partial class DecimalDataFrameColumn + { + internal BooleanDataFrameColumn ElementwiseNotEqualsImplementation(decimal value) + { + BooleanDataFrameColumn newColumn = CloneAsBooleanColumn(); + ColumnContainer.ElementwiseNotEquals(value, newColumn.ColumnContainer); + return newColumn; + } + } + public partial class DoubleDataFrameColumn + { + internal BooleanDataFrameColumn ElementwiseNotEqualsImplementation(double value) + { + BooleanDataFrameColumn newColumn = CloneAsBooleanColumn(); + ColumnContainer.ElementwiseNotEquals(value, newColumn.ColumnContainer); + return newColumn; + } + } + public partial class SingleDataFrameColumn + { + internal BooleanDataFrameColumn ElementwiseNotEqualsImplementation(float value) + { + BooleanDataFrameColumn newColumn = CloneAsBooleanColumn(); + ColumnContainer.ElementwiseNotEquals(value, newColumn.ColumnContainer); + return newColumn; + } + } + public partial class Int32DataFrameColumn + { + internal BooleanDataFrameColumn ElementwiseNotEqualsImplementation(int value) + { + BooleanDataFrameColumn newColumn = CloneAsBooleanColumn(); + ColumnContainer.ElementwiseNotEquals(value, newColumn.ColumnContainer); + return newColumn; + } + } + public partial class Int64DataFrameColumn + { + internal BooleanDataFrameColumn ElementwiseNotEqualsImplementation(long value) + { + BooleanDataFrameColumn newColumn = CloneAsBooleanColumn(); + ColumnContainer.ElementwiseNotEquals(value, newColumn.ColumnContainer); + return newColumn; + } + } + public partial class SByteDataFrameColumn + { + internal BooleanDataFrameColumn ElementwiseNotEqualsImplementation(sbyte value) + { + BooleanDataFrameColumn newColumn = CloneAsBooleanColumn(); + ColumnContainer.ElementwiseNotEquals(value, newColumn.ColumnContainer); + return newColumn; + } + } + public partial class Int16DataFrameColumn + { + internal BooleanDataFrameColumn ElementwiseNotEqualsImplementation(short value) + { + BooleanDataFrameColumn newColumn = CloneAsBooleanColumn(); + ColumnContainer.ElementwiseNotEquals(value, newColumn.ColumnContainer); + return newColumn; + } + } + public partial class UInt32DataFrameColumn + { + internal BooleanDataFrameColumn ElementwiseNotEqualsImplementation(uint value) + { + BooleanDataFrameColumn newColumn = CloneAsBooleanColumn(); + ColumnContainer.ElementwiseNotEquals(value, newColumn.ColumnContainer); + return newColumn; + } + } + public partial class UInt64DataFrameColumn + { + internal BooleanDataFrameColumn ElementwiseNotEqualsImplementation(ulong value) + { + BooleanDataFrameColumn newColumn = CloneAsBooleanColumn(); + ColumnContainer.ElementwiseNotEquals(value, newColumn.ColumnContainer); + return newColumn; + } + } + public partial class UInt16DataFrameColumn + { + internal BooleanDataFrameColumn ElementwiseNotEqualsImplementation(ushort value) + { + BooleanDataFrameColumn newColumn = CloneAsBooleanColumn(); + ColumnContainer.ElementwiseNotEquals(value, newColumn.ColumnContainer); + return newColumn; + } + } + public partial class BooleanDataFrameColumn + { + internal BooleanDataFrameColumn ElementwiseGreaterThanOrEqualImplementation(BooleanDataFrameColumn column) + { + BooleanDataFrameColumn newColumn = CloneAsBooleanColumn(); + ColumnContainer.ElementwiseGreaterThanOrEqual(column.ColumnContainer, newColumn.ColumnContainer); + return newColumn; + } + } + public partial class ByteDataFrameColumn + { + internal BooleanDataFrameColumn ElementwiseGreaterThanOrEqualImplementation(ByteDataFrameColumn column) + { + BooleanDataFrameColumn newColumn = CloneAsBooleanColumn(); + ColumnContainer.ElementwiseGreaterThanOrEqual(column.ColumnContainer, newColumn.ColumnContainer); + return newColumn; + } + } + public partial class DecimalDataFrameColumn + { + internal BooleanDataFrameColumn ElementwiseGreaterThanOrEqualImplementation(DecimalDataFrameColumn column) + { + BooleanDataFrameColumn newColumn = CloneAsBooleanColumn(); + ColumnContainer.ElementwiseGreaterThanOrEqual(column.ColumnContainer, newColumn.ColumnContainer); + return newColumn; + } + } + public partial class DoubleDataFrameColumn + { + internal BooleanDataFrameColumn ElementwiseGreaterThanOrEqualImplementation(DoubleDataFrameColumn column) + { + BooleanDataFrameColumn newColumn = CloneAsBooleanColumn(); + ColumnContainer.ElementwiseGreaterThanOrEqual(column.ColumnContainer, newColumn.ColumnContainer); + return newColumn; + } + } + public partial class SingleDataFrameColumn + { + internal BooleanDataFrameColumn ElementwiseGreaterThanOrEqualImplementation(SingleDataFrameColumn column) + { + BooleanDataFrameColumn newColumn = CloneAsBooleanColumn(); + ColumnContainer.ElementwiseGreaterThanOrEqual(column.ColumnContainer, newColumn.ColumnContainer); + return newColumn; + } + } + public partial class Int32DataFrameColumn + { + internal BooleanDataFrameColumn ElementwiseGreaterThanOrEqualImplementation(Int32DataFrameColumn column) + { + BooleanDataFrameColumn newColumn = CloneAsBooleanColumn(); + ColumnContainer.ElementwiseGreaterThanOrEqual(column.ColumnContainer, newColumn.ColumnContainer); + return newColumn; + } + } + public partial class Int64DataFrameColumn + { + internal BooleanDataFrameColumn ElementwiseGreaterThanOrEqualImplementation(Int64DataFrameColumn column) + { + BooleanDataFrameColumn newColumn = CloneAsBooleanColumn(); + ColumnContainer.ElementwiseGreaterThanOrEqual(column.ColumnContainer, newColumn.ColumnContainer); + return newColumn; + } + } + public partial class SByteDataFrameColumn + { + internal BooleanDataFrameColumn ElementwiseGreaterThanOrEqualImplementation(SByteDataFrameColumn column) + { + BooleanDataFrameColumn newColumn = CloneAsBooleanColumn(); + ColumnContainer.ElementwiseGreaterThanOrEqual(column.ColumnContainer, newColumn.ColumnContainer); + return newColumn; + } + } + public partial class Int16DataFrameColumn + { + internal BooleanDataFrameColumn ElementwiseGreaterThanOrEqualImplementation(Int16DataFrameColumn column) + { + BooleanDataFrameColumn newColumn = CloneAsBooleanColumn(); + ColumnContainer.ElementwiseGreaterThanOrEqual(column.ColumnContainer, newColumn.ColumnContainer); + return newColumn; + } + } + public partial class UInt32DataFrameColumn + { + internal BooleanDataFrameColumn ElementwiseGreaterThanOrEqualImplementation(UInt32DataFrameColumn column) + { + BooleanDataFrameColumn newColumn = CloneAsBooleanColumn(); + ColumnContainer.ElementwiseGreaterThanOrEqual(column.ColumnContainer, newColumn.ColumnContainer); + return newColumn; + } + } + public partial class UInt64DataFrameColumn + { + internal BooleanDataFrameColumn ElementwiseGreaterThanOrEqualImplementation(UInt64DataFrameColumn column) + { + BooleanDataFrameColumn newColumn = CloneAsBooleanColumn(); + ColumnContainer.ElementwiseGreaterThanOrEqual(column.ColumnContainer, newColumn.ColumnContainer); + return newColumn; + } + } + public partial class UInt16DataFrameColumn + { + internal BooleanDataFrameColumn ElementwiseGreaterThanOrEqualImplementation(UInt16DataFrameColumn column) + { + BooleanDataFrameColumn newColumn = CloneAsBooleanColumn(); + ColumnContainer.ElementwiseGreaterThanOrEqual(column.ColumnContainer, newColumn.ColumnContainer); + return newColumn; + } + } + public partial class BooleanDataFrameColumn + { + internal BooleanDataFrameColumn ElementwiseGreaterThanOrEqualImplementation(bool value) + { + BooleanDataFrameColumn newColumn = CloneAsBooleanColumn(); + ColumnContainer.ElementwiseGreaterThanOrEqual(value, newColumn.ColumnContainer); + return newColumn; + } + } + public partial class ByteDataFrameColumn + { + internal BooleanDataFrameColumn ElementwiseGreaterThanOrEqualImplementation(byte value) + { + BooleanDataFrameColumn newColumn = CloneAsBooleanColumn(); + ColumnContainer.ElementwiseGreaterThanOrEqual(value, newColumn.ColumnContainer); + return newColumn; + } + } + public partial class DecimalDataFrameColumn + { + internal BooleanDataFrameColumn ElementwiseGreaterThanOrEqualImplementation(decimal value) + { + BooleanDataFrameColumn newColumn = CloneAsBooleanColumn(); + ColumnContainer.ElementwiseGreaterThanOrEqual(value, newColumn.ColumnContainer); + return newColumn; + } + } + public partial class DoubleDataFrameColumn + { + internal BooleanDataFrameColumn ElementwiseGreaterThanOrEqualImplementation(double value) + { + BooleanDataFrameColumn newColumn = CloneAsBooleanColumn(); + ColumnContainer.ElementwiseGreaterThanOrEqual(value, newColumn.ColumnContainer); + return newColumn; + } + } + public partial class SingleDataFrameColumn + { + internal BooleanDataFrameColumn ElementwiseGreaterThanOrEqualImplementation(float value) + { + BooleanDataFrameColumn newColumn = CloneAsBooleanColumn(); + ColumnContainer.ElementwiseGreaterThanOrEqual(value, newColumn.ColumnContainer); + return newColumn; + } + } + public partial class Int32DataFrameColumn + { + internal BooleanDataFrameColumn ElementwiseGreaterThanOrEqualImplementation(int value) + { + BooleanDataFrameColumn newColumn = CloneAsBooleanColumn(); + ColumnContainer.ElementwiseGreaterThanOrEqual(value, newColumn.ColumnContainer); + return newColumn; + } + } + public partial class Int64DataFrameColumn + { + internal BooleanDataFrameColumn ElementwiseGreaterThanOrEqualImplementation(long value) + { + BooleanDataFrameColumn newColumn = CloneAsBooleanColumn(); + ColumnContainer.ElementwiseGreaterThanOrEqual(value, newColumn.ColumnContainer); + return newColumn; + } + } + public partial class SByteDataFrameColumn + { + internal BooleanDataFrameColumn ElementwiseGreaterThanOrEqualImplementation(sbyte value) + { + BooleanDataFrameColumn newColumn = CloneAsBooleanColumn(); + ColumnContainer.ElementwiseGreaterThanOrEqual(value, newColumn.ColumnContainer); + return newColumn; + } + } + public partial class Int16DataFrameColumn + { + internal BooleanDataFrameColumn ElementwiseGreaterThanOrEqualImplementation(short value) + { + BooleanDataFrameColumn newColumn = CloneAsBooleanColumn(); + ColumnContainer.ElementwiseGreaterThanOrEqual(value, newColumn.ColumnContainer); + return newColumn; + } + } + public partial class UInt32DataFrameColumn + { + internal BooleanDataFrameColumn ElementwiseGreaterThanOrEqualImplementation(uint value) + { + BooleanDataFrameColumn newColumn = CloneAsBooleanColumn(); + ColumnContainer.ElementwiseGreaterThanOrEqual(value, newColumn.ColumnContainer); + return newColumn; + } + } + public partial class UInt64DataFrameColumn + { + internal BooleanDataFrameColumn ElementwiseGreaterThanOrEqualImplementation(ulong value) + { + BooleanDataFrameColumn newColumn = CloneAsBooleanColumn(); + ColumnContainer.ElementwiseGreaterThanOrEqual(value, newColumn.ColumnContainer); + return newColumn; + } + } + public partial class UInt16DataFrameColumn + { + internal BooleanDataFrameColumn ElementwiseGreaterThanOrEqualImplementation(ushort value) + { + BooleanDataFrameColumn newColumn = CloneAsBooleanColumn(); + ColumnContainer.ElementwiseGreaterThanOrEqual(value, newColumn.ColumnContainer); + return newColumn; + } + } + public partial class BooleanDataFrameColumn + { + internal BooleanDataFrameColumn ElementwiseLessThanOrEqualImplementation(BooleanDataFrameColumn column) + { + BooleanDataFrameColumn newColumn = CloneAsBooleanColumn(); + ColumnContainer.ElementwiseLessThanOrEqual(column.ColumnContainer, newColumn.ColumnContainer); + return newColumn; + } + } + public partial class ByteDataFrameColumn + { + internal BooleanDataFrameColumn ElementwiseLessThanOrEqualImplementation(ByteDataFrameColumn column) + { + BooleanDataFrameColumn newColumn = CloneAsBooleanColumn(); + ColumnContainer.ElementwiseLessThanOrEqual(column.ColumnContainer, newColumn.ColumnContainer); + return newColumn; + } + } + public partial class DecimalDataFrameColumn + { + internal BooleanDataFrameColumn ElementwiseLessThanOrEqualImplementation(DecimalDataFrameColumn column) + { + BooleanDataFrameColumn newColumn = CloneAsBooleanColumn(); + ColumnContainer.ElementwiseLessThanOrEqual(column.ColumnContainer, newColumn.ColumnContainer); + return newColumn; + } + } + public partial class DoubleDataFrameColumn + { + internal BooleanDataFrameColumn ElementwiseLessThanOrEqualImplementation(DoubleDataFrameColumn column) + { + BooleanDataFrameColumn newColumn = CloneAsBooleanColumn(); + ColumnContainer.ElementwiseLessThanOrEqual(column.ColumnContainer, newColumn.ColumnContainer); + return newColumn; + } + } + public partial class SingleDataFrameColumn + { + internal BooleanDataFrameColumn ElementwiseLessThanOrEqualImplementation(SingleDataFrameColumn column) + { + BooleanDataFrameColumn newColumn = CloneAsBooleanColumn(); + ColumnContainer.ElementwiseLessThanOrEqual(column.ColumnContainer, newColumn.ColumnContainer); + return newColumn; + } + } + public partial class Int32DataFrameColumn + { + internal BooleanDataFrameColumn ElementwiseLessThanOrEqualImplementation(Int32DataFrameColumn column) + { + BooleanDataFrameColumn newColumn = CloneAsBooleanColumn(); + ColumnContainer.ElementwiseLessThanOrEqual(column.ColumnContainer, newColumn.ColumnContainer); + return newColumn; + } + } + public partial class Int64DataFrameColumn + { + internal BooleanDataFrameColumn ElementwiseLessThanOrEqualImplementation(Int64DataFrameColumn column) + { + BooleanDataFrameColumn newColumn = CloneAsBooleanColumn(); + ColumnContainer.ElementwiseLessThanOrEqual(column.ColumnContainer, newColumn.ColumnContainer); + return newColumn; + } + } + public partial class SByteDataFrameColumn + { + internal BooleanDataFrameColumn ElementwiseLessThanOrEqualImplementation(SByteDataFrameColumn column) + { + BooleanDataFrameColumn newColumn = CloneAsBooleanColumn(); + ColumnContainer.ElementwiseLessThanOrEqual(column.ColumnContainer, newColumn.ColumnContainer); + return newColumn; + } + } + public partial class Int16DataFrameColumn + { + internal BooleanDataFrameColumn ElementwiseLessThanOrEqualImplementation(Int16DataFrameColumn column) + { + BooleanDataFrameColumn newColumn = CloneAsBooleanColumn(); + ColumnContainer.ElementwiseLessThanOrEqual(column.ColumnContainer, newColumn.ColumnContainer); + return newColumn; + } + } + public partial class UInt32DataFrameColumn + { + internal BooleanDataFrameColumn ElementwiseLessThanOrEqualImplementation(UInt32DataFrameColumn column) + { + BooleanDataFrameColumn newColumn = CloneAsBooleanColumn(); + ColumnContainer.ElementwiseLessThanOrEqual(column.ColumnContainer, newColumn.ColumnContainer); + return newColumn; + } + } + public partial class UInt64DataFrameColumn + { + internal BooleanDataFrameColumn ElementwiseLessThanOrEqualImplementation(UInt64DataFrameColumn column) + { + BooleanDataFrameColumn newColumn = CloneAsBooleanColumn(); + ColumnContainer.ElementwiseLessThanOrEqual(column.ColumnContainer, newColumn.ColumnContainer); + return newColumn; + } + } + public partial class UInt16DataFrameColumn + { + internal BooleanDataFrameColumn ElementwiseLessThanOrEqualImplementation(UInt16DataFrameColumn column) + { + BooleanDataFrameColumn newColumn = CloneAsBooleanColumn(); + ColumnContainer.ElementwiseLessThanOrEqual(column.ColumnContainer, newColumn.ColumnContainer); + return newColumn; + } + } + public partial class BooleanDataFrameColumn + { + internal BooleanDataFrameColumn ElementwiseLessThanOrEqualImplementation(bool value) + { + BooleanDataFrameColumn newColumn = CloneAsBooleanColumn(); + ColumnContainer.ElementwiseLessThanOrEqual(value, newColumn.ColumnContainer); + return newColumn; + } + } + public partial class ByteDataFrameColumn + { + internal BooleanDataFrameColumn ElementwiseLessThanOrEqualImplementation(byte value) + { + BooleanDataFrameColumn newColumn = CloneAsBooleanColumn(); + ColumnContainer.ElementwiseLessThanOrEqual(value, newColumn.ColumnContainer); + return newColumn; + } + } + public partial class DecimalDataFrameColumn + { + internal BooleanDataFrameColumn ElementwiseLessThanOrEqualImplementation(decimal value) + { + BooleanDataFrameColumn newColumn = CloneAsBooleanColumn(); + ColumnContainer.ElementwiseLessThanOrEqual(value, newColumn.ColumnContainer); + return newColumn; + } + } + public partial class DoubleDataFrameColumn + { + internal BooleanDataFrameColumn ElementwiseLessThanOrEqualImplementation(double value) + { + BooleanDataFrameColumn newColumn = CloneAsBooleanColumn(); + ColumnContainer.ElementwiseLessThanOrEqual(value, newColumn.ColumnContainer); + return newColumn; + } + } + public partial class SingleDataFrameColumn + { + internal BooleanDataFrameColumn ElementwiseLessThanOrEqualImplementation(float value) + { + BooleanDataFrameColumn newColumn = CloneAsBooleanColumn(); + ColumnContainer.ElementwiseLessThanOrEqual(value, newColumn.ColumnContainer); + return newColumn; + } + } + public partial class Int32DataFrameColumn + { + internal BooleanDataFrameColumn ElementwiseLessThanOrEqualImplementation(int value) + { + BooleanDataFrameColumn newColumn = CloneAsBooleanColumn(); + ColumnContainer.ElementwiseLessThanOrEqual(value, newColumn.ColumnContainer); + return newColumn; + } + } + public partial class Int64DataFrameColumn + { + internal BooleanDataFrameColumn ElementwiseLessThanOrEqualImplementation(long value) + { + BooleanDataFrameColumn newColumn = CloneAsBooleanColumn(); + ColumnContainer.ElementwiseLessThanOrEqual(value, newColumn.ColumnContainer); + return newColumn; + } + } + public partial class SByteDataFrameColumn + { + internal BooleanDataFrameColumn ElementwiseLessThanOrEqualImplementation(sbyte value) + { + BooleanDataFrameColumn newColumn = CloneAsBooleanColumn(); + ColumnContainer.ElementwiseLessThanOrEqual(value, newColumn.ColumnContainer); + return newColumn; + } + } + public partial class Int16DataFrameColumn + { + internal BooleanDataFrameColumn ElementwiseLessThanOrEqualImplementation(short value) + { + BooleanDataFrameColumn newColumn = CloneAsBooleanColumn(); + ColumnContainer.ElementwiseLessThanOrEqual(value, newColumn.ColumnContainer); + return newColumn; + } + } + public partial class UInt32DataFrameColumn + { + internal BooleanDataFrameColumn ElementwiseLessThanOrEqualImplementation(uint value) + { + BooleanDataFrameColumn newColumn = CloneAsBooleanColumn(); + ColumnContainer.ElementwiseLessThanOrEqual(value, newColumn.ColumnContainer); + return newColumn; + } + } + public partial class UInt64DataFrameColumn + { + internal BooleanDataFrameColumn ElementwiseLessThanOrEqualImplementation(ulong value) + { + BooleanDataFrameColumn newColumn = CloneAsBooleanColumn(); + ColumnContainer.ElementwiseLessThanOrEqual(value, newColumn.ColumnContainer); + return newColumn; + } + } + public partial class UInt16DataFrameColumn + { + internal BooleanDataFrameColumn ElementwiseLessThanOrEqualImplementation(ushort value) + { + BooleanDataFrameColumn newColumn = CloneAsBooleanColumn(); + ColumnContainer.ElementwiseLessThanOrEqual(value, newColumn.ColumnContainer); + return newColumn; + } + } + public partial class BooleanDataFrameColumn + { + internal BooleanDataFrameColumn ElementwiseGreaterThanImplementation(BooleanDataFrameColumn column) + { + BooleanDataFrameColumn newColumn = CloneAsBooleanColumn(); + ColumnContainer.ElementwiseGreaterThan(column.ColumnContainer, newColumn.ColumnContainer); + return newColumn; + } + } + public partial class ByteDataFrameColumn + { + internal BooleanDataFrameColumn ElementwiseGreaterThanImplementation(ByteDataFrameColumn column) + { + BooleanDataFrameColumn newColumn = CloneAsBooleanColumn(); + ColumnContainer.ElementwiseGreaterThan(column.ColumnContainer, newColumn.ColumnContainer); + return newColumn; + } + } + public partial class DecimalDataFrameColumn + { + internal BooleanDataFrameColumn ElementwiseGreaterThanImplementation(DecimalDataFrameColumn column) + { + BooleanDataFrameColumn newColumn = CloneAsBooleanColumn(); + ColumnContainer.ElementwiseGreaterThan(column.ColumnContainer, newColumn.ColumnContainer); + return newColumn; + } + } + public partial class DoubleDataFrameColumn + { + internal BooleanDataFrameColumn ElementwiseGreaterThanImplementation(DoubleDataFrameColumn column) + { + BooleanDataFrameColumn newColumn = CloneAsBooleanColumn(); + ColumnContainer.ElementwiseGreaterThan(column.ColumnContainer, newColumn.ColumnContainer); + return newColumn; + } + } + public partial class SingleDataFrameColumn + { + internal BooleanDataFrameColumn ElementwiseGreaterThanImplementation(SingleDataFrameColumn column) + { + BooleanDataFrameColumn newColumn = CloneAsBooleanColumn(); + ColumnContainer.ElementwiseGreaterThan(column.ColumnContainer, newColumn.ColumnContainer); + return newColumn; + } + } + public partial class Int32DataFrameColumn + { + internal BooleanDataFrameColumn ElementwiseGreaterThanImplementation(Int32DataFrameColumn column) + { + BooleanDataFrameColumn newColumn = CloneAsBooleanColumn(); + ColumnContainer.ElementwiseGreaterThan(column.ColumnContainer, newColumn.ColumnContainer); + return newColumn; + } + } + public partial class Int64DataFrameColumn + { + internal BooleanDataFrameColumn ElementwiseGreaterThanImplementation(Int64DataFrameColumn column) + { + BooleanDataFrameColumn newColumn = CloneAsBooleanColumn(); + ColumnContainer.ElementwiseGreaterThan(column.ColumnContainer, newColumn.ColumnContainer); + return newColumn; + } + } + public partial class SByteDataFrameColumn + { + internal BooleanDataFrameColumn ElementwiseGreaterThanImplementation(SByteDataFrameColumn column) + { + BooleanDataFrameColumn newColumn = CloneAsBooleanColumn(); + ColumnContainer.ElementwiseGreaterThan(column.ColumnContainer, newColumn.ColumnContainer); + return newColumn; + } + } + public partial class Int16DataFrameColumn + { + internal BooleanDataFrameColumn ElementwiseGreaterThanImplementation(Int16DataFrameColumn column) + { + BooleanDataFrameColumn newColumn = CloneAsBooleanColumn(); + ColumnContainer.ElementwiseGreaterThan(column.ColumnContainer, newColumn.ColumnContainer); + return newColumn; + } + } + public partial class UInt32DataFrameColumn + { + internal BooleanDataFrameColumn ElementwiseGreaterThanImplementation(UInt32DataFrameColumn column) + { + BooleanDataFrameColumn newColumn = CloneAsBooleanColumn(); + ColumnContainer.ElementwiseGreaterThan(column.ColumnContainer, newColumn.ColumnContainer); + return newColumn; + } + } + public partial class UInt64DataFrameColumn + { + internal BooleanDataFrameColumn ElementwiseGreaterThanImplementation(UInt64DataFrameColumn column) + { + BooleanDataFrameColumn newColumn = CloneAsBooleanColumn(); + ColumnContainer.ElementwiseGreaterThan(column.ColumnContainer, newColumn.ColumnContainer); + return newColumn; + } + } + public partial class UInt16DataFrameColumn + { + internal BooleanDataFrameColumn ElementwiseGreaterThanImplementation(UInt16DataFrameColumn column) + { + BooleanDataFrameColumn newColumn = CloneAsBooleanColumn(); + ColumnContainer.ElementwiseGreaterThan(column.ColumnContainer, newColumn.ColumnContainer); + return newColumn; + } + } + public partial class BooleanDataFrameColumn + { + internal BooleanDataFrameColumn ElementwiseGreaterThanImplementation(bool value) + { + BooleanDataFrameColumn newColumn = CloneAsBooleanColumn(); + ColumnContainer.ElementwiseGreaterThan(value, newColumn.ColumnContainer); + return newColumn; + } + } + public partial class ByteDataFrameColumn + { + internal BooleanDataFrameColumn ElementwiseGreaterThanImplementation(byte value) + { + BooleanDataFrameColumn newColumn = CloneAsBooleanColumn(); + ColumnContainer.ElementwiseGreaterThan(value, newColumn.ColumnContainer); + return newColumn; + } + } + public partial class DecimalDataFrameColumn + { + internal BooleanDataFrameColumn ElementwiseGreaterThanImplementation(decimal value) + { + BooleanDataFrameColumn newColumn = CloneAsBooleanColumn(); + ColumnContainer.ElementwiseGreaterThan(value, newColumn.ColumnContainer); + return newColumn; + } + } + public partial class DoubleDataFrameColumn + { + internal BooleanDataFrameColumn ElementwiseGreaterThanImplementation(double value) + { + BooleanDataFrameColumn newColumn = CloneAsBooleanColumn(); + ColumnContainer.ElementwiseGreaterThan(value, newColumn.ColumnContainer); + return newColumn; + } + } + public partial class SingleDataFrameColumn + { + internal BooleanDataFrameColumn ElementwiseGreaterThanImplementation(float value) + { + BooleanDataFrameColumn newColumn = CloneAsBooleanColumn(); + ColumnContainer.ElementwiseGreaterThan(value, newColumn.ColumnContainer); + return newColumn; + } + } + public partial class Int32DataFrameColumn + { + internal BooleanDataFrameColumn ElementwiseGreaterThanImplementation(int value) + { + BooleanDataFrameColumn newColumn = CloneAsBooleanColumn(); + ColumnContainer.ElementwiseGreaterThan(value, newColumn.ColumnContainer); + return newColumn; + } + } + public partial class Int64DataFrameColumn + { + internal BooleanDataFrameColumn ElementwiseGreaterThanImplementation(long value) + { + BooleanDataFrameColumn newColumn = CloneAsBooleanColumn(); + ColumnContainer.ElementwiseGreaterThan(value, newColumn.ColumnContainer); + return newColumn; + } + } + public partial class SByteDataFrameColumn + { + internal BooleanDataFrameColumn ElementwiseGreaterThanImplementation(sbyte value) + { + BooleanDataFrameColumn newColumn = CloneAsBooleanColumn(); + ColumnContainer.ElementwiseGreaterThan(value, newColumn.ColumnContainer); + return newColumn; + } + } + public partial class Int16DataFrameColumn + { + internal BooleanDataFrameColumn ElementwiseGreaterThanImplementation(short value) + { + BooleanDataFrameColumn newColumn = CloneAsBooleanColumn(); + ColumnContainer.ElementwiseGreaterThan(value, newColumn.ColumnContainer); + return newColumn; + } + } + public partial class UInt32DataFrameColumn + { + internal BooleanDataFrameColumn ElementwiseGreaterThanImplementation(uint value) + { + BooleanDataFrameColumn newColumn = CloneAsBooleanColumn(); + ColumnContainer.ElementwiseGreaterThan(value, newColumn.ColumnContainer); + return newColumn; + } + } + public partial class UInt64DataFrameColumn + { + internal BooleanDataFrameColumn ElementwiseGreaterThanImplementation(ulong value) + { + BooleanDataFrameColumn newColumn = CloneAsBooleanColumn(); + ColumnContainer.ElementwiseGreaterThan(value, newColumn.ColumnContainer); + return newColumn; + } + } + public partial class UInt16DataFrameColumn + { + internal BooleanDataFrameColumn ElementwiseGreaterThanImplementation(ushort value) + { + BooleanDataFrameColumn newColumn = CloneAsBooleanColumn(); + ColumnContainer.ElementwiseGreaterThan(value, newColumn.ColumnContainer); + return newColumn; + } + } + public partial class BooleanDataFrameColumn + { + internal BooleanDataFrameColumn ElementwiseLessThanImplementation(BooleanDataFrameColumn column) + { + BooleanDataFrameColumn newColumn = CloneAsBooleanColumn(); + ColumnContainer.ElementwiseLessThan(column.ColumnContainer, newColumn.ColumnContainer); + return newColumn; + } + } + public partial class ByteDataFrameColumn + { + internal BooleanDataFrameColumn ElementwiseLessThanImplementation(ByteDataFrameColumn column) + { + BooleanDataFrameColumn newColumn = CloneAsBooleanColumn(); + ColumnContainer.ElementwiseLessThan(column.ColumnContainer, newColumn.ColumnContainer); + return newColumn; + } + } + public partial class DecimalDataFrameColumn + { + internal BooleanDataFrameColumn ElementwiseLessThanImplementation(DecimalDataFrameColumn column) + { + BooleanDataFrameColumn newColumn = CloneAsBooleanColumn(); + ColumnContainer.ElementwiseLessThan(column.ColumnContainer, newColumn.ColumnContainer); + return newColumn; + } + } + public partial class DoubleDataFrameColumn + { + internal BooleanDataFrameColumn ElementwiseLessThanImplementation(DoubleDataFrameColumn column) + { + BooleanDataFrameColumn newColumn = CloneAsBooleanColumn(); + ColumnContainer.ElementwiseLessThan(column.ColumnContainer, newColumn.ColumnContainer); + return newColumn; + } + } + public partial class SingleDataFrameColumn + { + internal BooleanDataFrameColumn ElementwiseLessThanImplementation(SingleDataFrameColumn column) + { + BooleanDataFrameColumn newColumn = CloneAsBooleanColumn(); + ColumnContainer.ElementwiseLessThan(column.ColumnContainer, newColumn.ColumnContainer); + return newColumn; + } + } + public partial class Int32DataFrameColumn + { + internal BooleanDataFrameColumn ElementwiseLessThanImplementation(Int32DataFrameColumn column) + { + BooleanDataFrameColumn newColumn = CloneAsBooleanColumn(); + ColumnContainer.ElementwiseLessThan(column.ColumnContainer, newColumn.ColumnContainer); + return newColumn; + } + } + public partial class Int64DataFrameColumn + { + internal BooleanDataFrameColumn ElementwiseLessThanImplementation(Int64DataFrameColumn column) + { + BooleanDataFrameColumn newColumn = CloneAsBooleanColumn(); + ColumnContainer.ElementwiseLessThan(column.ColumnContainer, newColumn.ColumnContainer); + return newColumn; + } + } + public partial class SByteDataFrameColumn + { + internal BooleanDataFrameColumn ElementwiseLessThanImplementation(SByteDataFrameColumn column) + { + BooleanDataFrameColumn newColumn = CloneAsBooleanColumn(); + ColumnContainer.ElementwiseLessThan(column.ColumnContainer, newColumn.ColumnContainer); + return newColumn; + } + } + public partial class Int16DataFrameColumn + { + internal BooleanDataFrameColumn ElementwiseLessThanImplementation(Int16DataFrameColumn column) + { + BooleanDataFrameColumn newColumn = CloneAsBooleanColumn(); + ColumnContainer.ElementwiseLessThan(column.ColumnContainer, newColumn.ColumnContainer); + return newColumn; + } + } + public partial class UInt32DataFrameColumn + { + internal BooleanDataFrameColumn ElementwiseLessThanImplementation(UInt32DataFrameColumn column) + { + BooleanDataFrameColumn newColumn = CloneAsBooleanColumn(); + ColumnContainer.ElementwiseLessThan(column.ColumnContainer, newColumn.ColumnContainer); + return newColumn; + } + } + public partial class UInt64DataFrameColumn + { + internal BooleanDataFrameColumn ElementwiseLessThanImplementation(UInt64DataFrameColumn column) + { + BooleanDataFrameColumn newColumn = CloneAsBooleanColumn(); + ColumnContainer.ElementwiseLessThan(column.ColumnContainer, newColumn.ColumnContainer); + return newColumn; + } + } + public partial class UInt16DataFrameColumn + { + internal BooleanDataFrameColumn ElementwiseLessThanImplementation(UInt16DataFrameColumn column) + { + BooleanDataFrameColumn newColumn = CloneAsBooleanColumn(); + ColumnContainer.ElementwiseLessThan(column.ColumnContainer, newColumn.ColumnContainer); + return newColumn; + } + } + public partial class BooleanDataFrameColumn + { + internal BooleanDataFrameColumn ElementwiseLessThanImplementation(bool value) + { + BooleanDataFrameColumn newColumn = CloneAsBooleanColumn(); + ColumnContainer.ElementwiseLessThan(value, newColumn.ColumnContainer); + return newColumn; + } + } + public partial class ByteDataFrameColumn + { + internal BooleanDataFrameColumn ElementwiseLessThanImplementation(byte value) + { + BooleanDataFrameColumn newColumn = CloneAsBooleanColumn(); + ColumnContainer.ElementwiseLessThan(value, newColumn.ColumnContainer); + return newColumn; + } + } + public partial class DecimalDataFrameColumn + { + internal BooleanDataFrameColumn ElementwiseLessThanImplementation(decimal value) + { + BooleanDataFrameColumn newColumn = CloneAsBooleanColumn(); + ColumnContainer.ElementwiseLessThan(value, newColumn.ColumnContainer); + return newColumn; + } + } + public partial class DoubleDataFrameColumn + { + internal BooleanDataFrameColumn ElementwiseLessThanImplementation(double value) + { + BooleanDataFrameColumn newColumn = CloneAsBooleanColumn(); + ColumnContainer.ElementwiseLessThan(value, newColumn.ColumnContainer); + return newColumn; + } + } + public partial class SingleDataFrameColumn + { + internal BooleanDataFrameColumn ElementwiseLessThanImplementation(float value) + { + BooleanDataFrameColumn newColumn = CloneAsBooleanColumn(); + ColumnContainer.ElementwiseLessThan(value, newColumn.ColumnContainer); + return newColumn; + } + } + public partial class Int32DataFrameColumn + { + internal BooleanDataFrameColumn ElementwiseLessThanImplementation(int value) + { + BooleanDataFrameColumn newColumn = CloneAsBooleanColumn(); + ColumnContainer.ElementwiseLessThan(value, newColumn.ColumnContainer); + return newColumn; + } + } + public partial class Int64DataFrameColumn + { + internal BooleanDataFrameColumn ElementwiseLessThanImplementation(long value) + { + BooleanDataFrameColumn newColumn = CloneAsBooleanColumn(); + ColumnContainer.ElementwiseLessThan(value, newColumn.ColumnContainer); + return newColumn; + } + } + public partial class SByteDataFrameColumn + { + internal BooleanDataFrameColumn ElementwiseLessThanImplementation(sbyte value) + { + BooleanDataFrameColumn newColumn = CloneAsBooleanColumn(); + ColumnContainer.ElementwiseLessThan(value, newColumn.ColumnContainer); + return newColumn; + } + } + public partial class Int16DataFrameColumn + { + internal BooleanDataFrameColumn ElementwiseLessThanImplementation(short value) + { + BooleanDataFrameColumn newColumn = CloneAsBooleanColumn(); + ColumnContainer.ElementwiseLessThan(value, newColumn.ColumnContainer); + return newColumn; + } + } + public partial class UInt32DataFrameColumn + { + internal BooleanDataFrameColumn ElementwiseLessThanImplementation(uint value) + { + BooleanDataFrameColumn newColumn = CloneAsBooleanColumn(); + ColumnContainer.ElementwiseLessThan(value, newColumn.ColumnContainer); + return newColumn; + } + } + public partial class UInt64DataFrameColumn + { + internal BooleanDataFrameColumn ElementwiseLessThanImplementation(ulong value) + { + BooleanDataFrameColumn newColumn = CloneAsBooleanColumn(); + ColumnContainer.ElementwiseLessThan(value, newColumn.ColumnContainer); + return newColumn; + } + } + public partial class UInt16DataFrameColumn + { + internal BooleanDataFrameColumn ElementwiseLessThanImplementation(ushort value) + { + BooleanDataFrameColumn newColumn = CloneAsBooleanColumn(); + ColumnContainer.ElementwiseLessThan(value, newColumn.ColumnContainer); + return newColumn; + } + } +} diff --git a/src/Microsoft.Data.Analysis/PrimitiveDataFrameColumn.BinaryOperationImplementations.Exploded.tt b/src/Microsoft.Data.Analysis/PrimitiveDataFrameColumn.BinaryOperationImplementations.Exploded.tt new file mode 100644 index 0000000000..d71534742a --- /dev/null +++ b/src/Microsoft.Data.Analysis/PrimitiveDataFrameColumn.BinaryOperationImplementations.Exploded.tt @@ -0,0 +1,235 @@ +<#@ template debug="false" hostspecific="false" language="C#" #> +<#@ assembly name="System.Core" #> +<#@ import namespace="System.Linq" #> +<#@ import namespace="System.Text" #> +<#@ import namespace="System.Collections.Generic" #> +<#@ import namespace="System.Diagnostics" #> +<#@ output extension=".cs" #> +<#@ include file="ColumnArithmeticTemplate.ttinclude"#> +<#@ include file="PrimitiveDataFrameColumn.BinaryOperations.Combinations.ttinclude" #> +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +// Generated from DataFrameColumn.BinaryOperationImplementations.ExplodedColumns.tt. Do not modify directly + +using System; +using System.Collections.Generic; + +namespace Microsoft.Data.Analysis +{ +<# +bool supportedInPlace(string type1, string type2) +{ + string ret = GetBinaryOperationReturnType(type1, type2); + if (ret == type1) + { + return true; + } + return false; +} +#> +<# +// This method generates implementations where the arguments are of the same type. +void GenerateAllBinaryCombinationsForMethod(string inputMethodName) +{ + foreach (TypeCombination types in BinaryOperationCombinations.binaryOperationCombinations) +{ + string returnType = types.ReturnColumnType; + string columnType = types.ThisColumnType; + string otherColumnType = types.OtherColumnType; + if (columnType != otherColumnType) + { + continue; + } + if (columnType != returnType) + { + continue; + } + Debug.Assert(returnType == otherColumnType); + + string fullColumnType = GetCapitalizedPrimitiveTypes(columnType) + "DataFrameColumn"; + string fullReturnType = fullColumnType; + string fullOtherColumnType = fullColumnType; + + string capitalizedReturnType = GetCapitalizedPrimitiveTypes(returnType); + string methodName = inputMethodName + "Implementation"; +#> + public partial class <#=fullColumnType#> + { +<# + if (supportedInPlace(columnType, otherColumnType)) + { +#> + internal <#=fullReturnType#> <#=methodName#>(<#=fullOtherColumnType#> column, bool inPlace = false) +<# + } + else + { +#> + internal <#=fullReturnType#> <#=methodName#>(<#=fullOtherColumnType#> column) +<# + } +#> + { + if (column.Length != Length) + { + throw new ArgumentException(Strings.MismatchedColumnLengths, nameof(column)); + } + <#=fullReturnType#> newColumn = inPlace ? this : CloneAs<#=capitalizedReturnType#>Column(); + newColumn.ColumnContainer.<#=inputMethodName#>(column.ColumnContainer); + return newColumn; + } + } +<# +} +} +#> +<# +// This method generates implementations where the arguments are of the same type. +void GenerateAllBinaryScalarCombinationsForMethod(string inputMethodName) +{ + foreach (TypeCombination types in BinaryOperationCombinations.binaryOperationCombinations) +{ + string returnType = types.ReturnColumnType; + string columnType = types.ThisColumnType; + string otherColumnType = types.OtherColumnType; + if (columnType != otherColumnType) + { + continue; + } + if (columnType != returnType) + { + continue; + } + Debug.Assert(returnType == otherColumnType); + + string fullColumnType = GetCapitalizedPrimitiveTypes(columnType) + "DataFrameColumn"; + string fullReturnType = fullColumnType; + string fullOtherColumnType = fullColumnType; + + string capitalizedReturnType = GetCapitalizedPrimitiveTypes(returnType); + string methodName = inputMethodName; + methodName += "Implementation"; +#> + public partial class <#=fullColumnType#> + { +<# + if (supportedInPlace(columnType, otherColumnType)) + { +#> + internal <#=fullReturnType#> <#=methodName#>(<#=otherColumnType#> value, bool inPlace = false) +<# + } + else + { +#> + internal <#=fullReturnType#> <#=methodName#>(<#=otherColumnType#> value) +<# + } +#> + { + <#=fullReturnType#> newColumn = inPlace ? this : CloneAs<#=capitalizedReturnType#>Column(); + newColumn.ColumnContainer.<#=inputMethodName#>(value); + return newColumn; + } + } +<# +} +} +#> +<# +void GenerateAllComparisonCombinationsForMethod(string inputMethodName) +{ + foreach (TypeCombination types in ComparisonOperationCombinations.comparisonOperationCombinations) + { + string returnType = types.ReturnColumnType; + string columnType = types.ThisColumnType; + string otherColumnType = types.OtherColumnType; + if (columnType != otherColumnType) + { + continue; + } + Debug.Assert(returnType == otherColumnType); + + string fullColumnType = GetCapitalizedPrimitiveTypes(columnType) + "DataFrameColumn"; + string fullReturnType = GetCapitalizedPrimitiveTypes(returnType) + "DataFrameColumn"; + string fullOtherColumnType = GetCapitalizedPrimitiveTypes(otherColumnType) + "DataFrameColumn"; + + string capitalizedReturnType = GetCapitalizedPrimitiveTypes(returnType); + string methodName = inputMethodName; + methodName += "Implementation"; + +#> + public partial class <#=fullColumnType#> + { + internal <#=fullReturnType#> <#=methodName#>(<#=fullOtherColumnType#> column) + { + BooleanDataFrameColumn newColumn = CloneAsBooleanColumn(); + ColumnContainer.<#=inputMethodName#>(column.ColumnContainer, newColumn.ColumnContainer); + return newColumn; + } + } +<# + } + } +#> +<# +void GenerateAllComparisonScalarCombinationsForMethod(string inputMethodName) +{ + foreach (TypeCombination types in ComparisonOperationCombinations.comparisonOperationCombinations) + { + string returnType = types.ReturnColumnType; + string columnType = types.ThisColumnType; + string otherColumnType = types.OtherColumnType; + if (columnType != otherColumnType) + { + continue; + } + Debug.Assert(returnType == otherColumnType); + + string fullColumnType = GetCapitalizedPrimitiveTypes(columnType) + "DataFrameColumn"; + string fullReturnType = GetCapitalizedPrimitiveTypes(returnType) + "DataFrameColumn"; + + string capitalizedReturnType = GetCapitalizedPrimitiveTypes(returnType); + string methodName = inputMethodName; + methodName += "Implementation"; + +#> + public partial class <#=fullColumnType#> + { + internal <#=fullReturnType#> <#=methodName#>(<#=otherColumnType#> value) + { + BooleanDataFrameColumn newColumn = CloneAsBooleanColumn(); + ColumnContainer.<#=inputMethodName#>(value, newColumn.ColumnContainer); + return newColumn; + } + } +<# + } + } +#> +<# +foreach (MethodConfiguration method in methodConfiguration) +{ + // Don't generate method for Comparison and ComparisonScalar methods here + if (method.MethodType == MethodType.Binary && method.IsNumeric) + { + GenerateAllBinaryCombinationsForMethod(method.MethodName); + } + else if (method.MethodType == MethodType.BinaryScalar && method.IsNumeric) + { + GenerateAllBinaryScalarCombinationsForMethod(method.MethodName); + GenerateAllBinaryScalarCombinationsForMethod("Reverse" + method.MethodName); + } + else if (method.MethodType == MethodType.Comparison) + { + GenerateAllComparisonCombinationsForMethod(method.MethodName); + } + else if (method.MethodType == MethodType.ComparisonScalar) + { + GenerateAllComparisonScalarCombinationsForMethod(method.MethodName); + } +} +#> +} diff --git a/src/Microsoft.Data.Analysis/PrimitiveDataFrameColumn.BinaryOperations.Combinations.tt b/src/Microsoft.Data.Analysis/PrimitiveDataFrameColumn.BinaryOperations.Combinations.tt new file mode 100644 index 0000000000..33f0a0ad72 --- /dev/null +++ b/src/Microsoft.Data.Analysis/PrimitiveDataFrameColumn.BinaryOperations.Combinations.tt @@ -0,0 +1,116 @@ +<#@ template debug="false" hostspecific="false" language="C#" #> +<#@ assembly name="System.Core" #> +<#@ import namespace="System.Linq" #> +<#@ import namespace="System.Text" #> +<#@ import namespace="System.Collections.Generic"#> +<#@ output extension=".ttinclude"#> +<#@ include file="ColumnArithmeticTemplate.ttinclude"#> +\<#+ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +// Generated from PrimitiveDataFrameColumn.BinaryOperations.Combinations.tt. Do not modify directly + +public class TypeCombination +{ + private string _thisColumnType; + private string _otherColumnType; + private string _returnColumnType; + + public TypeCombination(string thisColumnType, string otherColumnType, string returnColumnType) + { + _thisColumnType = thisColumnType; + _otherColumnType = otherColumnType; + _returnColumnType = returnColumnType; + } + public string ThisColumnType => _thisColumnType; + public string OtherColumnType => _otherColumnType; + public string ReturnColumnType => _returnColumnType; +} + +public static class BinaryOperationCombinations +{ + + public static List binaryOperationCombinations = new List + { +<# +foreach (TypeConfiguration type in typeConfiguration) +{ + if(!type.SupportsNumeric || type.TypeName == "char") + { + continue; + } + foreach (TypeConfiguration type2 in typeConfiguration) + { + if (!type2.SupportsNumeric || type2.TypeName == "char") + { + continue; + } +#> +<# +// We won't support binary operations on pairs of signed and unsigned types yet. For users, there is a simple work around of cloning the columns to higher types(short -> int, int -> long etc) and then performing binary ops on them +if (IsMixedSignedAndUnsignedTypePair(type.TypeName, type2.TypeName)) { + // continue; +} + +// If the C# spec doesn't allow some implicit conversions, don't define that API +string returnType = GetBinaryOperationReturnType(type, type2); +if (returnType == string.Empty) +{ + continue; +} +#> + new TypeCombination("<#=type.TypeName#>", "<#=type2.TypeName#>", "<#=returnType#>"), +<# + } +} +#> + }; +} + +public static class ComparisonOperationCombinations +{ + public static List comparisonOperationCombinations = new List + { +<# + foreach (TypeConfiguration type in typeConfiguration) + { + if (type.TypeName == "char") + { + continue; + } + foreach (TypeConfiguration innerType in typeConfiguration) + { + if (innerType.TypeName == "char") + { + continue; + } + if (type.TypeName == "bool" && innerType.TypeName != "bool") + { + continue; + } + if (type.SupportsNumeric != innerType.SupportsNumeric) + { + continue; + } + // For comparison, we don't exclude mixed signed and unsigned types since the result is always a bool + + if (type.SupportsNumeric) + { + // If the C# spec doesn't allow some implicit conversions, don't define that API. For ex: float == decimal or long == ulong are not allowed + string returnType = GetBinaryOperationReturnType(type, innerType); + if (returnType == string.Empty) + { + continue; + } + } +#> + new TypeCombination("<#=type.TypeName#>", "<#=innerType.TypeName#>", "bool"), +<# + } + } +#> + }; +} +\#> diff --git a/src/Microsoft.Data.Analysis/PrimitiveDataFrameColumn.BinaryOperations.Combinations.ttinclude b/src/Microsoft.Data.Analysis/PrimitiveDataFrameColumn.BinaryOperations.Combinations.ttinclude new file mode 100644 index 0000000000..23a88d1f12 --- /dev/null +++ b/src/Microsoft.Data.Analysis/PrimitiveDataFrameColumn.BinaryOperations.Combinations.ttinclude @@ -0,0 +1,271 @@ + +<#+ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +// Generated from PrimitiveDataFrameColumn.BinaryOperations.Combinations.tt. Do not modify directly + +public class TypeCombination +{ + private string _thisColumnType; + private string _otherColumnType; + private string _returnColumnType; + + public TypeCombination(string thisColumnType, string otherColumnType, string returnColumnType) + { + _thisColumnType = thisColumnType; + _otherColumnType = otherColumnType; + _returnColumnType = returnColumnType; + } + public string ThisColumnType => _thisColumnType; + public string OtherColumnType => _otherColumnType; + public string ReturnColumnType => _returnColumnType; +} + +public static class BinaryOperationCombinations +{ + + public static List binaryOperationCombinations = new List + { + new TypeCombination("byte", "byte", "int"), + new TypeCombination("byte", "decimal", "decimal"), + new TypeCombination("byte", "double", "double"), + new TypeCombination("byte", "float", "float"), + new TypeCombination("byte", "int", "int"), + new TypeCombination("byte", "long", "long"), + new TypeCombination("byte", "sbyte", "int"), + new TypeCombination("byte", "short", "int"), + new TypeCombination("byte", "uint", "uint"), + new TypeCombination("byte", "ulong", "ulong"), + new TypeCombination("byte", "ushort", "int"), + new TypeCombination("decimal", "byte", "decimal"), + new TypeCombination("decimal", "decimal", "decimal"), + new TypeCombination("decimal", "int", "decimal"), + new TypeCombination("decimal", "long", "decimal"), + new TypeCombination("decimal", "sbyte", "decimal"), + new TypeCombination("decimal", "short", "decimal"), + new TypeCombination("decimal", "uint", "decimal"), + new TypeCombination("decimal", "ulong", "decimal"), + new TypeCombination("decimal", "ushort", "decimal"), + new TypeCombination("double", "byte", "double"), + new TypeCombination("double", "double", "double"), + new TypeCombination("double", "float", "double"), + new TypeCombination("double", "int", "double"), + new TypeCombination("double", "long", "double"), + new TypeCombination("double", "sbyte", "double"), + new TypeCombination("double", "short", "double"), + new TypeCombination("double", "uint", "double"), + new TypeCombination("double", "ulong", "double"), + new TypeCombination("double", "ushort", "double"), + new TypeCombination("float", "byte", "float"), + new TypeCombination("float", "double", "double"), + new TypeCombination("float", "float", "float"), + new TypeCombination("float", "int", "float"), + new TypeCombination("float", "long", "float"), + new TypeCombination("float", "sbyte", "float"), + new TypeCombination("float", "short", "float"), + new TypeCombination("float", "uint", "float"), + new TypeCombination("float", "ulong", "float"), + new TypeCombination("float", "ushort", "float"), + new TypeCombination("int", "byte", "int"), + new TypeCombination("int", "decimal", "decimal"), + new TypeCombination("int", "double", "double"), + new TypeCombination("int", "float", "float"), + new TypeCombination("int", "int", "int"), + new TypeCombination("int", "long", "long"), + new TypeCombination("int", "sbyte", "int"), + new TypeCombination("int", "short", "int"), + new TypeCombination("int", "uint", "long"), + new TypeCombination("int", "ulong", "float"), + new TypeCombination("int", "ushort", "int"), + new TypeCombination("long", "byte", "long"), + new TypeCombination("long", "decimal", "decimal"), + new TypeCombination("long", "double", "double"), + new TypeCombination("long", "float", "float"), + new TypeCombination("long", "int", "long"), + new TypeCombination("long", "long", "long"), + new TypeCombination("long", "sbyte", "long"), + new TypeCombination("long", "short", "long"), + new TypeCombination("long", "uint", "long"), + new TypeCombination("long", "ushort", "long"), + new TypeCombination("sbyte", "byte", "int"), + new TypeCombination("sbyte", "decimal", "decimal"), + new TypeCombination("sbyte", "double", "double"), + new TypeCombination("sbyte", "float", "float"), + new TypeCombination("sbyte", "int", "int"), + new TypeCombination("sbyte", "long", "long"), + new TypeCombination("sbyte", "sbyte", "int"), + new TypeCombination("sbyte", "short", "int"), + new TypeCombination("sbyte", "uint", "long"), + new TypeCombination("sbyte", "ulong", "float"), + new TypeCombination("sbyte", "ushort", "int"), + new TypeCombination("short", "byte", "int"), + new TypeCombination("short", "decimal", "decimal"), + new TypeCombination("short", "double", "double"), + new TypeCombination("short", "float", "float"), + new TypeCombination("short", "int", "int"), + new TypeCombination("short", "long", "long"), + new TypeCombination("short", "sbyte", "int"), + new TypeCombination("short", "short", "int"), + new TypeCombination("short", "uint", "long"), + new TypeCombination("short", "ulong", "float"), + new TypeCombination("short", "ushort", "int"), + new TypeCombination("uint", "byte", "uint"), + new TypeCombination("uint", "decimal", "decimal"), + new TypeCombination("uint", "double", "double"), + new TypeCombination("uint", "float", "float"), + new TypeCombination("uint", "int", "long"), + new TypeCombination("uint", "long", "long"), + new TypeCombination("uint", "sbyte", "long"), + new TypeCombination("uint", "short", "long"), + new TypeCombination("uint", "uint", "uint"), + new TypeCombination("uint", "ulong", "ulong"), + new TypeCombination("uint", "ushort", "uint"), + new TypeCombination("ulong", "byte", "ulong"), + new TypeCombination("ulong", "decimal", "decimal"), + new TypeCombination("ulong", "double", "double"), + new TypeCombination("ulong", "float", "float"), + new TypeCombination("ulong", "int", "float"), + new TypeCombination("ulong", "sbyte", "float"), + new TypeCombination("ulong", "short", "float"), + new TypeCombination("ulong", "uint", "ulong"), + new TypeCombination("ulong", "ulong", "ulong"), + new TypeCombination("ulong", "ushort", "ulong"), + new TypeCombination("ushort", "byte", "int"), + new TypeCombination("ushort", "decimal", "decimal"), + new TypeCombination("ushort", "double", "double"), + new TypeCombination("ushort", "float", "float"), + new TypeCombination("ushort", "int", "int"), + new TypeCombination("ushort", "long", "long"), + new TypeCombination("ushort", "sbyte", "int"), + new TypeCombination("ushort", "short", "int"), + new TypeCombination("ushort", "uint", "uint"), + new TypeCombination("ushort", "ulong", "ulong"), + new TypeCombination("ushort", "ushort", "int"), + }; +} + +public static class ComparisonOperationCombinations +{ + public static List comparisonOperationCombinations = new List + { + new TypeCombination("bool", "bool", "bool"), + new TypeCombination("byte", "byte", "bool"), + new TypeCombination("byte", "decimal", "bool"), + new TypeCombination("byte", "double", "bool"), + new TypeCombination("byte", "float", "bool"), + new TypeCombination("byte", "int", "bool"), + new TypeCombination("byte", "long", "bool"), + new TypeCombination("byte", "sbyte", "bool"), + new TypeCombination("byte", "short", "bool"), + new TypeCombination("byte", "uint", "bool"), + new TypeCombination("byte", "ulong", "bool"), + new TypeCombination("byte", "ushort", "bool"), + new TypeCombination("decimal", "byte", "bool"), + new TypeCombination("decimal", "decimal", "bool"), + new TypeCombination("decimal", "int", "bool"), + new TypeCombination("decimal", "long", "bool"), + new TypeCombination("decimal", "sbyte", "bool"), + new TypeCombination("decimal", "short", "bool"), + new TypeCombination("decimal", "uint", "bool"), + new TypeCombination("decimal", "ulong", "bool"), + new TypeCombination("decimal", "ushort", "bool"), + new TypeCombination("double", "byte", "bool"), + new TypeCombination("double", "double", "bool"), + new TypeCombination("double", "float", "bool"), + new TypeCombination("double", "int", "bool"), + new TypeCombination("double", "long", "bool"), + new TypeCombination("double", "sbyte", "bool"), + new TypeCombination("double", "short", "bool"), + new TypeCombination("double", "uint", "bool"), + new TypeCombination("double", "ulong", "bool"), + new TypeCombination("double", "ushort", "bool"), + new TypeCombination("float", "byte", "bool"), + new TypeCombination("float", "double", "bool"), + new TypeCombination("float", "float", "bool"), + new TypeCombination("float", "int", "bool"), + new TypeCombination("float", "long", "bool"), + new TypeCombination("float", "sbyte", "bool"), + new TypeCombination("float", "short", "bool"), + new TypeCombination("float", "uint", "bool"), + new TypeCombination("float", "ulong", "bool"), + new TypeCombination("float", "ushort", "bool"), + new TypeCombination("int", "byte", "bool"), + new TypeCombination("int", "decimal", "bool"), + new TypeCombination("int", "double", "bool"), + new TypeCombination("int", "float", "bool"), + new TypeCombination("int", "int", "bool"), + new TypeCombination("int", "long", "bool"), + new TypeCombination("int", "sbyte", "bool"), + new TypeCombination("int", "short", "bool"), + new TypeCombination("int", "uint", "bool"), + new TypeCombination("int", "ulong", "bool"), + new TypeCombination("int", "ushort", "bool"), + new TypeCombination("long", "byte", "bool"), + new TypeCombination("long", "decimal", "bool"), + new TypeCombination("long", "double", "bool"), + new TypeCombination("long", "float", "bool"), + new TypeCombination("long", "int", "bool"), + new TypeCombination("long", "long", "bool"), + new TypeCombination("long", "sbyte", "bool"), + new TypeCombination("long", "short", "bool"), + new TypeCombination("long", "uint", "bool"), + new TypeCombination("long", "ushort", "bool"), + new TypeCombination("sbyte", "byte", "bool"), + new TypeCombination("sbyte", "decimal", "bool"), + new TypeCombination("sbyte", "double", "bool"), + new TypeCombination("sbyte", "float", "bool"), + new TypeCombination("sbyte", "int", "bool"), + new TypeCombination("sbyte", "long", "bool"), + new TypeCombination("sbyte", "sbyte", "bool"), + new TypeCombination("sbyte", "short", "bool"), + new TypeCombination("sbyte", "uint", "bool"), + new TypeCombination("sbyte", "ulong", "bool"), + new TypeCombination("sbyte", "ushort", "bool"), + new TypeCombination("short", "byte", "bool"), + new TypeCombination("short", "decimal", "bool"), + new TypeCombination("short", "double", "bool"), + new TypeCombination("short", "float", "bool"), + new TypeCombination("short", "int", "bool"), + new TypeCombination("short", "long", "bool"), + new TypeCombination("short", "sbyte", "bool"), + new TypeCombination("short", "short", "bool"), + new TypeCombination("short", "uint", "bool"), + new TypeCombination("short", "ulong", "bool"), + new TypeCombination("short", "ushort", "bool"), + new TypeCombination("uint", "byte", "bool"), + new TypeCombination("uint", "decimal", "bool"), + new TypeCombination("uint", "double", "bool"), + new TypeCombination("uint", "float", "bool"), + new TypeCombination("uint", "int", "bool"), + new TypeCombination("uint", "long", "bool"), + new TypeCombination("uint", "sbyte", "bool"), + new TypeCombination("uint", "short", "bool"), + new TypeCombination("uint", "uint", "bool"), + new TypeCombination("uint", "ulong", "bool"), + new TypeCombination("uint", "ushort", "bool"), + new TypeCombination("ulong", "byte", "bool"), + new TypeCombination("ulong", "decimal", "bool"), + new TypeCombination("ulong", "double", "bool"), + new TypeCombination("ulong", "float", "bool"), + new TypeCombination("ulong", "int", "bool"), + new TypeCombination("ulong", "sbyte", "bool"), + new TypeCombination("ulong", "short", "bool"), + new TypeCombination("ulong", "uint", "bool"), + new TypeCombination("ulong", "ulong", "bool"), + new TypeCombination("ulong", "ushort", "bool"), + new TypeCombination("ushort", "byte", "bool"), + new TypeCombination("ushort", "decimal", "bool"), + new TypeCombination("ushort", "double", "bool"), + new TypeCombination("ushort", "float", "bool"), + new TypeCombination("ushort", "int", "bool"), + new TypeCombination("ushort", "long", "bool"), + new TypeCombination("ushort", "sbyte", "bool"), + new TypeCombination("ushort", "short", "bool"), + new TypeCombination("ushort", "uint", "bool"), + new TypeCombination("ushort", "ulong", "bool"), + new TypeCombination("ushort", "ushort", "bool"), + }; +} +#> diff --git a/src/Microsoft.Data.Analysis/PrimitiveDataFrameColumn.BinaryOperations.cs b/src/Microsoft.Data.Analysis/PrimitiveDataFrameColumn.BinaryOperations.cs new file mode 100644 index 0000000000..6ad8319edf --- /dev/null +++ b/src/Microsoft.Data.Analysis/PrimitiveDataFrameColumn.BinaryOperations.cs @@ -0,0 +1,2624 @@ + +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +// Generated from PrimitiveDataFrameColumn.BinaryOperations.tt. Do not modify directly + +using System; +using System.Collections.Generic; +using System.Runtime.CompilerServices; + +namespace Microsoft.Data.Analysis +{ + public partial class PrimitiveDataFrameColumn : DataFrameColumn + where T : unmanaged + { + /// + public override DataFrameColumn Add(DataFrameColumn column, bool inPlace = false) + { + switch (column) + { + case PrimitiveDataFrameColumn boolColumn: + return AddImplementation(column as PrimitiveDataFrameColumn, inPlace); + case PrimitiveDataFrameColumn byteColumn: + return AddImplementation(column as PrimitiveDataFrameColumn, inPlace); + case PrimitiveDataFrameColumn charColumn: + return AddImplementation(column as PrimitiveDataFrameColumn, inPlace); + case PrimitiveDataFrameColumn decimalColumn: + return AddImplementation(column as PrimitiveDataFrameColumn, inPlace); + case PrimitiveDataFrameColumn doubleColumn: + return AddImplementation(column as PrimitiveDataFrameColumn, inPlace); + case PrimitiveDataFrameColumn floatColumn: + return AddImplementation(column as PrimitiveDataFrameColumn, inPlace); + case PrimitiveDataFrameColumn intColumn: + return AddImplementation(column as PrimitiveDataFrameColumn, inPlace); + case PrimitiveDataFrameColumn longColumn: + return AddImplementation(column as PrimitiveDataFrameColumn, inPlace); + case PrimitiveDataFrameColumn sbyteColumn: + return AddImplementation(column as PrimitiveDataFrameColumn, inPlace); + case PrimitiveDataFrameColumn shortColumn: + return AddImplementation(column as PrimitiveDataFrameColumn, inPlace); + case PrimitiveDataFrameColumn uintColumn: + return AddImplementation(column as PrimitiveDataFrameColumn, inPlace); + case PrimitiveDataFrameColumn ulongColumn: + return AddImplementation(column as PrimitiveDataFrameColumn, inPlace); + case PrimitiveDataFrameColumn ushortColumn: + return AddImplementation(column as PrimitiveDataFrameColumn, inPlace); + default: + throw new NotSupportedException(); + } + } + /// + public override DataFrameColumn Add(U value, bool inPlace = false) + { + DataFrameColumn column = value as DataFrameColumn; + if (column != null) + { + return Add(column, inPlace); + } + return AddImplementation(value, inPlace); + } + /// + public override DataFrameColumn Subtract(DataFrameColumn column, bool inPlace = false) + { + switch (column) + { + case PrimitiveDataFrameColumn boolColumn: + return SubtractImplementation(column as PrimitiveDataFrameColumn, inPlace); + case PrimitiveDataFrameColumn byteColumn: + return SubtractImplementation(column as PrimitiveDataFrameColumn, inPlace); + case PrimitiveDataFrameColumn charColumn: + return SubtractImplementation(column as PrimitiveDataFrameColumn, inPlace); + case PrimitiveDataFrameColumn decimalColumn: + return SubtractImplementation(column as PrimitiveDataFrameColumn, inPlace); + case PrimitiveDataFrameColumn doubleColumn: + return SubtractImplementation(column as PrimitiveDataFrameColumn, inPlace); + case PrimitiveDataFrameColumn floatColumn: + return SubtractImplementation(column as PrimitiveDataFrameColumn, inPlace); + case PrimitiveDataFrameColumn intColumn: + return SubtractImplementation(column as PrimitiveDataFrameColumn, inPlace); + case PrimitiveDataFrameColumn longColumn: + return SubtractImplementation(column as PrimitiveDataFrameColumn, inPlace); + case PrimitiveDataFrameColumn sbyteColumn: + return SubtractImplementation(column as PrimitiveDataFrameColumn, inPlace); + case PrimitiveDataFrameColumn shortColumn: + return SubtractImplementation(column as PrimitiveDataFrameColumn, inPlace); + case PrimitiveDataFrameColumn uintColumn: + return SubtractImplementation(column as PrimitiveDataFrameColumn, inPlace); + case PrimitiveDataFrameColumn ulongColumn: + return SubtractImplementation(column as PrimitiveDataFrameColumn, inPlace); + case PrimitiveDataFrameColumn ushortColumn: + return SubtractImplementation(column as PrimitiveDataFrameColumn, inPlace); + default: + throw new NotSupportedException(); + } + } + /// + public override DataFrameColumn Subtract(U value, bool inPlace = false) + { + DataFrameColumn column = value as DataFrameColumn; + if (column != null) + { + return Subtract(column, inPlace); + } + return SubtractImplementation(value, inPlace); + } + /// + public override DataFrameColumn Multiply(DataFrameColumn column, bool inPlace = false) + { + switch (column) + { + case PrimitiveDataFrameColumn boolColumn: + return MultiplyImplementation(column as PrimitiveDataFrameColumn, inPlace); + case PrimitiveDataFrameColumn byteColumn: + return MultiplyImplementation(column as PrimitiveDataFrameColumn, inPlace); + case PrimitiveDataFrameColumn charColumn: + return MultiplyImplementation(column as PrimitiveDataFrameColumn, inPlace); + case PrimitiveDataFrameColumn decimalColumn: + return MultiplyImplementation(column as PrimitiveDataFrameColumn, inPlace); + case PrimitiveDataFrameColumn doubleColumn: + return MultiplyImplementation(column as PrimitiveDataFrameColumn, inPlace); + case PrimitiveDataFrameColumn floatColumn: + return MultiplyImplementation(column as PrimitiveDataFrameColumn, inPlace); + case PrimitiveDataFrameColumn intColumn: + return MultiplyImplementation(column as PrimitiveDataFrameColumn, inPlace); + case PrimitiveDataFrameColumn longColumn: + return MultiplyImplementation(column as PrimitiveDataFrameColumn, inPlace); + case PrimitiveDataFrameColumn sbyteColumn: + return MultiplyImplementation(column as PrimitiveDataFrameColumn, inPlace); + case PrimitiveDataFrameColumn shortColumn: + return MultiplyImplementation(column as PrimitiveDataFrameColumn, inPlace); + case PrimitiveDataFrameColumn uintColumn: + return MultiplyImplementation(column as PrimitiveDataFrameColumn, inPlace); + case PrimitiveDataFrameColumn ulongColumn: + return MultiplyImplementation(column as PrimitiveDataFrameColumn, inPlace); + case PrimitiveDataFrameColumn ushortColumn: + return MultiplyImplementation(column as PrimitiveDataFrameColumn, inPlace); + default: + throw new NotSupportedException(); + } + } + /// + public override DataFrameColumn Multiply(U value, bool inPlace = false) + { + DataFrameColumn column = value as DataFrameColumn; + if (column != null) + { + return Multiply(column, inPlace); + } + return MultiplyImplementation(value, inPlace); + } + /// + public override DataFrameColumn Divide(DataFrameColumn column, bool inPlace = false) + { + switch (column) + { + case PrimitiveDataFrameColumn boolColumn: + return DivideImplementation(column as PrimitiveDataFrameColumn, inPlace); + case PrimitiveDataFrameColumn byteColumn: + return DivideImplementation(column as PrimitiveDataFrameColumn, inPlace); + case PrimitiveDataFrameColumn charColumn: + return DivideImplementation(column as PrimitiveDataFrameColumn, inPlace); + case PrimitiveDataFrameColumn decimalColumn: + return DivideImplementation(column as PrimitiveDataFrameColumn, inPlace); + case PrimitiveDataFrameColumn doubleColumn: + return DivideImplementation(column as PrimitiveDataFrameColumn, inPlace); + case PrimitiveDataFrameColumn floatColumn: + return DivideImplementation(column as PrimitiveDataFrameColumn, inPlace); + case PrimitiveDataFrameColumn intColumn: + return DivideImplementation(column as PrimitiveDataFrameColumn, inPlace); + case PrimitiveDataFrameColumn longColumn: + return DivideImplementation(column as PrimitiveDataFrameColumn, inPlace); + case PrimitiveDataFrameColumn sbyteColumn: + return DivideImplementation(column as PrimitiveDataFrameColumn, inPlace); + case PrimitiveDataFrameColumn shortColumn: + return DivideImplementation(column as PrimitiveDataFrameColumn, inPlace); + case PrimitiveDataFrameColumn uintColumn: + return DivideImplementation(column as PrimitiveDataFrameColumn, inPlace); + case PrimitiveDataFrameColumn ulongColumn: + return DivideImplementation(column as PrimitiveDataFrameColumn, inPlace); + case PrimitiveDataFrameColumn ushortColumn: + return DivideImplementation(column as PrimitiveDataFrameColumn, inPlace); + default: + throw new NotSupportedException(); + } + } + /// + public override DataFrameColumn Divide(U value, bool inPlace = false) + { + DataFrameColumn column = value as DataFrameColumn; + if (column != null) + { + return Divide(column, inPlace); + } + return DivideImplementation(value, inPlace); + } + /// + public override DataFrameColumn Modulo(DataFrameColumn column, bool inPlace = false) + { + switch (column) + { + case PrimitiveDataFrameColumn boolColumn: + return ModuloImplementation(column as PrimitiveDataFrameColumn, inPlace); + case PrimitiveDataFrameColumn byteColumn: + return ModuloImplementation(column as PrimitiveDataFrameColumn, inPlace); + case PrimitiveDataFrameColumn charColumn: + return ModuloImplementation(column as PrimitiveDataFrameColumn, inPlace); + case PrimitiveDataFrameColumn decimalColumn: + return ModuloImplementation(column as PrimitiveDataFrameColumn, inPlace); + case PrimitiveDataFrameColumn doubleColumn: + return ModuloImplementation(column as PrimitiveDataFrameColumn, inPlace); + case PrimitiveDataFrameColumn floatColumn: + return ModuloImplementation(column as PrimitiveDataFrameColumn, inPlace); + case PrimitiveDataFrameColumn intColumn: + return ModuloImplementation(column as PrimitiveDataFrameColumn, inPlace); + case PrimitiveDataFrameColumn longColumn: + return ModuloImplementation(column as PrimitiveDataFrameColumn, inPlace); + case PrimitiveDataFrameColumn sbyteColumn: + return ModuloImplementation(column as PrimitiveDataFrameColumn, inPlace); + case PrimitiveDataFrameColumn shortColumn: + return ModuloImplementation(column as PrimitiveDataFrameColumn, inPlace); + case PrimitiveDataFrameColumn uintColumn: + return ModuloImplementation(column as PrimitiveDataFrameColumn, inPlace); + case PrimitiveDataFrameColumn ulongColumn: + return ModuloImplementation(column as PrimitiveDataFrameColumn, inPlace); + case PrimitiveDataFrameColumn ushortColumn: + return ModuloImplementation(column as PrimitiveDataFrameColumn, inPlace); + default: + throw new NotSupportedException(); + } + } + /// + public override DataFrameColumn Modulo(U value, bool inPlace = false) + { + DataFrameColumn column = value as DataFrameColumn; + if (column != null) + { + return Modulo(column, inPlace); + } + return ModuloImplementation(value, inPlace); + } + /// + public override DataFrameColumn And(DataFrameColumn column, bool inPlace = false) + { + switch (column) + { + case PrimitiveDataFrameColumn boolColumn: + return AndImplementation(column as PrimitiveDataFrameColumn, inPlace); + case PrimitiveDataFrameColumn byteColumn: + return AndImplementation(column as PrimitiveDataFrameColumn, inPlace); + case PrimitiveDataFrameColumn charColumn: + return AndImplementation(column as PrimitiveDataFrameColumn, inPlace); + case PrimitiveDataFrameColumn decimalColumn: + return AndImplementation(column as PrimitiveDataFrameColumn, inPlace); + case PrimitiveDataFrameColumn doubleColumn: + return AndImplementation(column as PrimitiveDataFrameColumn, inPlace); + case PrimitiveDataFrameColumn floatColumn: + return AndImplementation(column as PrimitiveDataFrameColumn, inPlace); + case PrimitiveDataFrameColumn intColumn: + return AndImplementation(column as PrimitiveDataFrameColumn, inPlace); + case PrimitiveDataFrameColumn longColumn: + return AndImplementation(column as PrimitiveDataFrameColumn, inPlace); + case PrimitiveDataFrameColumn sbyteColumn: + return AndImplementation(column as PrimitiveDataFrameColumn, inPlace); + case PrimitiveDataFrameColumn shortColumn: + return AndImplementation(column as PrimitiveDataFrameColumn, inPlace); + case PrimitiveDataFrameColumn uintColumn: + return AndImplementation(column as PrimitiveDataFrameColumn, inPlace); + case PrimitiveDataFrameColumn ulongColumn: + return AndImplementation(column as PrimitiveDataFrameColumn, inPlace); + case PrimitiveDataFrameColumn ushortColumn: + return AndImplementation(column as PrimitiveDataFrameColumn, inPlace); + default: + throw new NotSupportedException(); + } + } + /// + public override PrimitiveDataFrameColumn And(bool value, bool inPlace = false) + { + return AndImplementation(value, inPlace); + } + /// + public override DataFrameColumn Or(DataFrameColumn column, bool inPlace = false) + { + switch (column) + { + case PrimitiveDataFrameColumn boolColumn: + return OrImplementation(column as PrimitiveDataFrameColumn, inPlace); + case PrimitiveDataFrameColumn byteColumn: + return OrImplementation(column as PrimitiveDataFrameColumn, inPlace); + case PrimitiveDataFrameColumn charColumn: + return OrImplementation(column as PrimitiveDataFrameColumn, inPlace); + case PrimitiveDataFrameColumn decimalColumn: + return OrImplementation(column as PrimitiveDataFrameColumn, inPlace); + case PrimitiveDataFrameColumn doubleColumn: + return OrImplementation(column as PrimitiveDataFrameColumn, inPlace); + case PrimitiveDataFrameColumn floatColumn: + return OrImplementation(column as PrimitiveDataFrameColumn, inPlace); + case PrimitiveDataFrameColumn intColumn: + return OrImplementation(column as PrimitiveDataFrameColumn, inPlace); + case PrimitiveDataFrameColumn longColumn: + return OrImplementation(column as PrimitiveDataFrameColumn, inPlace); + case PrimitiveDataFrameColumn sbyteColumn: + return OrImplementation(column as PrimitiveDataFrameColumn, inPlace); + case PrimitiveDataFrameColumn shortColumn: + return OrImplementation(column as PrimitiveDataFrameColumn, inPlace); + case PrimitiveDataFrameColumn uintColumn: + return OrImplementation(column as PrimitiveDataFrameColumn, inPlace); + case PrimitiveDataFrameColumn ulongColumn: + return OrImplementation(column as PrimitiveDataFrameColumn, inPlace); + case PrimitiveDataFrameColumn ushortColumn: + return OrImplementation(column as PrimitiveDataFrameColumn, inPlace); + default: + throw new NotSupportedException(); + } + } + /// + public override PrimitiveDataFrameColumn Or(bool value, bool inPlace = false) + { + return OrImplementation(value, inPlace); + } + /// + public override DataFrameColumn Xor(DataFrameColumn column, bool inPlace = false) + { + switch (column) + { + case PrimitiveDataFrameColumn boolColumn: + return XorImplementation(column as PrimitiveDataFrameColumn, inPlace); + case PrimitiveDataFrameColumn byteColumn: + return XorImplementation(column as PrimitiveDataFrameColumn, inPlace); + case PrimitiveDataFrameColumn charColumn: + return XorImplementation(column as PrimitiveDataFrameColumn, inPlace); + case PrimitiveDataFrameColumn decimalColumn: + return XorImplementation(column as PrimitiveDataFrameColumn, inPlace); + case PrimitiveDataFrameColumn doubleColumn: + return XorImplementation(column as PrimitiveDataFrameColumn, inPlace); + case PrimitiveDataFrameColumn floatColumn: + return XorImplementation(column as PrimitiveDataFrameColumn, inPlace); + case PrimitiveDataFrameColumn intColumn: + return XorImplementation(column as PrimitiveDataFrameColumn, inPlace); + case PrimitiveDataFrameColumn longColumn: + return XorImplementation(column as PrimitiveDataFrameColumn, inPlace); + case PrimitiveDataFrameColumn sbyteColumn: + return XorImplementation(column as PrimitiveDataFrameColumn, inPlace); + case PrimitiveDataFrameColumn shortColumn: + return XorImplementation(column as PrimitiveDataFrameColumn, inPlace); + case PrimitiveDataFrameColumn uintColumn: + return XorImplementation(column as PrimitiveDataFrameColumn, inPlace); + case PrimitiveDataFrameColumn ulongColumn: + return XorImplementation(column as PrimitiveDataFrameColumn, inPlace); + case PrimitiveDataFrameColumn ushortColumn: + return XorImplementation(column as PrimitiveDataFrameColumn, inPlace); + default: + throw new NotSupportedException(); + } + } + /// + public override PrimitiveDataFrameColumn Xor(bool value, bool inPlace = false) + { + return XorImplementation(value, inPlace); + } + /// + public override DataFrameColumn LeftShift(int value, bool inPlace = false) + { + return LeftShiftImplementation(value, inPlace); + } + /// + public override DataFrameColumn RightShift(int value, bool inPlace = false) + { + return RightShiftImplementation(value, inPlace); + } + /// + public override PrimitiveDataFrameColumn ElementwiseEquals(DataFrameColumn column) + { + switch (column) + { + case PrimitiveDataFrameColumn boolColumn: + return ElementwiseEqualsImplementation(column as PrimitiveDataFrameColumn); + case PrimitiveDataFrameColumn byteColumn: + return ElementwiseEqualsImplementation(column as PrimitiveDataFrameColumn); + case PrimitiveDataFrameColumn charColumn: + return ElementwiseEqualsImplementation(column as PrimitiveDataFrameColumn); + case PrimitiveDataFrameColumn decimalColumn: + return ElementwiseEqualsImplementation(column as PrimitiveDataFrameColumn); + case PrimitiveDataFrameColumn doubleColumn: + return ElementwiseEqualsImplementation(column as PrimitiveDataFrameColumn); + case PrimitiveDataFrameColumn floatColumn: + return ElementwiseEqualsImplementation(column as PrimitiveDataFrameColumn); + case PrimitiveDataFrameColumn intColumn: + return ElementwiseEqualsImplementation(column as PrimitiveDataFrameColumn); + case PrimitiveDataFrameColumn longColumn: + return ElementwiseEqualsImplementation(column as PrimitiveDataFrameColumn); + case PrimitiveDataFrameColumn sbyteColumn: + return ElementwiseEqualsImplementation(column as PrimitiveDataFrameColumn); + case PrimitiveDataFrameColumn shortColumn: + return ElementwiseEqualsImplementation(column as PrimitiveDataFrameColumn); + case PrimitiveDataFrameColumn uintColumn: + return ElementwiseEqualsImplementation(column as PrimitiveDataFrameColumn); + case PrimitiveDataFrameColumn ulongColumn: + return ElementwiseEqualsImplementation(column as PrimitiveDataFrameColumn); + case PrimitiveDataFrameColumn ushortColumn: + return ElementwiseEqualsImplementation(column as PrimitiveDataFrameColumn); + default: + throw new NotSupportedException(); + } + } + /// + public override PrimitiveDataFrameColumn ElementwiseEquals(U value) + { + DataFrameColumn column = value as DataFrameColumn; + if (column != null) + { + return ElementwiseEquals(column); + } + return ElementwiseEqualsImplementation(value); + } + /// + public override PrimitiveDataFrameColumn ElementwiseNotEquals(DataFrameColumn column) + { + switch (column) + { + case PrimitiveDataFrameColumn boolColumn: + return ElementwiseNotEqualsImplementation(column as PrimitiveDataFrameColumn); + case PrimitiveDataFrameColumn byteColumn: + return ElementwiseNotEqualsImplementation(column as PrimitiveDataFrameColumn); + case PrimitiveDataFrameColumn charColumn: + return ElementwiseNotEqualsImplementation(column as PrimitiveDataFrameColumn); + case PrimitiveDataFrameColumn decimalColumn: + return ElementwiseNotEqualsImplementation(column as PrimitiveDataFrameColumn); + case PrimitiveDataFrameColumn doubleColumn: + return ElementwiseNotEqualsImplementation(column as PrimitiveDataFrameColumn); + case PrimitiveDataFrameColumn floatColumn: + return ElementwiseNotEqualsImplementation(column as PrimitiveDataFrameColumn); + case PrimitiveDataFrameColumn intColumn: + return ElementwiseNotEqualsImplementation(column as PrimitiveDataFrameColumn); + case PrimitiveDataFrameColumn longColumn: + return ElementwiseNotEqualsImplementation(column as PrimitiveDataFrameColumn); + case PrimitiveDataFrameColumn sbyteColumn: + return ElementwiseNotEqualsImplementation(column as PrimitiveDataFrameColumn); + case PrimitiveDataFrameColumn shortColumn: + return ElementwiseNotEqualsImplementation(column as PrimitiveDataFrameColumn); + case PrimitiveDataFrameColumn uintColumn: + return ElementwiseNotEqualsImplementation(column as PrimitiveDataFrameColumn); + case PrimitiveDataFrameColumn ulongColumn: + return ElementwiseNotEqualsImplementation(column as PrimitiveDataFrameColumn); + case PrimitiveDataFrameColumn ushortColumn: + return ElementwiseNotEqualsImplementation(column as PrimitiveDataFrameColumn); + default: + throw new NotSupportedException(); + } + } + /// + public override PrimitiveDataFrameColumn ElementwiseNotEquals(U value) + { + DataFrameColumn column = value as DataFrameColumn; + if (column != null) + { + return ElementwiseNotEquals(column); + } + return ElementwiseNotEqualsImplementation(value); + } + /// + public override PrimitiveDataFrameColumn ElementwiseGreaterThanOrEqual(DataFrameColumn column) + { + switch (column) + { + case PrimitiveDataFrameColumn boolColumn: + return ElementwiseGreaterThanOrEqualImplementation(column as PrimitiveDataFrameColumn); + case PrimitiveDataFrameColumn byteColumn: + return ElementwiseGreaterThanOrEqualImplementation(column as PrimitiveDataFrameColumn); + case PrimitiveDataFrameColumn charColumn: + return ElementwiseGreaterThanOrEqualImplementation(column as PrimitiveDataFrameColumn); + case PrimitiveDataFrameColumn decimalColumn: + return ElementwiseGreaterThanOrEqualImplementation(column as PrimitiveDataFrameColumn); + case PrimitiveDataFrameColumn doubleColumn: + return ElementwiseGreaterThanOrEqualImplementation(column as PrimitiveDataFrameColumn); + case PrimitiveDataFrameColumn floatColumn: + return ElementwiseGreaterThanOrEqualImplementation(column as PrimitiveDataFrameColumn); + case PrimitiveDataFrameColumn intColumn: + return ElementwiseGreaterThanOrEqualImplementation(column as PrimitiveDataFrameColumn); + case PrimitiveDataFrameColumn longColumn: + return ElementwiseGreaterThanOrEqualImplementation(column as PrimitiveDataFrameColumn); + case PrimitiveDataFrameColumn sbyteColumn: + return ElementwiseGreaterThanOrEqualImplementation(column as PrimitiveDataFrameColumn); + case PrimitiveDataFrameColumn shortColumn: + return ElementwiseGreaterThanOrEqualImplementation(column as PrimitiveDataFrameColumn); + case PrimitiveDataFrameColumn uintColumn: + return ElementwiseGreaterThanOrEqualImplementation(column as PrimitiveDataFrameColumn); + case PrimitiveDataFrameColumn ulongColumn: + return ElementwiseGreaterThanOrEqualImplementation(column as PrimitiveDataFrameColumn); + case PrimitiveDataFrameColumn ushortColumn: + return ElementwiseGreaterThanOrEqualImplementation(column as PrimitiveDataFrameColumn); + default: + throw new NotSupportedException(); + } + } + /// + public override PrimitiveDataFrameColumn ElementwiseGreaterThanOrEqual(U value) + { + DataFrameColumn column = value as DataFrameColumn; + if (column != null) + { + return ElementwiseGreaterThanOrEqual(column); + } + return ElementwiseGreaterThanOrEqualImplementation(value); + } + /// + public override PrimitiveDataFrameColumn ElementwiseLessThanOrEqual(DataFrameColumn column) + { + switch (column) + { + case PrimitiveDataFrameColumn boolColumn: + return ElementwiseLessThanOrEqualImplementation(column as PrimitiveDataFrameColumn); + case PrimitiveDataFrameColumn byteColumn: + return ElementwiseLessThanOrEqualImplementation(column as PrimitiveDataFrameColumn); + case PrimitiveDataFrameColumn charColumn: + return ElementwiseLessThanOrEqualImplementation(column as PrimitiveDataFrameColumn); + case PrimitiveDataFrameColumn decimalColumn: + return ElementwiseLessThanOrEqualImplementation(column as PrimitiveDataFrameColumn); + case PrimitiveDataFrameColumn doubleColumn: + return ElementwiseLessThanOrEqualImplementation(column as PrimitiveDataFrameColumn); + case PrimitiveDataFrameColumn floatColumn: + return ElementwiseLessThanOrEqualImplementation(column as PrimitiveDataFrameColumn); + case PrimitiveDataFrameColumn intColumn: + return ElementwiseLessThanOrEqualImplementation(column as PrimitiveDataFrameColumn); + case PrimitiveDataFrameColumn longColumn: + return ElementwiseLessThanOrEqualImplementation(column as PrimitiveDataFrameColumn); + case PrimitiveDataFrameColumn sbyteColumn: + return ElementwiseLessThanOrEqualImplementation(column as PrimitiveDataFrameColumn); + case PrimitiveDataFrameColumn shortColumn: + return ElementwiseLessThanOrEqualImplementation(column as PrimitiveDataFrameColumn); + case PrimitiveDataFrameColumn uintColumn: + return ElementwiseLessThanOrEqualImplementation(column as PrimitiveDataFrameColumn); + case PrimitiveDataFrameColumn ulongColumn: + return ElementwiseLessThanOrEqualImplementation(column as PrimitiveDataFrameColumn); + case PrimitiveDataFrameColumn ushortColumn: + return ElementwiseLessThanOrEqualImplementation(column as PrimitiveDataFrameColumn); + default: + throw new NotSupportedException(); + } + } + /// + public override PrimitiveDataFrameColumn ElementwiseLessThanOrEqual(U value) + { + DataFrameColumn column = value as DataFrameColumn; + if (column != null) + { + return ElementwiseLessThanOrEqual(column); + } + return ElementwiseLessThanOrEqualImplementation(value); + } + /// + public override PrimitiveDataFrameColumn ElementwiseGreaterThan(DataFrameColumn column) + { + switch (column) + { + case PrimitiveDataFrameColumn boolColumn: + return ElementwiseGreaterThanImplementation(column as PrimitiveDataFrameColumn); + case PrimitiveDataFrameColumn byteColumn: + return ElementwiseGreaterThanImplementation(column as PrimitiveDataFrameColumn); + case PrimitiveDataFrameColumn charColumn: + return ElementwiseGreaterThanImplementation(column as PrimitiveDataFrameColumn); + case PrimitiveDataFrameColumn decimalColumn: + return ElementwiseGreaterThanImplementation(column as PrimitiveDataFrameColumn); + case PrimitiveDataFrameColumn doubleColumn: + return ElementwiseGreaterThanImplementation(column as PrimitiveDataFrameColumn); + case PrimitiveDataFrameColumn floatColumn: + return ElementwiseGreaterThanImplementation(column as PrimitiveDataFrameColumn); + case PrimitiveDataFrameColumn intColumn: + return ElementwiseGreaterThanImplementation(column as PrimitiveDataFrameColumn); + case PrimitiveDataFrameColumn longColumn: + return ElementwiseGreaterThanImplementation(column as PrimitiveDataFrameColumn); + case PrimitiveDataFrameColumn sbyteColumn: + return ElementwiseGreaterThanImplementation(column as PrimitiveDataFrameColumn); + case PrimitiveDataFrameColumn shortColumn: + return ElementwiseGreaterThanImplementation(column as PrimitiveDataFrameColumn); + case PrimitiveDataFrameColumn uintColumn: + return ElementwiseGreaterThanImplementation(column as PrimitiveDataFrameColumn); + case PrimitiveDataFrameColumn ulongColumn: + return ElementwiseGreaterThanImplementation(column as PrimitiveDataFrameColumn); + case PrimitiveDataFrameColumn ushortColumn: + return ElementwiseGreaterThanImplementation(column as PrimitiveDataFrameColumn); + default: + throw new NotSupportedException(); + } + } + /// + public override PrimitiveDataFrameColumn ElementwiseGreaterThan(U value) + { + DataFrameColumn column = value as DataFrameColumn; + if (column != null) + { + return ElementwiseGreaterThan(column); + } + return ElementwiseGreaterThanImplementation(value); + } + /// + public override PrimitiveDataFrameColumn ElementwiseLessThan(DataFrameColumn column) + { + switch (column) + { + case PrimitiveDataFrameColumn boolColumn: + return ElementwiseLessThanImplementation(column as PrimitiveDataFrameColumn); + case PrimitiveDataFrameColumn byteColumn: + return ElementwiseLessThanImplementation(column as PrimitiveDataFrameColumn); + case PrimitiveDataFrameColumn charColumn: + return ElementwiseLessThanImplementation(column as PrimitiveDataFrameColumn); + case PrimitiveDataFrameColumn decimalColumn: + return ElementwiseLessThanImplementation(column as PrimitiveDataFrameColumn); + case PrimitiveDataFrameColumn doubleColumn: + return ElementwiseLessThanImplementation(column as PrimitiveDataFrameColumn); + case PrimitiveDataFrameColumn floatColumn: + return ElementwiseLessThanImplementation(column as PrimitiveDataFrameColumn); + case PrimitiveDataFrameColumn intColumn: + return ElementwiseLessThanImplementation(column as PrimitiveDataFrameColumn); + case PrimitiveDataFrameColumn longColumn: + return ElementwiseLessThanImplementation(column as PrimitiveDataFrameColumn); + case PrimitiveDataFrameColumn sbyteColumn: + return ElementwiseLessThanImplementation(column as PrimitiveDataFrameColumn); + case PrimitiveDataFrameColumn shortColumn: + return ElementwiseLessThanImplementation(column as PrimitiveDataFrameColumn); + case PrimitiveDataFrameColumn uintColumn: + return ElementwiseLessThanImplementation(column as PrimitiveDataFrameColumn); + case PrimitiveDataFrameColumn ulongColumn: + return ElementwiseLessThanImplementation(column as PrimitiveDataFrameColumn); + case PrimitiveDataFrameColumn ushortColumn: + return ElementwiseLessThanImplementation(column as PrimitiveDataFrameColumn); + default: + throw new NotSupportedException(); + } + } + /// + public override PrimitiveDataFrameColumn ElementwiseLessThan(U value) + { + DataFrameColumn column = value as DataFrameColumn; + if (column != null) + { + return ElementwiseLessThan(column); + } + return ElementwiseLessThanImplementation(value); + } + + internal DataFrameColumn AddImplementation(PrimitiveDataFrameColumn column, bool inPlace) + where U : unmanaged + { + if (column.Length != Length) + { + throw new ArgumentException(Strings.MismatchedColumnLengths, nameof(column)); + } + switch (typeof(T)) + { + case Type boolType when boolType == typeof(bool): + throw new NotSupportedException(); + case Type decimalType when decimalType == typeof(decimal): + if (typeof(U) == typeof(bool)) + { + throw new NotSupportedException(); + } + if (typeof(U) == typeof(T)) + { + // No conversions + PrimitiveDataFrameColumn primitiveColumn = this as PrimitiveDataFrameColumn; + PrimitiveDataFrameColumn newColumn = inPlace ? primitiveColumn : primitiveColumn.Clone(); + newColumn._columnContainer.Add(column._columnContainer); + return newColumn; + } + else + { + if (inPlace) + { + throw new ArgumentException(string.Format(Strings.MismatchedColumnValueType, typeof(T)), nameof(column)); + } + PrimitiveDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + decimalColumn._columnContainer.Add(column.CloneAsDecimalColumn()._columnContainer); + return decimalColumn; + } + case Type byteType when byteType == typeof(byte): + case Type charType when charType == typeof(char): + case Type doubleType when doubleType == typeof(double): + case Type floatType when floatType == typeof(float): + case Type intType when intType == typeof(int): + case Type longType when longType == typeof(long): + case Type sbyteType when sbyteType == typeof(sbyte): + case Type shortType when shortType == typeof(short): + case Type uintType when uintType == typeof(uint): + case Type ulongType when ulongType == typeof(ulong): + case Type ushortType when ushortType == typeof(ushort): + if (typeof(U) == typeof(bool)) + { + throw new NotSupportedException(); + } + if (typeof(U) == typeof(T)) + { + // No conversions + PrimitiveDataFrameColumn primitiveColumn = this as PrimitiveDataFrameColumn; + PrimitiveDataFrameColumn newColumn = inPlace ? primitiveColumn : primitiveColumn.Clone(); + newColumn._columnContainer.Add(column._columnContainer); + return newColumn; + } + else + { + if (inPlace) + { + throw new ArgumentException(string.Format(Strings.MismatchedColumnValueType, typeof(T)), nameof(column)); + } + if (typeof(U) == typeof(decimal)) + { + PrimitiveDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + decimalColumn._columnContainer.Add((column as PrimitiveDataFrameColumn)._columnContainer); + return decimalColumn; + } + else + { + PrimitiveDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + doubleColumn._columnContainer.Add(column.CloneAsDoubleColumn()._columnContainer); + return doubleColumn; + } + } + default: + throw new NotSupportedException(); + } + } + internal DataFrameColumn AddImplementation(U value, bool inPlace) + { + switch (typeof(T)) + { + case Type boolType when boolType == typeof(bool): + throw new NotSupportedException(); + case Type decimalType when decimalType == typeof(decimal): + if (typeof(U) == typeof(bool)) + { + throw new NotSupportedException(); + } + if (typeof(U) == typeof(T)) + { + // No conversions + PrimitiveDataFrameColumn primitiveColumn = this; + PrimitiveDataFrameColumn newColumn = inPlace ? primitiveColumn : primitiveColumn.Clone(); + newColumn._columnContainer.Add(Unsafe.As(ref value)); + return newColumn; + } + else + { + if (inPlace) + { + throw new ArgumentException(string.Format(Strings.MismatchedValueType, typeof(T)), nameof(value)); + } + PrimitiveDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + decimalColumn._columnContainer.Add(DecimalConverter.Instance.GetDecimal(value)); + return decimalColumn; + } + case Type byteType when byteType == typeof(byte): + case Type charType when charType == typeof(char): + case Type doubleType when doubleType == typeof(double): + case Type floatType when floatType == typeof(float): + case Type intType when intType == typeof(int): + case Type longType when longType == typeof(long): + case Type sbyteType when sbyteType == typeof(sbyte): + case Type shortType when shortType == typeof(short): + case Type uintType when uintType == typeof(uint): + case Type ulongType when ulongType == typeof(ulong): + case Type ushortType when ushortType == typeof(ushort): + if (typeof(U) == typeof(bool)) + { + throw new NotSupportedException(); + } + if (typeof(U) == typeof(T)) + { + // No conversions + PrimitiveDataFrameColumn primitiveColumn = this; + PrimitiveDataFrameColumn newColumn = inPlace ? primitiveColumn : primitiveColumn.Clone(); + newColumn._columnContainer.Add(Unsafe.As(ref value)); + return newColumn; + } + else + { + if (inPlace) + { + throw new ArgumentException(string.Format(Strings.MismatchedValueType, typeof(T)), nameof(value)); + } + if (typeof(U) == typeof(decimal)) + { + PrimitiveDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + decimalColumn._columnContainer.Add(DecimalConverter.Instance.GetDecimal(value)); + return decimalColumn; + } + else + { + PrimitiveDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + doubleColumn._columnContainer.Add(DoubleConverter.Instance.GetDouble(value)); + return doubleColumn; + } + } + default: + throw new NotSupportedException(); + } + } + internal DataFrameColumn SubtractImplementation(PrimitiveDataFrameColumn column, bool inPlace) + where U : unmanaged + { + if (column.Length != Length) + { + throw new ArgumentException(Strings.MismatchedColumnLengths, nameof(column)); + } + switch (typeof(T)) + { + case Type boolType when boolType == typeof(bool): + throw new NotSupportedException(); + case Type decimalType when decimalType == typeof(decimal): + if (typeof(U) == typeof(bool)) + { + throw new NotSupportedException(); + } + if (typeof(U) == typeof(T)) + { + // No conversions + PrimitiveDataFrameColumn primitiveColumn = this as PrimitiveDataFrameColumn; + PrimitiveDataFrameColumn newColumn = inPlace ? primitiveColumn : primitiveColumn.Clone(); + newColumn._columnContainer.Subtract(column._columnContainer); + return newColumn; + } + else + { + if (inPlace) + { + throw new ArgumentException(string.Format(Strings.MismatchedColumnValueType, typeof(T)), nameof(column)); + } + PrimitiveDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + decimalColumn._columnContainer.Subtract(column.CloneAsDecimalColumn()._columnContainer); + return decimalColumn; + } + case Type byteType when byteType == typeof(byte): + case Type charType when charType == typeof(char): + case Type doubleType when doubleType == typeof(double): + case Type floatType when floatType == typeof(float): + case Type intType when intType == typeof(int): + case Type longType when longType == typeof(long): + case Type sbyteType when sbyteType == typeof(sbyte): + case Type shortType when shortType == typeof(short): + case Type uintType when uintType == typeof(uint): + case Type ulongType when ulongType == typeof(ulong): + case Type ushortType when ushortType == typeof(ushort): + if (typeof(U) == typeof(bool)) + { + throw new NotSupportedException(); + } + if (typeof(U) == typeof(T)) + { + // No conversions + PrimitiveDataFrameColumn primitiveColumn = this as PrimitiveDataFrameColumn; + PrimitiveDataFrameColumn newColumn = inPlace ? primitiveColumn : primitiveColumn.Clone(); + newColumn._columnContainer.Subtract(column._columnContainer); + return newColumn; + } + else + { + if (inPlace) + { + throw new ArgumentException(string.Format(Strings.MismatchedColumnValueType, typeof(T)), nameof(column)); + } + if (typeof(U) == typeof(decimal)) + { + PrimitiveDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + decimalColumn._columnContainer.Subtract((column as PrimitiveDataFrameColumn)._columnContainer); + return decimalColumn; + } + else + { + PrimitiveDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + doubleColumn._columnContainer.Subtract(column.CloneAsDoubleColumn()._columnContainer); + return doubleColumn; + } + } + default: + throw new NotSupportedException(); + } + } + internal DataFrameColumn SubtractImplementation(U value, bool inPlace) + { + switch (typeof(T)) + { + case Type boolType when boolType == typeof(bool): + throw new NotSupportedException(); + case Type decimalType when decimalType == typeof(decimal): + if (typeof(U) == typeof(bool)) + { + throw new NotSupportedException(); + } + if (typeof(U) == typeof(T)) + { + // No conversions + PrimitiveDataFrameColumn primitiveColumn = this; + PrimitiveDataFrameColumn newColumn = inPlace ? primitiveColumn : primitiveColumn.Clone(); + newColumn._columnContainer.Subtract(Unsafe.As(ref value)); + return newColumn; + } + else + { + if (inPlace) + { + throw new ArgumentException(string.Format(Strings.MismatchedValueType, typeof(T)), nameof(value)); + } + PrimitiveDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + decimalColumn._columnContainer.Subtract(DecimalConverter.Instance.GetDecimal(value)); + return decimalColumn; + } + case Type byteType when byteType == typeof(byte): + case Type charType when charType == typeof(char): + case Type doubleType when doubleType == typeof(double): + case Type floatType when floatType == typeof(float): + case Type intType when intType == typeof(int): + case Type longType when longType == typeof(long): + case Type sbyteType when sbyteType == typeof(sbyte): + case Type shortType when shortType == typeof(short): + case Type uintType when uintType == typeof(uint): + case Type ulongType when ulongType == typeof(ulong): + case Type ushortType when ushortType == typeof(ushort): + if (typeof(U) == typeof(bool)) + { + throw new NotSupportedException(); + } + if (typeof(U) == typeof(T)) + { + // No conversions + PrimitiveDataFrameColumn primitiveColumn = this; + PrimitiveDataFrameColumn newColumn = inPlace ? primitiveColumn : primitiveColumn.Clone(); + newColumn._columnContainer.Subtract(Unsafe.As(ref value)); + return newColumn; + } + else + { + if (inPlace) + { + throw new ArgumentException(string.Format(Strings.MismatchedValueType, typeof(T)), nameof(value)); + } + if (typeof(U) == typeof(decimal)) + { + PrimitiveDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + decimalColumn._columnContainer.Subtract(DecimalConverter.Instance.GetDecimal(value)); + return decimalColumn; + } + else + { + PrimitiveDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + doubleColumn._columnContainer.Subtract(DoubleConverter.Instance.GetDouble(value)); + return doubleColumn; + } + } + default: + throw new NotSupportedException(); + } + } + internal DataFrameColumn MultiplyImplementation(PrimitiveDataFrameColumn column, bool inPlace) + where U : unmanaged + { + if (column.Length != Length) + { + throw new ArgumentException(Strings.MismatchedColumnLengths, nameof(column)); + } + switch (typeof(T)) + { + case Type boolType when boolType == typeof(bool): + throw new NotSupportedException(); + case Type decimalType when decimalType == typeof(decimal): + if (typeof(U) == typeof(bool)) + { + throw new NotSupportedException(); + } + if (typeof(U) == typeof(T)) + { + // No conversions + PrimitiveDataFrameColumn primitiveColumn = this as PrimitiveDataFrameColumn; + PrimitiveDataFrameColumn newColumn = inPlace ? primitiveColumn : primitiveColumn.Clone(); + newColumn._columnContainer.Multiply(column._columnContainer); + return newColumn; + } + else + { + if (inPlace) + { + throw new ArgumentException(string.Format(Strings.MismatchedColumnValueType, typeof(T)), nameof(column)); + } + PrimitiveDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + decimalColumn._columnContainer.Multiply(column.CloneAsDecimalColumn()._columnContainer); + return decimalColumn; + } + case Type byteType when byteType == typeof(byte): + case Type charType when charType == typeof(char): + case Type doubleType when doubleType == typeof(double): + case Type floatType when floatType == typeof(float): + case Type intType when intType == typeof(int): + case Type longType when longType == typeof(long): + case Type sbyteType when sbyteType == typeof(sbyte): + case Type shortType when shortType == typeof(short): + case Type uintType when uintType == typeof(uint): + case Type ulongType when ulongType == typeof(ulong): + case Type ushortType when ushortType == typeof(ushort): + if (typeof(U) == typeof(bool)) + { + throw new NotSupportedException(); + } + if (typeof(U) == typeof(T)) + { + // No conversions + PrimitiveDataFrameColumn primitiveColumn = this as PrimitiveDataFrameColumn; + PrimitiveDataFrameColumn newColumn = inPlace ? primitiveColumn : primitiveColumn.Clone(); + newColumn._columnContainer.Multiply(column._columnContainer); + return newColumn; + } + else + { + if (inPlace) + { + throw new ArgumentException(string.Format(Strings.MismatchedColumnValueType, typeof(T)), nameof(column)); + } + if (typeof(U) == typeof(decimal)) + { + PrimitiveDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + decimalColumn._columnContainer.Multiply((column as PrimitiveDataFrameColumn)._columnContainer); + return decimalColumn; + } + else + { + PrimitiveDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + doubleColumn._columnContainer.Multiply(column.CloneAsDoubleColumn()._columnContainer); + return doubleColumn; + } + } + default: + throw new NotSupportedException(); + } + } + internal DataFrameColumn MultiplyImplementation(U value, bool inPlace) + { + switch (typeof(T)) + { + case Type boolType when boolType == typeof(bool): + throw new NotSupportedException(); + case Type decimalType when decimalType == typeof(decimal): + if (typeof(U) == typeof(bool)) + { + throw new NotSupportedException(); + } + if (typeof(U) == typeof(T)) + { + // No conversions + PrimitiveDataFrameColumn primitiveColumn = this; + PrimitiveDataFrameColumn newColumn = inPlace ? primitiveColumn : primitiveColumn.Clone(); + newColumn._columnContainer.Multiply(Unsafe.As(ref value)); + return newColumn; + } + else + { + if (inPlace) + { + throw new ArgumentException(string.Format(Strings.MismatchedValueType, typeof(T)), nameof(value)); + } + PrimitiveDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + decimalColumn._columnContainer.Multiply(DecimalConverter.Instance.GetDecimal(value)); + return decimalColumn; + } + case Type byteType when byteType == typeof(byte): + case Type charType when charType == typeof(char): + case Type doubleType when doubleType == typeof(double): + case Type floatType when floatType == typeof(float): + case Type intType when intType == typeof(int): + case Type longType when longType == typeof(long): + case Type sbyteType when sbyteType == typeof(sbyte): + case Type shortType when shortType == typeof(short): + case Type uintType when uintType == typeof(uint): + case Type ulongType when ulongType == typeof(ulong): + case Type ushortType when ushortType == typeof(ushort): + if (typeof(U) == typeof(bool)) + { + throw new NotSupportedException(); + } + if (typeof(U) == typeof(T)) + { + // No conversions + PrimitiveDataFrameColumn primitiveColumn = this; + PrimitiveDataFrameColumn newColumn = inPlace ? primitiveColumn : primitiveColumn.Clone(); + newColumn._columnContainer.Multiply(Unsafe.As(ref value)); + return newColumn; + } + else + { + if (inPlace) + { + throw new ArgumentException(string.Format(Strings.MismatchedValueType, typeof(T)), nameof(value)); + } + if (typeof(U) == typeof(decimal)) + { + PrimitiveDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + decimalColumn._columnContainer.Multiply(DecimalConverter.Instance.GetDecimal(value)); + return decimalColumn; + } + else + { + PrimitiveDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + doubleColumn._columnContainer.Multiply(DoubleConverter.Instance.GetDouble(value)); + return doubleColumn; + } + } + default: + throw new NotSupportedException(); + } + } + internal DataFrameColumn DivideImplementation(PrimitiveDataFrameColumn column, bool inPlace) + where U : unmanaged + { + if (column.Length != Length) + { + throw new ArgumentException(Strings.MismatchedColumnLengths, nameof(column)); + } + switch (typeof(T)) + { + case Type boolType when boolType == typeof(bool): + throw new NotSupportedException(); + case Type decimalType when decimalType == typeof(decimal): + if (typeof(U) == typeof(bool)) + { + throw new NotSupportedException(); + } + if (typeof(U) == typeof(T)) + { + // No conversions + PrimitiveDataFrameColumn primitiveColumn = this as PrimitiveDataFrameColumn; + PrimitiveDataFrameColumn newColumn = inPlace ? primitiveColumn : primitiveColumn.Clone(); + newColumn._columnContainer.Divide(column._columnContainer); + return newColumn; + } + else + { + if (inPlace) + { + throw new ArgumentException(string.Format(Strings.MismatchedColumnValueType, typeof(T)), nameof(column)); + } + PrimitiveDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + decimalColumn._columnContainer.Divide(column.CloneAsDecimalColumn()._columnContainer); + return decimalColumn; + } + case Type byteType when byteType == typeof(byte): + case Type charType when charType == typeof(char): + case Type doubleType when doubleType == typeof(double): + case Type floatType when floatType == typeof(float): + case Type intType when intType == typeof(int): + case Type longType when longType == typeof(long): + case Type sbyteType when sbyteType == typeof(sbyte): + case Type shortType when shortType == typeof(short): + case Type uintType when uintType == typeof(uint): + case Type ulongType when ulongType == typeof(ulong): + case Type ushortType when ushortType == typeof(ushort): + if (typeof(U) == typeof(bool)) + { + throw new NotSupportedException(); + } + if (typeof(U) == typeof(T)) + { + // No conversions + PrimitiveDataFrameColumn primitiveColumn = this as PrimitiveDataFrameColumn; + PrimitiveDataFrameColumn newColumn = inPlace ? primitiveColumn : primitiveColumn.Clone(); + newColumn._columnContainer.Divide(column._columnContainer); + return newColumn; + } + else + { + if (inPlace) + { + throw new ArgumentException(string.Format(Strings.MismatchedColumnValueType, typeof(T)), nameof(column)); + } + if (typeof(U) == typeof(decimal)) + { + PrimitiveDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + decimalColumn._columnContainer.Divide((column as PrimitiveDataFrameColumn)._columnContainer); + return decimalColumn; + } + else + { + PrimitiveDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + doubleColumn._columnContainer.Divide(column.CloneAsDoubleColumn()._columnContainer); + return doubleColumn; + } + } + default: + throw new NotSupportedException(); + } + } + internal DataFrameColumn DivideImplementation(U value, bool inPlace) + { + switch (typeof(T)) + { + case Type boolType when boolType == typeof(bool): + throw new NotSupportedException(); + case Type decimalType when decimalType == typeof(decimal): + if (typeof(U) == typeof(bool)) + { + throw new NotSupportedException(); + } + if (typeof(U) == typeof(T)) + { + // No conversions + PrimitiveDataFrameColumn primitiveColumn = this; + PrimitiveDataFrameColumn newColumn = inPlace ? primitiveColumn : primitiveColumn.Clone(); + newColumn._columnContainer.Divide(Unsafe.As(ref value)); + return newColumn; + } + else + { + if (inPlace) + { + throw new ArgumentException(string.Format(Strings.MismatchedValueType, typeof(T)), nameof(value)); + } + PrimitiveDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + decimalColumn._columnContainer.Divide(DecimalConverter.Instance.GetDecimal(value)); + return decimalColumn; + } + case Type byteType when byteType == typeof(byte): + case Type charType when charType == typeof(char): + case Type doubleType when doubleType == typeof(double): + case Type floatType when floatType == typeof(float): + case Type intType when intType == typeof(int): + case Type longType when longType == typeof(long): + case Type sbyteType when sbyteType == typeof(sbyte): + case Type shortType when shortType == typeof(short): + case Type uintType when uintType == typeof(uint): + case Type ulongType when ulongType == typeof(ulong): + case Type ushortType when ushortType == typeof(ushort): + if (typeof(U) == typeof(bool)) + { + throw new NotSupportedException(); + } + if (typeof(U) == typeof(T)) + { + // No conversions + PrimitiveDataFrameColumn primitiveColumn = this; + PrimitiveDataFrameColumn newColumn = inPlace ? primitiveColumn : primitiveColumn.Clone(); + newColumn._columnContainer.Divide(Unsafe.As(ref value)); + return newColumn; + } + else + { + if (inPlace) + { + throw new ArgumentException(string.Format(Strings.MismatchedValueType, typeof(T)), nameof(value)); + } + if (typeof(U) == typeof(decimal)) + { + PrimitiveDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + decimalColumn._columnContainer.Divide(DecimalConverter.Instance.GetDecimal(value)); + return decimalColumn; + } + else + { + PrimitiveDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + doubleColumn._columnContainer.Divide(DoubleConverter.Instance.GetDouble(value)); + return doubleColumn; + } + } + default: + throw new NotSupportedException(); + } + } + internal DataFrameColumn ModuloImplementation(PrimitiveDataFrameColumn column, bool inPlace) + where U : unmanaged + { + if (column.Length != Length) + { + throw new ArgumentException(Strings.MismatchedColumnLengths, nameof(column)); + } + switch (typeof(T)) + { + case Type boolType when boolType == typeof(bool): + throw new NotSupportedException(); + case Type decimalType when decimalType == typeof(decimal): + if (typeof(U) == typeof(bool)) + { + throw new NotSupportedException(); + } + if (typeof(U) == typeof(T)) + { + // No conversions + PrimitiveDataFrameColumn primitiveColumn = this as PrimitiveDataFrameColumn; + PrimitiveDataFrameColumn newColumn = inPlace ? primitiveColumn : primitiveColumn.Clone(); + newColumn._columnContainer.Modulo(column._columnContainer); + return newColumn; + } + else + { + if (inPlace) + { + throw new ArgumentException(string.Format(Strings.MismatchedColumnValueType, typeof(T)), nameof(column)); + } + PrimitiveDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + decimalColumn._columnContainer.Modulo(column.CloneAsDecimalColumn()._columnContainer); + return decimalColumn; + } + case Type byteType when byteType == typeof(byte): + case Type charType when charType == typeof(char): + case Type doubleType when doubleType == typeof(double): + case Type floatType when floatType == typeof(float): + case Type intType when intType == typeof(int): + case Type longType when longType == typeof(long): + case Type sbyteType when sbyteType == typeof(sbyte): + case Type shortType when shortType == typeof(short): + case Type uintType when uintType == typeof(uint): + case Type ulongType when ulongType == typeof(ulong): + case Type ushortType when ushortType == typeof(ushort): + if (typeof(U) == typeof(bool)) + { + throw new NotSupportedException(); + } + if (typeof(U) == typeof(T)) + { + // No conversions + PrimitiveDataFrameColumn primitiveColumn = this as PrimitiveDataFrameColumn; + PrimitiveDataFrameColumn newColumn = inPlace ? primitiveColumn : primitiveColumn.Clone(); + newColumn._columnContainer.Modulo(column._columnContainer); + return newColumn; + } + else + { + if (inPlace) + { + throw new ArgumentException(string.Format(Strings.MismatchedColumnValueType, typeof(T)), nameof(column)); + } + if (typeof(U) == typeof(decimal)) + { + PrimitiveDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + decimalColumn._columnContainer.Modulo((column as PrimitiveDataFrameColumn)._columnContainer); + return decimalColumn; + } + else + { + PrimitiveDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + doubleColumn._columnContainer.Modulo(column.CloneAsDoubleColumn()._columnContainer); + return doubleColumn; + } + } + default: + throw new NotSupportedException(); + } + } + internal DataFrameColumn ModuloImplementation(U value, bool inPlace) + { + switch (typeof(T)) + { + case Type boolType when boolType == typeof(bool): + throw new NotSupportedException(); + case Type decimalType when decimalType == typeof(decimal): + if (typeof(U) == typeof(bool)) + { + throw new NotSupportedException(); + } + if (typeof(U) == typeof(T)) + { + // No conversions + PrimitiveDataFrameColumn primitiveColumn = this; + PrimitiveDataFrameColumn newColumn = inPlace ? primitiveColumn : primitiveColumn.Clone(); + newColumn._columnContainer.Modulo(Unsafe.As(ref value)); + return newColumn; + } + else + { + if (inPlace) + { + throw new ArgumentException(string.Format(Strings.MismatchedValueType, typeof(T)), nameof(value)); + } + PrimitiveDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + decimalColumn._columnContainer.Modulo(DecimalConverter.Instance.GetDecimal(value)); + return decimalColumn; + } + case Type byteType when byteType == typeof(byte): + case Type charType when charType == typeof(char): + case Type doubleType when doubleType == typeof(double): + case Type floatType when floatType == typeof(float): + case Type intType when intType == typeof(int): + case Type longType when longType == typeof(long): + case Type sbyteType when sbyteType == typeof(sbyte): + case Type shortType when shortType == typeof(short): + case Type uintType when uintType == typeof(uint): + case Type ulongType when ulongType == typeof(ulong): + case Type ushortType when ushortType == typeof(ushort): + if (typeof(U) == typeof(bool)) + { + throw new NotSupportedException(); + } + if (typeof(U) == typeof(T)) + { + // No conversions + PrimitiveDataFrameColumn primitiveColumn = this; + PrimitiveDataFrameColumn newColumn = inPlace ? primitiveColumn : primitiveColumn.Clone(); + newColumn._columnContainer.Modulo(Unsafe.As(ref value)); + return newColumn; + } + else + { + if (inPlace) + { + throw new ArgumentException(string.Format(Strings.MismatchedValueType, typeof(T)), nameof(value)); + } + if (typeof(U) == typeof(decimal)) + { + PrimitiveDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + decimalColumn._columnContainer.Modulo(DecimalConverter.Instance.GetDecimal(value)); + return decimalColumn; + } + else + { + PrimitiveDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + doubleColumn._columnContainer.Modulo(DoubleConverter.Instance.GetDouble(value)); + return doubleColumn; + } + } + default: + throw new NotSupportedException(); + } + } + internal DataFrameColumn AndImplementation(PrimitiveDataFrameColumn column, bool inPlace) + where U : unmanaged + { + if (column.Length != Length) + { + throw new ArgumentException(Strings.MismatchedColumnLengths, nameof(column)); + } + switch (typeof(T)) + { + case Type boolType when boolType == typeof(bool): + if (typeof(U) != typeof(bool)) + { + throw new NotSupportedException(); + } + PrimitiveDataFrameColumn typedColumn = this as PrimitiveDataFrameColumn; + PrimitiveDataFrameColumn retColumn = inPlace ? typedColumn : typedColumn.Clone(); + retColumn._columnContainer.And(column._columnContainer); + return retColumn; + case Type byteType when byteType == typeof(byte): + case Type charType when charType == typeof(char): + case Type decimalType when decimalType == typeof(decimal): + case Type doubleType when doubleType == typeof(double): + case Type floatType when floatType == typeof(float): + case Type intType when intType == typeof(int): + case Type longType when longType == typeof(long): + case Type sbyteType when sbyteType == typeof(sbyte): + case Type shortType when shortType == typeof(short): + case Type uintType when uintType == typeof(uint): + case Type ulongType when ulongType == typeof(ulong): + case Type ushortType when ushortType == typeof(ushort): + default: + throw new NotSupportedException(); + } + } + internal PrimitiveDataFrameColumn AndImplementation(U value, bool inPlace) + { + switch (typeof(T)) + { + case Type boolType when boolType == typeof(bool): + if (typeof(U) != typeof(bool)) + { + throw new NotSupportedException(); + } + PrimitiveDataFrameColumn typedColumn = this as PrimitiveDataFrameColumn; + PrimitiveDataFrameColumn retColumn = inPlace ? typedColumn : typedColumn.Clone(); + retColumn._columnContainer.And(Unsafe.As(ref value)); + return retColumn as PrimitiveDataFrameColumn; + case Type byteType when byteType == typeof(byte): + case Type charType when charType == typeof(char): + case Type decimalType when decimalType == typeof(decimal): + case Type doubleType when doubleType == typeof(double): + case Type floatType when floatType == typeof(float): + case Type intType when intType == typeof(int): + case Type longType when longType == typeof(long): + case Type sbyteType when sbyteType == typeof(sbyte): + case Type shortType when shortType == typeof(short): + case Type uintType when uintType == typeof(uint): + case Type ulongType when ulongType == typeof(ulong): + case Type ushortType when ushortType == typeof(ushort): + default: + throw new NotSupportedException(); + } + } + internal DataFrameColumn OrImplementation(PrimitiveDataFrameColumn column, bool inPlace) + where U : unmanaged + { + if (column.Length != Length) + { + throw new ArgumentException(Strings.MismatchedColumnLengths, nameof(column)); + } + switch (typeof(T)) + { + case Type boolType when boolType == typeof(bool): + if (typeof(U) != typeof(bool)) + { + throw new NotSupportedException(); + } + PrimitiveDataFrameColumn typedColumn = this as PrimitiveDataFrameColumn; + PrimitiveDataFrameColumn retColumn = inPlace ? typedColumn : typedColumn.Clone(); + retColumn._columnContainer.Or(column._columnContainer); + return retColumn; + case Type byteType when byteType == typeof(byte): + case Type charType when charType == typeof(char): + case Type decimalType when decimalType == typeof(decimal): + case Type doubleType when doubleType == typeof(double): + case Type floatType when floatType == typeof(float): + case Type intType when intType == typeof(int): + case Type longType when longType == typeof(long): + case Type sbyteType when sbyteType == typeof(sbyte): + case Type shortType when shortType == typeof(short): + case Type uintType when uintType == typeof(uint): + case Type ulongType when ulongType == typeof(ulong): + case Type ushortType when ushortType == typeof(ushort): + default: + throw new NotSupportedException(); + } + } + internal PrimitiveDataFrameColumn OrImplementation(U value, bool inPlace) + { + switch (typeof(T)) + { + case Type boolType when boolType == typeof(bool): + if (typeof(U) != typeof(bool)) + { + throw new NotSupportedException(); + } + PrimitiveDataFrameColumn typedColumn = this as PrimitiveDataFrameColumn; + PrimitiveDataFrameColumn retColumn = inPlace ? typedColumn : typedColumn.Clone(); + retColumn._columnContainer.Or(Unsafe.As(ref value)); + return retColumn as PrimitiveDataFrameColumn; + case Type byteType when byteType == typeof(byte): + case Type charType when charType == typeof(char): + case Type decimalType when decimalType == typeof(decimal): + case Type doubleType when doubleType == typeof(double): + case Type floatType when floatType == typeof(float): + case Type intType when intType == typeof(int): + case Type longType when longType == typeof(long): + case Type sbyteType when sbyteType == typeof(sbyte): + case Type shortType when shortType == typeof(short): + case Type uintType when uintType == typeof(uint): + case Type ulongType when ulongType == typeof(ulong): + case Type ushortType when ushortType == typeof(ushort): + default: + throw new NotSupportedException(); + } + } + internal DataFrameColumn XorImplementation(PrimitiveDataFrameColumn column, bool inPlace) + where U : unmanaged + { + if (column.Length != Length) + { + throw new ArgumentException(Strings.MismatchedColumnLengths, nameof(column)); + } + switch (typeof(T)) + { + case Type boolType when boolType == typeof(bool): + if (typeof(U) != typeof(bool)) + { + throw new NotSupportedException(); + } + PrimitiveDataFrameColumn typedColumn = this as PrimitiveDataFrameColumn; + PrimitiveDataFrameColumn retColumn = inPlace ? typedColumn : typedColumn.Clone(); + retColumn._columnContainer.Xor(column._columnContainer); + return retColumn; + case Type byteType when byteType == typeof(byte): + case Type charType when charType == typeof(char): + case Type decimalType when decimalType == typeof(decimal): + case Type doubleType when doubleType == typeof(double): + case Type floatType when floatType == typeof(float): + case Type intType when intType == typeof(int): + case Type longType when longType == typeof(long): + case Type sbyteType when sbyteType == typeof(sbyte): + case Type shortType when shortType == typeof(short): + case Type uintType when uintType == typeof(uint): + case Type ulongType when ulongType == typeof(ulong): + case Type ushortType when ushortType == typeof(ushort): + default: + throw new NotSupportedException(); + } + } + internal PrimitiveDataFrameColumn XorImplementation(U value, bool inPlace) + { + switch (typeof(T)) + { + case Type boolType when boolType == typeof(bool): + if (typeof(U) != typeof(bool)) + { + throw new NotSupportedException(); + } + PrimitiveDataFrameColumn typedColumn = this as PrimitiveDataFrameColumn; + PrimitiveDataFrameColumn retColumn = inPlace ? typedColumn : typedColumn.Clone(); + retColumn._columnContainer.Xor(Unsafe.As(ref value)); + return retColumn as PrimitiveDataFrameColumn; + case Type byteType when byteType == typeof(byte): + case Type charType when charType == typeof(char): + case Type decimalType when decimalType == typeof(decimal): + case Type doubleType when doubleType == typeof(double): + case Type floatType when floatType == typeof(float): + case Type intType when intType == typeof(int): + case Type longType when longType == typeof(long): + case Type sbyteType when sbyteType == typeof(sbyte): + case Type shortType when shortType == typeof(short): + case Type uintType when uintType == typeof(uint): + case Type ulongType when ulongType == typeof(ulong): + case Type ushortType when ushortType == typeof(ushort): + default: + throw new NotSupportedException(); + } + } + internal DataFrameColumn LeftShiftImplementation(int value, bool inPlace) + { + switch (typeof(T)) + { + case Type boolType when boolType == typeof(bool): + throw new NotSupportedException(); + case Type byteType when byteType == typeof(byte): + PrimitiveDataFrameColumn byteColumn = this as PrimitiveDataFrameColumn; + PrimitiveDataFrameColumn newbyteColumn = inPlace ? byteColumn : byteColumn.Clone(); + newbyteColumn._columnContainer.LeftShift(value); + return newbyteColumn; + case Type charType when charType == typeof(char): + PrimitiveDataFrameColumn charColumn = this as PrimitiveDataFrameColumn; + PrimitiveDataFrameColumn newcharColumn = inPlace ? charColumn : charColumn.Clone(); + newcharColumn._columnContainer.LeftShift(value); + return newcharColumn; + case Type decimalType when decimalType == typeof(decimal): + throw new NotSupportedException(); + case Type doubleType when doubleType == typeof(double): + throw new NotSupportedException(); + case Type floatType when floatType == typeof(float): + throw new NotSupportedException(); + case Type intType when intType == typeof(int): + PrimitiveDataFrameColumn intColumn = this as PrimitiveDataFrameColumn; + PrimitiveDataFrameColumn newintColumn = inPlace ? intColumn : intColumn.Clone(); + newintColumn._columnContainer.LeftShift(value); + return newintColumn; + case Type longType when longType == typeof(long): + PrimitiveDataFrameColumn longColumn = this as PrimitiveDataFrameColumn; + PrimitiveDataFrameColumn newlongColumn = inPlace ? longColumn : longColumn.Clone(); + newlongColumn._columnContainer.LeftShift(value); + return newlongColumn; + case Type sbyteType when sbyteType == typeof(sbyte): + PrimitiveDataFrameColumn sbyteColumn = this as PrimitiveDataFrameColumn; + PrimitiveDataFrameColumn newsbyteColumn = inPlace ? sbyteColumn : sbyteColumn.Clone(); + newsbyteColumn._columnContainer.LeftShift(value); + return newsbyteColumn; + case Type shortType when shortType == typeof(short): + PrimitiveDataFrameColumn shortColumn = this as PrimitiveDataFrameColumn; + PrimitiveDataFrameColumn newshortColumn = inPlace ? shortColumn : shortColumn.Clone(); + newshortColumn._columnContainer.LeftShift(value); + return newshortColumn; + case Type uintType when uintType == typeof(uint): + PrimitiveDataFrameColumn uintColumn = this as PrimitiveDataFrameColumn; + PrimitiveDataFrameColumn newuintColumn = inPlace ? uintColumn : uintColumn.Clone(); + newuintColumn._columnContainer.LeftShift(value); + return newuintColumn; + case Type ulongType when ulongType == typeof(ulong): + PrimitiveDataFrameColumn ulongColumn = this as PrimitiveDataFrameColumn; + PrimitiveDataFrameColumn newulongColumn = inPlace ? ulongColumn : ulongColumn.Clone(); + newulongColumn._columnContainer.LeftShift(value); + return newulongColumn; + case Type ushortType when ushortType == typeof(ushort): + PrimitiveDataFrameColumn ushortColumn = this as PrimitiveDataFrameColumn; + PrimitiveDataFrameColumn newushortColumn = inPlace ? ushortColumn : ushortColumn.Clone(); + newushortColumn._columnContainer.LeftShift(value); + return newushortColumn; + default: + throw new NotSupportedException(); + } + } + internal DataFrameColumn RightShiftImplementation(int value, bool inPlace) + { + switch (typeof(T)) + { + case Type boolType when boolType == typeof(bool): + throw new NotSupportedException(); + case Type byteType when byteType == typeof(byte): + PrimitiveDataFrameColumn byteColumn = this as PrimitiveDataFrameColumn; + PrimitiveDataFrameColumn newbyteColumn = inPlace ? byteColumn : byteColumn.Clone(); + newbyteColumn._columnContainer.RightShift(value); + return newbyteColumn; + case Type charType when charType == typeof(char): + PrimitiveDataFrameColumn charColumn = this as PrimitiveDataFrameColumn; + PrimitiveDataFrameColumn newcharColumn = inPlace ? charColumn : charColumn.Clone(); + newcharColumn._columnContainer.RightShift(value); + return newcharColumn; + case Type decimalType when decimalType == typeof(decimal): + throw new NotSupportedException(); + case Type doubleType when doubleType == typeof(double): + throw new NotSupportedException(); + case Type floatType when floatType == typeof(float): + throw new NotSupportedException(); + case Type intType when intType == typeof(int): + PrimitiveDataFrameColumn intColumn = this as PrimitiveDataFrameColumn; + PrimitiveDataFrameColumn newintColumn = inPlace ? intColumn : intColumn.Clone(); + newintColumn._columnContainer.RightShift(value); + return newintColumn; + case Type longType when longType == typeof(long): + PrimitiveDataFrameColumn longColumn = this as PrimitiveDataFrameColumn; + PrimitiveDataFrameColumn newlongColumn = inPlace ? longColumn : longColumn.Clone(); + newlongColumn._columnContainer.RightShift(value); + return newlongColumn; + case Type sbyteType when sbyteType == typeof(sbyte): + PrimitiveDataFrameColumn sbyteColumn = this as PrimitiveDataFrameColumn; + PrimitiveDataFrameColumn newsbyteColumn = inPlace ? sbyteColumn : sbyteColumn.Clone(); + newsbyteColumn._columnContainer.RightShift(value); + return newsbyteColumn; + case Type shortType when shortType == typeof(short): + PrimitiveDataFrameColumn shortColumn = this as PrimitiveDataFrameColumn; + PrimitiveDataFrameColumn newshortColumn = inPlace ? shortColumn : shortColumn.Clone(); + newshortColumn._columnContainer.RightShift(value); + return newshortColumn; + case Type uintType when uintType == typeof(uint): + PrimitiveDataFrameColumn uintColumn = this as PrimitiveDataFrameColumn; + PrimitiveDataFrameColumn newuintColumn = inPlace ? uintColumn : uintColumn.Clone(); + newuintColumn._columnContainer.RightShift(value); + return newuintColumn; + case Type ulongType when ulongType == typeof(ulong): + PrimitiveDataFrameColumn ulongColumn = this as PrimitiveDataFrameColumn; + PrimitiveDataFrameColumn newulongColumn = inPlace ? ulongColumn : ulongColumn.Clone(); + newulongColumn._columnContainer.RightShift(value); + return newulongColumn; + case Type ushortType when ushortType == typeof(ushort): + PrimitiveDataFrameColumn ushortColumn = this as PrimitiveDataFrameColumn; + PrimitiveDataFrameColumn newushortColumn = inPlace ? ushortColumn : ushortColumn.Clone(); + newushortColumn._columnContainer.RightShift(value); + return newushortColumn; + default: + throw new NotSupportedException(); + } + } + internal PrimitiveDataFrameColumn ElementwiseEqualsImplementation(PrimitiveDataFrameColumn column) + where U : unmanaged + { + if (column.Length != Length) + { + throw new ArgumentException(Strings.MismatchedColumnLengths, nameof(column)); + } + switch (typeof(T)) + { + case Type boolType when boolType == typeof(bool): + if (typeof(U) != typeof(bool)) + { + throw new NotSupportedException(); + } + PrimitiveDataFrameColumn retColumn = CloneAsBooleanColumn(); + (this as PrimitiveDataFrameColumn)._columnContainer.ElementwiseEquals(column._columnContainer, retColumn._columnContainer); + return retColumn; + case Type decimalType when decimalType == typeof(decimal): + if (typeof(U) == typeof(bool)) + { + throw new NotSupportedException(); + } + if (typeof(U) == typeof(T)) + { + // No conversions + PrimitiveDataFrameColumn primitiveColumn = this as PrimitiveDataFrameColumn; + PrimitiveDataFrameColumn newColumn = CloneAsBooleanColumn(); + primitiveColumn._columnContainer.ElementwiseEquals(column._columnContainer, newColumn._columnContainer); + return newColumn; + } + else + { + PrimitiveDataFrameColumn newColumn = CloneAsBooleanColumn(); + PrimitiveDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + decimalColumn._columnContainer.ElementwiseEquals(column.CloneAsDecimalColumn()._columnContainer, newColumn._columnContainer); + return newColumn; + } + case Type byteType when byteType == typeof(byte): + case Type charType when charType == typeof(char): + case Type doubleType when doubleType == typeof(double): + case Type floatType when floatType == typeof(float): + case Type intType when intType == typeof(int): + case Type longType when longType == typeof(long): + case Type sbyteType when sbyteType == typeof(sbyte): + case Type shortType when shortType == typeof(short): + case Type uintType when uintType == typeof(uint): + case Type ulongType when ulongType == typeof(ulong): + case Type ushortType when ushortType == typeof(ushort): + if (typeof(U) == typeof(bool)) + { + throw new NotSupportedException(); + } + if (typeof(U) == typeof(T)) + { + // No conversions + PrimitiveDataFrameColumn primitiveColumn = this as PrimitiveDataFrameColumn; + PrimitiveDataFrameColumn newColumn = CloneAsBooleanColumn(); + primitiveColumn._columnContainer.ElementwiseEquals(column._columnContainer, newColumn._columnContainer); + return newColumn; + } + else + { + if (typeof(U) == typeof(decimal)) + { + PrimitiveDataFrameColumn newColumn = CloneAsBooleanColumn(); + PrimitiveDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + decimalColumn._columnContainer.ElementwiseEquals((column as PrimitiveDataFrameColumn)._columnContainer, newColumn._columnContainer); + return newColumn; + } + else + { + PrimitiveDataFrameColumn newColumn = CloneAsBooleanColumn(); + PrimitiveDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + doubleColumn._columnContainer.ElementwiseEquals(column.CloneAsDoubleColumn()._columnContainer, newColumn._columnContainer); + return newColumn; + } + } + default: + throw new NotSupportedException(); + } + } + internal PrimitiveDataFrameColumn ElementwiseEqualsImplementation(U value) + { + switch (typeof(T)) + { + case Type boolType when boolType == typeof(bool): + if (typeof(U) != typeof(bool)) + { + throw new NotSupportedException(); + } + PrimitiveDataFrameColumn retColumn = CloneAsBooleanColumn(); + (this as PrimitiveDataFrameColumn)._columnContainer.ElementwiseEquals(Unsafe.As(ref value), retColumn._columnContainer); + return retColumn; + case Type decimalType when decimalType == typeof(decimal): + if (typeof(U) == typeof(bool)) + { + throw new NotSupportedException(); + } + if (typeof(U) == typeof(T)) + { + // No conversions + PrimitiveDataFrameColumn primitiveColumn = this; + PrimitiveDataFrameColumn newColumn = CloneAsBooleanColumn(); + primitiveColumn._columnContainer.ElementwiseEquals(Unsafe.As(ref value), newColumn._columnContainer); + return newColumn; + } + else + { + PrimitiveDataFrameColumn newColumn = CloneAsBooleanColumn(); + PrimitiveDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + decimalColumn._columnContainer.ElementwiseEquals(DecimalConverter.Instance.GetDecimal(value), newColumn._columnContainer); + return newColumn; + } + case Type byteType when byteType == typeof(byte): + case Type charType when charType == typeof(char): + case Type doubleType when doubleType == typeof(double): + case Type floatType when floatType == typeof(float): + case Type intType when intType == typeof(int): + case Type longType when longType == typeof(long): + case Type sbyteType when sbyteType == typeof(sbyte): + case Type shortType when shortType == typeof(short): + case Type uintType when uintType == typeof(uint): + case Type ulongType when ulongType == typeof(ulong): + case Type ushortType when ushortType == typeof(ushort): + if (typeof(U) == typeof(bool)) + { + throw new NotSupportedException(); + } + if (typeof(U) == typeof(T)) + { + // No conversions + PrimitiveDataFrameColumn primitiveColumn = this; + PrimitiveDataFrameColumn newColumn = CloneAsBooleanColumn(); + primitiveColumn._columnContainer.ElementwiseEquals(Unsafe.As(ref value), newColumn._columnContainer); + return newColumn; + } + else + { + if (typeof(U) == typeof(decimal)) + { + PrimitiveDataFrameColumn newColumn = CloneAsBooleanColumn(); + PrimitiveDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + decimalColumn._columnContainer.ElementwiseEquals(DecimalConverter.Instance.GetDecimal(value), newColumn._columnContainer); + return newColumn; + } + else + { + PrimitiveDataFrameColumn newColumn = CloneAsBooleanColumn(); + PrimitiveDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + doubleColumn._columnContainer.ElementwiseEquals(DoubleConverter.Instance.GetDouble(value), newColumn._columnContainer); + return newColumn; + } + } + default: + throw new NotSupportedException(); + } + } + internal PrimitiveDataFrameColumn ElementwiseNotEqualsImplementation(PrimitiveDataFrameColumn column) + where U : unmanaged + { + if (column.Length != Length) + { + throw new ArgumentException(Strings.MismatchedColumnLengths, nameof(column)); + } + switch (typeof(T)) + { + case Type boolType when boolType == typeof(bool): + if (typeof(U) != typeof(bool)) + { + throw new NotSupportedException(); + } + PrimitiveDataFrameColumn retColumn = CloneAsBooleanColumn(); + (this as PrimitiveDataFrameColumn)._columnContainer.ElementwiseNotEquals(column._columnContainer, retColumn._columnContainer); + return retColumn; + case Type decimalType when decimalType == typeof(decimal): + if (typeof(U) == typeof(bool)) + { + throw new NotSupportedException(); + } + if (typeof(U) == typeof(T)) + { + // No conversions + PrimitiveDataFrameColumn primitiveColumn = this as PrimitiveDataFrameColumn; + PrimitiveDataFrameColumn newColumn = CloneAsBooleanColumn(); + primitiveColumn._columnContainer.ElementwiseNotEquals(column._columnContainer, newColumn._columnContainer); + return newColumn; + } + else + { + PrimitiveDataFrameColumn newColumn = CloneAsBooleanColumn(); + PrimitiveDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + decimalColumn._columnContainer.ElementwiseNotEquals(column.CloneAsDecimalColumn()._columnContainer, newColumn._columnContainer); + return newColumn; + } + case Type byteType when byteType == typeof(byte): + case Type charType when charType == typeof(char): + case Type doubleType when doubleType == typeof(double): + case Type floatType when floatType == typeof(float): + case Type intType when intType == typeof(int): + case Type longType when longType == typeof(long): + case Type sbyteType when sbyteType == typeof(sbyte): + case Type shortType when shortType == typeof(short): + case Type uintType when uintType == typeof(uint): + case Type ulongType when ulongType == typeof(ulong): + case Type ushortType when ushortType == typeof(ushort): + if (typeof(U) == typeof(bool)) + { + throw new NotSupportedException(); + } + if (typeof(U) == typeof(T)) + { + // No conversions + PrimitiveDataFrameColumn primitiveColumn = this as PrimitiveDataFrameColumn; + PrimitiveDataFrameColumn newColumn = CloneAsBooleanColumn(); + primitiveColumn._columnContainer.ElementwiseNotEquals(column._columnContainer, newColumn._columnContainer); + return newColumn; + } + else + { + if (typeof(U) == typeof(decimal)) + { + PrimitiveDataFrameColumn newColumn = CloneAsBooleanColumn(); + PrimitiveDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + decimalColumn._columnContainer.ElementwiseNotEquals((column as PrimitiveDataFrameColumn)._columnContainer, newColumn._columnContainer); + return newColumn; + } + else + { + PrimitiveDataFrameColumn newColumn = CloneAsBooleanColumn(); + PrimitiveDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + doubleColumn._columnContainer.ElementwiseNotEquals(column.CloneAsDoubleColumn()._columnContainer, newColumn._columnContainer); + return newColumn; + } + } + default: + throw new NotSupportedException(); + } + } + internal PrimitiveDataFrameColumn ElementwiseNotEqualsImplementation(U value) + { + switch (typeof(T)) + { + case Type boolType when boolType == typeof(bool): + if (typeof(U) != typeof(bool)) + { + throw new NotSupportedException(); + } + PrimitiveDataFrameColumn retColumn = CloneAsBooleanColumn(); + (this as PrimitiveDataFrameColumn)._columnContainer.ElementwiseNotEquals(Unsafe.As(ref value), retColumn._columnContainer); + return retColumn; + case Type decimalType when decimalType == typeof(decimal): + if (typeof(U) == typeof(bool)) + { + throw new NotSupportedException(); + } + if (typeof(U) == typeof(T)) + { + // No conversions + PrimitiveDataFrameColumn primitiveColumn = this; + PrimitiveDataFrameColumn newColumn = CloneAsBooleanColumn(); + primitiveColumn._columnContainer.ElementwiseNotEquals(Unsafe.As(ref value), newColumn._columnContainer); + return newColumn; + } + else + { + PrimitiveDataFrameColumn newColumn = CloneAsBooleanColumn(); + PrimitiveDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + decimalColumn._columnContainer.ElementwiseNotEquals(DecimalConverter.Instance.GetDecimal(value), newColumn._columnContainer); + return newColumn; + } + case Type byteType when byteType == typeof(byte): + case Type charType when charType == typeof(char): + case Type doubleType when doubleType == typeof(double): + case Type floatType when floatType == typeof(float): + case Type intType when intType == typeof(int): + case Type longType when longType == typeof(long): + case Type sbyteType when sbyteType == typeof(sbyte): + case Type shortType when shortType == typeof(short): + case Type uintType when uintType == typeof(uint): + case Type ulongType when ulongType == typeof(ulong): + case Type ushortType when ushortType == typeof(ushort): + if (typeof(U) == typeof(bool)) + { + throw new NotSupportedException(); + } + if (typeof(U) == typeof(T)) + { + // No conversions + PrimitiveDataFrameColumn primitiveColumn = this; + PrimitiveDataFrameColumn newColumn = CloneAsBooleanColumn(); + primitiveColumn._columnContainer.ElementwiseNotEquals(Unsafe.As(ref value), newColumn._columnContainer); + return newColumn; + } + else + { + if (typeof(U) == typeof(decimal)) + { + PrimitiveDataFrameColumn newColumn = CloneAsBooleanColumn(); + PrimitiveDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + decimalColumn._columnContainer.ElementwiseNotEquals(DecimalConverter.Instance.GetDecimal(value), newColumn._columnContainer); + return newColumn; + } + else + { + PrimitiveDataFrameColumn newColumn = CloneAsBooleanColumn(); + PrimitiveDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + doubleColumn._columnContainer.ElementwiseNotEquals(DoubleConverter.Instance.GetDouble(value), newColumn._columnContainer); + return newColumn; + } + } + default: + throw new NotSupportedException(); + } + } + internal PrimitiveDataFrameColumn ElementwiseGreaterThanOrEqualImplementation(PrimitiveDataFrameColumn column) + where U : unmanaged + { + if (column.Length != Length) + { + throw new ArgumentException(Strings.MismatchedColumnLengths, nameof(column)); + } + switch (typeof(T)) + { + case Type boolType when boolType == typeof(bool): + throw new NotSupportedException(); + case Type decimalType when decimalType == typeof(decimal): + if (typeof(U) == typeof(bool)) + { + throw new NotSupportedException(); + } + if (typeof(U) == typeof(T)) + { + // No conversions + PrimitiveDataFrameColumn primitiveColumn = this as PrimitiveDataFrameColumn; + PrimitiveDataFrameColumn newColumn = CloneAsBooleanColumn(); + primitiveColumn._columnContainer.ElementwiseGreaterThanOrEqual(column._columnContainer, newColumn._columnContainer); + return newColumn; + } + else + { + PrimitiveDataFrameColumn newColumn = CloneAsBooleanColumn(); + PrimitiveDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + decimalColumn._columnContainer.ElementwiseGreaterThanOrEqual(column.CloneAsDecimalColumn()._columnContainer, newColumn._columnContainer); + return newColumn; + } + case Type byteType when byteType == typeof(byte): + case Type charType when charType == typeof(char): + case Type doubleType when doubleType == typeof(double): + case Type floatType when floatType == typeof(float): + case Type intType when intType == typeof(int): + case Type longType when longType == typeof(long): + case Type sbyteType when sbyteType == typeof(sbyte): + case Type shortType when shortType == typeof(short): + case Type uintType when uintType == typeof(uint): + case Type ulongType when ulongType == typeof(ulong): + case Type ushortType when ushortType == typeof(ushort): + if (typeof(U) == typeof(bool)) + { + throw new NotSupportedException(); + } + if (typeof(U) == typeof(T)) + { + // No conversions + PrimitiveDataFrameColumn primitiveColumn = this as PrimitiveDataFrameColumn; + PrimitiveDataFrameColumn newColumn = CloneAsBooleanColumn(); + primitiveColumn._columnContainer.ElementwiseGreaterThanOrEqual(column._columnContainer, newColumn._columnContainer); + return newColumn; + } + else + { + if (typeof(U) == typeof(decimal)) + { + PrimitiveDataFrameColumn newColumn = CloneAsBooleanColumn(); + PrimitiveDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + decimalColumn._columnContainer.ElementwiseGreaterThanOrEqual((column as PrimitiveDataFrameColumn)._columnContainer, newColumn._columnContainer); + return newColumn; + } + else + { + PrimitiveDataFrameColumn newColumn = CloneAsBooleanColumn(); + PrimitiveDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + doubleColumn._columnContainer.ElementwiseGreaterThanOrEqual(column.CloneAsDoubleColumn()._columnContainer, newColumn._columnContainer); + return newColumn; + } + } + default: + throw new NotSupportedException(); + } + } + internal PrimitiveDataFrameColumn ElementwiseGreaterThanOrEqualImplementation(U value) + { + switch (typeof(T)) + { + case Type boolType when boolType == typeof(bool): + throw new NotSupportedException(); + case Type decimalType when decimalType == typeof(decimal): + if (typeof(U) == typeof(bool)) + { + throw new NotSupportedException(); + } + if (typeof(U) == typeof(T)) + { + // No conversions + PrimitiveDataFrameColumn primitiveColumn = this; + PrimitiveDataFrameColumn newColumn = CloneAsBooleanColumn(); + primitiveColumn._columnContainer.ElementwiseGreaterThanOrEqual(Unsafe.As(ref value), newColumn._columnContainer); + return newColumn; + } + else + { + PrimitiveDataFrameColumn newColumn = CloneAsBooleanColumn(); + PrimitiveDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + decimalColumn._columnContainer.ElementwiseGreaterThanOrEqual(DecimalConverter.Instance.GetDecimal(value), newColumn._columnContainer); + return newColumn; + } + case Type byteType when byteType == typeof(byte): + case Type charType when charType == typeof(char): + case Type doubleType when doubleType == typeof(double): + case Type floatType when floatType == typeof(float): + case Type intType when intType == typeof(int): + case Type longType when longType == typeof(long): + case Type sbyteType when sbyteType == typeof(sbyte): + case Type shortType when shortType == typeof(short): + case Type uintType when uintType == typeof(uint): + case Type ulongType when ulongType == typeof(ulong): + case Type ushortType when ushortType == typeof(ushort): + if (typeof(U) == typeof(bool)) + { + throw new NotSupportedException(); + } + if (typeof(U) == typeof(T)) + { + // No conversions + PrimitiveDataFrameColumn primitiveColumn = this; + PrimitiveDataFrameColumn newColumn = CloneAsBooleanColumn(); + primitiveColumn._columnContainer.ElementwiseGreaterThanOrEqual(Unsafe.As(ref value), newColumn._columnContainer); + return newColumn; + } + else + { + if (typeof(U) == typeof(decimal)) + { + PrimitiveDataFrameColumn newColumn = CloneAsBooleanColumn(); + PrimitiveDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + decimalColumn._columnContainer.ElementwiseGreaterThanOrEqual(DecimalConverter.Instance.GetDecimal(value), newColumn._columnContainer); + return newColumn; + } + else + { + PrimitiveDataFrameColumn newColumn = CloneAsBooleanColumn(); + PrimitiveDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + doubleColumn._columnContainer.ElementwiseGreaterThanOrEqual(DoubleConverter.Instance.GetDouble(value), newColumn._columnContainer); + return newColumn; + } + } + default: + throw new NotSupportedException(); + } + } + internal PrimitiveDataFrameColumn ElementwiseLessThanOrEqualImplementation(PrimitiveDataFrameColumn column) + where U : unmanaged + { + if (column.Length != Length) + { + throw new ArgumentException(Strings.MismatchedColumnLengths, nameof(column)); + } + switch (typeof(T)) + { + case Type boolType when boolType == typeof(bool): + throw new NotSupportedException(); + case Type decimalType when decimalType == typeof(decimal): + if (typeof(U) == typeof(bool)) + { + throw new NotSupportedException(); + } + if (typeof(U) == typeof(T)) + { + // No conversions + PrimitiveDataFrameColumn primitiveColumn = this as PrimitiveDataFrameColumn; + PrimitiveDataFrameColumn newColumn = CloneAsBooleanColumn(); + primitiveColumn._columnContainer.ElementwiseLessThanOrEqual(column._columnContainer, newColumn._columnContainer); + return newColumn; + } + else + { + PrimitiveDataFrameColumn newColumn = CloneAsBooleanColumn(); + PrimitiveDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + decimalColumn._columnContainer.ElementwiseLessThanOrEqual(column.CloneAsDecimalColumn()._columnContainer, newColumn._columnContainer); + return newColumn; + } + case Type byteType when byteType == typeof(byte): + case Type charType when charType == typeof(char): + case Type doubleType when doubleType == typeof(double): + case Type floatType when floatType == typeof(float): + case Type intType when intType == typeof(int): + case Type longType when longType == typeof(long): + case Type sbyteType when sbyteType == typeof(sbyte): + case Type shortType when shortType == typeof(short): + case Type uintType when uintType == typeof(uint): + case Type ulongType when ulongType == typeof(ulong): + case Type ushortType when ushortType == typeof(ushort): + if (typeof(U) == typeof(bool)) + { + throw new NotSupportedException(); + } + if (typeof(U) == typeof(T)) + { + // No conversions + PrimitiveDataFrameColumn primitiveColumn = this as PrimitiveDataFrameColumn; + PrimitiveDataFrameColumn newColumn = CloneAsBooleanColumn(); + primitiveColumn._columnContainer.ElementwiseLessThanOrEqual(column._columnContainer, newColumn._columnContainer); + return newColumn; + } + else + { + if (typeof(U) == typeof(decimal)) + { + PrimitiveDataFrameColumn newColumn = CloneAsBooleanColumn(); + PrimitiveDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + decimalColumn._columnContainer.ElementwiseLessThanOrEqual((column as PrimitiveDataFrameColumn)._columnContainer, newColumn._columnContainer); + return newColumn; + } + else + { + PrimitiveDataFrameColumn newColumn = CloneAsBooleanColumn(); + PrimitiveDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + doubleColumn._columnContainer.ElementwiseLessThanOrEqual(column.CloneAsDoubleColumn()._columnContainer, newColumn._columnContainer); + return newColumn; + } + } + default: + throw new NotSupportedException(); + } + } + internal PrimitiveDataFrameColumn ElementwiseLessThanOrEqualImplementation(U value) + { + switch (typeof(T)) + { + case Type boolType when boolType == typeof(bool): + throw new NotSupportedException(); + case Type decimalType when decimalType == typeof(decimal): + if (typeof(U) == typeof(bool)) + { + throw new NotSupportedException(); + } + if (typeof(U) == typeof(T)) + { + // No conversions + PrimitiveDataFrameColumn primitiveColumn = this; + PrimitiveDataFrameColumn newColumn = CloneAsBooleanColumn(); + primitiveColumn._columnContainer.ElementwiseLessThanOrEqual(Unsafe.As(ref value), newColumn._columnContainer); + return newColumn; + } + else + { + PrimitiveDataFrameColumn newColumn = CloneAsBooleanColumn(); + PrimitiveDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + decimalColumn._columnContainer.ElementwiseLessThanOrEqual(DecimalConverter.Instance.GetDecimal(value), newColumn._columnContainer); + return newColumn; + } + case Type byteType when byteType == typeof(byte): + case Type charType when charType == typeof(char): + case Type doubleType when doubleType == typeof(double): + case Type floatType when floatType == typeof(float): + case Type intType when intType == typeof(int): + case Type longType when longType == typeof(long): + case Type sbyteType when sbyteType == typeof(sbyte): + case Type shortType when shortType == typeof(short): + case Type uintType when uintType == typeof(uint): + case Type ulongType when ulongType == typeof(ulong): + case Type ushortType when ushortType == typeof(ushort): + if (typeof(U) == typeof(bool)) + { + throw new NotSupportedException(); + } + if (typeof(U) == typeof(T)) + { + // No conversions + PrimitiveDataFrameColumn primitiveColumn = this; + PrimitiveDataFrameColumn newColumn = CloneAsBooleanColumn(); + primitiveColumn._columnContainer.ElementwiseLessThanOrEqual(Unsafe.As(ref value), newColumn._columnContainer); + return newColumn; + } + else + { + if (typeof(U) == typeof(decimal)) + { + PrimitiveDataFrameColumn newColumn = CloneAsBooleanColumn(); + PrimitiveDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + decimalColumn._columnContainer.ElementwiseLessThanOrEqual(DecimalConverter.Instance.GetDecimal(value), newColumn._columnContainer); + return newColumn; + } + else + { + PrimitiveDataFrameColumn newColumn = CloneAsBooleanColumn(); + PrimitiveDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + doubleColumn._columnContainer.ElementwiseLessThanOrEqual(DoubleConverter.Instance.GetDouble(value), newColumn._columnContainer); + return newColumn; + } + } + default: + throw new NotSupportedException(); + } + } + internal PrimitiveDataFrameColumn ElementwiseGreaterThanImplementation(PrimitiveDataFrameColumn column) + where U : unmanaged + { + if (column.Length != Length) + { + throw new ArgumentException(Strings.MismatchedColumnLengths, nameof(column)); + } + switch (typeof(T)) + { + case Type boolType when boolType == typeof(bool): + throw new NotSupportedException(); + case Type decimalType when decimalType == typeof(decimal): + if (typeof(U) == typeof(bool)) + { + throw new NotSupportedException(); + } + if (typeof(U) == typeof(T)) + { + // No conversions + PrimitiveDataFrameColumn primitiveColumn = this as PrimitiveDataFrameColumn; + PrimitiveDataFrameColumn newColumn = CloneAsBooleanColumn(); + primitiveColumn._columnContainer.ElementwiseGreaterThan(column._columnContainer, newColumn._columnContainer); + return newColumn; + } + else + { + PrimitiveDataFrameColumn newColumn = CloneAsBooleanColumn(); + PrimitiveDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + decimalColumn._columnContainer.ElementwiseGreaterThan(column.CloneAsDecimalColumn()._columnContainer, newColumn._columnContainer); + return newColumn; + } + case Type byteType when byteType == typeof(byte): + case Type charType when charType == typeof(char): + case Type doubleType when doubleType == typeof(double): + case Type floatType when floatType == typeof(float): + case Type intType when intType == typeof(int): + case Type longType when longType == typeof(long): + case Type sbyteType when sbyteType == typeof(sbyte): + case Type shortType when shortType == typeof(short): + case Type uintType when uintType == typeof(uint): + case Type ulongType when ulongType == typeof(ulong): + case Type ushortType when ushortType == typeof(ushort): + if (typeof(U) == typeof(bool)) + { + throw new NotSupportedException(); + } + if (typeof(U) == typeof(T)) + { + // No conversions + PrimitiveDataFrameColumn primitiveColumn = this as PrimitiveDataFrameColumn; + PrimitiveDataFrameColumn newColumn = CloneAsBooleanColumn(); + primitiveColumn._columnContainer.ElementwiseGreaterThan(column._columnContainer, newColumn._columnContainer); + return newColumn; + } + else + { + if (typeof(U) == typeof(decimal)) + { + PrimitiveDataFrameColumn newColumn = CloneAsBooleanColumn(); + PrimitiveDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + decimalColumn._columnContainer.ElementwiseGreaterThan((column as PrimitiveDataFrameColumn)._columnContainer, newColumn._columnContainer); + return newColumn; + } + else + { + PrimitiveDataFrameColumn newColumn = CloneAsBooleanColumn(); + PrimitiveDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + doubleColumn._columnContainer.ElementwiseGreaterThan(column.CloneAsDoubleColumn()._columnContainer, newColumn._columnContainer); + return newColumn; + } + } + default: + throw new NotSupportedException(); + } + } + internal PrimitiveDataFrameColumn ElementwiseGreaterThanImplementation(U value) + { + switch (typeof(T)) + { + case Type boolType when boolType == typeof(bool): + throw new NotSupportedException(); + case Type decimalType when decimalType == typeof(decimal): + if (typeof(U) == typeof(bool)) + { + throw new NotSupportedException(); + } + if (typeof(U) == typeof(T)) + { + // No conversions + PrimitiveDataFrameColumn primitiveColumn = this; + PrimitiveDataFrameColumn newColumn = CloneAsBooleanColumn(); + primitiveColumn._columnContainer.ElementwiseGreaterThan(Unsafe.As(ref value), newColumn._columnContainer); + return newColumn; + } + else + { + PrimitiveDataFrameColumn newColumn = CloneAsBooleanColumn(); + PrimitiveDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + decimalColumn._columnContainer.ElementwiseGreaterThan(DecimalConverter.Instance.GetDecimal(value), newColumn._columnContainer); + return newColumn; + } + case Type byteType when byteType == typeof(byte): + case Type charType when charType == typeof(char): + case Type doubleType when doubleType == typeof(double): + case Type floatType when floatType == typeof(float): + case Type intType when intType == typeof(int): + case Type longType when longType == typeof(long): + case Type sbyteType when sbyteType == typeof(sbyte): + case Type shortType when shortType == typeof(short): + case Type uintType when uintType == typeof(uint): + case Type ulongType when ulongType == typeof(ulong): + case Type ushortType when ushortType == typeof(ushort): + if (typeof(U) == typeof(bool)) + { + throw new NotSupportedException(); + } + if (typeof(U) == typeof(T)) + { + // No conversions + PrimitiveDataFrameColumn primitiveColumn = this; + PrimitiveDataFrameColumn newColumn = CloneAsBooleanColumn(); + primitiveColumn._columnContainer.ElementwiseGreaterThan(Unsafe.As(ref value), newColumn._columnContainer); + return newColumn; + } + else + { + if (typeof(U) == typeof(decimal)) + { + PrimitiveDataFrameColumn newColumn = CloneAsBooleanColumn(); + PrimitiveDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + decimalColumn._columnContainer.ElementwiseGreaterThan(DecimalConverter.Instance.GetDecimal(value), newColumn._columnContainer); + return newColumn; + } + else + { + PrimitiveDataFrameColumn newColumn = CloneAsBooleanColumn(); + PrimitiveDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + doubleColumn._columnContainer.ElementwiseGreaterThan(DoubleConverter.Instance.GetDouble(value), newColumn._columnContainer); + return newColumn; + } + } + default: + throw new NotSupportedException(); + } + } + internal PrimitiveDataFrameColumn ElementwiseLessThanImplementation(PrimitiveDataFrameColumn column) + where U : unmanaged + { + if (column.Length != Length) + { + throw new ArgumentException(Strings.MismatchedColumnLengths, nameof(column)); + } + switch (typeof(T)) + { + case Type boolType when boolType == typeof(bool): + throw new NotSupportedException(); + case Type decimalType when decimalType == typeof(decimal): + if (typeof(U) == typeof(bool)) + { + throw new NotSupportedException(); + } + if (typeof(U) == typeof(T)) + { + // No conversions + PrimitiveDataFrameColumn primitiveColumn = this as PrimitiveDataFrameColumn; + PrimitiveDataFrameColumn newColumn = CloneAsBooleanColumn(); + primitiveColumn._columnContainer.ElementwiseLessThan(column._columnContainer, newColumn._columnContainer); + return newColumn; + } + else + { + PrimitiveDataFrameColumn newColumn = CloneAsBooleanColumn(); + PrimitiveDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + decimalColumn._columnContainer.ElementwiseLessThan(column.CloneAsDecimalColumn()._columnContainer, newColumn._columnContainer); + return newColumn; + } + case Type byteType when byteType == typeof(byte): + case Type charType when charType == typeof(char): + case Type doubleType when doubleType == typeof(double): + case Type floatType when floatType == typeof(float): + case Type intType when intType == typeof(int): + case Type longType when longType == typeof(long): + case Type sbyteType when sbyteType == typeof(sbyte): + case Type shortType when shortType == typeof(short): + case Type uintType when uintType == typeof(uint): + case Type ulongType when ulongType == typeof(ulong): + case Type ushortType when ushortType == typeof(ushort): + if (typeof(U) == typeof(bool)) + { + throw new NotSupportedException(); + } + if (typeof(U) == typeof(T)) + { + // No conversions + PrimitiveDataFrameColumn primitiveColumn = this as PrimitiveDataFrameColumn; + PrimitiveDataFrameColumn newColumn = CloneAsBooleanColumn(); + primitiveColumn._columnContainer.ElementwiseLessThan(column._columnContainer, newColumn._columnContainer); + return newColumn; + } + else + { + if (typeof(U) == typeof(decimal)) + { + PrimitiveDataFrameColumn newColumn = CloneAsBooleanColumn(); + PrimitiveDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + decimalColumn._columnContainer.ElementwiseLessThan((column as PrimitiveDataFrameColumn)._columnContainer, newColumn._columnContainer); + return newColumn; + } + else + { + PrimitiveDataFrameColumn newColumn = CloneAsBooleanColumn(); + PrimitiveDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + doubleColumn._columnContainer.ElementwiseLessThan(column.CloneAsDoubleColumn()._columnContainer, newColumn._columnContainer); + return newColumn; + } + } + default: + throw new NotSupportedException(); + } + } + internal PrimitiveDataFrameColumn ElementwiseLessThanImplementation(U value) + { + switch (typeof(T)) + { + case Type boolType when boolType == typeof(bool): + throw new NotSupportedException(); + case Type decimalType when decimalType == typeof(decimal): + if (typeof(U) == typeof(bool)) + { + throw new NotSupportedException(); + } + if (typeof(U) == typeof(T)) + { + // No conversions + PrimitiveDataFrameColumn primitiveColumn = this; + PrimitiveDataFrameColumn newColumn = CloneAsBooleanColumn(); + primitiveColumn._columnContainer.ElementwiseLessThan(Unsafe.As(ref value), newColumn._columnContainer); + return newColumn; + } + else + { + PrimitiveDataFrameColumn newColumn = CloneAsBooleanColumn(); + PrimitiveDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + decimalColumn._columnContainer.ElementwiseLessThan(DecimalConverter.Instance.GetDecimal(value), newColumn._columnContainer); + return newColumn; + } + case Type byteType when byteType == typeof(byte): + case Type charType when charType == typeof(char): + case Type doubleType when doubleType == typeof(double): + case Type floatType when floatType == typeof(float): + case Type intType when intType == typeof(int): + case Type longType when longType == typeof(long): + case Type sbyteType when sbyteType == typeof(sbyte): + case Type shortType when shortType == typeof(short): + case Type uintType when uintType == typeof(uint): + case Type ulongType when ulongType == typeof(ulong): + case Type ushortType when ushortType == typeof(ushort): + if (typeof(U) == typeof(bool)) + { + throw new NotSupportedException(); + } + if (typeof(U) == typeof(T)) + { + // No conversions + PrimitiveDataFrameColumn primitiveColumn = this; + PrimitiveDataFrameColumn newColumn = CloneAsBooleanColumn(); + primitiveColumn._columnContainer.ElementwiseLessThan(Unsafe.As(ref value), newColumn._columnContainer); + return newColumn; + } + else + { + if (typeof(U) == typeof(decimal)) + { + PrimitiveDataFrameColumn newColumn = CloneAsBooleanColumn(); + PrimitiveDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + decimalColumn._columnContainer.ElementwiseLessThan(DecimalConverter.Instance.GetDecimal(value), newColumn._columnContainer); + return newColumn; + } + else + { + PrimitiveDataFrameColumn newColumn = CloneAsBooleanColumn(); + PrimitiveDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + doubleColumn._columnContainer.ElementwiseLessThan(DoubleConverter.Instance.GetDouble(value), newColumn._columnContainer); + return newColumn; + } + } + default: + throw new NotSupportedException(); + } + } + } +} diff --git a/src/Microsoft.Data.Analysis/PrimitiveDataFrameColumn.BinaryOperations.tt b/src/Microsoft.Data.Analysis/PrimitiveDataFrameColumn.BinaryOperations.tt new file mode 100644 index 0000000000..6809de48d1 --- /dev/null +++ b/src/Microsoft.Data.Analysis/PrimitiveDataFrameColumn.BinaryOperations.tt @@ -0,0 +1,388 @@ +<#@ template debug="false" hostspecific="false" language="C#" #> +<#@ assembly name="System.Core" #> +<#@ import namespace="System.Linq" #> +<#@ import namespace="System.Text" #> +<#@ import namespace="System.Collections.Generic" #> +<#@ output extension=".cs" #> +<#@ include file="ColumnArithmeticTemplate.ttinclude" #> +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +// Generated from PrimitiveDataFrameColumn.BinaryOperations.tt. Do not modify directly + +using System; +using System.Collections.Generic; +using System.Runtime.CompilerServices; + +namespace Microsoft.Data.Analysis +{ + public partial class PrimitiveDataFrameColumn : DataFrameColumn + where T : unmanaged + { +<# foreach (MethodConfiguration method in methodConfiguration) { #> +<# if (method.MethodType == MethodType.Binary || method.MethodType == MethodType.Comparison) {#> +<# if (method.MethodType == MethodType.Binary) {#> + /// + public override DataFrameColumn <#=method.MethodName#>(DataFrameColumn column, bool inPlace = false) +<# } else { #> + /// + public override PrimitiveDataFrameColumn <#=method.MethodName#>(DataFrameColumn column) +<# } #> + { + switch (column) + { +<# foreach (TypeConfiguration type in typeConfiguration) { #> + case PrimitiveDataFrameColumn<<#=type.TypeName#>> <#=type.TypeName#>Column: +<# if (method.MethodType == MethodType.Binary) {#> + return <#=method.MethodName#>Implementation(column as PrimitiveDataFrameColumn<<#=type.TypeName#>>, inPlace); +<# } else { #> + return <#=method.MethodName#>Implementation(column as PrimitiveDataFrameColumn<<#=type.TypeName#>>); +<# } #> +<# } #> + default: + throw new NotSupportedException(); + } + } +<# } #> +<# if (method.MethodType == MethodType.BinaryScalar || method.MethodType == MethodType.ComparisonScalar) {#> +<# if (method.MethodType == MethodType.BinaryScalar) {#> +<# if (method.IsBitwise == true) { #> + /// + public override PrimitiveDataFrameColumn <#=method.MethodName#>(bool value, bool inPlace = false) +<# } else { #> + /// + public override DataFrameColumn <#=method.MethodName#>(U value, bool inPlace = false) +<# } #> +<# } else {#> + /// + public override PrimitiveDataFrameColumn <#=method.MethodName#>(U value) +<# } #> + { +<# if (method.MethodType == MethodType.BinaryScalar) {#> +<# if (method.IsBitwise == true) { #> + return <#=method.MethodName#>Implementation(value, inPlace); +<# } else { #> + DataFrameColumn column = value as DataFrameColumn; + if (column != null) + { + return <#=method.MethodName#>(column, inPlace); + } + return <#=method.MethodName#>Implementation(value, inPlace); +<# } #> +<# } else {#> + DataFrameColumn column = value as DataFrameColumn; + if (column != null) + { + return <#=method.MethodName#>(column); + } + return <#=method.MethodName#>Implementation(value); +<# } #> + } +<# } #> +<# if (method.MethodType == MethodType.BinaryInt ) {#> + /// + public override DataFrameColumn <#=method.MethodName#>(int value, bool inPlace = false) + { + return <#=method.MethodName#>Implementation(value, inPlace); + } +<# } #> +<# } #> + +<# foreach (MethodConfiguration method in methodConfiguration) { #> +<# if (method.MethodType == MethodType.BinaryScalar || method.MethodType == MethodType.ComparisonScalar) {#> +<# if (method.MethodType == MethodType.BinaryScalar) {#> +<# if (method.IsBitwise == true) { #> + internal PrimitiveDataFrameColumn <#=method.MethodName#>Implementation(U value, bool inPlace) +<# } else { #> + internal DataFrameColumn <#=method.MethodName#>Implementation(U value, bool inPlace) +<# } #> +<# } else {#> + internal PrimitiveDataFrameColumn <#=method.MethodName#>Implementation(U value) +<# } #> +<# } #> +<# if (method.MethodType == MethodType.Binary || method.MethodType == MethodType.Comparison) {#> +<# if (method.MethodType == MethodType.Binary) {#> + internal DataFrameColumn <#=method.MethodName#>Implementation(PrimitiveDataFrameColumn column, bool inPlace) +<# } else { #> + internal PrimitiveDataFrameColumn <#=method.MethodName#>Implementation(PrimitiveDataFrameColumn column) +<# } #> + where U : unmanaged +<# } #> +<# if (method.MethodType == MethodType.BinaryInt ) {#> + internal DataFrameColumn <#=method.MethodName#>Implementation(int value, bool inPlace) +<# } #> + { +<# if (method.MethodType == MethodType.BinaryScalar || method.MethodType == MethodType.ComparisonScalar || method.MethodType == MethodType.BinaryInt) {#> +<# } else { #> + if (column.Length != Length) + { + throw new ArgumentException(Strings.MismatchedColumnLengths, nameof(column)); + } +<# } #> +<# if (method.MethodType == MethodType.BinaryInt ) {#> + switch (typeof(T)) + { +<# foreach (TypeConfiguration type in typeConfiguration) { #> + case Type <#=type.TypeName#>Type when <#=type.TypeName#>Type == typeof(<#=type.TypeName#>): +<# if (type.TypeName == "bool" || type.SupportsBitwise == false) { #> + throw new NotSupportedException(); +<# } else { #> + PrimitiveDataFrameColumn<<#=type.TypeName#>> <#=type.TypeName#>Column = this as PrimitiveDataFrameColumn<<#=type.TypeName#>>; + PrimitiveDataFrameColumn<<#=type.TypeName#>> new<#=type.TypeName#>Column = inPlace ? <#=type.TypeName#>Column : <#=type.TypeName#>Column.Clone(); + new<#=type.TypeName#>Column._columnContainer.<#=method.MethodName#>(value); + return new<#=type.TypeName#>Column; +<# } #> +<# } #> + default: + throw new NotSupportedException(); + } +<# } else if (method.IsBitwise == true && method.IsNumeric == false) { #> + switch (typeof(T)) + { + case Type boolType when boolType == typeof(bool): + if (typeof(U) != typeof(bool)) + { + throw new NotSupportedException(); + } +<# if (method.MethodType == MethodType.BinaryScalar) {#> + PrimitiveDataFrameColumn typedColumn = this as PrimitiveDataFrameColumn; + PrimitiveDataFrameColumn retColumn = <#=GenerateInPlaceStatement("typedColumn", "typedColumn.Clone()")#>; + retColumn._columnContainer.<#=method.MethodName#>(Unsafe.As(ref value)); + return retColumn as PrimitiveDataFrameColumn; +<# } else { #> + PrimitiveDataFrameColumn typedColumn = this as PrimitiveDataFrameColumn; + PrimitiveDataFrameColumn retColumn = <#=GenerateInPlaceStatement("typedColumn", "typedColumn.Clone()")#>; + retColumn._columnContainer.<#=method.MethodName#>(column._columnContainer); + return retColumn; +<# } #> +<# foreach (TypeConfiguration type in typeConfiguration) { #> +<# if (type.TypeName == "bool") { #> +<# } else { #> + case Type <#=type.TypeName#>Type when <#=type.TypeName#>Type == typeof(<#=type.TypeName#>): +<# } #> +<# } #> + default: + throw new NotSupportedException(); + } +<# } else { #> + switch (typeof(T)) + { +<# foreach (TypeConfiguration type in typeConfiguration) { #> +<# if (type.TypeName == "bool") { #> + case Type <#=type.TypeName#>Type when <#=type.TypeName#>Type == typeof(<#=type.TypeName#>): +<# if (method.IsNumeric == true) { #> + throw new NotSupportedException(); +<# } else { #> + if (typeof(U) != typeof(bool)) + { + throw new NotSupportedException(); + } +<# if (method.MethodType == MethodType.ComparisonScalar || method.MethodType == MethodType.Comparison) { #> + PrimitiveDataFrameColumn retColumn = CloneAsBooleanColumn(); +<# if (method.MethodType == MethodType.ComparisonScalar) { #> + (this as PrimitiveDataFrameColumn)._columnContainer.<#=method.MethodName#>(Unsafe.As(ref value), retColumn._columnContainer); +<# } else { #> + (this as PrimitiveDataFrameColumn)._columnContainer.<#=method.MethodName#>(column._columnContainer, retColumn._columnContainer); +<# } #> +<# } else if (method.MethodType == MethodType.BinaryScalar) {#> + PrimitiveDataFrameColumn column = this as PrimitiveDataFrameColumn; + PrimitiveDataFrameColumn retColumn = <#=GenerateInPlaceStatement("column", "column.Clone()")#>; + retColumn._columnContainer.<#=method.MethodName#>(value); +<# } else { #> + PrimitiveDataFrameColumn column = this as PrimitiveDataFrameColumn; + PrimitiveDataFrameColumn retColumn = <#=GenerateInPlaceStatement("column", "column.Clone()")#>; + retColumn._columnContainer.<#=method.MethodName#>(column._columnContainer); +<# } #> + return retColumn; +<# } #> +<# } else if (type.TypeName == "decimal") { #> + case Type <#=type.TypeName#>Type when <#=type.TypeName#>Type == typeof(<#=type.TypeName#>): + if (typeof(U) == typeof(bool)) + { + throw new NotSupportedException(); + } + if (typeof(U) == typeof(T)) + { + // No conversions +<# if (method.MethodType == MethodType.ComparisonScalar || method.MethodType == MethodType.Comparison) { #> +<# if (method.MethodType == MethodType.ComparisonScalar) { #> + PrimitiveDataFrameColumn primitiveColumn = this; + PrimitiveDataFrameColumn newColumn = CloneAsBooleanColumn(); + primitiveColumn._columnContainer.<#=method.MethodName#>(Unsafe.As(ref value), newColumn._columnContainer); + return newColumn; +<# } else { #> + PrimitiveDataFrameColumn primitiveColumn = this as PrimitiveDataFrameColumn; + PrimitiveDataFrameColumn newColumn = CloneAsBooleanColumn(); + primitiveColumn._columnContainer.<#=method.MethodName#>(column._columnContainer, newColumn._columnContainer); + return newColumn; +<# } #> +<# } else if (method.IsBitwise == true ) { #> + throw new NotSupportedException(); +<# } else if (method.MethodType == MethodType.BinaryScalar ) { #> + PrimitiveDataFrameColumn primitiveColumn = this; + PrimitiveDataFrameColumn newColumn = <#=GenerateInPlaceStatement("primitiveColumn", "primitiveColumn.Clone()")#>; + newColumn._columnContainer.<#=method.MethodName#>(Unsafe.As(ref value)); + return newColumn; +<# } else { #> + PrimitiveDataFrameColumn primitiveColumn = this as PrimitiveDataFrameColumn; + PrimitiveDataFrameColumn newColumn = <#=GenerateInPlaceStatement("primitiveColumn", "primitiveColumn.Clone()")#>; + newColumn._columnContainer.<#=method.MethodName#>(column._columnContainer); + return newColumn; +<# } #> + } + else + { +<# if (method.MethodType == MethodType.BinaryScalar) { #> + if (inPlace) + { + throw new ArgumentException(string.Format(Strings.MismatchedValueType, typeof(T)), nameof(value)); + } +<# } else if (method.MethodType == MethodType.Binary) { #> + if (inPlace) + { + throw new ArgumentException(string.Format(Strings.MismatchedColumnValueType, typeof(T)), nameof(column)); + } +<# } #> +<# if (method.MethodType == MethodType.ComparisonScalar || method.MethodType == MethodType.Comparison) { #> + PrimitiveDataFrameColumn newColumn = CloneAsBooleanColumn(); +<# if (method.MethodType == MethodType.ComparisonScalar) { #> + PrimitiveDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + decimalColumn._columnContainer.<#=method.MethodName#>(DecimalConverter.Instance.GetDecimal(value), newColumn._columnContainer); + return newColumn; +<# } else { #> + PrimitiveDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + decimalColumn._columnContainer.<#=method.MethodName#>(column.CloneAsDecimalColumn()._columnContainer, newColumn._columnContainer); + return newColumn; +<# } #> +<# } else if (method.IsBitwise == true) { #> + throw new NotSupportedException(); +<# } else if (method.MethodType == MethodType.BinaryScalar) { #> + PrimitiveDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + decimalColumn._columnContainer.<#=method.MethodName#>(DecimalConverter.Instance.GetDecimal(value)); + return decimalColumn; +<# } else { #> + PrimitiveDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + decimalColumn._columnContainer.<#=method.MethodName#>(column.CloneAsDecimalColumn()._columnContainer); + return decimalColumn; +<# } #> + } +<# } else { #> +<# } #> +<# } #> + case Type byteType when byteType == typeof(byte): + case Type charType when charType == typeof(char): + case Type doubleType when doubleType == typeof(double): + case Type floatType when floatType == typeof(float): + case Type intType when intType == typeof(int): + case Type longType when longType == typeof(long): + case Type sbyteType when sbyteType == typeof(sbyte): + case Type shortType when shortType == typeof(short): + case Type uintType when uintType == typeof(uint): + case Type ulongType when ulongType == typeof(ulong): + case Type ushortType when ushortType == typeof(ushort): + if (typeof(U) == typeof(bool)) + { + throw new NotSupportedException(); + } + if (typeof(U) == typeof(T)) + { + // No conversions +<# if (method.MethodType == MethodType.ComparisonScalar || method.MethodType == MethodType.Comparison) { #> +<# if (method.MethodType == MethodType.ComparisonScalar) { #> + PrimitiveDataFrameColumn primitiveColumn = this; + PrimitiveDataFrameColumn newColumn = CloneAsBooleanColumn(); + primitiveColumn._columnContainer.<#=method.MethodName#>(Unsafe.As(ref value), newColumn._columnContainer); + return newColumn; +<# } else { #> + PrimitiveDataFrameColumn primitiveColumn = this as PrimitiveDataFrameColumn; + PrimitiveDataFrameColumn newColumn = CloneAsBooleanColumn(); + primitiveColumn._columnContainer.<#=method.MethodName#>(column._columnContainer, newColumn._columnContainer); + return newColumn; +<# } #> +<# } else if (method.IsBitwise == true ) { #> + throw new NotSupportedException(); +<# } else if (method.MethodType == MethodType.BinaryScalar ) { #> + PrimitiveDataFrameColumn primitiveColumn = this; + PrimitiveDataFrameColumn newColumn = <#=GenerateInPlaceStatement("primitiveColumn", "primitiveColumn.Clone()")#>; + newColumn._columnContainer.<#=method.MethodName#>(Unsafe.As(ref value)); + return newColumn; +<# } else { #> + PrimitiveDataFrameColumn primitiveColumn = this as PrimitiveDataFrameColumn; + PrimitiveDataFrameColumn newColumn = <#=GenerateInPlaceStatement("primitiveColumn", "primitiveColumn.Clone()")#>; + newColumn._columnContainer.<#=method.MethodName#>(column._columnContainer); + return newColumn; +<# } #> + } + else + { +<# if (method.MethodType == MethodType.BinaryScalar) { #> + if (inPlace) + { + throw new ArgumentException(string.Format(Strings.MismatchedValueType, typeof(T)), nameof(value)); + } +<# } else if (method.MethodType == MethodType.Binary) { #> + if (inPlace) + { + throw new ArgumentException(string.Format(Strings.MismatchedColumnValueType, typeof(T)), nameof(column)); + } +<# } #> + if (typeof(U) == typeof(decimal)) + { +<# if (method.MethodType == MethodType.ComparisonScalar || method.MethodType == MethodType.Comparison) { #> + PrimitiveDataFrameColumn newColumn = CloneAsBooleanColumn(); +<# if (method.MethodType == MethodType.ComparisonScalar) { #> + PrimitiveDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + decimalColumn._columnContainer.<#=method.MethodName#>(DecimalConverter.Instance.GetDecimal(value), newColumn._columnContainer); + return newColumn; +<# } else { #> + PrimitiveDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + decimalColumn._columnContainer.<#=method.MethodName#>((column as PrimitiveDataFrameColumn)._columnContainer, newColumn._columnContainer); + return newColumn; +<# } #> +<# } else if (method.IsBitwise == true) { #> + throw new NotSupportedException(); +<# } else if (method.MethodType == MethodType.BinaryScalar) { #> + PrimitiveDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + decimalColumn._columnContainer.<#=method.MethodName#>(DecimalConverter.Instance.GetDecimal(value)); + return decimalColumn; +<# } else { #> + PrimitiveDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + decimalColumn._columnContainer.<#=method.MethodName#>((column as PrimitiveDataFrameColumn)._columnContainer); + return decimalColumn; +<# } #> + } + else + { +<# if (method.MethodType == MethodType.ComparisonScalar || method.MethodType == MethodType.Comparison) { #> + PrimitiveDataFrameColumn newColumn = CloneAsBooleanColumn(); +<# if (method.MethodType == MethodType.ComparisonScalar) { #> + PrimitiveDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + doubleColumn._columnContainer.<#=method.MethodName#>(DoubleConverter.Instance.GetDouble(value), newColumn._columnContainer); + return newColumn; +<# } else { #> + PrimitiveDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + doubleColumn._columnContainer.<#=method.MethodName#>(column.CloneAsDoubleColumn()._columnContainer, newColumn._columnContainer); + return newColumn; +<# } #> +<# } else if (method.IsBitwise == true) { #> + throw new NotSupportedException(); +<# } else if (method.MethodType == MethodType.BinaryScalar ) { #> + PrimitiveDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + doubleColumn._columnContainer.<#=method.MethodName#>(DoubleConverter.Instance.GetDouble(value)); + return doubleColumn; +<# } else { #> + PrimitiveDataFrameColumn doubleColumn = CloneAsDoubleColumn(); + doubleColumn._columnContainer.<#=method.MethodName#>(column.CloneAsDoubleColumn()._columnContainer); + return doubleColumn; +<# } #> + } + } + default: + throw new NotSupportedException(); + } +<# } #> + } +<# } #> + } +} diff --git a/src/Microsoft.Data.Analysis/PrimitiveDataFrameColumn.BinaryOperators.cs b/src/Microsoft.Data.Analysis/PrimitiveDataFrameColumn.BinaryOperators.cs new file mode 100644 index 0000000000..ab89c880d9 --- /dev/null +++ b/src/Microsoft.Data.Analysis/PrimitiveDataFrameColumn.BinaryOperators.cs @@ -0,0 +1,7397 @@ + + +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System; +using System.Collections.Generic; +using System.Text; + +namespace Microsoft.Data.Analysis +{ + public partial class ByteDataFrameColumn + { + public static Int32DataFrameColumn operator +(ByteDataFrameColumn left, ByteDataFrameColumn right) + { + return left.Add(right); + } + public static DecimalDataFrameColumn operator +(ByteDataFrameColumn left, DecimalDataFrameColumn right) + { + return left.Add(right); + } + public static DoubleDataFrameColumn operator +(ByteDataFrameColumn left, DoubleDataFrameColumn right) + { + return left.Add(right); + } + public static SingleDataFrameColumn operator +(ByteDataFrameColumn left, SingleDataFrameColumn right) + { + return left.Add(right); + } + public static Int32DataFrameColumn operator +(ByteDataFrameColumn left, Int32DataFrameColumn right) + { + return left.Add(right); + } + public static Int64DataFrameColumn operator +(ByteDataFrameColumn left, Int64DataFrameColumn right) + { + return left.Add(right); + } + public static Int32DataFrameColumn operator +(ByteDataFrameColumn left, SByteDataFrameColumn right) + { + return left.Add(right); + } + public static Int32DataFrameColumn operator +(ByteDataFrameColumn left, Int16DataFrameColumn right) + { + return left.Add(right); + } + public static UInt32DataFrameColumn operator +(ByteDataFrameColumn left, UInt32DataFrameColumn right) + { + return left.Add(right); + } + public static UInt64DataFrameColumn operator +(ByteDataFrameColumn left, UInt64DataFrameColumn right) + { + return left.Add(right); + } + public static Int32DataFrameColumn operator +(ByteDataFrameColumn left, UInt16DataFrameColumn right) + { + return left.Add(right); + } + } + public partial class DecimalDataFrameColumn + { + public static DecimalDataFrameColumn operator +(DecimalDataFrameColumn left, ByteDataFrameColumn right) + { + return left.Add(right); + } + public static DecimalDataFrameColumn operator +(DecimalDataFrameColumn left, DecimalDataFrameColumn right) + { + return left.Add(right); + } + public static DecimalDataFrameColumn operator +(DecimalDataFrameColumn left, Int32DataFrameColumn right) + { + return left.Add(right); + } + public static DecimalDataFrameColumn operator +(DecimalDataFrameColumn left, Int64DataFrameColumn right) + { + return left.Add(right); + } + public static DecimalDataFrameColumn operator +(DecimalDataFrameColumn left, SByteDataFrameColumn right) + { + return left.Add(right); + } + public static DecimalDataFrameColumn operator +(DecimalDataFrameColumn left, Int16DataFrameColumn right) + { + return left.Add(right); + } + public static DecimalDataFrameColumn operator +(DecimalDataFrameColumn left, UInt32DataFrameColumn right) + { + return left.Add(right); + } + public static DecimalDataFrameColumn operator +(DecimalDataFrameColumn left, UInt64DataFrameColumn right) + { + return left.Add(right); + } + public static DecimalDataFrameColumn operator +(DecimalDataFrameColumn left, UInt16DataFrameColumn right) + { + return left.Add(right); + } + } + public partial class DoubleDataFrameColumn + { + public static DoubleDataFrameColumn operator +(DoubleDataFrameColumn left, ByteDataFrameColumn right) + { + return left.Add(right); + } + public static DoubleDataFrameColumn operator +(DoubleDataFrameColumn left, DoubleDataFrameColumn right) + { + return left.Add(right); + } + public static DoubleDataFrameColumn operator +(DoubleDataFrameColumn left, SingleDataFrameColumn right) + { + return left.Add(right); + } + public static DoubleDataFrameColumn operator +(DoubleDataFrameColumn left, Int32DataFrameColumn right) + { + return left.Add(right); + } + public static DoubleDataFrameColumn operator +(DoubleDataFrameColumn left, Int64DataFrameColumn right) + { + return left.Add(right); + } + public static DoubleDataFrameColumn operator +(DoubleDataFrameColumn left, SByteDataFrameColumn right) + { + return left.Add(right); + } + public static DoubleDataFrameColumn operator +(DoubleDataFrameColumn left, Int16DataFrameColumn right) + { + return left.Add(right); + } + public static DoubleDataFrameColumn operator +(DoubleDataFrameColumn left, UInt32DataFrameColumn right) + { + return left.Add(right); + } + public static DoubleDataFrameColumn operator +(DoubleDataFrameColumn left, UInt64DataFrameColumn right) + { + return left.Add(right); + } + public static DoubleDataFrameColumn operator +(DoubleDataFrameColumn left, UInt16DataFrameColumn right) + { + return left.Add(right); + } + } + public partial class SingleDataFrameColumn + { + public static SingleDataFrameColumn operator +(SingleDataFrameColumn left, ByteDataFrameColumn right) + { + return left.Add(right); + } + public static DoubleDataFrameColumn operator +(SingleDataFrameColumn left, DoubleDataFrameColumn right) + { + return left.Add(right); + } + public static SingleDataFrameColumn operator +(SingleDataFrameColumn left, SingleDataFrameColumn right) + { + return left.Add(right); + } + public static SingleDataFrameColumn operator +(SingleDataFrameColumn left, Int32DataFrameColumn right) + { + return left.Add(right); + } + public static SingleDataFrameColumn operator +(SingleDataFrameColumn left, Int64DataFrameColumn right) + { + return left.Add(right); + } + public static SingleDataFrameColumn operator +(SingleDataFrameColumn left, SByteDataFrameColumn right) + { + return left.Add(right); + } + public static SingleDataFrameColumn operator +(SingleDataFrameColumn left, Int16DataFrameColumn right) + { + return left.Add(right); + } + public static SingleDataFrameColumn operator +(SingleDataFrameColumn left, UInt32DataFrameColumn right) + { + return left.Add(right); + } + public static SingleDataFrameColumn operator +(SingleDataFrameColumn left, UInt64DataFrameColumn right) + { + return left.Add(right); + } + public static SingleDataFrameColumn operator +(SingleDataFrameColumn left, UInt16DataFrameColumn right) + { + return left.Add(right); + } + } + public partial class Int32DataFrameColumn + { + public static Int32DataFrameColumn operator +(Int32DataFrameColumn left, ByteDataFrameColumn right) + { + return left.Add(right); + } + public static DecimalDataFrameColumn operator +(Int32DataFrameColumn left, DecimalDataFrameColumn right) + { + return left.Add(right); + } + public static DoubleDataFrameColumn operator +(Int32DataFrameColumn left, DoubleDataFrameColumn right) + { + return left.Add(right); + } + public static SingleDataFrameColumn operator +(Int32DataFrameColumn left, SingleDataFrameColumn right) + { + return left.Add(right); + } + public static Int32DataFrameColumn operator +(Int32DataFrameColumn left, Int32DataFrameColumn right) + { + return left.Add(right); + } + public static Int64DataFrameColumn operator +(Int32DataFrameColumn left, Int64DataFrameColumn right) + { + return left.Add(right); + } + public static Int32DataFrameColumn operator +(Int32DataFrameColumn left, SByteDataFrameColumn right) + { + return left.Add(right); + } + public static Int32DataFrameColumn operator +(Int32DataFrameColumn left, Int16DataFrameColumn right) + { + return left.Add(right); + } + public static Int64DataFrameColumn operator +(Int32DataFrameColumn left, UInt32DataFrameColumn right) + { + return left.Add(right); + } + public static SingleDataFrameColumn operator +(Int32DataFrameColumn left, UInt64DataFrameColumn right) + { + return left.Add(right); + } + public static Int32DataFrameColumn operator +(Int32DataFrameColumn left, UInt16DataFrameColumn right) + { + return left.Add(right); + } + } + public partial class Int64DataFrameColumn + { + public static Int64DataFrameColumn operator +(Int64DataFrameColumn left, ByteDataFrameColumn right) + { + return left.Add(right); + } + public static DecimalDataFrameColumn operator +(Int64DataFrameColumn left, DecimalDataFrameColumn right) + { + return left.Add(right); + } + public static DoubleDataFrameColumn operator +(Int64DataFrameColumn left, DoubleDataFrameColumn right) + { + return left.Add(right); + } + public static SingleDataFrameColumn operator +(Int64DataFrameColumn left, SingleDataFrameColumn right) + { + return left.Add(right); + } + public static Int64DataFrameColumn operator +(Int64DataFrameColumn left, Int32DataFrameColumn right) + { + return left.Add(right); + } + public static Int64DataFrameColumn operator +(Int64DataFrameColumn left, Int64DataFrameColumn right) + { + return left.Add(right); + } + public static Int64DataFrameColumn operator +(Int64DataFrameColumn left, SByteDataFrameColumn right) + { + return left.Add(right); + } + public static Int64DataFrameColumn operator +(Int64DataFrameColumn left, Int16DataFrameColumn right) + { + return left.Add(right); + } + public static Int64DataFrameColumn operator +(Int64DataFrameColumn left, UInt32DataFrameColumn right) + { + return left.Add(right); + } + public static Int64DataFrameColumn operator +(Int64DataFrameColumn left, UInt16DataFrameColumn right) + { + return left.Add(right); + } + } + public partial class SByteDataFrameColumn + { + public static Int32DataFrameColumn operator +(SByteDataFrameColumn left, ByteDataFrameColumn right) + { + return left.Add(right); + } + public static DecimalDataFrameColumn operator +(SByteDataFrameColumn left, DecimalDataFrameColumn right) + { + return left.Add(right); + } + public static DoubleDataFrameColumn operator +(SByteDataFrameColumn left, DoubleDataFrameColumn right) + { + return left.Add(right); + } + public static SingleDataFrameColumn operator +(SByteDataFrameColumn left, SingleDataFrameColumn right) + { + return left.Add(right); + } + public static Int32DataFrameColumn operator +(SByteDataFrameColumn left, Int32DataFrameColumn right) + { + return left.Add(right); + } + public static Int64DataFrameColumn operator +(SByteDataFrameColumn left, Int64DataFrameColumn right) + { + return left.Add(right); + } + public static Int32DataFrameColumn operator +(SByteDataFrameColumn left, SByteDataFrameColumn right) + { + return left.Add(right); + } + public static Int32DataFrameColumn operator +(SByteDataFrameColumn left, Int16DataFrameColumn right) + { + return left.Add(right); + } + public static Int64DataFrameColumn operator +(SByteDataFrameColumn left, UInt32DataFrameColumn right) + { + return left.Add(right); + } + public static SingleDataFrameColumn operator +(SByteDataFrameColumn left, UInt64DataFrameColumn right) + { + return left.Add(right); + } + public static Int32DataFrameColumn operator +(SByteDataFrameColumn left, UInt16DataFrameColumn right) + { + return left.Add(right); + } + } + public partial class Int16DataFrameColumn + { + public static Int32DataFrameColumn operator +(Int16DataFrameColumn left, ByteDataFrameColumn right) + { + return left.Add(right); + } + public static DecimalDataFrameColumn operator +(Int16DataFrameColumn left, DecimalDataFrameColumn right) + { + return left.Add(right); + } + public static DoubleDataFrameColumn operator +(Int16DataFrameColumn left, DoubleDataFrameColumn right) + { + return left.Add(right); + } + public static SingleDataFrameColumn operator +(Int16DataFrameColumn left, SingleDataFrameColumn right) + { + return left.Add(right); + } + public static Int32DataFrameColumn operator +(Int16DataFrameColumn left, Int32DataFrameColumn right) + { + return left.Add(right); + } + public static Int64DataFrameColumn operator +(Int16DataFrameColumn left, Int64DataFrameColumn right) + { + return left.Add(right); + } + public static Int32DataFrameColumn operator +(Int16DataFrameColumn left, SByteDataFrameColumn right) + { + return left.Add(right); + } + public static Int32DataFrameColumn operator +(Int16DataFrameColumn left, Int16DataFrameColumn right) + { + return left.Add(right); + } + public static Int64DataFrameColumn operator +(Int16DataFrameColumn left, UInt32DataFrameColumn right) + { + return left.Add(right); + } + public static SingleDataFrameColumn operator +(Int16DataFrameColumn left, UInt64DataFrameColumn right) + { + return left.Add(right); + } + public static Int32DataFrameColumn operator +(Int16DataFrameColumn left, UInt16DataFrameColumn right) + { + return left.Add(right); + } + } + public partial class UInt32DataFrameColumn + { + public static UInt32DataFrameColumn operator +(UInt32DataFrameColumn left, ByteDataFrameColumn right) + { + return left.Add(right); + } + public static DecimalDataFrameColumn operator +(UInt32DataFrameColumn left, DecimalDataFrameColumn right) + { + return left.Add(right); + } + public static DoubleDataFrameColumn operator +(UInt32DataFrameColumn left, DoubleDataFrameColumn right) + { + return left.Add(right); + } + public static SingleDataFrameColumn operator +(UInt32DataFrameColumn left, SingleDataFrameColumn right) + { + return left.Add(right); + } + public static Int64DataFrameColumn operator +(UInt32DataFrameColumn left, Int32DataFrameColumn right) + { + return left.Add(right); + } + public static Int64DataFrameColumn operator +(UInt32DataFrameColumn left, Int64DataFrameColumn right) + { + return left.Add(right); + } + public static Int64DataFrameColumn operator +(UInt32DataFrameColumn left, SByteDataFrameColumn right) + { + return left.Add(right); + } + public static Int64DataFrameColumn operator +(UInt32DataFrameColumn left, Int16DataFrameColumn right) + { + return left.Add(right); + } + public static UInt32DataFrameColumn operator +(UInt32DataFrameColumn left, UInt32DataFrameColumn right) + { + return left.Add(right); + } + public static UInt64DataFrameColumn operator +(UInt32DataFrameColumn left, UInt64DataFrameColumn right) + { + return left.Add(right); + } + public static UInt32DataFrameColumn operator +(UInt32DataFrameColumn left, UInt16DataFrameColumn right) + { + return left.Add(right); + } + } + public partial class UInt64DataFrameColumn + { + public static UInt64DataFrameColumn operator +(UInt64DataFrameColumn left, ByteDataFrameColumn right) + { + return left.Add(right); + } + public static DecimalDataFrameColumn operator +(UInt64DataFrameColumn left, DecimalDataFrameColumn right) + { + return left.Add(right); + } + public static DoubleDataFrameColumn operator +(UInt64DataFrameColumn left, DoubleDataFrameColumn right) + { + return left.Add(right); + } + public static SingleDataFrameColumn operator +(UInt64DataFrameColumn left, SingleDataFrameColumn right) + { + return left.Add(right); + } + public static SingleDataFrameColumn operator +(UInt64DataFrameColumn left, Int32DataFrameColumn right) + { + return left.Add(right); + } + public static SingleDataFrameColumn operator +(UInt64DataFrameColumn left, SByteDataFrameColumn right) + { + return left.Add(right); + } + public static SingleDataFrameColumn operator +(UInt64DataFrameColumn left, Int16DataFrameColumn right) + { + return left.Add(right); + } + public static UInt64DataFrameColumn operator +(UInt64DataFrameColumn left, UInt32DataFrameColumn right) + { + return left.Add(right); + } + public static UInt64DataFrameColumn operator +(UInt64DataFrameColumn left, UInt64DataFrameColumn right) + { + return left.Add(right); + } + public static UInt64DataFrameColumn operator +(UInt64DataFrameColumn left, UInt16DataFrameColumn right) + { + return left.Add(right); + } + } + public partial class UInt16DataFrameColumn + { + public static Int32DataFrameColumn operator +(UInt16DataFrameColumn left, ByteDataFrameColumn right) + { + return left.Add(right); + } + public static DecimalDataFrameColumn operator +(UInt16DataFrameColumn left, DecimalDataFrameColumn right) + { + return left.Add(right); + } + public static DoubleDataFrameColumn operator +(UInt16DataFrameColumn left, DoubleDataFrameColumn right) + { + return left.Add(right); + } + public static SingleDataFrameColumn operator +(UInt16DataFrameColumn left, SingleDataFrameColumn right) + { + return left.Add(right); + } + public static Int32DataFrameColumn operator +(UInt16DataFrameColumn left, Int32DataFrameColumn right) + { + return left.Add(right); + } + public static Int64DataFrameColumn operator +(UInt16DataFrameColumn left, Int64DataFrameColumn right) + { + return left.Add(right); + } + public static Int32DataFrameColumn operator +(UInt16DataFrameColumn left, SByteDataFrameColumn right) + { + return left.Add(right); + } + public static Int32DataFrameColumn operator +(UInt16DataFrameColumn left, Int16DataFrameColumn right) + { + return left.Add(right); + } + public static UInt32DataFrameColumn operator +(UInt16DataFrameColumn left, UInt32DataFrameColumn right) + { + return left.Add(right); + } + public static UInt64DataFrameColumn operator +(UInt16DataFrameColumn left, UInt64DataFrameColumn right) + { + return left.Add(right); + } + public static Int32DataFrameColumn operator +(UInt16DataFrameColumn left, UInt16DataFrameColumn right) + { + return left.Add(right); + } + } + public partial class ByteDataFrameColumn + { + public static Int32DataFrameColumn operator +(ByteDataFrameColumn left, byte right) + { + return left.Add(right); + } + public static Int32DataFrameColumn operator +(byte left, ByteDataFrameColumn right) + { + return right.ReverseAdd(left); + } + public static DecimalDataFrameColumn operator +(ByteDataFrameColumn left, decimal right) + { + return left.Add(right); + } + public static DecimalDataFrameColumn operator +(decimal left, ByteDataFrameColumn right) + { + return right.ReverseAdd(left); + } + public static DoubleDataFrameColumn operator +(ByteDataFrameColumn left, double right) + { + return left.Add(right); + } + public static DoubleDataFrameColumn operator +(double left, ByteDataFrameColumn right) + { + return right.ReverseAdd(left); + } + public static SingleDataFrameColumn operator +(ByteDataFrameColumn left, float right) + { + return left.Add(right); + } + public static SingleDataFrameColumn operator +(float left, ByteDataFrameColumn right) + { + return right.ReverseAdd(left); + } + public static Int32DataFrameColumn operator +(ByteDataFrameColumn left, int right) + { + return left.Add(right); + } + public static Int32DataFrameColumn operator +(int left, ByteDataFrameColumn right) + { + return right.ReverseAdd(left); + } + public static Int64DataFrameColumn operator +(ByteDataFrameColumn left, long right) + { + return left.Add(right); + } + public static Int64DataFrameColumn operator +(long left, ByteDataFrameColumn right) + { + return right.ReverseAdd(left); + } + public static Int32DataFrameColumn operator +(ByteDataFrameColumn left, sbyte right) + { + return left.Add(right); + } + public static Int32DataFrameColumn operator +(sbyte left, ByteDataFrameColumn right) + { + return right.ReverseAdd(left); + } + public static Int32DataFrameColumn operator +(ByteDataFrameColumn left, short right) + { + return left.Add(right); + } + public static Int32DataFrameColumn operator +(short left, ByteDataFrameColumn right) + { + return right.ReverseAdd(left); + } + public static UInt32DataFrameColumn operator +(ByteDataFrameColumn left, uint right) + { + return left.Add(right); + } + public static UInt32DataFrameColumn operator +(uint left, ByteDataFrameColumn right) + { + return right.ReverseAdd(left); + } + public static UInt64DataFrameColumn operator +(ByteDataFrameColumn left, ulong right) + { + return left.Add(right); + } + public static UInt64DataFrameColumn operator +(ulong left, ByteDataFrameColumn right) + { + return right.ReverseAdd(left); + } + public static Int32DataFrameColumn operator +(ByteDataFrameColumn left, ushort right) + { + return left.Add(right); + } + public static Int32DataFrameColumn operator +(ushort left, ByteDataFrameColumn right) + { + return right.ReverseAdd(left); + } + } + public partial class DecimalDataFrameColumn + { + public static DecimalDataFrameColumn operator +(DecimalDataFrameColumn left, byte right) + { + return left.Add(right); + } + public static DecimalDataFrameColumn operator +(byte left, DecimalDataFrameColumn right) + { + return right.ReverseAdd(left); + } + public static DecimalDataFrameColumn operator +(DecimalDataFrameColumn left, decimal right) + { + return left.Add(right); + } + public static DecimalDataFrameColumn operator +(decimal left, DecimalDataFrameColumn right) + { + return right.ReverseAdd(left); + } + public static DecimalDataFrameColumn operator +(DecimalDataFrameColumn left, int right) + { + return left.Add(right); + } + public static DecimalDataFrameColumn operator +(int left, DecimalDataFrameColumn right) + { + return right.ReverseAdd(left); + } + public static DecimalDataFrameColumn operator +(DecimalDataFrameColumn left, long right) + { + return left.Add(right); + } + public static DecimalDataFrameColumn operator +(long left, DecimalDataFrameColumn right) + { + return right.ReverseAdd(left); + } + public static DecimalDataFrameColumn operator +(DecimalDataFrameColumn left, sbyte right) + { + return left.Add(right); + } + public static DecimalDataFrameColumn operator +(sbyte left, DecimalDataFrameColumn right) + { + return right.ReverseAdd(left); + } + public static DecimalDataFrameColumn operator +(DecimalDataFrameColumn left, short right) + { + return left.Add(right); + } + public static DecimalDataFrameColumn operator +(short left, DecimalDataFrameColumn right) + { + return right.ReverseAdd(left); + } + public static DecimalDataFrameColumn operator +(DecimalDataFrameColumn left, uint right) + { + return left.Add(right); + } + public static DecimalDataFrameColumn operator +(uint left, DecimalDataFrameColumn right) + { + return right.ReverseAdd(left); + } + public static DecimalDataFrameColumn operator +(DecimalDataFrameColumn left, ulong right) + { + return left.Add(right); + } + public static DecimalDataFrameColumn operator +(ulong left, DecimalDataFrameColumn right) + { + return right.ReverseAdd(left); + } + public static DecimalDataFrameColumn operator +(DecimalDataFrameColumn left, ushort right) + { + return left.Add(right); + } + public static DecimalDataFrameColumn operator +(ushort left, DecimalDataFrameColumn right) + { + return right.ReverseAdd(left); + } + } + public partial class DoubleDataFrameColumn + { + public static DoubleDataFrameColumn operator +(DoubleDataFrameColumn left, byte right) + { + return left.Add(right); + } + public static DoubleDataFrameColumn operator +(byte left, DoubleDataFrameColumn right) + { + return right.ReverseAdd(left); + } + public static DoubleDataFrameColumn operator +(DoubleDataFrameColumn left, double right) + { + return left.Add(right); + } + public static DoubleDataFrameColumn operator +(double left, DoubleDataFrameColumn right) + { + return right.ReverseAdd(left); + } + public static DoubleDataFrameColumn operator +(DoubleDataFrameColumn left, float right) + { + return left.Add(right); + } + public static DoubleDataFrameColumn operator +(float left, DoubleDataFrameColumn right) + { + return right.ReverseAdd(left); + } + public static DoubleDataFrameColumn operator +(DoubleDataFrameColumn left, int right) + { + return left.Add(right); + } + public static DoubleDataFrameColumn operator +(int left, DoubleDataFrameColumn right) + { + return right.ReverseAdd(left); + } + public static DoubleDataFrameColumn operator +(DoubleDataFrameColumn left, long right) + { + return left.Add(right); + } + public static DoubleDataFrameColumn operator +(long left, DoubleDataFrameColumn right) + { + return right.ReverseAdd(left); + } + public static DoubleDataFrameColumn operator +(DoubleDataFrameColumn left, sbyte right) + { + return left.Add(right); + } + public static DoubleDataFrameColumn operator +(sbyte left, DoubleDataFrameColumn right) + { + return right.ReverseAdd(left); + } + public static DoubleDataFrameColumn operator +(DoubleDataFrameColumn left, short right) + { + return left.Add(right); + } + public static DoubleDataFrameColumn operator +(short left, DoubleDataFrameColumn right) + { + return right.ReverseAdd(left); + } + public static DoubleDataFrameColumn operator +(DoubleDataFrameColumn left, uint right) + { + return left.Add(right); + } + public static DoubleDataFrameColumn operator +(uint left, DoubleDataFrameColumn right) + { + return right.ReverseAdd(left); + } + public static DoubleDataFrameColumn operator +(DoubleDataFrameColumn left, ulong right) + { + return left.Add(right); + } + public static DoubleDataFrameColumn operator +(ulong left, DoubleDataFrameColumn right) + { + return right.ReverseAdd(left); + } + public static DoubleDataFrameColumn operator +(DoubleDataFrameColumn left, ushort right) + { + return left.Add(right); + } + public static DoubleDataFrameColumn operator +(ushort left, DoubleDataFrameColumn right) + { + return right.ReverseAdd(left); + } + } + public partial class SingleDataFrameColumn + { + public static SingleDataFrameColumn operator +(SingleDataFrameColumn left, byte right) + { + return left.Add(right); + } + public static SingleDataFrameColumn operator +(byte left, SingleDataFrameColumn right) + { + return right.ReverseAdd(left); + } + public static DoubleDataFrameColumn operator +(SingleDataFrameColumn left, double right) + { + return left.Add(right); + } + public static DoubleDataFrameColumn operator +(double left, SingleDataFrameColumn right) + { + return right.ReverseAdd(left); + } + public static SingleDataFrameColumn operator +(SingleDataFrameColumn left, float right) + { + return left.Add(right); + } + public static SingleDataFrameColumn operator +(float left, SingleDataFrameColumn right) + { + return right.ReverseAdd(left); + } + public static SingleDataFrameColumn operator +(SingleDataFrameColumn left, int right) + { + return left.Add(right); + } + public static SingleDataFrameColumn operator +(int left, SingleDataFrameColumn right) + { + return right.ReverseAdd(left); + } + public static SingleDataFrameColumn operator +(SingleDataFrameColumn left, long right) + { + return left.Add(right); + } + public static SingleDataFrameColumn operator +(long left, SingleDataFrameColumn right) + { + return right.ReverseAdd(left); + } + public static SingleDataFrameColumn operator +(SingleDataFrameColumn left, sbyte right) + { + return left.Add(right); + } + public static SingleDataFrameColumn operator +(sbyte left, SingleDataFrameColumn right) + { + return right.ReverseAdd(left); + } + public static SingleDataFrameColumn operator +(SingleDataFrameColumn left, short right) + { + return left.Add(right); + } + public static SingleDataFrameColumn operator +(short left, SingleDataFrameColumn right) + { + return right.ReverseAdd(left); + } + public static SingleDataFrameColumn operator +(SingleDataFrameColumn left, uint right) + { + return left.Add(right); + } + public static SingleDataFrameColumn operator +(uint left, SingleDataFrameColumn right) + { + return right.ReverseAdd(left); + } + public static SingleDataFrameColumn operator +(SingleDataFrameColumn left, ulong right) + { + return left.Add(right); + } + public static SingleDataFrameColumn operator +(ulong left, SingleDataFrameColumn right) + { + return right.ReverseAdd(left); + } + public static SingleDataFrameColumn operator +(SingleDataFrameColumn left, ushort right) + { + return left.Add(right); + } + public static SingleDataFrameColumn operator +(ushort left, SingleDataFrameColumn right) + { + return right.ReverseAdd(left); + } + } + public partial class Int32DataFrameColumn + { + public static Int32DataFrameColumn operator +(Int32DataFrameColumn left, byte right) + { + return left.Add(right); + } + public static Int32DataFrameColumn operator +(byte left, Int32DataFrameColumn right) + { + return right.ReverseAdd(left); + } + public static DecimalDataFrameColumn operator +(Int32DataFrameColumn left, decimal right) + { + return left.Add(right); + } + public static DecimalDataFrameColumn operator +(decimal left, Int32DataFrameColumn right) + { + return right.ReverseAdd(left); + } + public static DoubleDataFrameColumn operator +(Int32DataFrameColumn left, double right) + { + return left.Add(right); + } + public static DoubleDataFrameColumn operator +(double left, Int32DataFrameColumn right) + { + return right.ReverseAdd(left); + } + public static SingleDataFrameColumn operator +(Int32DataFrameColumn left, float right) + { + return left.Add(right); + } + public static SingleDataFrameColumn operator +(float left, Int32DataFrameColumn right) + { + return right.ReverseAdd(left); + } + public static Int32DataFrameColumn operator +(Int32DataFrameColumn left, int right) + { + return left.Add(right); + } + public static Int32DataFrameColumn operator +(int left, Int32DataFrameColumn right) + { + return right.ReverseAdd(left); + } + public static Int64DataFrameColumn operator +(Int32DataFrameColumn left, long right) + { + return left.Add(right); + } + public static Int64DataFrameColumn operator +(long left, Int32DataFrameColumn right) + { + return right.ReverseAdd(left); + } + public static Int32DataFrameColumn operator +(Int32DataFrameColumn left, sbyte right) + { + return left.Add(right); + } + public static Int32DataFrameColumn operator +(sbyte left, Int32DataFrameColumn right) + { + return right.ReverseAdd(left); + } + public static Int32DataFrameColumn operator +(Int32DataFrameColumn left, short right) + { + return left.Add(right); + } + public static Int32DataFrameColumn operator +(short left, Int32DataFrameColumn right) + { + return right.ReverseAdd(left); + } + public static Int64DataFrameColumn operator +(Int32DataFrameColumn left, uint right) + { + return left.Add(right); + } + public static Int64DataFrameColumn operator +(uint left, Int32DataFrameColumn right) + { + return right.ReverseAdd(left); + } + public static SingleDataFrameColumn operator +(Int32DataFrameColumn left, ulong right) + { + return left.Add(right); + } + public static SingleDataFrameColumn operator +(ulong left, Int32DataFrameColumn right) + { + return right.ReverseAdd(left); + } + public static Int32DataFrameColumn operator +(Int32DataFrameColumn left, ushort right) + { + return left.Add(right); + } + public static Int32DataFrameColumn operator +(ushort left, Int32DataFrameColumn right) + { + return right.ReverseAdd(left); + } + } + public partial class Int64DataFrameColumn + { + public static Int64DataFrameColumn operator +(Int64DataFrameColumn left, byte right) + { + return left.Add(right); + } + public static Int64DataFrameColumn operator +(byte left, Int64DataFrameColumn right) + { + return right.ReverseAdd(left); + } + public static DecimalDataFrameColumn operator +(Int64DataFrameColumn left, decimal right) + { + return left.Add(right); + } + public static DecimalDataFrameColumn operator +(decimal left, Int64DataFrameColumn right) + { + return right.ReverseAdd(left); + } + public static DoubleDataFrameColumn operator +(Int64DataFrameColumn left, double right) + { + return left.Add(right); + } + public static DoubleDataFrameColumn operator +(double left, Int64DataFrameColumn right) + { + return right.ReverseAdd(left); + } + public static SingleDataFrameColumn operator +(Int64DataFrameColumn left, float right) + { + return left.Add(right); + } + public static SingleDataFrameColumn operator +(float left, Int64DataFrameColumn right) + { + return right.ReverseAdd(left); + } + public static Int64DataFrameColumn operator +(Int64DataFrameColumn left, int right) + { + return left.Add(right); + } + public static Int64DataFrameColumn operator +(int left, Int64DataFrameColumn right) + { + return right.ReverseAdd(left); + } + public static Int64DataFrameColumn operator +(Int64DataFrameColumn left, long right) + { + return left.Add(right); + } + public static Int64DataFrameColumn operator +(long left, Int64DataFrameColumn right) + { + return right.ReverseAdd(left); + } + public static Int64DataFrameColumn operator +(Int64DataFrameColumn left, sbyte right) + { + return left.Add(right); + } + public static Int64DataFrameColumn operator +(sbyte left, Int64DataFrameColumn right) + { + return right.ReverseAdd(left); + } + public static Int64DataFrameColumn operator +(Int64DataFrameColumn left, short right) + { + return left.Add(right); + } + public static Int64DataFrameColumn operator +(short left, Int64DataFrameColumn right) + { + return right.ReverseAdd(left); + } + public static Int64DataFrameColumn operator +(Int64DataFrameColumn left, uint right) + { + return left.Add(right); + } + public static Int64DataFrameColumn operator +(uint left, Int64DataFrameColumn right) + { + return right.ReverseAdd(left); + } + public static Int64DataFrameColumn operator +(Int64DataFrameColumn left, ushort right) + { + return left.Add(right); + } + public static Int64DataFrameColumn operator +(ushort left, Int64DataFrameColumn right) + { + return right.ReverseAdd(left); + } + } + public partial class SByteDataFrameColumn + { + public static Int32DataFrameColumn operator +(SByteDataFrameColumn left, byte right) + { + return left.Add(right); + } + public static Int32DataFrameColumn operator +(byte left, SByteDataFrameColumn right) + { + return right.ReverseAdd(left); + } + public static DecimalDataFrameColumn operator +(SByteDataFrameColumn left, decimal right) + { + return left.Add(right); + } + public static DecimalDataFrameColumn operator +(decimal left, SByteDataFrameColumn right) + { + return right.ReverseAdd(left); + } + public static DoubleDataFrameColumn operator +(SByteDataFrameColumn left, double right) + { + return left.Add(right); + } + public static DoubleDataFrameColumn operator +(double left, SByteDataFrameColumn right) + { + return right.ReverseAdd(left); + } + public static SingleDataFrameColumn operator +(SByteDataFrameColumn left, float right) + { + return left.Add(right); + } + public static SingleDataFrameColumn operator +(float left, SByteDataFrameColumn right) + { + return right.ReverseAdd(left); + } + public static Int32DataFrameColumn operator +(SByteDataFrameColumn left, int right) + { + return left.Add(right); + } + public static Int32DataFrameColumn operator +(int left, SByteDataFrameColumn right) + { + return right.ReverseAdd(left); + } + public static Int64DataFrameColumn operator +(SByteDataFrameColumn left, long right) + { + return left.Add(right); + } + public static Int64DataFrameColumn operator +(long left, SByteDataFrameColumn right) + { + return right.ReverseAdd(left); + } + public static Int32DataFrameColumn operator +(SByteDataFrameColumn left, sbyte right) + { + return left.Add(right); + } + public static Int32DataFrameColumn operator +(sbyte left, SByteDataFrameColumn right) + { + return right.ReverseAdd(left); + } + public static Int32DataFrameColumn operator +(SByteDataFrameColumn left, short right) + { + return left.Add(right); + } + public static Int32DataFrameColumn operator +(short left, SByteDataFrameColumn right) + { + return right.ReverseAdd(left); + } + public static Int64DataFrameColumn operator +(SByteDataFrameColumn left, uint right) + { + return left.Add(right); + } + public static Int64DataFrameColumn operator +(uint left, SByteDataFrameColumn right) + { + return right.ReverseAdd(left); + } + public static SingleDataFrameColumn operator +(SByteDataFrameColumn left, ulong right) + { + return left.Add(right); + } + public static SingleDataFrameColumn operator +(ulong left, SByteDataFrameColumn right) + { + return right.ReverseAdd(left); + } + public static Int32DataFrameColumn operator +(SByteDataFrameColumn left, ushort right) + { + return left.Add(right); + } + public static Int32DataFrameColumn operator +(ushort left, SByteDataFrameColumn right) + { + return right.ReverseAdd(left); + } + } + public partial class Int16DataFrameColumn + { + public static Int32DataFrameColumn operator +(Int16DataFrameColumn left, byte right) + { + return left.Add(right); + } + public static Int32DataFrameColumn operator +(byte left, Int16DataFrameColumn right) + { + return right.ReverseAdd(left); + } + public static DecimalDataFrameColumn operator +(Int16DataFrameColumn left, decimal right) + { + return left.Add(right); + } + public static DecimalDataFrameColumn operator +(decimal left, Int16DataFrameColumn right) + { + return right.ReverseAdd(left); + } + public static DoubleDataFrameColumn operator +(Int16DataFrameColumn left, double right) + { + return left.Add(right); + } + public static DoubleDataFrameColumn operator +(double left, Int16DataFrameColumn right) + { + return right.ReverseAdd(left); + } + public static SingleDataFrameColumn operator +(Int16DataFrameColumn left, float right) + { + return left.Add(right); + } + public static SingleDataFrameColumn operator +(float left, Int16DataFrameColumn right) + { + return right.ReverseAdd(left); + } + public static Int32DataFrameColumn operator +(Int16DataFrameColumn left, int right) + { + return left.Add(right); + } + public static Int32DataFrameColumn operator +(int left, Int16DataFrameColumn right) + { + return right.ReverseAdd(left); + } + public static Int64DataFrameColumn operator +(Int16DataFrameColumn left, long right) + { + return left.Add(right); + } + public static Int64DataFrameColumn operator +(long left, Int16DataFrameColumn right) + { + return right.ReverseAdd(left); + } + public static Int32DataFrameColumn operator +(Int16DataFrameColumn left, sbyte right) + { + return left.Add(right); + } + public static Int32DataFrameColumn operator +(sbyte left, Int16DataFrameColumn right) + { + return right.ReverseAdd(left); + } + public static Int32DataFrameColumn operator +(Int16DataFrameColumn left, short right) + { + return left.Add(right); + } + public static Int32DataFrameColumn operator +(short left, Int16DataFrameColumn right) + { + return right.ReverseAdd(left); + } + public static Int64DataFrameColumn operator +(Int16DataFrameColumn left, uint right) + { + return left.Add(right); + } + public static Int64DataFrameColumn operator +(uint left, Int16DataFrameColumn right) + { + return right.ReverseAdd(left); + } + public static SingleDataFrameColumn operator +(Int16DataFrameColumn left, ulong right) + { + return left.Add(right); + } + public static SingleDataFrameColumn operator +(ulong left, Int16DataFrameColumn right) + { + return right.ReverseAdd(left); + } + public static Int32DataFrameColumn operator +(Int16DataFrameColumn left, ushort right) + { + return left.Add(right); + } + public static Int32DataFrameColumn operator +(ushort left, Int16DataFrameColumn right) + { + return right.ReverseAdd(left); + } + } + public partial class UInt32DataFrameColumn + { + public static UInt32DataFrameColumn operator +(UInt32DataFrameColumn left, byte right) + { + return left.Add(right); + } + public static UInt32DataFrameColumn operator +(byte left, UInt32DataFrameColumn right) + { + return right.ReverseAdd(left); + } + public static DecimalDataFrameColumn operator +(UInt32DataFrameColumn left, decimal right) + { + return left.Add(right); + } + public static DecimalDataFrameColumn operator +(decimal left, UInt32DataFrameColumn right) + { + return right.ReverseAdd(left); + } + public static DoubleDataFrameColumn operator +(UInt32DataFrameColumn left, double right) + { + return left.Add(right); + } + public static DoubleDataFrameColumn operator +(double left, UInt32DataFrameColumn right) + { + return right.ReverseAdd(left); + } + public static SingleDataFrameColumn operator +(UInt32DataFrameColumn left, float right) + { + return left.Add(right); + } + public static SingleDataFrameColumn operator +(float left, UInt32DataFrameColumn right) + { + return right.ReverseAdd(left); + } + public static Int64DataFrameColumn operator +(UInt32DataFrameColumn left, int right) + { + return left.Add(right); + } + public static Int64DataFrameColumn operator +(int left, UInt32DataFrameColumn right) + { + return right.ReverseAdd(left); + } + public static Int64DataFrameColumn operator +(UInt32DataFrameColumn left, long right) + { + return left.Add(right); + } + public static Int64DataFrameColumn operator +(long left, UInt32DataFrameColumn right) + { + return right.ReverseAdd(left); + } + public static Int64DataFrameColumn operator +(UInt32DataFrameColumn left, sbyte right) + { + return left.Add(right); + } + public static Int64DataFrameColumn operator +(sbyte left, UInt32DataFrameColumn right) + { + return right.ReverseAdd(left); + } + public static Int64DataFrameColumn operator +(UInt32DataFrameColumn left, short right) + { + return left.Add(right); + } + public static Int64DataFrameColumn operator +(short left, UInt32DataFrameColumn right) + { + return right.ReverseAdd(left); + } + public static UInt32DataFrameColumn operator +(UInt32DataFrameColumn left, uint right) + { + return left.Add(right); + } + public static UInt32DataFrameColumn operator +(uint left, UInt32DataFrameColumn right) + { + return right.ReverseAdd(left); + } + public static UInt64DataFrameColumn operator +(UInt32DataFrameColumn left, ulong right) + { + return left.Add(right); + } + public static UInt64DataFrameColumn operator +(ulong left, UInt32DataFrameColumn right) + { + return right.ReverseAdd(left); + } + public static UInt32DataFrameColumn operator +(UInt32DataFrameColumn left, ushort right) + { + return left.Add(right); + } + public static UInt32DataFrameColumn operator +(ushort left, UInt32DataFrameColumn right) + { + return right.ReverseAdd(left); + } + } + public partial class UInt64DataFrameColumn + { + public static UInt64DataFrameColumn operator +(UInt64DataFrameColumn left, byte right) + { + return left.Add(right); + } + public static UInt64DataFrameColumn operator +(byte left, UInt64DataFrameColumn right) + { + return right.ReverseAdd(left); + } + public static DecimalDataFrameColumn operator +(UInt64DataFrameColumn left, decimal right) + { + return left.Add(right); + } + public static DecimalDataFrameColumn operator +(decimal left, UInt64DataFrameColumn right) + { + return right.ReverseAdd(left); + } + public static DoubleDataFrameColumn operator +(UInt64DataFrameColumn left, double right) + { + return left.Add(right); + } + public static DoubleDataFrameColumn operator +(double left, UInt64DataFrameColumn right) + { + return right.ReverseAdd(left); + } + public static SingleDataFrameColumn operator +(UInt64DataFrameColumn left, float right) + { + return left.Add(right); + } + public static SingleDataFrameColumn operator +(float left, UInt64DataFrameColumn right) + { + return right.ReverseAdd(left); + } + public static SingleDataFrameColumn operator +(UInt64DataFrameColumn left, int right) + { + return left.Add(right); + } + public static SingleDataFrameColumn operator +(int left, UInt64DataFrameColumn right) + { + return right.ReverseAdd(left); + } + public static SingleDataFrameColumn operator +(UInt64DataFrameColumn left, sbyte right) + { + return left.Add(right); + } + public static SingleDataFrameColumn operator +(sbyte left, UInt64DataFrameColumn right) + { + return right.ReverseAdd(left); + } + public static SingleDataFrameColumn operator +(UInt64DataFrameColumn left, short right) + { + return left.Add(right); + } + public static SingleDataFrameColumn operator +(short left, UInt64DataFrameColumn right) + { + return right.ReverseAdd(left); + } + public static UInt64DataFrameColumn operator +(UInt64DataFrameColumn left, uint right) + { + return left.Add(right); + } + public static UInt64DataFrameColumn operator +(uint left, UInt64DataFrameColumn right) + { + return right.ReverseAdd(left); + } + public static UInt64DataFrameColumn operator +(UInt64DataFrameColumn left, ulong right) + { + return left.Add(right); + } + public static UInt64DataFrameColumn operator +(ulong left, UInt64DataFrameColumn right) + { + return right.ReverseAdd(left); + } + public static UInt64DataFrameColumn operator +(UInt64DataFrameColumn left, ushort right) + { + return left.Add(right); + } + public static UInt64DataFrameColumn operator +(ushort left, UInt64DataFrameColumn right) + { + return right.ReverseAdd(left); + } + } + public partial class UInt16DataFrameColumn + { + public static Int32DataFrameColumn operator +(UInt16DataFrameColumn left, byte right) + { + return left.Add(right); + } + public static Int32DataFrameColumn operator +(byte left, UInt16DataFrameColumn right) + { + return right.ReverseAdd(left); + } + public static DecimalDataFrameColumn operator +(UInt16DataFrameColumn left, decimal right) + { + return left.Add(right); + } + public static DecimalDataFrameColumn operator +(decimal left, UInt16DataFrameColumn right) + { + return right.ReverseAdd(left); + } + public static DoubleDataFrameColumn operator +(UInt16DataFrameColumn left, double right) + { + return left.Add(right); + } + public static DoubleDataFrameColumn operator +(double left, UInt16DataFrameColumn right) + { + return right.ReverseAdd(left); + } + public static SingleDataFrameColumn operator +(UInt16DataFrameColumn left, float right) + { + return left.Add(right); + } + public static SingleDataFrameColumn operator +(float left, UInt16DataFrameColumn right) + { + return right.ReverseAdd(left); + } + public static Int32DataFrameColumn operator +(UInt16DataFrameColumn left, int right) + { + return left.Add(right); + } + public static Int32DataFrameColumn operator +(int left, UInt16DataFrameColumn right) + { + return right.ReverseAdd(left); + } + public static Int64DataFrameColumn operator +(UInt16DataFrameColumn left, long right) + { + return left.Add(right); + } + public static Int64DataFrameColumn operator +(long left, UInt16DataFrameColumn right) + { + return right.ReverseAdd(left); + } + public static Int32DataFrameColumn operator +(UInt16DataFrameColumn left, sbyte right) + { + return left.Add(right); + } + public static Int32DataFrameColumn operator +(sbyte left, UInt16DataFrameColumn right) + { + return right.ReverseAdd(left); + } + public static Int32DataFrameColumn operator +(UInt16DataFrameColumn left, short right) + { + return left.Add(right); + } + public static Int32DataFrameColumn operator +(short left, UInt16DataFrameColumn right) + { + return right.ReverseAdd(left); + } + public static UInt32DataFrameColumn operator +(UInt16DataFrameColumn left, uint right) + { + return left.Add(right); + } + public static UInt32DataFrameColumn operator +(uint left, UInt16DataFrameColumn right) + { + return right.ReverseAdd(left); + } + public static UInt64DataFrameColumn operator +(UInt16DataFrameColumn left, ulong right) + { + return left.Add(right); + } + public static UInt64DataFrameColumn operator +(ulong left, UInt16DataFrameColumn right) + { + return right.ReverseAdd(left); + } + public static Int32DataFrameColumn operator +(UInt16DataFrameColumn left, ushort right) + { + return left.Add(right); + } + public static Int32DataFrameColumn operator +(ushort left, UInt16DataFrameColumn right) + { + return right.ReverseAdd(left); + } + } + public partial class ByteDataFrameColumn + { + public static Int32DataFrameColumn operator -(ByteDataFrameColumn left, ByteDataFrameColumn right) + { + return left.Subtract(right); + } + public static DecimalDataFrameColumn operator -(ByteDataFrameColumn left, DecimalDataFrameColumn right) + { + return left.Subtract(right); + } + public static DoubleDataFrameColumn operator -(ByteDataFrameColumn left, DoubleDataFrameColumn right) + { + return left.Subtract(right); + } + public static SingleDataFrameColumn operator -(ByteDataFrameColumn left, SingleDataFrameColumn right) + { + return left.Subtract(right); + } + public static Int32DataFrameColumn operator -(ByteDataFrameColumn left, Int32DataFrameColumn right) + { + return left.Subtract(right); + } + public static Int64DataFrameColumn operator -(ByteDataFrameColumn left, Int64DataFrameColumn right) + { + return left.Subtract(right); + } + public static Int32DataFrameColumn operator -(ByteDataFrameColumn left, SByteDataFrameColumn right) + { + return left.Subtract(right); + } + public static Int32DataFrameColumn operator -(ByteDataFrameColumn left, Int16DataFrameColumn right) + { + return left.Subtract(right); + } + public static UInt32DataFrameColumn operator -(ByteDataFrameColumn left, UInt32DataFrameColumn right) + { + return left.Subtract(right); + } + public static UInt64DataFrameColumn operator -(ByteDataFrameColumn left, UInt64DataFrameColumn right) + { + return left.Subtract(right); + } + public static Int32DataFrameColumn operator -(ByteDataFrameColumn left, UInt16DataFrameColumn right) + { + return left.Subtract(right); + } + } + public partial class DecimalDataFrameColumn + { + public static DecimalDataFrameColumn operator -(DecimalDataFrameColumn left, ByteDataFrameColumn right) + { + return left.Subtract(right); + } + public static DecimalDataFrameColumn operator -(DecimalDataFrameColumn left, DecimalDataFrameColumn right) + { + return left.Subtract(right); + } + public static DecimalDataFrameColumn operator -(DecimalDataFrameColumn left, Int32DataFrameColumn right) + { + return left.Subtract(right); + } + public static DecimalDataFrameColumn operator -(DecimalDataFrameColumn left, Int64DataFrameColumn right) + { + return left.Subtract(right); + } + public static DecimalDataFrameColumn operator -(DecimalDataFrameColumn left, SByteDataFrameColumn right) + { + return left.Subtract(right); + } + public static DecimalDataFrameColumn operator -(DecimalDataFrameColumn left, Int16DataFrameColumn right) + { + return left.Subtract(right); + } + public static DecimalDataFrameColumn operator -(DecimalDataFrameColumn left, UInt32DataFrameColumn right) + { + return left.Subtract(right); + } + public static DecimalDataFrameColumn operator -(DecimalDataFrameColumn left, UInt64DataFrameColumn right) + { + return left.Subtract(right); + } + public static DecimalDataFrameColumn operator -(DecimalDataFrameColumn left, UInt16DataFrameColumn right) + { + return left.Subtract(right); + } + } + public partial class DoubleDataFrameColumn + { + public static DoubleDataFrameColumn operator -(DoubleDataFrameColumn left, ByteDataFrameColumn right) + { + return left.Subtract(right); + } + public static DoubleDataFrameColumn operator -(DoubleDataFrameColumn left, DoubleDataFrameColumn right) + { + return left.Subtract(right); + } + public static DoubleDataFrameColumn operator -(DoubleDataFrameColumn left, SingleDataFrameColumn right) + { + return left.Subtract(right); + } + public static DoubleDataFrameColumn operator -(DoubleDataFrameColumn left, Int32DataFrameColumn right) + { + return left.Subtract(right); + } + public static DoubleDataFrameColumn operator -(DoubleDataFrameColumn left, Int64DataFrameColumn right) + { + return left.Subtract(right); + } + public static DoubleDataFrameColumn operator -(DoubleDataFrameColumn left, SByteDataFrameColumn right) + { + return left.Subtract(right); + } + public static DoubleDataFrameColumn operator -(DoubleDataFrameColumn left, Int16DataFrameColumn right) + { + return left.Subtract(right); + } + public static DoubleDataFrameColumn operator -(DoubleDataFrameColumn left, UInt32DataFrameColumn right) + { + return left.Subtract(right); + } + public static DoubleDataFrameColumn operator -(DoubleDataFrameColumn left, UInt64DataFrameColumn right) + { + return left.Subtract(right); + } + public static DoubleDataFrameColumn operator -(DoubleDataFrameColumn left, UInt16DataFrameColumn right) + { + return left.Subtract(right); + } + } + public partial class SingleDataFrameColumn + { + public static SingleDataFrameColumn operator -(SingleDataFrameColumn left, ByteDataFrameColumn right) + { + return left.Subtract(right); + } + public static DoubleDataFrameColumn operator -(SingleDataFrameColumn left, DoubleDataFrameColumn right) + { + return left.Subtract(right); + } + public static SingleDataFrameColumn operator -(SingleDataFrameColumn left, SingleDataFrameColumn right) + { + return left.Subtract(right); + } + public static SingleDataFrameColumn operator -(SingleDataFrameColumn left, Int32DataFrameColumn right) + { + return left.Subtract(right); + } + public static SingleDataFrameColumn operator -(SingleDataFrameColumn left, Int64DataFrameColumn right) + { + return left.Subtract(right); + } + public static SingleDataFrameColumn operator -(SingleDataFrameColumn left, SByteDataFrameColumn right) + { + return left.Subtract(right); + } + public static SingleDataFrameColumn operator -(SingleDataFrameColumn left, Int16DataFrameColumn right) + { + return left.Subtract(right); + } + public static SingleDataFrameColumn operator -(SingleDataFrameColumn left, UInt32DataFrameColumn right) + { + return left.Subtract(right); + } + public static SingleDataFrameColumn operator -(SingleDataFrameColumn left, UInt64DataFrameColumn right) + { + return left.Subtract(right); + } + public static SingleDataFrameColumn operator -(SingleDataFrameColumn left, UInt16DataFrameColumn right) + { + return left.Subtract(right); + } + } + public partial class Int32DataFrameColumn + { + public static Int32DataFrameColumn operator -(Int32DataFrameColumn left, ByteDataFrameColumn right) + { + return left.Subtract(right); + } + public static DecimalDataFrameColumn operator -(Int32DataFrameColumn left, DecimalDataFrameColumn right) + { + return left.Subtract(right); + } + public static DoubleDataFrameColumn operator -(Int32DataFrameColumn left, DoubleDataFrameColumn right) + { + return left.Subtract(right); + } + public static SingleDataFrameColumn operator -(Int32DataFrameColumn left, SingleDataFrameColumn right) + { + return left.Subtract(right); + } + public static Int32DataFrameColumn operator -(Int32DataFrameColumn left, Int32DataFrameColumn right) + { + return left.Subtract(right); + } + public static Int64DataFrameColumn operator -(Int32DataFrameColumn left, Int64DataFrameColumn right) + { + return left.Subtract(right); + } + public static Int32DataFrameColumn operator -(Int32DataFrameColumn left, SByteDataFrameColumn right) + { + return left.Subtract(right); + } + public static Int32DataFrameColumn operator -(Int32DataFrameColumn left, Int16DataFrameColumn right) + { + return left.Subtract(right); + } + public static Int64DataFrameColumn operator -(Int32DataFrameColumn left, UInt32DataFrameColumn right) + { + return left.Subtract(right); + } + public static SingleDataFrameColumn operator -(Int32DataFrameColumn left, UInt64DataFrameColumn right) + { + return left.Subtract(right); + } + public static Int32DataFrameColumn operator -(Int32DataFrameColumn left, UInt16DataFrameColumn right) + { + return left.Subtract(right); + } + } + public partial class Int64DataFrameColumn + { + public static Int64DataFrameColumn operator -(Int64DataFrameColumn left, ByteDataFrameColumn right) + { + return left.Subtract(right); + } + public static DecimalDataFrameColumn operator -(Int64DataFrameColumn left, DecimalDataFrameColumn right) + { + return left.Subtract(right); + } + public static DoubleDataFrameColumn operator -(Int64DataFrameColumn left, DoubleDataFrameColumn right) + { + return left.Subtract(right); + } + public static SingleDataFrameColumn operator -(Int64DataFrameColumn left, SingleDataFrameColumn right) + { + return left.Subtract(right); + } + public static Int64DataFrameColumn operator -(Int64DataFrameColumn left, Int32DataFrameColumn right) + { + return left.Subtract(right); + } + public static Int64DataFrameColumn operator -(Int64DataFrameColumn left, Int64DataFrameColumn right) + { + return left.Subtract(right); + } + public static Int64DataFrameColumn operator -(Int64DataFrameColumn left, SByteDataFrameColumn right) + { + return left.Subtract(right); + } + public static Int64DataFrameColumn operator -(Int64DataFrameColumn left, Int16DataFrameColumn right) + { + return left.Subtract(right); + } + public static Int64DataFrameColumn operator -(Int64DataFrameColumn left, UInt32DataFrameColumn right) + { + return left.Subtract(right); + } + public static Int64DataFrameColumn operator -(Int64DataFrameColumn left, UInt16DataFrameColumn right) + { + return left.Subtract(right); + } + } + public partial class SByteDataFrameColumn + { + public static Int32DataFrameColumn operator -(SByteDataFrameColumn left, ByteDataFrameColumn right) + { + return left.Subtract(right); + } + public static DecimalDataFrameColumn operator -(SByteDataFrameColumn left, DecimalDataFrameColumn right) + { + return left.Subtract(right); + } + public static DoubleDataFrameColumn operator -(SByteDataFrameColumn left, DoubleDataFrameColumn right) + { + return left.Subtract(right); + } + public static SingleDataFrameColumn operator -(SByteDataFrameColumn left, SingleDataFrameColumn right) + { + return left.Subtract(right); + } + public static Int32DataFrameColumn operator -(SByteDataFrameColumn left, Int32DataFrameColumn right) + { + return left.Subtract(right); + } + public static Int64DataFrameColumn operator -(SByteDataFrameColumn left, Int64DataFrameColumn right) + { + return left.Subtract(right); + } + public static Int32DataFrameColumn operator -(SByteDataFrameColumn left, SByteDataFrameColumn right) + { + return left.Subtract(right); + } + public static Int32DataFrameColumn operator -(SByteDataFrameColumn left, Int16DataFrameColumn right) + { + return left.Subtract(right); + } + public static Int64DataFrameColumn operator -(SByteDataFrameColumn left, UInt32DataFrameColumn right) + { + return left.Subtract(right); + } + public static SingleDataFrameColumn operator -(SByteDataFrameColumn left, UInt64DataFrameColumn right) + { + return left.Subtract(right); + } + public static Int32DataFrameColumn operator -(SByteDataFrameColumn left, UInt16DataFrameColumn right) + { + return left.Subtract(right); + } + } + public partial class Int16DataFrameColumn + { + public static Int32DataFrameColumn operator -(Int16DataFrameColumn left, ByteDataFrameColumn right) + { + return left.Subtract(right); + } + public static DecimalDataFrameColumn operator -(Int16DataFrameColumn left, DecimalDataFrameColumn right) + { + return left.Subtract(right); + } + public static DoubleDataFrameColumn operator -(Int16DataFrameColumn left, DoubleDataFrameColumn right) + { + return left.Subtract(right); + } + public static SingleDataFrameColumn operator -(Int16DataFrameColumn left, SingleDataFrameColumn right) + { + return left.Subtract(right); + } + public static Int32DataFrameColumn operator -(Int16DataFrameColumn left, Int32DataFrameColumn right) + { + return left.Subtract(right); + } + public static Int64DataFrameColumn operator -(Int16DataFrameColumn left, Int64DataFrameColumn right) + { + return left.Subtract(right); + } + public static Int32DataFrameColumn operator -(Int16DataFrameColumn left, SByteDataFrameColumn right) + { + return left.Subtract(right); + } + public static Int32DataFrameColumn operator -(Int16DataFrameColumn left, Int16DataFrameColumn right) + { + return left.Subtract(right); + } + public static Int64DataFrameColumn operator -(Int16DataFrameColumn left, UInt32DataFrameColumn right) + { + return left.Subtract(right); + } + public static SingleDataFrameColumn operator -(Int16DataFrameColumn left, UInt64DataFrameColumn right) + { + return left.Subtract(right); + } + public static Int32DataFrameColumn operator -(Int16DataFrameColumn left, UInt16DataFrameColumn right) + { + return left.Subtract(right); + } + } + public partial class UInt32DataFrameColumn + { + public static UInt32DataFrameColumn operator -(UInt32DataFrameColumn left, ByteDataFrameColumn right) + { + return left.Subtract(right); + } + public static DecimalDataFrameColumn operator -(UInt32DataFrameColumn left, DecimalDataFrameColumn right) + { + return left.Subtract(right); + } + public static DoubleDataFrameColumn operator -(UInt32DataFrameColumn left, DoubleDataFrameColumn right) + { + return left.Subtract(right); + } + public static SingleDataFrameColumn operator -(UInt32DataFrameColumn left, SingleDataFrameColumn right) + { + return left.Subtract(right); + } + public static Int64DataFrameColumn operator -(UInt32DataFrameColumn left, Int32DataFrameColumn right) + { + return left.Subtract(right); + } + public static Int64DataFrameColumn operator -(UInt32DataFrameColumn left, Int64DataFrameColumn right) + { + return left.Subtract(right); + } + public static Int64DataFrameColumn operator -(UInt32DataFrameColumn left, SByteDataFrameColumn right) + { + return left.Subtract(right); + } + public static Int64DataFrameColumn operator -(UInt32DataFrameColumn left, Int16DataFrameColumn right) + { + return left.Subtract(right); + } + public static UInt32DataFrameColumn operator -(UInt32DataFrameColumn left, UInt32DataFrameColumn right) + { + return left.Subtract(right); + } + public static UInt64DataFrameColumn operator -(UInt32DataFrameColumn left, UInt64DataFrameColumn right) + { + return left.Subtract(right); + } + public static UInt32DataFrameColumn operator -(UInt32DataFrameColumn left, UInt16DataFrameColumn right) + { + return left.Subtract(right); + } + } + public partial class UInt64DataFrameColumn + { + public static UInt64DataFrameColumn operator -(UInt64DataFrameColumn left, ByteDataFrameColumn right) + { + return left.Subtract(right); + } + public static DecimalDataFrameColumn operator -(UInt64DataFrameColumn left, DecimalDataFrameColumn right) + { + return left.Subtract(right); + } + public static DoubleDataFrameColumn operator -(UInt64DataFrameColumn left, DoubleDataFrameColumn right) + { + return left.Subtract(right); + } + public static SingleDataFrameColumn operator -(UInt64DataFrameColumn left, SingleDataFrameColumn right) + { + return left.Subtract(right); + } + public static SingleDataFrameColumn operator -(UInt64DataFrameColumn left, Int32DataFrameColumn right) + { + return left.Subtract(right); + } + public static SingleDataFrameColumn operator -(UInt64DataFrameColumn left, SByteDataFrameColumn right) + { + return left.Subtract(right); + } + public static SingleDataFrameColumn operator -(UInt64DataFrameColumn left, Int16DataFrameColumn right) + { + return left.Subtract(right); + } + public static UInt64DataFrameColumn operator -(UInt64DataFrameColumn left, UInt32DataFrameColumn right) + { + return left.Subtract(right); + } + public static UInt64DataFrameColumn operator -(UInt64DataFrameColumn left, UInt64DataFrameColumn right) + { + return left.Subtract(right); + } + public static UInt64DataFrameColumn operator -(UInt64DataFrameColumn left, UInt16DataFrameColumn right) + { + return left.Subtract(right); + } + } + public partial class UInt16DataFrameColumn + { + public static Int32DataFrameColumn operator -(UInt16DataFrameColumn left, ByteDataFrameColumn right) + { + return left.Subtract(right); + } + public static DecimalDataFrameColumn operator -(UInt16DataFrameColumn left, DecimalDataFrameColumn right) + { + return left.Subtract(right); + } + public static DoubleDataFrameColumn operator -(UInt16DataFrameColumn left, DoubleDataFrameColumn right) + { + return left.Subtract(right); + } + public static SingleDataFrameColumn operator -(UInt16DataFrameColumn left, SingleDataFrameColumn right) + { + return left.Subtract(right); + } + public static Int32DataFrameColumn operator -(UInt16DataFrameColumn left, Int32DataFrameColumn right) + { + return left.Subtract(right); + } + public static Int64DataFrameColumn operator -(UInt16DataFrameColumn left, Int64DataFrameColumn right) + { + return left.Subtract(right); + } + public static Int32DataFrameColumn operator -(UInt16DataFrameColumn left, SByteDataFrameColumn right) + { + return left.Subtract(right); + } + public static Int32DataFrameColumn operator -(UInt16DataFrameColumn left, Int16DataFrameColumn right) + { + return left.Subtract(right); + } + public static UInt32DataFrameColumn operator -(UInt16DataFrameColumn left, UInt32DataFrameColumn right) + { + return left.Subtract(right); + } + public static UInt64DataFrameColumn operator -(UInt16DataFrameColumn left, UInt64DataFrameColumn right) + { + return left.Subtract(right); + } + public static Int32DataFrameColumn operator -(UInt16DataFrameColumn left, UInt16DataFrameColumn right) + { + return left.Subtract(right); + } + } + public partial class ByteDataFrameColumn + { + public static Int32DataFrameColumn operator -(ByteDataFrameColumn left, byte right) + { + return left.Subtract(right); + } + public static Int32DataFrameColumn operator -(byte left, ByteDataFrameColumn right) + { + return right.ReverseSubtract(left); + } + public static DecimalDataFrameColumn operator -(ByteDataFrameColumn left, decimal right) + { + return left.Subtract(right); + } + public static DecimalDataFrameColumn operator -(decimal left, ByteDataFrameColumn right) + { + return right.ReverseSubtract(left); + } + public static DoubleDataFrameColumn operator -(ByteDataFrameColumn left, double right) + { + return left.Subtract(right); + } + public static DoubleDataFrameColumn operator -(double left, ByteDataFrameColumn right) + { + return right.ReverseSubtract(left); + } + public static SingleDataFrameColumn operator -(ByteDataFrameColumn left, float right) + { + return left.Subtract(right); + } + public static SingleDataFrameColumn operator -(float left, ByteDataFrameColumn right) + { + return right.ReverseSubtract(left); + } + public static Int32DataFrameColumn operator -(ByteDataFrameColumn left, int right) + { + return left.Subtract(right); + } + public static Int32DataFrameColumn operator -(int left, ByteDataFrameColumn right) + { + return right.ReverseSubtract(left); + } + public static Int64DataFrameColumn operator -(ByteDataFrameColumn left, long right) + { + return left.Subtract(right); + } + public static Int64DataFrameColumn operator -(long left, ByteDataFrameColumn right) + { + return right.ReverseSubtract(left); + } + public static Int32DataFrameColumn operator -(ByteDataFrameColumn left, sbyte right) + { + return left.Subtract(right); + } + public static Int32DataFrameColumn operator -(sbyte left, ByteDataFrameColumn right) + { + return right.ReverseSubtract(left); + } + public static Int32DataFrameColumn operator -(ByteDataFrameColumn left, short right) + { + return left.Subtract(right); + } + public static Int32DataFrameColumn operator -(short left, ByteDataFrameColumn right) + { + return right.ReverseSubtract(left); + } + public static UInt32DataFrameColumn operator -(ByteDataFrameColumn left, uint right) + { + return left.Subtract(right); + } + public static UInt32DataFrameColumn operator -(uint left, ByteDataFrameColumn right) + { + return right.ReverseSubtract(left); + } + public static UInt64DataFrameColumn operator -(ByteDataFrameColumn left, ulong right) + { + return left.Subtract(right); + } + public static UInt64DataFrameColumn operator -(ulong left, ByteDataFrameColumn right) + { + return right.ReverseSubtract(left); + } + public static Int32DataFrameColumn operator -(ByteDataFrameColumn left, ushort right) + { + return left.Subtract(right); + } + public static Int32DataFrameColumn operator -(ushort left, ByteDataFrameColumn right) + { + return right.ReverseSubtract(left); + } + } + public partial class DecimalDataFrameColumn + { + public static DecimalDataFrameColumn operator -(DecimalDataFrameColumn left, byte right) + { + return left.Subtract(right); + } + public static DecimalDataFrameColumn operator -(byte left, DecimalDataFrameColumn right) + { + return right.ReverseSubtract(left); + } + public static DecimalDataFrameColumn operator -(DecimalDataFrameColumn left, decimal right) + { + return left.Subtract(right); + } + public static DecimalDataFrameColumn operator -(decimal left, DecimalDataFrameColumn right) + { + return right.ReverseSubtract(left); + } + public static DecimalDataFrameColumn operator -(DecimalDataFrameColumn left, int right) + { + return left.Subtract(right); + } + public static DecimalDataFrameColumn operator -(int left, DecimalDataFrameColumn right) + { + return right.ReverseSubtract(left); + } + public static DecimalDataFrameColumn operator -(DecimalDataFrameColumn left, long right) + { + return left.Subtract(right); + } + public static DecimalDataFrameColumn operator -(long left, DecimalDataFrameColumn right) + { + return right.ReverseSubtract(left); + } + public static DecimalDataFrameColumn operator -(DecimalDataFrameColumn left, sbyte right) + { + return left.Subtract(right); + } + public static DecimalDataFrameColumn operator -(sbyte left, DecimalDataFrameColumn right) + { + return right.ReverseSubtract(left); + } + public static DecimalDataFrameColumn operator -(DecimalDataFrameColumn left, short right) + { + return left.Subtract(right); + } + public static DecimalDataFrameColumn operator -(short left, DecimalDataFrameColumn right) + { + return right.ReverseSubtract(left); + } + public static DecimalDataFrameColumn operator -(DecimalDataFrameColumn left, uint right) + { + return left.Subtract(right); + } + public static DecimalDataFrameColumn operator -(uint left, DecimalDataFrameColumn right) + { + return right.ReverseSubtract(left); + } + public static DecimalDataFrameColumn operator -(DecimalDataFrameColumn left, ulong right) + { + return left.Subtract(right); + } + public static DecimalDataFrameColumn operator -(ulong left, DecimalDataFrameColumn right) + { + return right.ReverseSubtract(left); + } + public static DecimalDataFrameColumn operator -(DecimalDataFrameColumn left, ushort right) + { + return left.Subtract(right); + } + public static DecimalDataFrameColumn operator -(ushort left, DecimalDataFrameColumn right) + { + return right.ReverseSubtract(left); + } + } + public partial class DoubleDataFrameColumn + { + public static DoubleDataFrameColumn operator -(DoubleDataFrameColumn left, byte right) + { + return left.Subtract(right); + } + public static DoubleDataFrameColumn operator -(byte left, DoubleDataFrameColumn right) + { + return right.ReverseSubtract(left); + } + public static DoubleDataFrameColumn operator -(DoubleDataFrameColumn left, double right) + { + return left.Subtract(right); + } + public static DoubleDataFrameColumn operator -(double left, DoubleDataFrameColumn right) + { + return right.ReverseSubtract(left); + } + public static DoubleDataFrameColumn operator -(DoubleDataFrameColumn left, float right) + { + return left.Subtract(right); + } + public static DoubleDataFrameColumn operator -(float left, DoubleDataFrameColumn right) + { + return right.ReverseSubtract(left); + } + public static DoubleDataFrameColumn operator -(DoubleDataFrameColumn left, int right) + { + return left.Subtract(right); + } + public static DoubleDataFrameColumn operator -(int left, DoubleDataFrameColumn right) + { + return right.ReverseSubtract(left); + } + public static DoubleDataFrameColumn operator -(DoubleDataFrameColumn left, long right) + { + return left.Subtract(right); + } + public static DoubleDataFrameColumn operator -(long left, DoubleDataFrameColumn right) + { + return right.ReverseSubtract(left); + } + public static DoubleDataFrameColumn operator -(DoubleDataFrameColumn left, sbyte right) + { + return left.Subtract(right); + } + public static DoubleDataFrameColumn operator -(sbyte left, DoubleDataFrameColumn right) + { + return right.ReverseSubtract(left); + } + public static DoubleDataFrameColumn operator -(DoubleDataFrameColumn left, short right) + { + return left.Subtract(right); + } + public static DoubleDataFrameColumn operator -(short left, DoubleDataFrameColumn right) + { + return right.ReverseSubtract(left); + } + public static DoubleDataFrameColumn operator -(DoubleDataFrameColumn left, uint right) + { + return left.Subtract(right); + } + public static DoubleDataFrameColumn operator -(uint left, DoubleDataFrameColumn right) + { + return right.ReverseSubtract(left); + } + public static DoubleDataFrameColumn operator -(DoubleDataFrameColumn left, ulong right) + { + return left.Subtract(right); + } + public static DoubleDataFrameColumn operator -(ulong left, DoubleDataFrameColumn right) + { + return right.ReverseSubtract(left); + } + public static DoubleDataFrameColumn operator -(DoubleDataFrameColumn left, ushort right) + { + return left.Subtract(right); + } + public static DoubleDataFrameColumn operator -(ushort left, DoubleDataFrameColumn right) + { + return right.ReverseSubtract(left); + } + } + public partial class SingleDataFrameColumn + { + public static SingleDataFrameColumn operator -(SingleDataFrameColumn left, byte right) + { + return left.Subtract(right); + } + public static SingleDataFrameColumn operator -(byte left, SingleDataFrameColumn right) + { + return right.ReverseSubtract(left); + } + public static DoubleDataFrameColumn operator -(SingleDataFrameColumn left, double right) + { + return left.Subtract(right); + } + public static DoubleDataFrameColumn operator -(double left, SingleDataFrameColumn right) + { + return right.ReverseSubtract(left); + } + public static SingleDataFrameColumn operator -(SingleDataFrameColumn left, float right) + { + return left.Subtract(right); + } + public static SingleDataFrameColumn operator -(float left, SingleDataFrameColumn right) + { + return right.ReverseSubtract(left); + } + public static SingleDataFrameColumn operator -(SingleDataFrameColumn left, int right) + { + return left.Subtract(right); + } + public static SingleDataFrameColumn operator -(int left, SingleDataFrameColumn right) + { + return right.ReverseSubtract(left); + } + public static SingleDataFrameColumn operator -(SingleDataFrameColumn left, long right) + { + return left.Subtract(right); + } + public static SingleDataFrameColumn operator -(long left, SingleDataFrameColumn right) + { + return right.ReverseSubtract(left); + } + public static SingleDataFrameColumn operator -(SingleDataFrameColumn left, sbyte right) + { + return left.Subtract(right); + } + public static SingleDataFrameColumn operator -(sbyte left, SingleDataFrameColumn right) + { + return right.ReverseSubtract(left); + } + public static SingleDataFrameColumn operator -(SingleDataFrameColumn left, short right) + { + return left.Subtract(right); + } + public static SingleDataFrameColumn operator -(short left, SingleDataFrameColumn right) + { + return right.ReverseSubtract(left); + } + public static SingleDataFrameColumn operator -(SingleDataFrameColumn left, uint right) + { + return left.Subtract(right); + } + public static SingleDataFrameColumn operator -(uint left, SingleDataFrameColumn right) + { + return right.ReverseSubtract(left); + } + public static SingleDataFrameColumn operator -(SingleDataFrameColumn left, ulong right) + { + return left.Subtract(right); + } + public static SingleDataFrameColumn operator -(ulong left, SingleDataFrameColumn right) + { + return right.ReverseSubtract(left); + } + public static SingleDataFrameColumn operator -(SingleDataFrameColumn left, ushort right) + { + return left.Subtract(right); + } + public static SingleDataFrameColumn operator -(ushort left, SingleDataFrameColumn right) + { + return right.ReverseSubtract(left); + } + } + public partial class Int32DataFrameColumn + { + public static Int32DataFrameColumn operator -(Int32DataFrameColumn left, byte right) + { + return left.Subtract(right); + } + public static Int32DataFrameColumn operator -(byte left, Int32DataFrameColumn right) + { + return right.ReverseSubtract(left); + } + public static DecimalDataFrameColumn operator -(Int32DataFrameColumn left, decimal right) + { + return left.Subtract(right); + } + public static DecimalDataFrameColumn operator -(decimal left, Int32DataFrameColumn right) + { + return right.ReverseSubtract(left); + } + public static DoubleDataFrameColumn operator -(Int32DataFrameColumn left, double right) + { + return left.Subtract(right); + } + public static DoubleDataFrameColumn operator -(double left, Int32DataFrameColumn right) + { + return right.ReverseSubtract(left); + } + public static SingleDataFrameColumn operator -(Int32DataFrameColumn left, float right) + { + return left.Subtract(right); + } + public static SingleDataFrameColumn operator -(float left, Int32DataFrameColumn right) + { + return right.ReverseSubtract(left); + } + public static Int32DataFrameColumn operator -(Int32DataFrameColumn left, int right) + { + return left.Subtract(right); + } + public static Int32DataFrameColumn operator -(int left, Int32DataFrameColumn right) + { + return right.ReverseSubtract(left); + } + public static Int64DataFrameColumn operator -(Int32DataFrameColumn left, long right) + { + return left.Subtract(right); + } + public static Int64DataFrameColumn operator -(long left, Int32DataFrameColumn right) + { + return right.ReverseSubtract(left); + } + public static Int32DataFrameColumn operator -(Int32DataFrameColumn left, sbyte right) + { + return left.Subtract(right); + } + public static Int32DataFrameColumn operator -(sbyte left, Int32DataFrameColumn right) + { + return right.ReverseSubtract(left); + } + public static Int32DataFrameColumn operator -(Int32DataFrameColumn left, short right) + { + return left.Subtract(right); + } + public static Int32DataFrameColumn operator -(short left, Int32DataFrameColumn right) + { + return right.ReverseSubtract(left); + } + public static Int64DataFrameColumn operator -(Int32DataFrameColumn left, uint right) + { + return left.Subtract(right); + } + public static Int64DataFrameColumn operator -(uint left, Int32DataFrameColumn right) + { + return right.ReverseSubtract(left); + } + public static SingleDataFrameColumn operator -(Int32DataFrameColumn left, ulong right) + { + return left.Subtract(right); + } + public static SingleDataFrameColumn operator -(ulong left, Int32DataFrameColumn right) + { + return right.ReverseSubtract(left); + } + public static Int32DataFrameColumn operator -(Int32DataFrameColumn left, ushort right) + { + return left.Subtract(right); + } + public static Int32DataFrameColumn operator -(ushort left, Int32DataFrameColumn right) + { + return right.ReverseSubtract(left); + } + } + public partial class Int64DataFrameColumn + { + public static Int64DataFrameColumn operator -(Int64DataFrameColumn left, byte right) + { + return left.Subtract(right); + } + public static Int64DataFrameColumn operator -(byte left, Int64DataFrameColumn right) + { + return right.ReverseSubtract(left); + } + public static DecimalDataFrameColumn operator -(Int64DataFrameColumn left, decimal right) + { + return left.Subtract(right); + } + public static DecimalDataFrameColumn operator -(decimal left, Int64DataFrameColumn right) + { + return right.ReverseSubtract(left); + } + public static DoubleDataFrameColumn operator -(Int64DataFrameColumn left, double right) + { + return left.Subtract(right); + } + public static DoubleDataFrameColumn operator -(double left, Int64DataFrameColumn right) + { + return right.ReverseSubtract(left); + } + public static SingleDataFrameColumn operator -(Int64DataFrameColumn left, float right) + { + return left.Subtract(right); + } + public static SingleDataFrameColumn operator -(float left, Int64DataFrameColumn right) + { + return right.ReverseSubtract(left); + } + public static Int64DataFrameColumn operator -(Int64DataFrameColumn left, int right) + { + return left.Subtract(right); + } + public static Int64DataFrameColumn operator -(int left, Int64DataFrameColumn right) + { + return right.ReverseSubtract(left); + } + public static Int64DataFrameColumn operator -(Int64DataFrameColumn left, long right) + { + return left.Subtract(right); + } + public static Int64DataFrameColumn operator -(long left, Int64DataFrameColumn right) + { + return right.ReverseSubtract(left); + } + public static Int64DataFrameColumn operator -(Int64DataFrameColumn left, sbyte right) + { + return left.Subtract(right); + } + public static Int64DataFrameColumn operator -(sbyte left, Int64DataFrameColumn right) + { + return right.ReverseSubtract(left); + } + public static Int64DataFrameColumn operator -(Int64DataFrameColumn left, short right) + { + return left.Subtract(right); + } + public static Int64DataFrameColumn operator -(short left, Int64DataFrameColumn right) + { + return right.ReverseSubtract(left); + } + public static Int64DataFrameColumn operator -(Int64DataFrameColumn left, uint right) + { + return left.Subtract(right); + } + public static Int64DataFrameColumn operator -(uint left, Int64DataFrameColumn right) + { + return right.ReverseSubtract(left); + } + public static Int64DataFrameColumn operator -(Int64DataFrameColumn left, ushort right) + { + return left.Subtract(right); + } + public static Int64DataFrameColumn operator -(ushort left, Int64DataFrameColumn right) + { + return right.ReverseSubtract(left); + } + } + public partial class SByteDataFrameColumn + { + public static Int32DataFrameColumn operator -(SByteDataFrameColumn left, byte right) + { + return left.Subtract(right); + } + public static Int32DataFrameColumn operator -(byte left, SByteDataFrameColumn right) + { + return right.ReverseSubtract(left); + } + public static DecimalDataFrameColumn operator -(SByteDataFrameColumn left, decimal right) + { + return left.Subtract(right); + } + public static DecimalDataFrameColumn operator -(decimal left, SByteDataFrameColumn right) + { + return right.ReverseSubtract(left); + } + public static DoubleDataFrameColumn operator -(SByteDataFrameColumn left, double right) + { + return left.Subtract(right); + } + public static DoubleDataFrameColumn operator -(double left, SByteDataFrameColumn right) + { + return right.ReverseSubtract(left); + } + public static SingleDataFrameColumn operator -(SByteDataFrameColumn left, float right) + { + return left.Subtract(right); + } + public static SingleDataFrameColumn operator -(float left, SByteDataFrameColumn right) + { + return right.ReverseSubtract(left); + } + public static Int32DataFrameColumn operator -(SByteDataFrameColumn left, int right) + { + return left.Subtract(right); + } + public static Int32DataFrameColumn operator -(int left, SByteDataFrameColumn right) + { + return right.ReverseSubtract(left); + } + public static Int64DataFrameColumn operator -(SByteDataFrameColumn left, long right) + { + return left.Subtract(right); + } + public static Int64DataFrameColumn operator -(long left, SByteDataFrameColumn right) + { + return right.ReverseSubtract(left); + } + public static Int32DataFrameColumn operator -(SByteDataFrameColumn left, sbyte right) + { + return left.Subtract(right); + } + public static Int32DataFrameColumn operator -(sbyte left, SByteDataFrameColumn right) + { + return right.ReverseSubtract(left); + } + public static Int32DataFrameColumn operator -(SByteDataFrameColumn left, short right) + { + return left.Subtract(right); + } + public static Int32DataFrameColumn operator -(short left, SByteDataFrameColumn right) + { + return right.ReverseSubtract(left); + } + public static Int64DataFrameColumn operator -(SByteDataFrameColumn left, uint right) + { + return left.Subtract(right); + } + public static Int64DataFrameColumn operator -(uint left, SByteDataFrameColumn right) + { + return right.ReverseSubtract(left); + } + public static SingleDataFrameColumn operator -(SByteDataFrameColumn left, ulong right) + { + return left.Subtract(right); + } + public static SingleDataFrameColumn operator -(ulong left, SByteDataFrameColumn right) + { + return right.ReverseSubtract(left); + } + public static Int32DataFrameColumn operator -(SByteDataFrameColumn left, ushort right) + { + return left.Subtract(right); + } + public static Int32DataFrameColumn operator -(ushort left, SByteDataFrameColumn right) + { + return right.ReverseSubtract(left); + } + } + public partial class Int16DataFrameColumn + { + public static Int32DataFrameColumn operator -(Int16DataFrameColumn left, byte right) + { + return left.Subtract(right); + } + public static Int32DataFrameColumn operator -(byte left, Int16DataFrameColumn right) + { + return right.ReverseSubtract(left); + } + public static DecimalDataFrameColumn operator -(Int16DataFrameColumn left, decimal right) + { + return left.Subtract(right); + } + public static DecimalDataFrameColumn operator -(decimal left, Int16DataFrameColumn right) + { + return right.ReverseSubtract(left); + } + public static DoubleDataFrameColumn operator -(Int16DataFrameColumn left, double right) + { + return left.Subtract(right); + } + public static DoubleDataFrameColumn operator -(double left, Int16DataFrameColumn right) + { + return right.ReverseSubtract(left); + } + public static SingleDataFrameColumn operator -(Int16DataFrameColumn left, float right) + { + return left.Subtract(right); + } + public static SingleDataFrameColumn operator -(float left, Int16DataFrameColumn right) + { + return right.ReverseSubtract(left); + } + public static Int32DataFrameColumn operator -(Int16DataFrameColumn left, int right) + { + return left.Subtract(right); + } + public static Int32DataFrameColumn operator -(int left, Int16DataFrameColumn right) + { + return right.ReverseSubtract(left); + } + public static Int64DataFrameColumn operator -(Int16DataFrameColumn left, long right) + { + return left.Subtract(right); + } + public static Int64DataFrameColumn operator -(long left, Int16DataFrameColumn right) + { + return right.ReverseSubtract(left); + } + public static Int32DataFrameColumn operator -(Int16DataFrameColumn left, sbyte right) + { + return left.Subtract(right); + } + public static Int32DataFrameColumn operator -(sbyte left, Int16DataFrameColumn right) + { + return right.ReverseSubtract(left); + } + public static Int32DataFrameColumn operator -(Int16DataFrameColumn left, short right) + { + return left.Subtract(right); + } + public static Int32DataFrameColumn operator -(short left, Int16DataFrameColumn right) + { + return right.ReverseSubtract(left); + } + public static Int64DataFrameColumn operator -(Int16DataFrameColumn left, uint right) + { + return left.Subtract(right); + } + public static Int64DataFrameColumn operator -(uint left, Int16DataFrameColumn right) + { + return right.ReverseSubtract(left); + } + public static SingleDataFrameColumn operator -(Int16DataFrameColumn left, ulong right) + { + return left.Subtract(right); + } + public static SingleDataFrameColumn operator -(ulong left, Int16DataFrameColumn right) + { + return right.ReverseSubtract(left); + } + public static Int32DataFrameColumn operator -(Int16DataFrameColumn left, ushort right) + { + return left.Subtract(right); + } + public static Int32DataFrameColumn operator -(ushort left, Int16DataFrameColumn right) + { + return right.ReverseSubtract(left); + } + } + public partial class UInt32DataFrameColumn + { + public static UInt32DataFrameColumn operator -(UInt32DataFrameColumn left, byte right) + { + return left.Subtract(right); + } + public static UInt32DataFrameColumn operator -(byte left, UInt32DataFrameColumn right) + { + return right.ReverseSubtract(left); + } + public static DecimalDataFrameColumn operator -(UInt32DataFrameColumn left, decimal right) + { + return left.Subtract(right); + } + public static DecimalDataFrameColumn operator -(decimal left, UInt32DataFrameColumn right) + { + return right.ReverseSubtract(left); + } + public static DoubleDataFrameColumn operator -(UInt32DataFrameColumn left, double right) + { + return left.Subtract(right); + } + public static DoubleDataFrameColumn operator -(double left, UInt32DataFrameColumn right) + { + return right.ReverseSubtract(left); + } + public static SingleDataFrameColumn operator -(UInt32DataFrameColumn left, float right) + { + return left.Subtract(right); + } + public static SingleDataFrameColumn operator -(float left, UInt32DataFrameColumn right) + { + return right.ReverseSubtract(left); + } + public static Int64DataFrameColumn operator -(UInt32DataFrameColumn left, int right) + { + return left.Subtract(right); + } + public static Int64DataFrameColumn operator -(int left, UInt32DataFrameColumn right) + { + return right.ReverseSubtract(left); + } + public static Int64DataFrameColumn operator -(UInt32DataFrameColumn left, long right) + { + return left.Subtract(right); + } + public static Int64DataFrameColumn operator -(long left, UInt32DataFrameColumn right) + { + return right.ReverseSubtract(left); + } + public static Int64DataFrameColumn operator -(UInt32DataFrameColumn left, sbyte right) + { + return left.Subtract(right); + } + public static Int64DataFrameColumn operator -(sbyte left, UInt32DataFrameColumn right) + { + return right.ReverseSubtract(left); + } + public static Int64DataFrameColumn operator -(UInt32DataFrameColumn left, short right) + { + return left.Subtract(right); + } + public static Int64DataFrameColumn operator -(short left, UInt32DataFrameColumn right) + { + return right.ReverseSubtract(left); + } + public static UInt32DataFrameColumn operator -(UInt32DataFrameColumn left, uint right) + { + return left.Subtract(right); + } + public static UInt32DataFrameColumn operator -(uint left, UInt32DataFrameColumn right) + { + return right.ReverseSubtract(left); + } + public static UInt64DataFrameColumn operator -(UInt32DataFrameColumn left, ulong right) + { + return left.Subtract(right); + } + public static UInt64DataFrameColumn operator -(ulong left, UInt32DataFrameColumn right) + { + return right.ReverseSubtract(left); + } + public static UInt32DataFrameColumn operator -(UInt32DataFrameColumn left, ushort right) + { + return left.Subtract(right); + } + public static UInt32DataFrameColumn operator -(ushort left, UInt32DataFrameColumn right) + { + return right.ReverseSubtract(left); + } + } + public partial class UInt64DataFrameColumn + { + public static UInt64DataFrameColumn operator -(UInt64DataFrameColumn left, byte right) + { + return left.Subtract(right); + } + public static UInt64DataFrameColumn operator -(byte left, UInt64DataFrameColumn right) + { + return right.ReverseSubtract(left); + } + public static DecimalDataFrameColumn operator -(UInt64DataFrameColumn left, decimal right) + { + return left.Subtract(right); + } + public static DecimalDataFrameColumn operator -(decimal left, UInt64DataFrameColumn right) + { + return right.ReverseSubtract(left); + } + public static DoubleDataFrameColumn operator -(UInt64DataFrameColumn left, double right) + { + return left.Subtract(right); + } + public static DoubleDataFrameColumn operator -(double left, UInt64DataFrameColumn right) + { + return right.ReverseSubtract(left); + } + public static SingleDataFrameColumn operator -(UInt64DataFrameColumn left, float right) + { + return left.Subtract(right); + } + public static SingleDataFrameColumn operator -(float left, UInt64DataFrameColumn right) + { + return right.ReverseSubtract(left); + } + public static SingleDataFrameColumn operator -(UInt64DataFrameColumn left, int right) + { + return left.Subtract(right); + } + public static SingleDataFrameColumn operator -(int left, UInt64DataFrameColumn right) + { + return right.ReverseSubtract(left); + } + public static SingleDataFrameColumn operator -(UInt64DataFrameColumn left, sbyte right) + { + return left.Subtract(right); + } + public static SingleDataFrameColumn operator -(sbyte left, UInt64DataFrameColumn right) + { + return right.ReverseSubtract(left); + } + public static SingleDataFrameColumn operator -(UInt64DataFrameColumn left, short right) + { + return left.Subtract(right); + } + public static SingleDataFrameColumn operator -(short left, UInt64DataFrameColumn right) + { + return right.ReverseSubtract(left); + } + public static UInt64DataFrameColumn operator -(UInt64DataFrameColumn left, uint right) + { + return left.Subtract(right); + } + public static UInt64DataFrameColumn operator -(uint left, UInt64DataFrameColumn right) + { + return right.ReverseSubtract(left); + } + public static UInt64DataFrameColumn operator -(UInt64DataFrameColumn left, ulong right) + { + return left.Subtract(right); + } + public static UInt64DataFrameColumn operator -(ulong left, UInt64DataFrameColumn right) + { + return right.ReverseSubtract(left); + } + public static UInt64DataFrameColumn operator -(UInt64DataFrameColumn left, ushort right) + { + return left.Subtract(right); + } + public static UInt64DataFrameColumn operator -(ushort left, UInt64DataFrameColumn right) + { + return right.ReverseSubtract(left); + } + } + public partial class UInt16DataFrameColumn + { + public static Int32DataFrameColumn operator -(UInt16DataFrameColumn left, byte right) + { + return left.Subtract(right); + } + public static Int32DataFrameColumn operator -(byte left, UInt16DataFrameColumn right) + { + return right.ReverseSubtract(left); + } + public static DecimalDataFrameColumn operator -(UInt16DataFrameColumn left, decimal right) + { + return left.Subtract(right); + } + public static DecimalDataFrameColumn operator -(decimal left, UInt16DataFrameColumn right) + { + return right.ReverseSubtract(left); + } + public static DoubleDataFrameColumn operator -(UInt16DataFrameColumn left, double right) + { + return left.Subtract(right); + } + public static DoubleDataFrameColumn operator -(double left, UInt16DataFrameColumn right) + { + return right.ReverseSubtract(left); + } + public static SingleDataFrameColumn operator -(UInt16DataFrameColumn left, float right) + { + return left.Subtract(right); + } + public static SingleDataFrameColumn operator -(float left, UInt16DataFrameColumn right) + { + return right.ReverseSubtract(left); + } + public static Int32DataFrameColumn operator -(UInt16DataFrameColumn left, int right) + { + return left.Subtract(right); + } + public static Int32DataFrameColumn operator -(int left, UInt16DataFrameColumn right) + { + return right.ReverseSubtract(left); + } + public static Int64DataFrameColumn operator -(UInt16DataFrameColumn left, long right) + { + return left.Subtract(right); + } + public static Int64DataFrameColumn operator -(long left, UInt16DataFrameColumn right) + { + return right.ReverseSubtract(left); + } + public static Int32DataFrameColumn operator -(UInt16DataFrameColumn left, sbyte right) + { + return left.Subtract(right); + } + public static Int32DataFrameColumn operator -(sbyte left, UInt16DataFrameColumn right) + { + return right.ReverseSubtract(left); + } + public static Int32DataFrameColumn operator -(UInt16DataFrameColumn left, short right) + { + return left.Subtract(right); + } + public static Int32DataFrameColumn operator -(short left, UInt16DataFrameColumn right) + { + return right.ReverseSubtract(left); + } + public static UInt32DataFrameColumn operator -(UInt16DataFrameColumn left, uint right) + { + return left.Subtract(right); + } + public static UInt32DataFrameColumn operator -(uint left, UInt16DataFrameColumn right) + { + return right.ReverseSubtract(left); + } + public static UInt64DataFrameColumn operator -(UInt16DataFrameColumn left, ulong right) + { + return left.Subtract(right); + } + public static UInt64DataFrameColumn operator -(ulong left, UInt16DataFrameColumn right) + { + return right.ReverseSubtract(left); + } + public static Int32DataFrameColumn operator -(UInt16DataFrameColumn left, ushort right) + { + return left.Subtract(right); + } + public static Int32DataFrameColumn operator -(ushort left, UInt16DataFrameColumn right) + { + return right.ReverseSubtract(left); + } + } + public partial class ByteDataFrameColumn + { + public static Int32DataFrameColumn operator *(ByteDataFrameColumn left, ByteDataFrameColumn right) + { + return left.Multiply(right); + } + public static DecimalDataFrameColumn operator *(ByteDataFrameColumn left, DecimalDataFrameColumn right) + { + return left.Multiply(right); + } + public static DoubleDataFrameColumn operator *(ByteDataFrameColumn left, DoubleDataFrameColumn right) + { + return left.Multiply(right); + } + public static SingleDataFrameColumn operator *(ByteDataFrameColumn left, SingleDataFrameColumn right) + { + return left.Multiply(right); + } + public static Int32DataFrameColumn operator *(ByteDataFrameColumn left, Int32DataFrameColumn right) + { + return left.Multiply(right); + } + public static Int64DataFrameColumn operator *(ByteDataFrameColumn left, Int64DataFrameColumn right) + { + return left.Multiply(right); + } + public static Int32DataFrameColumn operator *(ByteDataFrameColumn left, SByteDataFrameColumn right) + { + return left.Multiply(right); + } + public static Int32DataFrameColumn operator *(ByteDataFrameColumn left, Int16DataFrameColumn right) + { + return left.Multiply(right); + } + public static UInt32DataFrameColumn operator *(ByteDataFrameColumn left, UInt32DataFrameColumn right) + { + return left.Multiply(right); + } + public static UInt64DataFrameColumn operator *(ByteDataFrameColumn left, UInt64DataFrameColumn right) + { + return left.Multiply(right); + } + public static Int32DataFrameColumn operator *(ByteDataFrameColumn left, UInt16DataFrameColumn right) + { + return left.Multiply(right); + } + } + public partial class DecimalDataFrameColumn + { + public static DecimalDataFrameColumn operator *(DecimalDataFrameColumn left, ByteDataFrameColumn right) + { + return left.Multiply(right); + } + public static DecimalDataFrameColumn operator *(DecimalDataFrameColumn left, DecimalDataFrameColumn right) + { + return left.Multiply(right); + } + public static DecimalDataFrameColumn operator *(DecimalDataFrameColumn left, Int32DataFrameColumn right) + { + return left.Multiply(right); + } + public static DecimalDataFrameColumn operator *(DecimalDataFrameColumn left, Int64DataFrameColumn right) + { + return left.Multiply(right); + } + public static DecimalDataFrameColumn operator *(DecimalDataFrameColumn left, SByteDataFrameColumn right) + { + return left.Multiply(right); + } + public static DecimalDataFrameColumn operator *(DecimalDataFrameColumn left, Int16DataFrameColumn right) + { + return left.Multiply(right); + } + public static DecimalDataFrameColumn operator *(DecimalDataFrameColumn left, UInt32DataFrameColumn right) + { + return left.Multiply(right); + } + public static DecimalDataFrameColumn operator *(DecimalDataFrameColumn left, UInt64DataFrameColumn right) + { + return left.Multiply(right); + } + public static DecimalDataFrameColumn operator *(DecimalDataFrameColumn left, UInt16DataFrameColumn right) + { + return left.Multiply(right); + } + } + public partial class DoubleDataFrameColumn + { + public static DoubleDataFrameColumn operator *(DoubleDataFrameColumn left, ByteDataFrameColumn right) + { + return left.Multiply(right); + } + public static DoubleDataFrameColumn operator *(DoubleDataFrameColumn left, DoubleDataFrameColumn right) + { + return left.Multiply(right); + } + public static DoubleDataFrameColumn operator *(DoubleDataFrameColumn left, SingleDataFrameColumn right) + { + return left.Multiply(right); + } + public static DoubleDataFrameColumn operator *(DoubleDataFrameColumn left, Int32DataFrameColumn right) + { + return left.Multiply(right); + } + public static DoubleDataFrameColumn operator *(DoubleDataFrameColumn left, Int64DataFrameColumn right) + { + return left.Multiply(right); + } + public static DoubleDataFrameColumn operator *(DoubleDataFrameColumn left, SByteDataFrameColumn right) + { + return left.Multiply(right); + } + public static DoubleDataFrameColumn operator *(DoubleDataFrameColumn left, Int16DataFrameColumn right) + { + return left.Multiply(right); + } + public static DoubleDataFrameColumn operator *(DoubleDataFrameColumn left, UInt32DataFrameColumn right) + { + return left.Multiply(right); + } + public static DoubleDataFrameColumn operator *(DoubleDataFrameColumn left, UInt64DataFrameColumn right) + { + return left.Multiply(right); + } + public static DoubleDataFrameColumn operator *(DoubleDataFrameColumn left, UInt16DataFrameColumn right) + { + return left.Multiply(right); + } + } + public partial class SingleDataFrameColumn + { + public static SingleDataFrameColumn operator *(SingleDataFrameColumn left, ByteDataFrameColumn right) + { + return left.Multiply(right); + } + public static DoubleDataFrameColumn operator *(SingleDataFrameColumn left, DoubleDataFrameColumn right) + { + return left.Multiply(right); + } + public static SingleDataFrameColumn operator *(SingleDataFrameColumn left, SingleDataFrameColumn right) + { + return left.Multiply(right); + } + public static SingleDataFrameColumn operator *(SingleDataFrameColumn left, Int32DataFrameColumn right) + { + return left.Multiply(right); + } + public static SingleDataFrameColumn operator *(SingleDataFrameColumn left, Int64DataFrameColumn right) + { + return left.Multiply(right); + } + public static SingleDataFrameColumn operator *(SingleDataFrameColumn left, SByteDataFrameColumn right) + { + return left.Multiply(right); + } + public static SingleDataFrameColumn operator *(SingleDataFrameColumn left, Int16DataFrameColumn right) + { + return left.Multiply(right); + } + public static SingleDataFrameColumn operator *(SingleDataFrameColumn left, UInt32DataFrameColumn right) + { + return left.Multiply(right); + } + public static SingleDataFrameColumn operator *(SingleDataFrameColumn left, UInt64DataFrameColumn right) + { + return left.Multiply(right); + } + public static SingleDataFrameColumn operator *(SingleDataFrameColumn left, UInt16DataFrameColumn right) + { + return left.Multiply(right); + } + } + public partial class Int32DataFrameColumn + { + public static Int32DataFrameColumn operator *(Int32DataFrameColumn left, ByteDataFrameColumn right) + { + return left.Multiply(right); + } + public static DecimalDataFrameColumn operator *(Int32DataFrameColumn left, DecimalDataFrameColumn right) + { + return left.Multiply(right); + } + public static DoubleDataFrameColumn operator *(Int32DataFrameColumn left, DoubleDataFrameColumn right) + { + return left.Multiply(right); + } + public static SingleDataFrameColumn operator *(Int32DataFrameColumn left, SingleDataFrameColumn right) + { + return left.Multiply(right); + } + public static Int32DataFrameColumn operator *(Int32DataFrameColumn left, Int32DataFrameColumn right) + { + return left.Multiply(right); + } + public static Int64DataFrameColumn operator *(Int32DataFrameColumn left, Int64DataFrameColumn right) + { + return left.Multiply(right); + } + public static Int32DataFrameColumn operator *(Int32DataFrameColumn left, SByteDataFrameColumn right) + { + return left.Multiply(right); + } + public static Int32DataFrameColumn operator *(Int32DataFrameColumn left, Int16DataFrameColumn right) + { + return left.Multiply(right); + } + public static Int64DataFrameColumn operator *(Int32DataFrameColumn left, UInt32DataFrameColumn right) + { + return left.Multiply(right); + } + public static SingleDataFrameColumn operator *(Int32DataFrameColumn left, UInt64DataFrameColumn right) + { + return left.Multiply(right); + } + public static Int32DataFrameColumn operator *(Int32DataFrameColumn left, UInt16DataFrameColumn right) + { + return left.Multiply(right); + } + } + public partial class Int64DataFrameColumn + { + public static Int64DataFrameColumn operator *(Int64DataFrameColumn left, ByteDataFrameColumn right) + { + return left.Multiply(right); + } + public static DecimalDataFrameColumn operator *(Int64DataFrameColumn left, DecimalDataFrameColumn right) + { + return left.Multiply(right); + } + public static DoubleDataFrameColumn operator *(Int64DataFrameColumn left, DoubleDataFrameColumn right) + { + return left.Multiply(right); + } + public static SingleDataFrameColumn operator *(Int64DataFrameColumn left, SingleDataFrameColumn right) + { + return left.Multiply(right); + } + public static Int64DataFrameColumn operator *(Int64DataFrameColumn left, Int32DataFrameColumn right) + { + return left.Multiply(right); + } + public static Int64DataFrameColumn operator *(Int64DataFrameColumn left, Int64DataFrameColumn right) + { + return left.Multiply(right); + } + public static Int64DataFrameColumn operator *(Int64DataFrameColumn left, SByteDataFrameColumn right) + { + return left.Multiply(right); + } + public static Int64DataFrameColumn operator *(Int64DataFrameColumn left, Int16DataFrameColumn right) + { + return left.Multiply(right); + } + public static Int64DataFrameColumn operator *(Int64DataFrameColumn left, UInt32DataFrameColumn right) + { + return left.Multiply(right); + } + public static Int64DataFrameColumn operator *(Int64DataFrameColumn left, UInt16DataFrameColumn right) + { + return left.Multiply(right); + } + } + public partial class SByteDataFrameColumn + { + public static Int32DataFrameColumn operator *(SByteDataFrameColumn left, ByteDataFrameColumn right) + { + return left.Multiply(right); + } + public static DecimalDataFrameColumn operator *(SByteDataFrameColumn left, DecimalDataFrameColumn right) + { + return left.Multiply(right); + } + public static DoubleDataFrameColumn operator *(SByteDataFrameColumn left, DoubleDataFrameColumn right) + { + return left.Multiply(right); + } + public static SingleDataFrameColumn operator *(SByteDataFrameColumn left, SingleDataFrameColumn right) + { + return left.Multiply(right); + } + public static Int32DataFrameColumn operator *(SByteDataFrameColumn left, Int32DataFrameColumn right) + { + return left.Multiply(right); + } + public static Int64DataFrameColumn operator *(SByteDataFrameColumn left, Int64DataFrameColumn right) + { + return left.Multiply(right); + } + public static Int32DataFrameColumn operator *(SByteDataFrameColumn left, SByteDataFrameColumn right) + { + return left.Multiply(right); + } + public static Int32DataFrameColumn operator *(SByteDataFrameColumn left, Int16DataFrameColumn right) + { + return left.Multiply(right); + } + public static Int64DataFrameColumn operator *(SByteDataFrameColumn left, UInt32DataFrameColumn right) + { + return left.Multiply(right); + } + public static SingleDataFrameColumn operator *(SByteDataFrameColumn left, UInt64DataFrameColumn right) + { + return left.Multiply(right); + } + public static Int32DataFrameColumn operator *(SByteDataFrameColumn left, UInt16DataFrameColumn right) + { + return left.Multiply(right); + } + } + public partial class Int16DataFrameColumn + { + public static Int32DataFrameColumn operator *(Int16DataFrameColumn left, ByteDataFrameColumn right) + { + return left.Multiply(right); + } + public static DecimalDataFrameColumn operator *(Int16DataFrameColumn left, DecimalDataFrameColumn right) + { + return left.Multiply(right); + } + public static DoubleDataFrameColumn operator *(Int16DataFrameColumn left, DoubleDataFrameColumn right) + { + return left.Multiply(right); + } + public static SingleDataFrameColumn operator *(Int16DataFrameColumn left, SingleDataFrameColumn right) + { + return left.Multiply(right); + } + public static Int32DataFrameColumn operator *(Int16DataFrameColumn left, Int32DataFrameColumn right) + { + return left.Multiply(right); + } + public static Int64DataFrameColumn operator *(Int16DataFrameColumn left, Int64DataFrameColumn right) + { + return left.Multiply(right); + } + public static Int32DataFrameColumn operator *(Int16DataFrameColumn left, SByteDataFrameColumn right) + { + return left.Multiply(right); + } + public static Int32DataFrameColumn operator *(Int16DataFrameColumn left, Int16DataFrameColumn right) + { + return left.Multiply(right); + } + public static Int64DataFrameColumn operator *(Int16DataFrameColumn left, UInt32DataFrameColumn right) + { + return left.Multiply(right); + } + public static SingleDataFrameColumn operator *(Int16DataFrameColumn left, UInt64DataFrameColumn right) + { + return left.Multiply(right); + } + public static Int32DataFrameColumn operator *(Int16DataFrameColumn left, UInt16DataFrameColumn right) + { + return left.Multiply(right); + } + } + public partial class UInt32DataFrameColumn + { + public static UInt32DataFrameColumn operator *(UInt32DataFrameColumn left, ByteDataFrameColumn right) + { + return left.Multiply(right); + } + public static DecimalDataFrameColumn operator *(UInt32DataFrameColumn left, DecimalDataFrameColumn right) + { + return left.Multiply(right); + } + public static DoubleDataFrameColumn operator *(UInt32DataFrameColumn left, DoubleDataFrameColumn right) + { + return left.Multiply(right); + } + public static SingleDataFrameColumn operator *(UInt32DataFrameColumn left, SingleDataFrameColumn right) + { + return left.Multiply(right); + } + public static Int64DataFrameColumn operator *(UInt32DataFrameColumn left, Int32DataFrameColumn right) + { + return left.Multiply(right); + } + public static Int64DataFrameColumn operator *(UInt32DataFrameColumn left, Int64DataFrameColumn right) + { + return left.Multiply(right); + } + public static Int64DataFrameColumn operator *(UInt32DataFrameColumn left, SByteDataFrameColumn right) + { + return left.Multiply(right); + } + public static Int64DataFrameColumn operator *(UInt32DataFrameColumn left, Int16DataFrameColumn right) + { + return left.Multiply(right); + } + public static UInt32DataFrameColumn operator *(UInt32DataFrameColumn left, UInt32DataFrameColumn right) + { + return left.Multiply(right); + } + public static UInt64DataFrameColumn operator *(UInt32DataFrameColumn left, UInt64DataFrameColumn right) + { + return left.Multiply(right); + } + public static UInt32DataFrameColumn operator *(UInt32DataFrameColumn left, UInt16DataFrameColumn right) + { + return left.Multiply(right); + } + } + public partial class UInt64DataFrameColumn + { + public static UInt64DataFrameColumn operator *(UInt64DataFrameColumn left, ByteDataFrameColumn right) + { + return left.Multiply(right); + } + public static DecimalDataFrameColumn operator *(UInt64DataFrameColumn left, DecimalDataFrameColumn right) + { + return left.Multiply(right); + } + public static DoubleDataFrameColumn operator *(UInt64DataFrameColumn left, DoubleDataFrameColumn right) + { + return left.Multiply(right); + } + public static SingleDataFrameColumn operator *(UInt64DataFrameColumn left, SingleDataFrameColumn right) + { + return left.Multiply(right); + } + public static SingleDataFrameColumn operator *(UInt64DataFrameColumn left, Int32DataFrameColumn right) + { + return left.Multiply(right); + } + public static SingleDataFrameColumn operator *(UInt64DataFrameColumn left, SByteDataFrameColumn right) + { + return left.Multiply(right); + } + public static SingleDataFrameColumn operator *(UInt64DataFrameColumn left, Int16DataFrameColumn right) + { + return left.Multiply(right); + } + public static UInt64DataFrameColumn operator *(UInt64DataFrameColumn left, UInt32DataFrameColumn right) + { + return left.Multiply(right); + } + public static UInt64DataFrameColumn operator *(UInt64DataFrameColumn left, UInt64DataFrameColumn right) + { + return left.Multiply(right); + } + public static UInt64DataFrameColumn operator *(UInt64DataFrameColumn left, UInt16DataFrameColumn right) + { + return left.Multiply(right); + } + } + public partial class UInt16DataFrameColumn + { + public static Int32DataFrameColumn operator *(UInt16DataFrameColumn left, ByteDataFrameColumn right) + { + return left.Multiply(right); + } + public static DecimalDataFrameColumn operator *(UInt16DataFrameColumn left, DecimalDataFrameColumn right) + { + return left.Multiply(right); + } + public static DoubleDataFrameColumn operator *(UInt16DataFrameColumn left, DoubleDataFrameColumn right) + { + return left.Multiply(right); + } + public static SingleDataFrameColumn operator *(UInt16DataFrameColumn left, SingleDataFrameColumn right) + { + return left.Multiply(right); + } + public static Int32DataFrameColumn operator *(UInt16DataFrameColumn left, Int32DataFrameColumn right) + { + return left.Multiply(right); + } + public static Int64DataFrameColumn operator *(UInt16DataFrameColumn left, Int64DataFrameColumn right) + { + return left.Multiply(right); + } + public static Int32DataFrameColumn operator *(UInt16DataFrameColumn left, SByteDataFrameColumn right) + { + return left.Multiply(right); + } + public static Int32DataFrameColumn operator *(UInt16DataFrameColumn left, Int16DataFrameColumn right) + { + return left.Multiply(right); + } + public static UInt32DataFrameColumn operator *(UInt16DataFrameColumn left, UInt32DataFrameColumn right) + { + return left.Multiply(right); + } + public static UInt64DataFrameColumn operator *(UInt16DataFrameColumn left, UInt64DataFrameColumn right) + { + return left.Multiply(right); + } + public static Int32DataFrameColumn operator *(UInt16DataFrameColumn left, UInt16DataFrameColumn right) + { + return left.Multiply(right); + } + } + public partial class ByteDataFrameColumn + { + public static Int32DataFrameColumn operator *(ByteDataFrameColumn left, byte right) + { + return left.Multiply(right); + } + public static Int32DataFrameColumn operator *(byte left, ByteDataFrameColumn right) + { + return right.ReverseMultiply(left); + } + public static DecimalDataFrameColumn operator *(ByteDataFrameColumn left, decimal right) + { + return left.Multiply(right); + } + public static DecimalDataFrameColumn operator *(decimal left, ByteDataFrameColumn right) + { + return right.ReverseMultiply(left); + } + public static DoubleDataFrameColumn operator *(ByteDataFrameColumn left, double right) + { + return left.Multiply(right); + } + public static DoubleDataFrameColumn operator *(double left, ByteDataFrameColumn right) + { + return right.ReverseMultiply(left); + } + public static SingleDataFrameColumn operator *(ByteDataFrameColumn left, float right) + { + return left.Multiply(right); + } + public static SingleDataFrameColumn operator *(float left, ByteDataFrameColumn right) + { + return right.ReverseMultiply(left); + } + public static Int32DataFrameColumn operator *(ByteDataFrameColumn left, int right) + { + return left.Multiply(right); + } + public static Int32DataFrameColumn operator *(int left, ByteDataFrameColumn right) + { + return right.ReverseMultiply(left); + } + public static Int64DataFrameColumn operator *(ByteDataFrameColumn left, long right) + { + return left.Multiply(right); + } + public static Int64DataFrameColumn operator *(long left, ByteDataFrameColumn right) + { + return right.ReverseMultiply(left); + } + public static Int32DataFrameColumn operator *(ByteDataFrameColumn left, sbyte right) + { + return left.Multiply(right); + } + public static Int32DataFrameColumn operator *(sbyte left, ByteDataFrameColumn right) + { + return right.ReverseMultiply(left); + } + public static Int32DataFrameColumn operator *(ByteDataFrameColumn left, short right) + { + return left.Multiply(right); + } + public static Int32DataFrameColumn operator *(short left, ByteDataFrameColumn right) + { + return right.ReverseMultiply(left); + } + public static UInt32DataFrameColumn operator *(ByteDataFrameColumn left, uint right) + { + return left.Multiply(right); + } + public static UInt32DataFrameColumn operator *(uint left, ByteDataFrameColumn right) + { + return right.ReverseMultiply(left); + } + public static UInt64DataFrameColumn operator *(ByteDataFrameColumn left, ulong right) + { + return left.Multiply(right); + } + public static UInt64DataFrameColumn operator *(ulong left, ByteDataFrameColumn right) + { + return right.ReverseMultiply(left); + } + public static Int32DataFrameColumn operator *(ByteDataFrameColumn left, ushort right) + { + return left.Multiply(right); + } + public static Int32DataFrameColumn operator *(ushort left, ByteDataFrameColumn right) + { + return right.ReverseMultiply(left); + } + } + public partial class DecimalDataFrameColumn + { + public static DecimalDataFrameColumn operator *(DecimalDataFrameColumn left, byte right) + { + return left.Multiply(right); + } + public static DecimalDataFrameColumn operator *(byte left, DecimalDataFrameColumn right) + { + return right.ReverseMultiply(left); + } + public static DecimalDataFrameColumn operator *(DecimalDataFrameColumn left, decimal right) + { + return left.Multiply(right); + } + public static DecimalDataFrameColumn operator *(decimal left, DecimalDataFrameColumn right) + { + return right.ReverseMultiply(left); + } + public static DecimalDataFrameColumn operator *(DecimalDataFrameColumn left, int right) + { + return left.Multiply(right); + } + public static DecimalDataFrameColumn operator *(int left, DecimalDataFrameColumn right) + { + return right.ReverseMultiply(left); + } + public static DecimalDataFrameColumn operator *(DecimalDataFrameColumn left, long right) + { + return left.Multiply(right); + } + public static DecimalDataFrameColumn operator *(long left, DecimalDataFrameColumn right) + { + return right.ReverseMultiply(left); + } + public static DecimalDataFrameColumn operator *(DecimalDataFrameColumn left, sbyte right) + { + return left.Multiply(right); + } + public static DecimalDataFrameColumn operator *(sbyte left, DecimalDataFrameColumn right) + { + return right.ReverseMultiply(left); + } + public static DecimalDataFrameColumn operator *(DecimalDataFrameColumn left, short right) + { + return left.Multiply(right); + } + public static DecimalDataFrameColumn operator *(short left, DecimalDataFrameColumn right) + { + return right.ReverseMultiply(left); + } + public static DecimalDataFrameColumn operator *(DecimalDataFrameColumn left, uint right) + { + return left.Multiply(right); + } + public static DecimalDataFrameColumn operator *(uint left, DecimalDataFrameColumn right) + { + return right.ReverseMultiply(left); + } + public static DecimalDataFrameColumn operator *(DecimalDataFrameColumn left, ulong right) + { + return left.Multiply(right); + } + public static DecimalDataFrameColumn operator *(ulong left, DecimalDataFrameColumn right) + { + return right.ReverseMultiply(left); + } + public static DecimalDataFrameColumn operator *(DecimalDataFrameColumn left, ushort right) + { + return left.Multiply(right); + } + public static DecimalDataFrameColumn operator *(ushort left, DecimalDataFrameColumn right) + { + return right.ReverseMultiply(left); + } + } + public partial class DoubleDataFrameColumn + { + public static DoubleDataFrameColumn operator *(DoubleDataFrameColumn left, byte right) + { + return left.Multiply(right); + } + public static DoubleDataFrameColumn operator *(byte left, DoubleDataFrameColumn right) + { + return right.ReverseMultiply(left); + } + public static DoubleDataFrameColumn operator *(DoubleDataFrameColumn left, double right) + { + return left.Multiply(right); + } + public static DoubleDataFrameColumn operator *(double left, DoubleDataFrameColumn right) + { + return right.ReverseMultiply(left); + } + public static DoubleDataFrameColumn operator *(DoubleDataFrameColumn left, float right) + { + return left.Multiply(right); + } + public static DoubleDataFrameColumn operator *(float left, DoubleDataFrameColumn right) + { + return right.ReverseMultiply(left); + } + public static DoubleDataFrameColumn operator *(DoubleDataFrameColumn left, int right) + { + return left.Multiply(right); + } + public static DoubleDataFrameColumn operator *(int left, DoubleDataFrameColumn right) + { + return right.ReverseMultiply(left); + } + public static DoubleDataFrameColumn operator *(DoubleDataFrameColumn left, long right) + { + return left.Multiply(right); + } + public static DoubleDataFrameColumn operator *(long left, DoubleDataFrameColumn right) + { + return right.ReverseMultiply(left); + } + public static DoubleDataFrameColumn operator *(DoubleDataFrameColumn left, sbyte right) + { + return left.Multiply(right); + } + public static DoubleDataFrameColumn operator *(sbyte left, DoubleDataFrameColumn right) + { + return right.ReverseMultiply(left); + } + public static DoubleDataFrameColumn operator *(DoubleDataFrameColumn left, short right) + { + return left.Multiply(right); + } + public static DoubleDataFrameColumn operator *(short left, DoubleDataFrameColumn right) + { + return right.ReverseMultiply(left); + } + public static DoubleDataFrameColumn operator *(DoubleDataFrameColumn left, uint right) + { + return left.Multiply(right); + } + public static DoubleDataFrameColumn operator *(uint left, DoubleDataFrameColumn right) + { + return right.ReverseMultiply(left); + } + public static DoubleDataFrameColumn operator *(DoubleDataFrameColumn left, ulong right) + { + return left.Multiply(right); + } + public static DoubleDataFrameColumn operator *(ulong left, DoubleDataFrameColumn right) + { + return right.ReverseMultiply(left); + } + public static DoubleDataFrameColumn operator *(DoubleDataFrameColumn left, ushort right) + { + return left.Multiply(right); + } + public static DoubleDataFrameColumn operator *(ushort left, DoubleDataFrameColumn right) + { + return right.ReverseMultiply(left); + } + } + public partial class SingleDataFrameColumn + { + public static SingleDataFrameColumn operator *(SingleDataFrameColumn left, byte right) + { + return left.Multiply(right); + } + public static SingleDataFrameColumn operator *(byte left, SingleDataFrameColumn right) + { + return right.ReverseMultiply(left); + } + public static DoubleDataFrameColumn operator *(SingleDataFrameColumn left, double right) + { + return left.Multiply(right); + } + public static DoubleDataFrameColumn operator *(double left, SingleDataFrameColumn right) + { + return right.ReverseMultiply(left); + } + public static SingleDataFrameColumn operator *(SingleDataFrameColumn left, float right) + { + return left.Multiply(right); + } + public static SingleDataFrameColumn operator *(float left, SingleDataFrameColumn right) + { + return right.ReverseMultiply(left); + } + public static SingleDataFrameColumn operator *(SingleDataFrameColumn left, int right) + { + return left.Multiply(right); + } + public static SingleDataFrameColumn operator *(int left, SingleDataFrameColumn right) + { + return right.ReverseMultiply(left); + } + public static SingleDataFrameColumn operator *(SingleDataFrameColumn left, long right) + { + return left.Multiply(right); + } + public static SingleDataFrameColumn operator *(long left, SingleDataFrameColumn right) + { + return right.ReverseMultiply(left); + } + public static SingleDataFrameColumn operator *(SingleDataFrameColumn left, sbyte right) + { + return left.Multiply(right); + } + public static SingleDataFrameColumn operator *(sbyte left, SingleDataFrameColumn right) + { + return right.ReverseMultiply(left); + } + public static SingleDataFrameColumn operator *(SingleDataFrameColumn left, short right) + { + return left.Multiply(right); + } + public static SingleDataFrameColumn operator *(short left, SingleDataFrameColumn right) + { + return right.ReverseMultiply(left); + } + public static SingleDataFrameColumn operator *(SingleDataFrameColumn left, uint right) + { + return left.Multiply(right); + } + public static SingleDataFrameColumn operator *(uint left, SingleDataFrameColumn right) + { + return right.ReverseMultiply(left); + } + public static SingleDataFrameColumn operator *(SingleDataFrameColumn left, ulong right) + { + return left.Multiply(right); + } + public static SingleDataFrameColumn operator *(ulong left, SingleDataFrameColumn right) + { + return right.ReverseMultiply(left); + } + public static SingleDataFrameColumn operator *(SingleDataFrameColumn left, ushort right) + { + return left.Multiply(right); + } + public static SingleDataFrameColumn operator *(ushort left, SingleDataFrameColumn right) + { + return right.ReverseMultiply(left); + } + } + public partial class Int32DataFrameColumn + { + public static Int32DataFrameColumn operator *(Int32DataFrameColumn left, byte right) + { + return left.Multiply(right); + } + public static Int32DataFrameColumn operator *(byte left, Int32DataFrameColumn right) + { + return right.ReverseMultiply(left); + } + public static DecimalDataFrameColumn operator *(Int32DataFrameColumn left, decimal right) + { + return left.Multiply(right); + } + public static DecimalDataFrameColumn operator *(decimal left, Int32DataFrameColumn right) + { + return right.ReverseMultiply(left); + } + public static DoubleDataFrameColumn operator *(Int32DataFrameColumn left, double right) + { + return left.Multiply(right); + } + public static DoubleDataFrameColumn operator *(double left, Int32DataFrameColumn right) + { + return right.ReverseMultiply(left); + } + public static SingleDataFrameColumn operator *(Int32DataFrameColumn left, float right) + { + return left.Multiply(right); + } + public static SingleDataFrameColumn operator *(float left, Int32DataFrameColumn right) + { + return right.ReverseMultiply(left); + } + public static Int32DataFrameColumn operator *(Int32DataFrameColumn left, int right) + { + return left.Multiply(right); + } + public static Int32DataFrameColumn operator *(int left, Int32DataFrameColumn right) + { + return right.ReverseMultiply(left); + } + public static Int64DataFrameColumn operator *(Int32DataFrameColumn left, long right) + { + return left.Multiply(right); + } + public static Int64DataFrameColumn operator *(long left, Int32DataFrameColumn right) + { + return right.ReverseMultiply(left); + } + public static Int32DataFrameColumn operator *(Int32DataFrameColumn left, sbyte right) + { + return left.Multiply(right); + } + public static Int32DataFrameColumn operator *(sbyte left, Int32DataFrameColumn right) + { + return right.ReverseMultiply(left); + } + public static Int32DataFrameColumn operator *(Int32DataFrameColumn left, short right) + { + return left.Multiply(right); + } + public static Int32DataFrameColumn operator *(short left, Int32DataFrameColumn right) + { + return right.ReverseMultiply(left); + } + public static Int64DataFrameColumn operator *(Int32DataFrameColumn left, uint right) + { + return left.Multiply(right); + } + public static Int64DataFrameColumn operator *(uint left, Int32DataFrameColumn right) + { + return right.ReverseMultiply(left); + } + public static SingleDataFrameColumn operator *(Int32DataFrameColumn left, ulong right) + { + return left.Multiply(right); + } + public static SingleDataFrameColumn operator *(ulong left, Int32DataFrameColumn right) + { + return right.ReverseMultiply(left); + } + public static Int32DataFrameColumn operator *(Int32DataFrameColumn left, ushort right) + { + return left.Multiply(right); + } + public static Int32DataFrameColumn operator *(ushort left, Int32DataFrameColumn right) + { + return right.ReverseMultiply(left); + } + } + public partial class Int64DataFrameColumn + { + public static Int64DataFrameColumn operator *(Int64DataFrameColumn left, byte right) + { + return left.Multiply(right); + } + public static Int64DataFrameColumn operator *(byte left, Int64DataFrameColumn right) + { + return right.ReverseMultiply(left); + } + public static DecimalDataFrameColumn operator *(Int64DataFrameColumn left, decimal right) + { + return left.Multiply(right); + } + public static DecimalDataFrameColumn operator *(decimal left, Int64DataFrameColumn right) + { + return right.ReverseMultiply(left); + } + public static DoubleDataFrameColumn operator *(Int64DataFrameColumn left, double right) + { + return left.Multiply(right); + } + public static DoubleDataFrameColumn operator *(double left, Int64DataFrameColumn right) + { + return right.ReverseMultiply(left); + } + public static SingleDataFrameColumn operator *(Int64DataFrameColumn left, float right) + { + return left.Multiply(right); + } + public static SingleDataFrameColumn operator *(float left, Int64DataFrameColumn right) + { + return right.ReverseMultiply(left); + } + public static Int64DataFrameColumn operator *(Int64DataFrameColumn left, int right) + { + return left.Multiply(right); + } + public static Int64DataFrameColumn operator *(int left, Int64DataFrameColumn right) + { + return right.ReverseMultiply(left); + } + public static Int64DataFrameColumn operator *(Int64DataFrameColumn left, long right) + { + return left.Multiply(right); + } + public static Int64DataFrameColumn operator *(long left, Int64DataFrameColumn right) + { + return right.ReverseMultiply(left); + } + public static Int64DataFrameColumn operator *(Int64DataFrameColumn left, sbyte right) + { + return left.Multiply(right); + } + public static Int64DataFrameColumn operator *(sbyte left, Int64DataFrameColumn right) + { + return right.ReverseMultiply(left); + } + public static Int64DataFrameColumn operator *(Int64DataFrameColumn left, short right) + { + return left.Multiply(right); + } + public static Int64DataFrameColumn operator *(short left, Int64DataFrameColumn right) + { + return right.ReverseMultiply(left); + } + public static Int64DataFrameColumn operator *(Int64DataFrameColumn left, uint right) + { + return left.Multiply(right); + } + public static Int64DataFrameColumn operator *(uint left, Int64DataFrameColumn right) + { + return right.ReverseMultiply(left); + } + public static Int64DataFrameColumn operator *(Int64DataFrameColumn left, ushort right) + { + return left.Multiply(right); + } + public static Int64DataFrameColumn operator *(ushort left, Int64DataFrameColumn right) + { + return right.ReverseMultiply(left); + } + } + public partial class SByteDataFrameColumn + { + public static Int32DataFrameColumn operator *(SByteDataFrameColumn left, byte right) + { + return left.Multiply(right); + } + public static Int32DataFrameColumn operator *(byte left, SByteDataFrameColumn right) + { + return right.ReverseMultiply(left); + } + public static DecimalDataFrameColumn operator *(SByteDataFrameColumn left, decimal right) + { + return left.Multiply(right); + } + public static DecimalDataFrameColumn operator *(decimal left, SByteDataFrameColumn right) + { + return right.ReverseMultiply(left); + } + public static DoubleDataFrameColumn operator *(SByteDataFrameColumn left, double right) + { + return left.Multiply(right); + } + public static DoubleDataFrameColumn operator *(double left, SByteDataFrameColumn right) + { + return right.ReverseMultiply(left); + } + public static SingleDataFrameColumn operator *(SByteDataFrameColumn left, float right) + { + return left.Multiply(right); + } + public static SingleDataFrameColumn operator *(float left, SByteDataFrameColumn right) + { + return right.ReverseMultiply(left); + } + public static Int32DataFrameColumn operator *(SByteDataFrameColumn left, int right) + { + return left.Multiply(right); + } + public static Int32DataFrameColumn operator *(int left, SByteDataFrameColumn right) + { + return right.ReverseMultiply(left); + } + public static Int64DataFrameColumn operator *(SByteDataFrameColumn left, long right) + { + return left.Multiply(right); + } + public static Int64DataFrameColumn operator *(long left, SByteDataFrameColumn right) + { + return right.ReverseMultiply(left); + } + public static Int32DataFrameColumn operator *(SByteDataFrameColumn left, sbyte right) + { + return left.Multiply(right); + } + public static Int32DataFrameColumn operator *(sbyte left, SByteDataFrameColumn right) + { + return right.ReverseMultiply(left); + } + public static Int32DataFrameColumn operator *(SByteDataFrameColumn left, short right) + { + return left.Multiply(right); + } + public static Int32DataFrameColumn operator *(short left, SByteDataFrameColumn right) + { + return right.ReverseMultiply(left); + } + public static Int64DataFrameColumn operator *(SByteDataFrameColumn left, uint right) + { + return left.Multiply(right); + } + public static Int64DataFrameColumn operator *(uint left, SByteDataFrameColumn right) + { + return right.ReverseMultiply(left); + } + public static SingleDataFrameColumn operator *(SByteDataFrameColumn left, ulong right) + { + return left.Multiply(right); + } + public static SingleDataFrameColumn operator *(ulong left, SByteDataFrameColumn right) + { + return right.ReverseMultiply(left); + } + public static Int32DataFrameColumn operator *(SByteDataFrameColumn left, ushort right) + { + return left.Multiply(right); + } + public static Int32DataFrameColumn operator *(ushort left, SByteDataFrameColumn right) + { + return right.ReverseMultiply(left); + } + } + public partial class Int16DataFrameColumn + { + public static Int32DataFrameColumn operator *(Int16DataFrameColumn left, byte right) + { + return left.Multiply(right); + } + public static Int32DataFrameColumn operator *(byte left, Int16DataFrameColumn right) + { + return right.ReverseMultiply(left); + } + public static DecimalDataFrameColumn operator *(Int16DataFrameColumn left, decimal right) + { + return left.Multiply(right); + } + public static DecimalDataFrameColumn operator *(decimal left, Int16DataFrameColumn right) + { + return right.ReverseMultiply(left); + } + public static DoubleDataFrameColumn operator *(Int16DataFrameColumn left, double right) + { + return left.Multiply(right); + } + public static DoubleDataFrameColumn operator *(double left, Int16DataFrameColumn right) + { + return right.ReverseMultiply(left); + } + public static SingleDataFrameColumn operator *(Int16DataFrameColumn left, float right) + { + return left.Multiply(right); + } + public static SingleDataFrameColumn operator *(float left, Int16DataFrameColumn right) + { + return right.ReverseMultiply(left); + } + public static Int32DataFrameColumn operator *(Int16DataFrameColumn left, int right) + { + return left.Multiply(right); + } + public static Int32DataFrameColumn operator *(int left, Int16DataFrameColumn right) + { + return right.ReverseMultiply(left); + } + public static Int64DataFrameColumn operator *(Int16DataFrameColumn left, long right) + { + return left.Multiply(right); + } + public static Int64DataFrameColumn operator *(long left, Int16DataFrameColumn right) + { + return right.ReverseMultiply(left); + } + public static Int32DataFrameColumn operator *(Int16DataFrameColumn left, sbyte right) + { + return left.Multiply(right); + } + public static Int32DataFrameColumn operator *(sbyte left, Int16DataFrameColumn right) + { + return right.ReverseMultiply(left); + } + public static Int32DataFrameColumn operator *(Int16DataFrameColumn left, short right) + { + return left.Multiply(right); + } + public static Int32DataFrameColumn operator *(short left, Int16DataFrameColumn right) + { + return right.ReverseMultiply(left); + } + public static Int64DataFrameColumn operator *(Int16DataFrameColumn left, uint right) + { + return left.Multiply(right); + } + public static Int64DataFrameColumn operator *(uint left, Int16DataFrameColumn right) + { + return right.ReverseMultiply(left); + } + public static SingleDataFrameColumn operator *(Int16DataFrameColumn left, ulong right) + { + return left.Multiply(right); + } + public static SingleDataFrameColumn operator *(ulong left, Int16DataFrameColumn right) + { + return right.ReverseMultiply(left); + } + public static Int32DataFrameColumn operator *(Int16DataFrameColumn left, ushort right) + { + return left.Multiply(right); + } + public static Int32DataFrameColumn operator *(ushort left, Int16DataFrameColumn right) + { + return right.ReverseMultiply(left); + } + } + public partial class UInt32DataFrameColumn + { + public static UInt32DataFrameColumn operator *(UInt32DataFrameColumn left, byte right) + { + return left.Multiply(right); + } + public static UInt32DataFrameColumn operator *(byte left, UInt32DataFrameColumn right) + { + return right.ReverseMultiply(left); + } + public static DecimalDataFrameColumn operator *(UInt32DataFrameColumn left, decimal right) + { + return left.Multiply(right); + } + public static DecimalDataFrameColumn operator *(decimal left, UInt32DataFrameColumn right) + { + return right.ReverseMultiply(left); + } + public static DoubleDataFrameColumn operator *(UInt32DataFrameColumn left, double right) + { + return left.Multiply(right); + } + public static DoubleDataFrameColumn operator *(double left, UInt32DataFrameColumn right) + { + return right.ReverseMultiply(left); + } + public static SingleDataFrameColumn operator *(UInt32DataFrameColumn left, float right) + { + return left.Multiply(right); + } + public static SingleDataFrameColumn operator *(float left, UInt32DataFrameColumn right) + { + return right.ReverseMultiply(left); + } + public static Int64DataFrameColumn operator *(UInt32DataFrameColumn left, int right) + { + return left.Multiply(right); + } + public static Int64DataFrameColumn operator *(int left, UInt32DataFrameColumn right) + { + return right.ReverseMultiply(left); + } + public static Int64DataFrameColumn operator *(UInt32DataFrameColumn left, long right) + { + return left.Multiply(right); + } + public static Int64DataFrameColumn operator *(long left, UInt32DataFrameColumn right) + { + return right.ReverseMultiply(left); + } + public static Int64DataFrameColumn operator *(UInt32DataFrameColumn left, sbyte right) + { + return left.Multiply(right); + } + public static Int64DataFrameColumn operator *(sbyte left, UInt32DataFrameColumn right) + { + return right.ReverseMultiply(left); + } + public static Int64DataFrameColumn operator *(UInt32DataFrameColumn left, short right) + { + return left.Multiply(right); + } + public static Int64DataFrameColumn operator *(short left, UInt32DataFrameColumn right) + { + return right.ReverseMultiply(left); + } + public static UInt32DataFrameColumn operator *(UInt32DataFrameColumn left, uint right) + { + return left.Multiply(right); + } + public static UInt32DataFrameColumn operator *(uint left, UInt32DataFrameColumn right) + { + return right.ReverseMultiply(left); + } + public static UInt64DataFrameColumn operator *(UInt32DataFrameColumn left, ulong right) + { + return left.Multiply(right); + } + public static UInt64DataFrameColumn operator *(ulong left, UInt32DataFrameColumn right) + { + return right.ReverseMultiply(left); + } + public static UInt32DataFrameColumn operator *(UInt32DataFrameColumn left, ushort right) + { + return left.Multiply(right); + } + public static UInt32DataFrameColumn operator *(ushort left, UInt32DataFrameColumn right) + { + return right.ReverseMultiply(left); + } + } + public partial class UInt64DataFrameColumn + { + public static UInt64DataFrameColumn operator *(UInt64DataFrameColumn left, byte right) + { + return left.Multiply(right); + } + public static UInt64DataFrameColumn operator *(byte left, UInt64DataFrameColumn right) + { + return right.ReverseMultiply(left); + } + public static DecimalDataFrameColumn operator *(UInt64DataFrameColumn left, decimal right) + { + return left.Multiply(right); + } + public static DecimalDataFrameColumn operator *(decimal left, UInt64DataFrameColumn right) + { + return right.ReverseMultiply(left); + } + public static DoubleDataFrameColumn operator *(UInt64DataFrameColumn left, double right) + { + return left.Multiply(right); + } + public static DoubleDataFrameColumn operator *(double left, UInt64DataFrameColumn right) + { + return right.ReverseMultiply(left); + } + public static SingleDataFrameColumn operator *(UInt64DataFrameColumn left, float right) + { + return left.Multiply(right); + } + public static SingleDataFrameColumn operator *(float left, UInt64DataFrameColumn right) + { + return right.ReverseMultiply(left); + } + public static SingleDataFrameColumn operator *(UInt64DataFrameColumn left, int right) + { + return left.Multiply(right); + } + public static SingleDataFrameColumn operator *(int left, UInt64DataFrameColumn right) + { + return right.ReverseMultiply(left); + } + public static SingleDataFrameColumn operator *(UInt64DataFrameColumn left, sbyte right) + { + return left.Multiply(right); + } + public static SingleDataFrameColumn operator *(sbyte left, UInt64DataFrameColumn right) + { + return right.ReverseMultiply(left); + } + public static SingleDataFrameColumn operator *(UInt64DataFrameColumn left, short right) + { + return left.Multiply(right); + } + public static SingleDataFrameColumn operator *(short left, UInt64DataFrameColumn right) + { + return right.ReverseMultiply(left); + } + public static UInt64DataFrameColumn operator *(UInt64DataFrameColumn left, uint right) + { + return left.Multiply(right); + } + public static UInt64DataFrameColumn operator *(uint left, UInt64DataFrameColumn right) + { + return right.ReverseMultiply(left); + } + public static UInt64DataFrameColumn operator *(UInt64DataFrameColumn left, ulong right) + { + return left.Multiply(right); + } + public static UInt64DataFrameColumn operator *(ulong left, UInt64DataFrameColumn right) + { + return right.ReverseMultiply(left); + } + public static UInt64DataFrameColumn operator *(UInt64DataFrameColumn left, ushort right) + { + return left.Multiply(right); + } + public static UInt64DataFrameColumn operator *(ushort left, UInt64DataFrameColumn right) + { + return right.ReverseMultiply(left); + } + } + public partial class UInt16DataFrameColumn + { + public static Int32DataFrameColumn operator *(UInt16DataFrameColumn left, byte right) + { + return left.Multiply(right); + } + public static Int32DataFrameColumn operator *(byte left, UInt16DataFrameColumn right) + { + return right.ReverseMultiply(left); + } + public static DecimalDataFrameColumn operator *(UInt16DataFrameColumn left, decimal right) + { + return left.Multiply(right); + } + public static DecimalDataFrameColumn operator *(decimal left, UInt16DataFrameColumn right) + { + return right.ReverseMultiply(left); + } + public static DoubleDataFrameColumn operator *(UInt16DataFrameColumn left, double right) + { + return left.Multiply(right); + } + public static DoubleDataFrameColumn operator *(double left, UInt16DataFrameColumn right) + { + return right.ReverseMultiply(left); + } + public static SingleDataFrameColumn operator *(UInt16DataFrameColumn left, float right) + { + return left.Multiply(right); + } + public static SingleDataFrameColumn operator *(float left, UInt16DataFrameColumn right) + { + return right.ReverseMultiply(left); + } + public static Int32DataFrameColumn operator *(UInt16DataFrameColumn left, int right) + { + return left.Multiply(right); + } + public static Int32DataFrameColumn operator *(int left, UInt16DataFrameColumn right) + { + return right.ReverseMultiply(left); + } + public static Int64DataFrameColumn operator *(UInt16DataFrameColumn left, long right) + { + return left.Multiply(right); + } + public static Int64DataFrameColumn operator *(long left, UInt16DataFrameColumn right) + { + return right.ReverseMultiply(left); + } + public static Int32DataFrameColumn operator *(UInt16DataFrameColumn left, sbyte right) + { + return left.Multiply(right); + } + public static Int32DataFrameColumn operator *(sbyte left, UInt16DataFrameColumn right) + { + return right.ReverseMultiply(left); + } + public static Int32DataFrameColumn operator *(UInt16DataFrameColumn left, short right) + { + return left.Multiply(right); + } + public static Int32DataFrameColumn operator *(short left, UInt16DataFrameColumn right) + { + return right.ReverseMultiply(left); + } + public static UInt32DataFrameColumn operator *(UInt16DataFrameColumn left, uint right) + { + return left.Multiply(right); + } + public static UInt32DataFrameColumn operator *(uint left, UInt16DataFrameColumn right) + { + return right.ReverseMultiply(left); + } + public static UInt64DataFrameColumn operator *(UInt16DataFrameColumn left, ulong right) + { + return left.Multiply(right); + } + public static UInt64DataFrameColumn operator *(ulong left, UInt16DataFrameColumn right) + { + return right.ReverseMultiply(left); + } + public static Int32DataFrameColumn operator *(UInt16DataFrameColumn left, ushort right) + { + return left.Multiply(right); + } + public static Int32DataFrameColumn operator *(ushort left, UInt16DataFrameColumn right) + { + return right.ReverseMultiply(left); + } + } + public partial class ByteDataFrameColumn + { + public static Int32DataFrameColumn operator /(ByteDataFrameColumn left, ByteDataFrameColumn right) + { + return left.Divide(right); + } + public static DecimalDataFrameColumn operator /(ByteDataFrameColumn left, DecimalDataFrameColumn right) + { + return left.Divide(right); + } + public static DoubleDataFrameColumn operator /(ByteDataFrameColumn left, DoubleDataFrameColumn right) + { + return left.Divide(right); + } + public static SingleDataFrameColumn operator /(ByteDataFrameColumn left, SingleDataFrameColumn right) + { + return left.Divide(right); + } + public static Int32DataFrameColumn operator /(ByteDataFrameColumn left, Int32DataFrameColumn right) + { + return left.Divide(right); + } + public static Int64DataFrameColumn operator /(ByteDataFrameColumn left, Int64DataFrameColumn right) + { + return left.Divide(right); + } + public static Int32DataFrameColumn operator /(ByteDataFrameColumn left, SByteDataFrameColumn right) + { + return left.Divide(right); + } + public static Int32DataFrameColumn operator /(ByteDataFrameColumn left, Int16DataFrameColumn right) + { + return left.Divide(right); + } + public static UInt32DataFrameColumn operator /(ByteDataFrameColumn left, UInt32DataFrameColumn right) + { + return left.Divide(right); + } + public static UInt64DataFrameColumn operator /(ByteDataFrameColumn left, UInt64DataFrameColumn right) + { + return left.Divide(right); + } + public static Int32DataFrameColumn operator /(ByteDataFrameColumn left, UInt16DataFrameColumn right) + { + return left.Divide(right); + } + } + public partial class DecimalDataFrameColumn + { + public static DecimalDataFrameColumn operator /(DecimalDataFrameColumn left, ByteDataFrameColumn right) + { + return left.Divide(right); + } + public static DecimalDataFrameColumn operator /(DecimalDataFrameColumn left, DecimalDataFrameColumn right) + { + return left.Divide(right); + } + public static DecimalDataFrameColumn operator /(DecimalDataFrameColumn left, Int32DataFrameColumn right) + { + return left.Divide(right); + } + public static DecimalDataFrameColumn operator /(DecimalDataFrameColumn left, Int64DataFrameColumn right) + { + return left.Divide(right); + } + public static DecimalDataFrameColumn operator /(DecimalDataFrameColumn left, SByteDataFrameColumn right) + { + return left.Divide(right); + } + public static DecimalDataFrameColumn operator /(DecimalDataFrameColumn left, Int16DataFrameColumn right) + { + return left.Divide(right); + } + public static DecimalDataFrameColumn operator /(DecimalDataFrameColumn left, UInt32DataFrameColumn right) + { + return left.Divide(right); + } + public static DecimalDataFrameColumn operator /(DecimalDataFrameColumn left, UInt64DataFrameColumn right) + { + return left.Divide(right); + } + public static DecimalDataFrameColumn operator /(DecimalDataFrameColumn left, UInt16DataFrameColumn right) + { + return left.Divide(right); + } + } + public partial class DoubleDataFrameColumn + { + public static DoubleDataFrameColumn operator /(DoubleDataFrameColumn left, ByteDataFrameColumn right) + { + return left.Divide(right); + } + public static DoubleDataFrameColumn operator /(DoubleDataFrameColumn left, DoubleDataFrameColumn right) + { + return left.Divide(right); + } + public static DoubleDataFrameColumn operator /(DoubleDataFrameColumn left, SingleDataFrameColumn right) + { + return left.Divide(right); + } + public static DoubleDataFrameColumn operator /(DoubleDataFrameColumn left, Int32DataFrameColumn right) + { + return left.Divide(right); + } + public static DoubleDataFrameColumn operator /(DoubleDataFrameColumn left, Int64DataFrameColumn right) + { + return left.Divide(right); + } + public static DoubleDataFrameColumn operator /(DoubleDataFrameColumn left, SByteDataFrameColumn right) + { + return left.Divide(right); + } + public static DoubleDataFrameColumn operator /(DoubleDataFrameColumn left, Int16DataFrameColumn right) + { + return left.Divide(right); + } + public static DoubleDataFrameColumn operator /(DoubleDataFrameColumn left, UInt32DataFrameColumn right) + { + return left.Divide(right); + } + public static DoubleDataFrameColumn operator /(DoubleDataFrameColumn left, UInt64DataFrameColumn right) + { + return left.Divide(right); + } + public static DoubleDataFrameColumn operator /(DoubleDataFrameColumn left, UInt16DataFrameColumn right) + { + return left.Divide(right); + } + } + public partial class SingleDataFrameColumn + { + public static SingleDataFrameColumn operator /(SingleDataFrameColumn left, ByteDataFrameColumn right) + { + return left.Divide(right); + } + public static DoubleDataFrameColumn operator /(SingleDataFrameColumn left, DoubleDataFrameColumn right) + { + return left.Divide(right); + } + public static SingleDataFrameColumn operator /(SingleDataFrameColumn left, SingleDataFrameColumn right) + { + return left.Divide(right); + } + public static SingleDataFrameColumn operator /(SingleDataFrameColumn left, Int32DataFrameColumn right) + { + return left.Divide(right); + } + public static SingleDataFrameColumn operator /(SingleDataFrameColumn left, Int64DataFrameColumn right) + { + return left.Divide(right); + } + public static SingleDataFrameColumn operator /(SingleDataFrameColumn left, SByteDataFrameColumn right) + { + return left.Divide(right); + } + public static SingleDataFrameColumn operator /(SingleDataFrameColumn left, Int16DataFrameColumn right) + { + return left.Divide(right); + } + public static SingleDataFrameColumn operator /(SingleDataFrameColumn left, UInt32DataFrameColumn right) + { + return left.Divide(right); + } + public static SingleDataFrameColumn operator /(SingleDataFrameColumn left, UInt64DataFrameColumn right) + { + return left.Divide(right); + } + public static SingleDataFrameColumn operator /(SingleDataFrameColumn left, UInt16DataFrameColumn right) + { + return left.Divide(right); + } + } + public partial class Int32DataFrameColumn + { + public static Int32DataFrameColumn operator /(Int32DataFrameColumn left, ByteDataFrameColumn right) + { + return left.Divide(right); + } + public static DecimalDataFrameColumn operator /(Int32DataFrameColumn left, DecimalDataFrameColumn right) + { + return left.Divide(right); + } + public static DoubleDataFrameColumn operator /(Int32DataFrameColumn left, DoubleDataFrameColumn right) + { + return left.Divide(right); + } + public static SingleDataFrameColumn operator /(Int32DataFrameColumn left, SingleDataFrameColumn right) + { + return left.Divide(right); + } + public static Int32DataFrameColumn operator /(Int32DataFrameColumn left, Int32DataFrameColumn right) + { + return left.Divide(right); + } + public static Int64DataFrameColumn operator /(Int32DataFrameColumn left, Int64DataFrameColumn right) + { + return left.Divide(right); + } + public static Int32DataFrameColumn operator /(Int32DataFrameColumn left, SByteDataFrameColumn right) + { + return left.Divide(right); + } + public static Int32DataFrameColumn operator /(Int32DataFrameColumn left, Int16DataFrameColumn right) + { + return left.Divide(right); + } + public static Int64DataFrameColumn operator /(Int32DataFrameColumn left, UInt32DataFrameColumn right) + { + return left.Divide(right); + } + public static SingleDataFrameColumn operator /(Int32DataFrameColumn left, UInt64DataFrameColumn right) + { + return left.Divide(right); + } + public static Int32DataFrameColumn operator /(Int32DataFrameColumn left, UInt16DataFrameColumn right) + { + return left.Divide(right); + } + } + public partial class Int64DataFrameColumn + { + public static Int64DataFrameColumn operator /(Int64DataFrameColumn left, ByteDataFrameColumn right) + { + return left.Divide(right); + } + public static DecimalDataFrameColumn operator /(Int64DataFrameColumn left, DecimalDataFrameColumn right) + { + return left.Divide(right); + } + public static DoubleDataFrameColumn operator /(Int64DataFrameColumn left, DoubleDataFrameColumn right) + { + return left.Divide(right); + } + public static SingleDataFrameColumn operator /(Int64DataFrameColumn left, SingleDataFrameColumn right) + { + return left.Divide(right); + } + public static Int64DataFrameColumn operator /(Int64DataFrameColumn left, Int32DataFrameColumn right) + { + return left.Divide(right); + } + public static Int64DataFrameColumn operator /(Int64DataFrameColumn left, Int64DataFrameColumn right) + { + return left.Divide(right); + } + public static Int64DataFrameColumn operator /(Int64DataFrameColumn left, SByteDataFrameColumn right) + { + return left.Divide(right); + } + public static Int64DataFrameColumn operator /(Int64DataFrameColumn left, Int16DataFrameColumn right) + { + return left.Divide(right); + } + public static Int64DataFrameColumn operator /(Int64DataFrameColumn left, UInt32DataFrameColumn right) + { + return left.Divide(right); + } + public static Int64DataFrameColumn operator /(Int64DataFrameColumn left, UInt16DataFrameColumn right) + { + return left.Divide(right); + } + } + public partial class SByteDataFrameColumn + { + public static Int32DataFrameColumn operator /(SByteDataFrameColumn left, ByteDataFrameColumn right) + { + return left.Divide(right); + } + public static DecimalDataFrameColumn operator /(SByteDataFrameColumn left, DecimalDataFrameColumn right) + { + return left.Divide(right); + } + public static DoubleDataFrameColumn operator /(SByteDataFrameColumn left, DoubleDataFrameColumn right) + { + return left.Divide(right); + } + public static SingleDataFrameColumn operator /(SByteDataFrameColumn left, SingleDataFrameColumn right) + { + return left.Divide(right); + } + public static Int32DataFrameColumn operator /(SByteDataFrameColumn left, Int32DataFrameColumn right) + { + return left.Divide(right); + } + public static Int64DataFrameColumn operator /(SByteDataFrameColumn left, Int64DataFrameColumn right) + { + return left.Divide(right); + } + public static Int32DataFrameColumn operator /(SByteDataFrameColumn left, SByteDataFrameColumn right) + { + return left.Divide(right); + } + public static Int32DataFrameColumn operator /(SByteDataFrameColumn left, Int16DataFrameColumn right) + { + return left.Divide(right); + } + public static Int64DataFrameColumn operator /(SByteDataFrameColumn left, UInt32DataFrameColumn right) + { + return left.Divide(right); + } + public static SingleDataFrameColumn operator /(SByteDataFrameColumn left, UInt64DataFrameColumn right) + { + return left.Divide(right); + } + public static Int32DataFrameColumn operator /(SByteDataFrameColumn left, UInt16DataFrameColumn right) + { + return left.Divide(right); + } + } + public partial class Int16DataFrameColumn + { + public static Int32DataFrameColumn operator /(Int16DataFrameColumn left, ByteDataFrameColumn right) + { + return left.Divide(right); + } + public static DecimalDataFrameColumn operator /(Int16DataFrameColumn left, DecimalDataFrameColumn right) + { + return left.Divide(right); + } + public static DoubleDataFrameColumn operator /(Int16DataFrameColumn left, DoubleDataFrameColumn right) + { + return left.Divide(right); + } + public static SingleDataFrameColumn operator /(Int16DataFrameColumn left, SingleDataFrameColumn right) + { + return left.Divide(right); + } + public static Int32DataFrameColumn operator /(Int16DataFrameColumn left, Int32DataFrameColumn right) + { + return left.Divide(right); + } + public static Int64DataFrameColumn operator /(Int16DataFrameColumn left, Int64DataFrameColumn right) + { + return left.Divide(right); + } + public static Int32DataFrameColumn operator /(Int16DataFrameColumn left, SByteDataFrameColumn right) + { + return left.Divide(right); + } + public static Int32DataFrameColumn operator /(Int16DataFrameColumn left, Int16DataFrameColumn right) + { + return left.Divide(right); + } + public static Int64DataFrameColumn operator /(Int16DataFrameColumn left, UInt32DataFrameColumn right) + { + return left.Divide(right); + } + public static SingleDataFrameColumn operator /(Int16DataFrameColumn left, UInt64DataFrameColumn right) + { + return left.Divide(right); + } + public static Int32DataFrameColumn operator /(Int16DataFrameColumn left, UInt16DataFrameColumn right) + { + return left.Divide(right); + } + } + public partial class UInt32DataFrameColumn + { + public static UInt32DataFrameColumn operator /(UInt32DataFrameColumn left, ByteDataFrameColumn right) + { + return left.Divide(right); + } + public static DecimalDataFrameColumn operator /(UInt32DataFrameColumn left, DecimalDataFrameColumn right) + { + return left.Divide(right); + } + public static DoubleDataFrameColumn operator /(UInt32DataFrameColumn left, DoubleDataFrameColumn right) + { + return left.Divide(right); + } + public static SingleDataFrameColumn operator /(UInt32DataFrameColumn left, SingleDataFrameColumn right) + { + return left.Divide(right); + } + public static Int64DataFrameColumn operator /(UInt32DataFrameColumn left, Int32DataFrameColumn right) + { + return left.Divide(right); + } + public static Int64DataFrameColumn operator /(UInt32DataFrameColumn left, Int64DataFrameColumn right) + { + return left.Divide(right); + } + public static Int64DataFrameColumn operator /(UInt32DataFrameColumn left, SByteDataFrameColumn right) + { + return left.Divide(right); + } + public static Int64DataFrameColumn operator /(UInt32DataFrameColumn left, Int16DataFrameColumn right) + { + return left.Divide(right); + } + public static UInt32DataFrameColumn operator /(UInt32DataFrameColumn left, UInt32DataFrameColumn right) + { + return left.Divide(right); + } + public static UInt64DataFrameColumn operator /(UInt32DataFrameColumn left, UInt64DataFrameColumn right) + { + return left.Divide(right); + } + public static UInt32DataFrameColumn operator /(UInt32DataFrameColumn left, UInt16DataFrameColumn right) + { + return left.Divide(right); + } + } + public partial class UInt64DataFrameColumn + { + public static UInt64DataFrameColumn operator /(UInt64DataFrameColumn left, ByteDataFrameColumn right) + { + return left.Divide(right); + } + public static DecimalDataFrameColumn operator /(UInt64DataFrameColumn left, DecimalDataFrameColumn right) + { + return left.Divide(right); + } + public static DoubleDataFrameColumn operator /(UInt64DataFrameColumn left, DoubleDataFrameColumn right) + { + return left.Divide(right); + } + public static SingleDataFrameColumn operator /(UInt64DataFrameColumn left, SingleDataFrameColumn right) + { + return left.Divide(right); + } + public static SingleDataFrameColumn operator /(UInt64DataFrameColumn left, Int32DataFrameColumn right) + { + return left.Divide(right); + } + public static SingleDataFrameColumn operator /(UInt64DataFrameColumn left, SByteDataFrameColumn right) + { + return left.Divide(right); + } + public static SingleDataFrameColumn operator /(UInt64DataFrameColumn left, Int16DataFrameColumn right) + { + return left.Divide(right); + } + public static UInt64DataFrameColumn operator /(UInt64DataFrameColumn left, UInt32DataFrameColumn right) + { + return left.Divide(right); + } + public static UInt64DataFrameColumn operator /(UInt64DataFrameColumn left, UInt64DataFrameColumn right) + { + return left.Divide(right); + } + public static UInt64DataFrameColumn operator /(UInt64DataFrameColumn left, UInt16DataFrameColumn right) + { + return left.Divide(right); + } + } + public partial class UInt16DataFrameColumn + { + public static Int32DataFrameColumn operator /(UInt16DataFrameColumn left, ByteDataFrameColumn right) + { + return left.Divide(right); + } + public static DecimalDataFrameColumn operator /(UInt16DataFrameColumn left, DecimalDataFrameColumn right) + { + return left.Divide(right); + } + public static DoubleDataFrameColumn operator /(UInt16DataFrameColumn left, DoubleDataFrameColumn right) + { + return left.Divide(right); + } + public static SingleDataFrameColumn operator /(UInt16DataFrameColumn left, SingleDataFrameColumn right) + { + return left.Divide(right); + } + public static Int32DataFrameColumn operator /(UInt16DataFrameColumn left, Int32DataFrameColumn right) + { + return left.Divide(right); + } + public static Int64DataFrameColumn operator /(UInt16DataFrameColumn left, Int64DataFrameColumn right) + { + return left.Divide(right); + } + public static Int32DataFrameColumn operator /(UInt16DataFrameColumn left, SByteDataFrameColumn right) + { + return left.Divide(right); + } + public static Int32DataFrameColumn operator /(UInt16DataFrameColumn left, Int16DataFrameColumn right) + { + return left.Divide(right); + } + public static UInt32DataFrameColumn operator /(UInt16DataFrameColumn left, UInt32DataFrameColumn right) + { + return left.Divide(right); + } + public static UInt64DataFrameColumn operator /(UInt16DataFrameColumn left, UInt64DataFrameColumn right) + { + return left.Divide(right); + } + public static Int32DataFrameColumn operator /(UInt16DataFrameColumn left, UInt16DataFrameColumn right) + { + return left.Divide(right); + } + } + public partial class ByteDataFrameColumn + { + public static Int32DataFrameColumn operator /(ByteDataFrameColumn left, byte right) + { + return left.Divide(right); + } + public static Int32DataFrameColumn operator /(byte left, ByteDataFrameColumn right) + { + return right.ReverseDivide(left); + } + public static DecimalDataFrameColumn operator /(ByteDataFrameColumn left, decimal right) + { + return left.Divide(right); + } + public static DecimalDataFrameColumn operator /(decimal left, ByteDataFrameColumn right) + { + return right.ReverseDivide(left); + } + public static DoubleDataFrameColumn operator /(ByteDataFrameColumn left, double right) + { + return left.Divide(right); + } + public static DoubleDataFrameColumn operator /(double left, ByteDataFrameColumn right) + { + return right.ReverseDivide(left); + } + public static SingleDataFrameColumn operator /(ByteDataFrameColumn left, float right) + { + return left.Divide(right); + } + public static SingleDataFrameColumn operator /(float left, ByteDataFrameColumn right) + { + return right.ReverseDivide(left); + } + public static Int32DataFrameColumn operator /(ByteDataFrameColumn left, int right) + { + return left.Divide(right); + } + public static Int32DataFrameColumn operator /(int left, ByteDataFrameColumn right) + { + return right.ReverseDivide(left); + } + public static Int64DataFrameColumn operator /(ByteDataFrameColumn left, long right) + { + return left.Divide(right); + } + public static Int64DataFrameColumn operator /(long left, ByteDataFrameColumn right) + { + return right.ReverseDivide(left); + } + public static Int32DataFrameColumn operator /(ByteDataFrameColumn left, sbyte right) + { + return left.Divide(right); + } + public static Int32DataFrameColumn operator /(sbyte left, ByteDataFrameColumn right) + { + return right.ReverseDivide(left); + } + public static Int32DataFrameColumn operator /(ByteDataFrameColumn left, short right) + { + return left.Divide(right); + } + public static Int32DataFrameColumn operator /(short left, ByteDataFrameColumn right) + { + return right.ReverseDivide(left); + } + public static UInt32DataFrameColumn operator /(ByteDataFrameColumn left, uint right) + { + return left.Divide(right); + } + public static UInt32DataFrameColumn operator /(uint left, ByteDataFrameColumn right) + { + return right.ReverseDivide(left); + } + public static UInt64DataFrameColumn operator /(ByteDataFrameColumn left, ulong right) + { + return left.Divide(right); + } + public static UInt64DataFrameColumn operator /(ulong left, ByteDataFrameColumn right) + { + return right.ReverseDivide(left); + } + public static Int32DataFrameColumn operator /(ByteDataFrameColumn left, ushort right) + { + return left.Divide(right); + } + public static Int32DataFrameColumn operator /(ushort left, ByteDataFrameColumn right) + { + return right.ReverseDivide(left); + } + } + public partial class DecimalDataFrameColumn + { + public static DecimalDataFrameColumn operator /(DecimalDataFrameColumn left, byte right) + { + return left.Divide(right); + } + public static DecimalDataFrameColumn operator /(byte left, DecimalDataFrameColumn right) + { + return right.ReverseDivide(left); + } + public static DecimalDataFrameColumn operator /(DecimalDataFrameColumn left, decimal right) + { + return left.Divide(right); + } + public static DecimalDataFrameColumn operator /(decimal left, DecimalDataFrameColumn right) + { + return right.ReverseDivide(left); + } + public static DecimalDataFrameColumn operator /(DecimalDataFrameColumn left, int right) + { + return left.Divide(right); + } + public static DecimalDataFrameColumn operator /(int left, DecimalDataFrameColumn right) + { + return right.ReverseDivide(left); + } + public static DecimalDataFrameColumn operator /(DecimalDataFrameColumn left, long right) + { + return left.Divide(right); + } + public static DecimalDataFrameColumn operator /(long left, DecimalDataFrameColumn right) + { + return right.ReverseDivide(left); + } + public static DecimalDataFrameColumn operator /(DecimalDataFrameColumn left, sbyte right) + { + return left.Divide(right); + } + public static DecimalDataFrameColumn operator /(sbyte left, DecimalDataFrameColumn right) + { + return right.ReverseDivide(left); + } + public static DecimalDataFrameColumn operator /(DecimalDataFrameColumn left, short right) + { + return left.Divide(right); + } + public static DecimalDataFrameColumn operator /(short left, DecimalDataFrameColumn right) + { + return right.ReverseDivide(left); + } + public static DecimalDataFrameColumn operator /(DecimalDataFrameColumn left, uint right) + { + return left.Divide(right); + } + public static DecimalDataFrameColumn operator /(uint left, DecimalDataFrameColumn right) + { + return right.ReverseDivide(left); + } + public static DecimalDataFrameColumn operator /(DecimalDataFrameColumn left, ulong right) + { + return left.Divide(right); + } + public static DecimalDataFrameColumn operator /(ulong left, DecimalDataFrameColumn right) + { + return right.ReverseDivide(left); + } + public static DecimalDataFrameColumn operator /(DecimalDataFrameColumn left, ushort right) + { + return left.Divide(right); + } + public static DecimalDataFrameColumn operator /(ushort left, DecimalDataFrameColumn right) + { + return right.ReverseDivide(left); + } + } + public partial class DoubleDataFrameColumn + { + public static DoubleDataFrameColumn operator /(DoubleDataFrameColumn left, byte right) + { + return left.Divide(right); + } + public static DoubleDataFrameColumn operator /(byte left, DoubleDataFrameColumn right) + { + return right.ReverseDivide(left); + } + public static DoubleDataFrameColumn operator /(DoubleDataFrameColumn left, double right) + { + return left.Divide(right); + } + public static DoubleDataFrameColumn operator /(double left, DoubleDataFrameColumn right) + { + return right.ReverseDivide(left); + } + public static DoubleDataFrameColumn operator /(DoubleDataFrameColumn left, float right) + { + return left.Divide(right); + } + public static DoubleDataFrameColumn operator /(float left, DoubleDataFrameColumn right) + { + return right.ReverseDivide(left); + } + public static DoubleDataFrameColumn operator /(DoubleDataFrameColumn left, int right) + { + return left.Divide(right); + } + public static DoubleDataFrameColumn operator /(int left, DoubleDataFrameColumn right) + { + return right.ReverseDivide(left); + } + public static DoubleDataFrameColumn operator /(DoubleDataFrameColumn left, long right) + { + return left.Divide(right); + } + public static DoubleDataFrameColumn operator /(long left, DoubleDataFrameColumn right) + { + return right.ReverseDivide(left); + } + public static DoubleDataFrameColumn operator /(DoubleDataFrameColumn left, sbyte right) + { + return left.Divide(right); + } + public static DoubleDataFrameColumn operator /(sbyte left, DoubleDataFrameColumn right) + { + return right.ReverseDivide(left); + } + public static DoubleDataFrameColumn operator /(DoubleDataFrameColumn left, short right) + { + return left.Divide(right); + } + public static DoubleDataFrameColumn operator /(short left, DoubleDataFrameColumn right) + { + return right.ReverseDivide(left); + } + public static DoubleDataFrameColumn operator /(DoubleDataFrameColumn left, uint right) + { + return left.Divide(right); + } + public static DoubleDataFrameColumn operator /(uint left, DoubleDataFrameColumn right) + { + return right.ReverseDivide(left); + } + public static DoubleDataFrameColumn operator /(DoubleDataFrameColumn left, ulong right) + { + return left.Divide(right); + } + public static DoubleDataFrameColumn operator /(ulong left, DoubleDataFrameColumn right) + { + return right.ReverseDivide(left); + } + public static DoubleDataFrameColumn operator /(DoubleDataFrameColumn left, ushort right) + { + return left.Divide(right); + } + public static DoubleDataFrameColumn operator /(ushort left, DoubleDataFrameColumn right) + { + return right.ReverseDivide(left); + } + } + public partial class SingleDataFrameColumn + { + public static SingleDataFrameColumn operator /(SingleDataFrameColumn left, byte right) + { + return left.Divide(right); + } + public static SingleDataFrameColumn operator /(byte left, SingleDataFrameColumn right) + { + return right.ReverseDivide(left); + } + public static DoubleDataFrameColumn operator /(SingleDataFrameColumn left, double right) + { + return left.Divide(right); + } + public static DoubleDataFrameColumn operator /(double left, SingleDataFrameColumn right) + { + return right.ReverseDivide(left); + } + public static SingleDataFrameColumn operator /(SingleDataFrameColumn left, float right) + { + return left.Divide(right); + } + public static SingleDataFrameColumn operator /(float left, SingleDataFrameColumn right) + { + return right.ReverseDivide(left); + } + public static SingleDataFrameColumn operator /(SingleDataFrameColumn left, int right) + { + return left.Divide(right); + } + public static SingleDataFrameColumn operator /(int left, SingleDataFrameColumn right) + { + return right.ReverseDivide(left); + } + public static SingleDataFrameColumn operator /(SingleDataFrameColumn left, long right) + { + return left.Divide(right); + } + public static SingleDataFrameColumn operator /(long left, SingleDataFrameColumn right) + { + return right.ReverseDivide(left); + } + public static SingleDataFrameColumn operator /(SingleDataFrameColumn left, sbyte right) + { + return left.Divide(right); + } + public static SingleDataFrameColumn operator /(sbyte left, SingleDataFrameColumn right) + { + return right.ReverseDivide(left); + } + public static SingleDataFrameColumn operator /(SingleDataFrameColumn left, short right) + { + return left.Divide(right); + } + public static SingleDataFrameColumn operator /(short left, SingleDataFrameColumn right) + { + return right.ReverseDivide(left); + } + public static SingleDataFrameColumn operator /(SingleDataFrameColumn left, uint right) + { + return left.Divide(right); + } + public static SingleDataFrameColumn operator /(uint left, SingleDataFrameColumn right) + { + return right.ReverseDivide(left); + } + public static SingleDataFrameColumn operator /(SingleDataFrameColumn left, ulong right) + { + return left.Divide(right); + } + public static SingleDataFrameColumn operator /(ulong left, SingleDataFrameColumn right) + { + return right.ReverseDivide(left); + } + public static SingleDataFrameColumn operator /(SingleDataFrameColumn left, ushort right) + { + return left.Divide(right); + } + public static SingleDataFrameColumn operator /(ushort left, SingleDataFrameColumn right) + { + return right.ReverseDivide(left); + } + } + public partial class Int32DataFrameColumn + { + public static Int32DataFrameColumn operator /(Int32DataFrameColumn left, byte right) + { + return left.Divide(right); + } + public static Int32DataFrameColumn operator /(byte left, Int32DataFrameColumn right) + { + return right.ReverseDivide(left); + } + public static DecimalDataFrameColumn operator /(Int32DataFrameColumn left, decimal right) + { + return left.Divide(right); + } + public static DecimalDataFrameColumn operator /(decimal left, Int32DataFrameColumn right) + { + return right.ReverseDivide(left); + } + public static DoubleDataFrameColumn operator /(Int32DataFrameColumn left, double right) + { + return left.Divide(right); + } + public static DoubleDataFrameColumn operator /(double left, Int32DataFrameColumn right) + { + return right.ReverseDivide(left); + } + public static SingleDataFrameColumn operator /(Int32DataFrameColumn left, float right) + { + return left.Divide(right); + } + public static SingleDataFrameColumn operator /(float left, Int32DataFrameColumn right) + { + return right.ReverseDivide(left); + } + public static Int32DataFrameColumn operator /(Int32DataFrameColumn left, int right) + { + return left.Divide(right); + } + public static Int32DataFrameColumn operator /(int left, Int32DataFrameColumn right) + { + return right.ReverseDivide(left); + } + public static Int64DataFrameColumn operator /(Int32DataFrameColumn left, long right) + { + return left.Divide(right); + } + public static Int64DataFrameColumn operator /(long left, Int32DataFrameColumn right) + { + return right.ReverseDivide(left); + } + public static Int32DataFrameColumn operator /(Int32DataFrameColumn left, sbyte right) + { + return left.Divide(right); + } + public static Int32DataFrameColumn operator /(sbyte left, Int32DataFrameColumn right) + { + return right.ReverseDivide(left); + } + public static Int32DataFrameColumn operator /(Int32DataFrameColumn left, short right) + { + return left.Divide(right); + } + public static Int32DataFrameColumn operator /(short left, Int32DataFrameColumn right) + { + return right.ReverseDivide(left); + } + public static Int64DataFrameColumn operator /(Int32DataFrameColumn left, uint right) + { + return left.Divide(right); + } + public static Int64DataFrameColumn operator /(uint left, Int32DataFrameColumn right) + { + return right.ReverseDivide(left); + } + public static SingleDataFrameColumn operator /(Int32DataFrameColumn left, ulong right) + { + return left.Divide(right); + } + public static SingleDataFrameColumn operator /(ulong left, Int32DataFrameColumn right) + { + return right.ReverseDivide(left); + } + public static Int32DataFrameColumn operator /(Int32DataFrameColumn left, ushort right) + { + return left.Divide(right); + } + public static Int32DataFrameColumn operator /(ushort left, Int32DataFrameColumn right) + { + return right.ReverseDivide(left); + } + } + public partial class Int64DataFrameColumn + { + public static Int64DataFrameColumn operator /(Int64DataFrameColumn left, byte right) + { + return left.Divide(right); + } + public static Int64DataFrameColumn operator /(byte left, Int64DataFrameColumn right) + { + return right.ReverseDivide(left); + } + public static DecimalDataFrameColumn operator /(Int64DataFrameColumn left, decimal right) + { + return left.Divide(right); + } + public static DecimalDataFrameColumn operator /(decimal left, Int64DataFrameColumn right) + { + return right.ReverseDivide(left); + } + public static DoubleDataFrameColumn operator /(Int64DataFrameColumn left, double right) + { + return left.Divide(right); + } + public static DoubleDataFrameColumn operator /(double left, Int64DataFrameColumn right) + { + return right.ReverseDivide(left); + } + public static SingleDataFrameColumn operator /(Int64DataFrameColumn left, float right) + { + return left.Divide(right); + } + public static SingleDataFrameColumn operator /(float left, Int64DataFrameColumn right) + { + return right.ReverseDivide(left); + } + public static Int64DataFrameColumn operator /(Int64DataFrameColumn left, int right) + { + return left.Divide(right); + } + public static Int64DataFrameColumn operator /(int left, Int64DataFrameColumn right) + { + return right.ReverseDivide(left); + } + public static Int64DataFrameColumn operator /(Int64DataFrameColumn left, long right) + { + return left.Divide(right); + } + public static Int64DataFrameColumn operator /(long left, Int64DataFrameColumn right) + { + return right.ReverseDivide(left); + } + public static Int64DataFrameColumn operator /(Int64DataFrameColumn left, sbyte right) + { + return left.Divide(right); + } + public static Int64DataFrameColumn operator /(sbyte left, Int64DataFrameColumn right) + { + return right.ReverseDivide(left); + } + public static Int64DataFrameColumn operator /(Int64DataFrameColumn left, short right) + { + return left.Divide(right); + } + public static Int64DataFrameColumn operator /(short left, Int64DataFrameColumn right) + { + return right.ReverseDivide(left); + } + public static Int64DataFrameColumn operator /(Int64DataFrameColumn left, uint right) + { + return left.Divide(right); + } + public static Int64DataFrameColumn operator /(uint left, Int64DataFrameColumn right) + { + return right.ReverseDivide(left); + } + public static Int64DataFrameColumn operator /(Int64DataFrameColumn left, ushort right) + { + return left.Divide(right); + } + public static Int64DataFrameColumn operator /(ushort left, Int64DataFrameColumn right) + { + return right.ReverseDivide(left); + } + } + public partial class SByteDataFrameColumn + { + public static Int32DataFrameColumn operator /(SByteDataFrameColumn left, byte right) + { + return left.Divide(right); + } + public static Int32DataFrameColumn operator /(byte left, SByteDataFrameColumn right) + { + return right.ReverseDivide(left); + } + public static DecimalDataFrameColumn operator /(SByteDataFrameColumn left, decimal right) + { + return left.Divide(right); + } + public static DecimalDataFrameColumn operator /(decimal left, SByteDataFrameColumn right) + { + return right.ReverseDivide(left); + } + public static DoubleDataFrameColumn operator /(SByteDataFrameColumn left, double right) + { + return left.Divide(right); + } + public static DoubleDataFrameColumn operator /(double left, SByteDataFrameColumn right) + { + return right.ReverseDivide(left); + } + public static SingleDataFrameColumn operator /(SByteDataFrameColumn left, float right) + { + return left.Divide(right); + } + public static SingleDataFrameColumn operator /(float left, SByteDataFrameColumn right) + { + return right.ReverseDivide(left); + } + public static Int32DataFrameColumn operator /(SByteDataFrameColumn left, int right) + { + return left.Divide(right); + } + public static Int32DataFrameColumn operator /(int left, SByteDataFrameColumn right) + { + return right.ReverseDivide(left); + } + public static Int64DataFrameColumn operator /(SByteDataFrameColumn left, long right) + { + return left.Divide(right); + } + public static Int64DataFrameColumn operator /(long left, SByteDataFrameColumn right) + { + return right.ReverseDivide(left); + } + public static Int32DataFrameColumn operator /(SByteDataFrameColumn left, sbyte right) + { + return left.Divide(right); + } + public static Int32DataFrameColumn operator /(sbyte left, SByteDataFrameColumn right) + { + return right.ReverseDivide(left); + } + public static Int32DataFrameColumn operator /(SByteDataFrameColumn left, short right) + { + return left.Divide(right); + } + public static Int32DataFrameColumn operator /(short left, SByteDataFrameColumn right) + { + return right.ReverseDivide(left); + } + public static Int64DataFrameColumn operator /(SByteDataFrameColumn left, uint right) + { + return left.Divide(right); + } + public static Int64DataFrameColumn operator /(uint left, SByteDataFrameColumn right) + { + return right.ReverseDivide(left); + } + public static SingleDataFrameColumn operator /(SByteDataFrameColumn left, ulong right) + { + return left.Divide(right); + } + public static SingleDataFrameColumn operator /(ulong left, SByteDataFrameColumn right) + { + return right.ReverseDivide(left); + } + public static Int32DataFrameColumn operator /(SByteDataFrameColumn left, ushort right) + { + return left.Divide(right); + } + public static Int32DataFrameColumn operator /(ushort left, SByteDataFrameColumn right) + { + return right.ReverseDivide(left); + } + } + public partial class Int16DataFrameColumn + { + public static Int32DataFrameColumn operator /(Int16DataFrameColumn left, byte right) + { + return left.Divide(right); + } + public static Int32DataFrameColumn operator /(byte left, Int16DataFrameColumn right) + { + return right.ReverseDivide(left); + } + public static DecimalDataFrameColumn operator /(Int16DataFrameColumn left, decimal right) + { + return left.Divide(right); + } + public static DecimalDataFrameColumn operator /(decimal left, Int16DataFrameColumn right) + { + return right.ReverseDivide(left); + } + public static DoubleDataFrameColumn operator /(Int16DataFrameColumn left, double right) + { + return left.Divide(right); + } + public static DoubleDataFrameColumn operator /(double left, Int16DataFrameColumn right) + { + return right.ReverseDivide(left); + } + public static SingleDataFrameColumn operator /(Int16DataFrameColumn left, float right) + { + return left.Divide(right); + } + public static SingleDataFrameColumn operator /(float left, Int16DataFrameColumn right) + { + return right.ReverseDivide(left); + } + public static Int32DataFrameColumn operator /(Int16DataFrameColumn left, int right) + { + return left.Divide(right); + } + public static Int32DataFrameColumn operator /(int left, Int16DataFrameColumn right) + { + return right.ReverseDivide(left); + } + public static Int64DataFrameColumn operator /(Int16DataFrameColumn left, long right) + { + return left.Divide(right); + } + public static Int64DataFrameColumn operator /(long left, Int16DataFrameColumn right) + { + return right.ReverseDivide(left); + } + public static Int32DataFrameColumn operator /(Int16DataFrameColumn left, sbyte right) + { + return left.Divide(right); + } + public static Int32DataFrameColumn operator /(sbyte left, Int16DataFrameColumn right) + { + return right.ReverseDivide(left); + } + public static Int32DataFrameColumn operator /(Int16DataFrameColumn left, short right) + { + return left.Divide(right); + } + public static Int32DataFrameColumn operator /(short left, Int16DataFrameColumn right) + { + return right.ReverseDivide(left); + } + public static Int64DataFrameColumn operator /(Int16DataFrameColumn left, uint right) + { + return left.Divide(right); + } + public static Int64DataFrameColumn operator /(uint left, Int16DataFrameColumn right) + { + return right.ReverseDivide(left); + } + public static SingleDataFrameColumn operator /(Int16DataFrameColumn left, ulong right) + { + return left.Divide(right); + } + public static SingleDataFrameColumn operator /(ulong left, Int16DataFrameColumn right) + { + return right.ReverseDivide(left); + } + public static Int32DataFrameColumn operator /(Int16DataFrameColumn left, ushort right) + { + return left.Divide(right); + } + public static Int32DataFrameColumn operator /(ushort left, Int16DataFrameColumn right) + { + return right.ReverseDivide(left); + } + } + public partial class UInt32DataFrameColumn + { + public static UInt32DataFrameColumn operator /(UInt32DataFrameColumn left, byte right) + { + return left.Divide(right); + } + public static UInt32DataFrameColumn operator /(byte left, UInt32DataFrameColumn right) + { + return right.ReverseDivide(left); + } + public static DecimalDataFrameColumn operator /(UInt32DataFrameColumn left, decimal right) + { + return left.Divide(right); + } + public static DecimalDataFrameColumn operator /(decimal left, UInt32DataFrameColumn right) + { + return right.ReverseDivide(left); + } + public static DoubleDataFrameColumn operator /(UInt32DataFrameColumn left, double right) + { + return left.Divide(right); + } + public static DoubleDataFrameColumn operator /(double left, UInt32DataFrameColumn right) + { + return right.ReverseDivide(left); + } + public static SingleDataFrameColumn operator /(UInt32DataFrameColumn left, float right) + { + return left.Divide(right); + } + public static SingleDataFrameColumn operator /(float left, UInt32DataFrameColumn right) + { + return right.ReverseDivide(left); + } + public static Int64DataFrameColumn operator /(UInt32DataFrameColumn left, int right) + { + return left.Divide(right); + } + public static Int64DataFrameColumn operator /(int left, UInt32DataFrameColumn right) + { + return right.ReverseDivide(left); + } + public static Int64DataFrameColumn operator /(UInt32DataFrameColumn left, long right) + { + return left.Divide(right); + } + public static Int64DataFrameColumn operator /(long left, UInt32DataFrameColumn right) + { + return right.ReverseDivide(left); + } + public static Int64DataFrameColumn operator /(UInt32DataFrameColumn left, sbyte right) + { + return left.Divide(right); + } + public static Int64DataFrameColumn operator /(sbyte left, UInt32DataFrameColumn right) + { + return right.ReverseDivide(left); + } + public static Int64DataFrameColumn operator /(UInt32DataFrameColumn left, short right) + { + return left.Divide(right); + } + public static Int64DataFrameColumn operator /(short left, UInt32DataFrameColumn right) + { + return right.ReverseDivide(left); + } + public static UInt32DataFrameColumn operator /(UInt32DataFrameColumn left, uint right) + { + return left.Divide(right); + } + public static UInt32DataFrameColumn operator /(uint left, UInt32DataFrameColumn right) + { + return right.ReverseDivide(left); + } + public static UInt64DataFrameColumn operator /(UInt32DataFrameColumn left, ulong right) + { + return left.Divide(right); + } + public static UInt64DataFrameColumn operator /(ulong left, UInt32DataFrameColumn right) + { + return right.ReverseDivide(left); + } + public static UInt32DataFrameColumn operator /(UInt32DataFrameColumn left, ushort right) + { + return left.Divide(right); + } + public static UInt32DataFrameColumn operator /(ushort left, UInt32DataFrameColumn right) + { + return right.ReverseDivide(left); + } + } + public partial class UInt64DataFrameColumn + { + public static UInt64DataFrameColumn operator /(UInt64DataFrameColumn left, byte right) + { + return left.Divide(right); + } + public static UInt64DataFrameColumn operator /(byte left, UInt64DataFrameColumn right) + { + return right.ReverseDivide(left); + } + public static DecimalDataFrameColumn operator /(UInt64DataFrameColumn left, decimal right) + { + return left.Divide(right); + } + public static DecimalDataFrameColumn operator /(decimal left, UInt64DataFrameColumn right) + { + return right.ReverseDivide(left); + } + public static DoubleDataFrameColumn operator /(UInt64DataFrameColumn left, double right) + { + return left.Divide(right); + } + public static DoubleDataFrameColumn operator /(double left, UInt64DataFrameColumn right) + { + return right.ReverseDivide(left); + } + public static SingleDataFrameColumn operator /(UInt64DataFrameColumn left, float right) + { + return left.Divide(right); + } + public static SingleDataFrameColumn operator /(float left, UInt64DataFrameColumn right) + { + return right.ReverseDivide(left); + } + public static SingleDataFrameColumn operator /(UInt64DataFrameColumn left, int right) + { + return left.Divide(right); + } + public static SingleDataFrameColumn operator /(int left, UInt64DataFrameColumn right) + { + return right.ReverseDivide(left); + } + public static SingleDataFrameColumn operator /(UInt64DataFrameColumn left, sbyte right) + { + return left.Divide(right); + } + public static SingleDataFrameColumn operator /(sbyte left, UInt64DataFrameColumn right) + { + return right.ReverseDivide(left); + } + public static SingleDataFrameColumn operator /(UInt64DataFrameColumn left, short right) + { + return left.Divide(right); + } + public static SingleDataFrameColumn operator /(short left, UInt64DataFrameColumn right) + { + return right.ReverseDivide(left); + } + public static UInt64DataFrameColumn operator /(UInt64DataFrameColumn left, uint right) + { + return left.Divide(right); + } + public static UInt64DataFrameColumn operator /(uint left, UInt64DataFrameColumn right) + { + return right.ReverseDivide(left); + } + public static UInt64DataFrameColumn operator /(UInt64DataFrameColumn left, ulong right) + { + return left.Divide(right); + } + public static UInt64DataFrameColumn operator /(ulong left, UInt64DataFrameColumn right) + { + return right.ReverseDivide(left); + } + public static UInt64DataFrameColumn operator /(UInt64DataFrameColumn left, ushort right) + { + return left.Divide(right); + } + public static UInt64DataFrameColumn operator /(ushort left, UInt64DataFrameColumn right) + { + return right.ReverseDivide(left); + } + } + public partial class UInt16DataFrameColumn + { + public static Int32DataFrameColumn operator /(UInt16DataFrameColumn left, byte right) + { + return left.Divide(right); + } + public static Int32DataFrameColumn operator /(byte left, UInt16DataFrameColumn right) + { + return right.ReverseDivide(left); + } + public static DecimalDataFrameColumn operator /(UInt16DataFrameColumn left, decimal right) + { + return left.Divide(right); + } + public static DecimalDataFrameColumn operator /(decimal left, UInt16DataFrameColumn right) + { + return right.ReverseDivide(left); + } + public static DoubleDataFrameColumn operator /(UInt16DataFrameColumn left, double right) + { + return left.Divide(right); + } + public static DoubleDataFrameColumn operator /(double left, UInt16DataFrameColumn right) + { + return right.ReverseDivide(left); + } + public static SingleDataFrameColumn operator /(UInt16DataFrameColumn left, float right) + { + return left.Divide(right); + } + public static SingleDataFrameColumn operator /(float left, UInt16DataFrameColumn right) + { + return right.ReverseDivide(left); + } + public static Int32DataFrameColumn operator /(UInt16DataFrameColumn left, int right) + { + return left.Divide(right); + } + public static Int32DataFrameColumn operator /(int left, UInt16DataFrameColumn right) + { + return right.ReverseDivide(left); + } + public static Int64DataFrameColumn operator /(UInt16DataFrameColumn left, long right) + { + return left.Divide(right); + } + public static Int64DataFrameColumn operator /(long left, UInt16DataFrameColumn right) + { + return right.ReverseDivide(left); + } + public static Int32DataFrameColumn operator /(UInt16DataFrameColumn left, sbyte right) + { + return left.Divide(right); + } + public static Int32DataFrameColumn operator /(sbyte left, UInt16DataFrameColumn right) + { + return right.ReverseDivide(left); + } + public static Int32DataFrameColumn operator /(UInt16DataFrameColumn left, short right) + { + return left.Divide(right); + } + public static Int32DataFrameColumn operator /(short left, UInt16DataFrameColumn right) + { + return right.ReverseDivide(left); + } + public static UInt32DataFrameColumn operator /(UInt16DataFrameColumn left, uint right) + { + return left.Divide(right); + } + public static UInt32DataFrameColumn operator /(uint left, UInt16DataFrameColumn right) + { + return right.ReverseDivide(left); + } + public static UInt64DataFrameColumn operator /(UInt16DataFrameColumn left, ulong right) + { + return left.Divide(right); + } + public static UInt64DataFrameColumn operator /(ulong left, UInt16DataFrameColumn right) + { + return right.ReverseDivide(left); + } + public static Int32DataFrameColumn operator /(UInt16DataFrameColumn left, ushort right) + { + return left.Divide(right); + } + public static Int32DataFrameColumn operator /(ushort left, UInt16DataFrameColumn right) + { + return right.ReverseDivide(left); + } + } + public partial class ByteDataFrameColumn + { + public static Int32DataFrameColumn operator %(ByteDataFrameColumn left, ByteDataFrameColumn right) + { + return left.Modulo(right); + } + public static DecimalDataFrameColumn operator %(ByteDataFrameColumn left, DecimalDataFrameColumn right) + { + return left.Modulo(right); + } + public static DoubleDataFrameColumn operator %(ByteDataFrameColumn left, DoubleDataFrameColumn right) + { + return left.Modulo(right); + } + public static SingleDataFrameColumn operator %(ByteDataFrameColumn left, SingleDataFrameColumn right) + { + return left.Modulo(right); + } + public static Int32DataFrameColumn operator %(ByteDataFrameColumn left, Int32DataFrameColumn right) + { + return left.Modulo(right); + } + public static Int64DataFrameColumn operator %(ByteDataFrameColumn left, Int64DataFrameColumn right) + { + return left.Modulo(right); + } + public static Int32DataFrameColumn operator %(ByteDataFrameColumn left, SByteDataFrameColumn right) + { + return left.Modulo(right); + } + public static Int32DataFrameColumn operator %(ByteDataFrameColumn left, Int16DataFrameColumn right) + { + return left.Modulo(right); + } + public static UInt32DataFrameColumn operator %(ByteDataFrameColumn left, UInt32DataFrameColumn right) + { + return left.Modulo(right); + } + public static UInt64DataFrameColumn operator %(ByteDataFrameColumn left, UInt64DataFrameColumn right) + { + return left.Modulo(right); + } + public static Int32DataFrameColumn operator %(ByteDataFrameColumn left, UInt16DataFrameColumn right) + { + return left.Modulo(right); + } + } + public partial class DecimalDataFrameColumn + { + public static DecimalDataFrameColumn operator %(DecimalDataFrameColumn left, ByteDataFrameColumn right) + { + return left.Modulo(right); + } + public static DecimalDataFrameColumn operator %(DecimalDataFrameColumn left, DecimalDataFrameColumn right) + { + return left.Modulo(right); + } + public static DecimalDataFrameColumn operator %(DecimalDataFrameColumn left, Int32DataFrameColumn right) + { + return left.Modulo(right); + } + public static DecimalDataFrameColumn operator %(DecimalDataFrameColumn left, Int64DataFrameColumn right) + { + return left.Modulo(right); + } + public static DecimalDataFrameColumn operator %(DecimalDataFrameColumn left, SByteDataFrameColumn right) + { + return left.Modulo(right); + } + public static DecimalDataFrameColumn operator %(DecimalDataFrameColumn left, Int16DataFrameColumn right) + { + return left.Modulo(right); + } + public static DecimalDataFrameColumn operator %(DecimalDataFrameColumn left, UInt32DataFrameColumn right) + { + return left.Modulo(right); + } + public static DecimalDataFrameColumn operator %(DecimalDataFrameColumn left, UInt64DataFrameColumn right) + { + return left.Modulo(right); + } + public static DecimalDataFrameColumn operator %(DecimalDataFrameColumn left, UInt16DataFrameColumn right) + { + return left.Modulo(right); + } + } + public partial class DoubleDataFrameColumn + { + public static DoubleDataFrameColumn operator %(DoubleDataFrameColumn left, ByteDataFrameColumn right) + { + return left.Modulo(right); + } + public static DoubleDataFrameColumn operator %(DoubleDataFrameColumn left, DoubleDataFrameColumn right) + { + return left.Modulo(right); + } + public static DoubleDataFrameColumn operator %(DoubleDataFrameColumn left, SingleDataFrameColumn right) + { + return left.Modulo(right); + } + public static DoubleDataFrameColumn operator %(DoubleDataFrameColumn left, Int32DataFrameColumn right) + { + return left.Modulo(right); + } + public static DoubleDataFrameColumn operator %(DoubleDataFrameColumn left, Int64DataFrameColumn right) + { + return left.Modulo(right); + } + public static DoubleDataFrameColumn operator %(DoubleDataFrameColumn left, SByteDataFrameColumn right) + { + return left.Modulo(right); + } + public static DoubleDataFrameColumn operator %(DoubleDataFrameColumn left, Int16DataFrameColumn right) + { + return left.Modulo(right); + } + public static DoubleDataFrameColumn operator %(DoubleDataFrameColumn left, UInt32DataFrameColumn right) + { + return left.Modulo(right); + } + public static DoubleDataFrameColumn operator %(DoubleDataFrameColumn left, UInt64DataFrameColumn right) + { + return left.Modulo(right); + } + public static DoubleDataFrameColumn operator %(DoubleDataFrameColumn left, UInt16DataFrameColumn right) + { + return left.Modulo(right); + } + } + public partial class SingleDataFrameColumn + { + public static SingleDataFrameColumn operator %(SingleDataFrameColumn left, ByteDataFrameColumn right) + { + return left.Modulo(right); + } + public static DoubleDataFrameColumn operator %(SingleDataFrameColumn left, DoubleDataFrameColumn right) + { + return left.Modulo(right); + } + public static SingleDataFrameColumn operator %(SingleDataFrameColumn left, SingleDataFrameColumn right) + { + return left.Modulo(right); + } + public static SingleDataFrameColumn operator %(SingleDataFrameColumn left, Int32DataFrameColumn right) + { + return left.Modulo(right); + } + public static SingleDataFrameColumn operator %(SingleDataFrameColumn left, Int64DataFrameColumn right) + { + return left.Modulo(right); + } + public static SingleDataFrameColumn operator %(SingleDataFrameColumn left, SByteDataFrameColumn right) + { + return left.Modulo(right); + } + public static SingleDataFrameColumn operator %(SingleDataFrameColumn left, Int16DataFrameColumn right) + { + return left.Modulo(right); + } + public static SingleDataFrameColumn operator %(SingleDataFrameColumn left, UInt32DataFrameColumn right) + { + return left.Modulo(right); + } + public static SingleDataFrameColumn operator %(SingleDataFrameColumn left, UInt64DataFrameColumn right) + { + return left.Modulo(right); + } + public static SingleDataFrameColumn operator %(SingleDataFrameColumn left, UInt16DataFrameColumn right) + { + return left.Modulo(right); + } + } + public partial class Int32DataFrameColumn + { + public static Int32DataFrameColumn operator %(Int32DataFrameColumn left, ByteDataFrameColumn right) + { + return left.Modulo(right); + } + public static DecimalDataFrameColumn operator %(Int32DataFrameColumn left, DecimalDataFrameColumn right) + { + return left.Modulo(right); + } + public static DoubleDataFrameColumn operator %(Int32DataFrameColumn left, DoubleDataFrameColumn right) + { + return left.Modulo(right); + } + public static SingleDataFrameColumn operator %(Int32DataFrameColumn left, SingleDataFrameColumn right) + { + return left.Modulo(right); + } + public static Int32DataFrameColumn operator %(Int32DataFrameColumn left, Int32DataFrameColumn right) + { + return left.Modulo(right); + } + public static Int64DataFrameColumn operator %(Int32DataFrameColumn left, Int64DataFrameColumn right) + { + return left.Modulo(right); + } + public static Int32DataFrameColumn operator %(Int32DataFrameColumn left, SByteDataFrameColumn right) + { + return left.Modulo(right); + } + public static Int32DataFrameColumn operator %(Int32DataFrameColumn left, Int16DataFrameColumn right) + { + return left.Modulo(right); + } + public static Int64DataFrameColumn operator %(Int32DataFrameColumn left, UInt32DataFrameColumn right) + { + return left.Modulo(right); + } + public static SingleDataFrameColumn operator %(Int32DataFrameColumn left, UInt64DataFrameColumn right) + { + return left.Modulo(right); + } + public static Int32DataFrameColumn operator %(Int32DataFrameColumn left, UInt16DataFrameColumn right) + { + return left.Modulo(right); + } + } + public partial class Int64DataFrameColumn + { + public static Int64DataFrameColumn operator %(Int64DataFrameColumn left, ByteDataFrameColumn right) + { + return left.Modulo(right); + } + public static DecimalDataFrameColumn operator %(Int64DataFrameColumn left, DecimalDataFrameColumn right) + { + return left.Modulo(right); + } + public static DoubleDataFrameColumn operator %(Int64DataFrameColumn left, DoubleDataFrameColumn right) + { + return left.Modulo(right); + } + public static SingleDataFrameColumn operator %(Int64DataFrameColumn left, SingleDataFrameColumn right) + { + return left.Modulo(right); + } + public static Int64DataFrameColumn operator %(Int64DataFrameColumn left, Int32DataFrameColumn right) + { + return left.Modulo(right); + } + public static Int64DataFrameColumn operator %(Int64DataFrameColumn left, Int64DataFrameColumn right) + { + return left.Modulo(right); + } + public static Int64DataFrameColumn operator %(Int64DataFrameColumn left, SByteDataFrameColumn right) + { + return left.Modulo(right); + } + public static Int64DataFrameColumn operator %(Int64DataFrameColumn left, Int16DataFrameColumn right) + { + return left.Modulo(right); + } + public static Int64DataFrameColumn operator %(Int64DataFrameColumn left, UInt32DataFrameColumn right) + { + return left.Modulo(right); + } + public static Int64DataFrameColumn operator %(Int64DataFrameColumn left, UInt16DataFrameColumn right) + { + return left.Modulo(right); + } + } + public partial class SByteDataFrameColumn + { + public static Int32DataFrameColumn operator %(SByteDataFrameColumn left, ByteDataFrameColumn right) + { + return left.Modulo(right); + } + public static DecimalDataFrameColumn operator %(SByteDataFrameColumn left, DecimalDataFrameColumn right) + { + return left.Modulo(right); + } + public static DoubleDataFrameColumn operator %(SByteDataFrameColumn left, DoubleDataFrameColumn right) + { + return left.Modulo(right); + } + public static SingleDataFrameColumn operator %(SByteDataFrameColumn left, SingleDataFrameColumn right) + { + return left.Modulo(right); + } + public static Int32DataFrameColumn operator %(SByteDataFrameColumn left, Int32DataFrameColumn right) + { + return left.Modulo(right); + } + public static Int64DataFrameColumn operator %(SByteDataFrameColumn left, Int64DataFrameColumn right) + { + return left.Modulo(right); + } + public static Int32DataFrameColumn operator %(SByteDataFrameColumn left, SByteDataFrameColumn right) + { + return left.Modulo(right); + } + public static Int32DataFrameColumn operator %(SByteDataFrameColumn left, Int16DataFrameColumn right) + { + return left.Modulo(right); + } + public static Int64DataFrameColumn operator %(SByteDataFrameColumn left, UInt32DataFrameColumn right) + { + return left.Modulo(right); + } + public static SingleDataFrameColumn operator %(SByteDataFrameColumn left, UInt64DataFrameColumn right) + { + return left.Modulo(right); + } + public static Int32DataFrameColumn operator %(SByteDataFrameColumn left, UInt16DataFrameColumn right) + { + return left.Modulo(right); + } + } + public partial class Int16DataFrameColumn + { + public static Int32DataFrameColumn operator %(Int16DataFrameColumn left, ByteDataFrameColumn right) + { + return left.Modulo(right); + } + public static DecimalDataFrameColumn operator %(Int16DataFrameColumn left, DecimalDataFrameColumn right) + { + return left.Modulo(right); + } + public static DoubleDataFrameColumn operator %(Int16DataFrameColumn left, DoubleDataFrameColumn right) + { + return left.Modulo(right); + } + public static SingleDataFrameColumn operator %(Int16DataFrameColumn left, SingleDataFrameColumn right) + { + return left.Modulo(right); + } + public static Int32DataFrameColumn operator %(Int16DataFrameColumn left, Int32DataFrameColumn right) + { + return left.Modulo(right); + } + public static Int64DataFrameColumn operator %(Int16DataFrameColumn left, Int64DataFrameColumn right) + { + return left.Modulo(right); + } + public static Int32DataFrameColumn operator %(Int16DataFrameColumn left, SByteDataFrameColumn right) + { + return left.Modulo(right); + } + public static Int32DataFrameColumn operator %(Int16DataFrameColumn left, Int16DataFrameColumn right) + { + return left.Modulo(right); + } + public static Int64DataFrameColumn operator %(Int16DataFrameColumn left, UInt32DataFrameColumn right) + { + return left.Modulo(right); + } + public static SingleDataFrameColumn operator %(Int16DataFrameColumn left, UInt64DataFrameColumn right) + { + return left.Modulo(right); + } + public static Int32DataFrameColumn operator %(Int16DataFrameColumn left, UInt16DataFrameColumn right) + { + return left.Modulo(right); + } + } + public partial class UInt32DataFrameColumn + { + public static UInt32DataFrameColumn operator %(UInt32DataFrameColumn left, ByteDataFrameColumn right) + { + return left.Modulo(right); + } + public static DecimalDataFrameColumn operator %(UInt32DataFrameColumn left, DecimalDataFrameColumn right) + { + return left.Modulo(right); + } + public static DoubleDataFrameColumn operator %(UInt32DataFrameColumn left, DoubleDataFrameColumn right) + { + return left.Modulo(right); + } + public static SingleDataFrameColumn operator %(UInt32DataFrameColumn left, SingleDataFrameColumn right) + { + return left.Modulo(right); + } + public static Int64DataFrameColumn operator %(UInt32DataFrameColumn left, Int32DataFrameColumn right) + { + return left.Modulo(right); + } + public static Int64DataFrameColumn operator %(UInt32DataFrameColumn left, Int64DataFrameColumn right) + { + return left.Modulo(right); + } + public static Int64DataFrameColumn operator %(UInt32DataFrameColumn left, SByteDataFrameColumn right) + { + return left.Modulo(right); + } + public static Int64DataFrameColumn operator %(UInt32DataFrameColumn left, Int16DataFrameColumn right) + { + return left.Modulo(right); + } + public static UInt32DataFrameColumn operator %(UInt32DataFrameColumn left, UInt32DataFrameColumn right) + { + return left.Modulo(right); + } + public static UInt64DataFrameColumn operator %(UInt32DataFrameColumn left, UInt64DataFrameColumn right) + { + return left.Modulo(right); + } + public static UInt32DataFrameColumn operator %(UInt32DataFrameColumn left, UInt16DataFrameColumn right) + { + return left.Modulo(right); + } + } + public partial class UInt64DataFrameColumn + { + public static UInt64DataFrameColumn operator %(UInt64DataFrameColumn left, ByteDataFrameColumn right) + { + return left.Modulo(right); + } + public static DecimalDataFrameColumn operator %(UInt64DataFrameColumn left, DecimalDataFrameColumn right) + { + return left.Modulo(right); + } + public static DoubleDataFrameColumn operator %(UInt64DataFrameColumn left, DoubleDataFrameColumn right) + { + return left.Modulo(right); + } + public static SingleDataFrameColumn operator %(UInt64DataFrameColumn left, SingleDataFrameColumn right) + { + return left.Modulo(right); + } + public static SingleDataFrameColumn operator %(UInt64DataFrameColumn left, Int32DataFrameColumn right) + { + return left.Modulo(right); + } + public static SingleDataFrameColumn operator %(UInt64DataFrameColumn left, SByteDataFrameColumn right) + { + return left.Modulo(right); + } + public static SingleDataFrameColumn operator %(UInt64DataFrameColumn left, Int16DataFrameColumn right) + { + return left.Modulo(right); + } + public static UInt64DataFrameColumn operator %(UInt64DataFrameColumn left, UInt32DataFrameColumn right) + { + return left.Modulo(right); + } + public static UInt64DataFrameColumn operator %(UInt64DataFrameColumn left, UInt64DataFrameColumn right) + { + return left.Modulo(right); + } + public static UInt64DataFrameColumn operator %(UInt64DataFrameColumn left, UInt16DataFrameColumn right) + { + return left.Modulo(right); + } + } + public partial class UInt16DataFrameColumn + { + public static Int32DataFrameColumn operator %(UInt16DataFrameColumn left, ByteDataFrameColumn right) + { + return left.Modulo(right); + } + public static DecimalDataFrameColumn operator %(UInt16DataFrameColumn left, DecimalDataFrameColumn right) + { + return left.Modulo(right); + } + public static DoubleDataFrameColumn operator %(UInt16DataFrameColumn left, DoubleDataFrameColumn right) + { + return left.Modulo(right); + } + public static SingleDataFrameColumn operator %(UInt16DataFrameColumn left, SingleDataFrameColumn right) + { + return left.Modulo(right); + } + public static Int32DataFrameColumn operator %(UInt16DataFrameColumn left, Int32DataFrameColumn right) + { + return left.Modulo(right); + } + public static Int64DataFrameColumn operator %(UInt16DataFrameColumn left, Int64DataFrameColumn right) + { + return left.Modulo(right); + } + public static Int32DataFrameColumn operator %(UInt16DataFrameColumn left, SByteDataFrameColumn right) + { + return left.Modulo(right); + } + public static Int32DataFrameColumn operator %(UInt16DataFrameColumn left, Int16DataFrameColumn right) + { + return left.Modulo(right); + } + public static UInt32DataFrameColumn operator %(UInt16DataFrameColumn left, UInt32DataFrameColumn right) + { + return left.Modulo(right); + } + public static UInt64DataFrameColumn operator %(UInt16DataFrameColumn left, UInt64DataFrameColumn right) + { + return left.Modulo(right); + } + public static Int32DataFrameColumn operator %(UInt16DataFrameColumn left, UInt16DataFrameColumn right) + { + return left.Modulo(right); + } + } + public partial class ByteDataFrameColumn + { + public static Int32DataFrameColumn operator %(ByteDataFrameColumn left, byte right) + { + return left.Modulo(right); + } + public static Int32DataFrameColumn operator %(byte left, ByteDataFrameColumn right) + { + return right.ReverseModulo(left); + } + public static DecimalDataFrameColumn operator %(ByteDataFrameColumn left, decimal right) + { + return left.Modulo(right); + } + public static DecimalDataFrameColumn operator %(decimal left, ByteDataFrameColumn right) + { + return right.ReverseModulo(left); + } + public static DoubleDataFrameColumn operator %(ByteDataFrameColumn left, double right) + { + return left.Modulo(right); + } + public static DoubleDataFrameColumn operator %(double left, ByteDataFrameColumn right) + { + return right.ReverseModulo(left); + } + public static SingleDataFrameColumn operator %(ByteDataFrameColumn left, float right) + { + return left.Modulo(right); + } + public static SingleDataFrameColumn operator %(float left, ByteDataFrameColumn right) + { + return right.ReverseModulo(left); + } + public static Int32DataFrameColumn operator %(ByteDataFrameColumn left, int right) + { + return left.Modulo(right); + } + public static Int32DataFrameColumn operator %(int left, ByteDataFrameColumn right) + { + return right.ReverseModulo(left); + } + public static Int64DataFrameColumn operator %(ByteDataFrameColumn left, long right) + { + return left.Modulo(right); + } + public static Int64DataFrameColumn operator %(long left, ByteDataFrameColumn right) + { + return right.ReverseModulo(left); + } + public static Int32DataFrameColumn operator %(ByteDataFrameColumn left, sbyte right) + { + return left.Modulo(right); + } + public static Int32DataFrameColumn operator %(sbyte left, ByteDataFrameColumn right) + { + return right.ReverseModulo(left); + } + public static Int32DataFrameColumn operator %(ByteDataFrameColumn left, short right) + { + return left.Modulo(right); + } + public static Int32DataFrameColumn operator %(short left, ByteDataFrameColumn right) + { + return right.ReverseModulo(left); + } + public static UInt32DataFrameColumn operator %(ByteDataFrameColumn left, uint right) + { + return left.Modulo(right); + } + public static UInt32DataFrameColumn operator %(uint left, ByteDataFrameColumn right) + { + return right.ReverseModulo(left); + } + public static UInt64DataFrameColumn operator %(ByteDataFrameColumn left, ulong right) + { + return left.Modulo(right); + } + public static UInt64DataFrameColumn operator %(ulong left, ByteDataFrameColumn right) + { + return right.ReverseModulo(left); + } + public static Int32DataFrameColumn operator %(ByteDataFrameColumn left, ushort right) + { + return left.Modulo(right); + } + public static Int32DataFrameColumn operator %(ushort left, ByteDataFrameColumn right) + { + return right.ReverseModulo(left); + } + } + public partial class DecimalDataFrameColumn + { + public static DecimalDataFrameColumn operator %(DecimalDataFrameColumn left, byte right) + { + return left.Modulo(right); + } + public static DecimalDataFrameColumn operator %(byte left, DecimalDataFrameColumn right) + { + return right.ReverseModulo(left); + } + public static DecimalDataFrameColumn operator %(DecimalDataFrameColumn left, decimal right) + { + return left.Modulo(right); + } + public static DecimalDataFrameColumn operator %(decimal left, DecimalDataFrameColumn right) + { + return right.ReverseModulo(left); + } + public static DecimalDataFrameColumn operator %(DecimalDataFrameColumn left, int right) + { + return left.Modulo(right); + } + public static DecimalDataFrameColumn operator %(int left, DecimalDataFrameColumn right) + { + return right.ReverseModulo(left); + } + public static DecimalDataFrameColumn operator %(DecimalDataFrameColumn left, long right) + { + return left.Modulo(right); + } + public static DecimalDataFrameColumn operator %(long left, DecimalDataFrameColumn right) + { + return right.ReverseModulo(left); + } + public static DecimalDataFrameColumn operator %(DecimalDataFrameColumn left, sbyte right) + { + return left.Modulo(right); + } + public static DecimalDataFrameColumn operator %(sbyte left, DecimalDataFrameColumn right) + { + return right.ReverseModulo(left); + } + public static DecimalDataFrameColumn operator %(DecimalDataFrameColumn left, short right) + { + return left.Modulo(right); + } + public static DecimalDataFrameColumn operator %(short left, DecimalDataFrameColumn right) + { + return right.ReverseModulo(left); + } + public static DecimalDataFrameColumn operator %(DecimalDataFrameColumn left, uint right) + { + return left.Modulo(right); + } + public static DecimalDataFrameColumn operator %(uint left, DecimalDataFrameColumn right) + { + return right.ReverseModulo(left); + } + public static DecimalDataFrameColumn operator %(DecimalDataFrameColumn left, ulong right) + { + return left.Modulo(right); + } + public static DecimalDataFrameColumn operator %(ulong left, DecimalDataFrameColumn right) + { + return right.ReverseModulo(left); + } + public static DecimalDataFrameColumn operator %(DecimalDataFrameColumn left, ushort right) + { + return left.Modulo(right); + } + public static DecimalDataFrameColumn operator %(ushort left, DecimalDataFrameColumn right) + { + return right.ReverseModulo(left); + } + } + public partial class DoubleDataFrameColumn + { + public static DoubleDataFrameColumn operator %(DoubleDataFrameColumn left, byte right) + { + return left.Modulo(right); + } + public static DoubleDataFrameColumn operator %(byte left, DoubleDataFrameColumn right) + { + return right.ReverseModulo(left); + } + public static DoubleDataFrameColumn operator %(DoubleDataFrameColumn left, double right) + { + return left.Modulo(right); + } + public static DoubleDataFrameColumn operator %(double left, DoubleDataFrameColumn right) + { + return right.ReverseModulo(left); + } + public static DoubleDataFrameColumn operator %(DoubleDataFrameColumn left, float right) + { + return left.Modulo(right); + } + public static DoubleDataFrameColumn operator %(float left, DoubleDataFrameColumn right) + { + return right.ReverseModulo(left); + } + public static DoubleDataFrameColumn operator %(DoubleDataFrameColumn left, int right) + { + return left.Modulo(right); + } + public static DoubleDataFrameColumn operator %(int left, DoubleDataFrameColumn right) + { + return right.ReverseModulo(left); + } + public static DoubleDataFrameColumn operator %(DoubleDataFrameColumn left, long right) + { + return left.Modulo(right); + } + public static DoubleDataFrameColumn operator %(long left, DoubleDataFrameColumn right) + { + return right.ReverseModulo(left); + } + public static DoubleDataFrameColumn operator %(DoubleDataFrameColumn left, sbyte right) + { + return left.Modulo(right); + } + public static DoubleDataFrameColumn operator %(sbyte left, DoubleDataFrameColumn right) + { + return right.ReverseModulo(left); + } + public static DoubleDataFrameColumn operator %(DoubleDataFrameColumn left, short right) + { + return left.Modulo(right); + } + public static DoubleDataFrameColumn operator %(short left, DoubleDataFrameColumn right) + { + return right.ReverseModulo(left); + } + public static DoubleDataFrameColumn operator %(DoubleDataFrameColumn left, uint right) + { + return left.Modulo(right); + } + public static DoubleDataFrameColumn operator %(uint left, DoubleDataFrameColumn right) + { + return right.ReverseModulo(left); + } + public static DoubleDataFrameColumn operator %(DoubleDataFrameColumn left, ulong right) + { + return left.Modulo(right); + } + public static DoubleDataFrameColumn operator %(ulong left, DoubleDataFrameColumn right) + { + return right.ReverseModulo(left); + } + public static DoubleDataFrameColumn operator %(DoubleDataFrameColumn left, ushort right) + { + return left.Modulo(right); + } + public static DoubleDataFrameColumn operator %(ushort left, DoubleDataFrameColumn right) + { + return right.ReverseModulo(left); + } + } + public partial class SingleDataFrameColumn + { + public static SingleDataFrameColumn operator %(SingleDataFrameColumn left, byte right) + { + return left.Modulo(right); + } + public static SingleDataFrameColumn operator %(byte left, SingleDataFrameColumn right) + { + return right.ReverseModulo(left); + } + public static DoubleDataFrameColumn operator %(SingleDataFrameColumn left, double right) + { + return left.Modulo(right); + } + public static DoubleDataFrameColumn operator %(double left, SingleDataFrameColumn right) + { + return right.ReverseModulo(left); + } + public static SingleDataFrameColumn operator %(SingleDataFrameColumn left, float right) + { + return left.Modulo(right); + } + public static SingleDataFrameColumn operator %(float left, SingleDataFrameColumn right) + { + return right.ReverseModulo(left); + } + public static SingleDataFrameColumn operator %(SingleDataFrameColumn left, int right) + { + return left.Modulo(right); + } + public static SingleDataFrameColumn operator %(int left, SingleDataFrameColumn right) + { + return right.ReverseModulo(left); + } + public static SingleDataFrameColumn operator %(SingleDataFrameColumn left, long right) + { + return left.Modulo(right); + } + public static SingleDataFrameColumn operator %(long left, SingleDataFrameColumn right) + { + return right.ReverseModulo(left); + } + public static SingleDataFrameColumn operator %(SingleDataFrameColumn left, sbyte right) + { + return left.Modulo(right); + } + public static SingleDataFrameColumn operator %(sbyte left, SingleDataFrameColumn right) + { + return right.ReverseModulo(left); + } + public static SingleDataFrameColumn operator %(SingleDataFrameColumn left, short right) + { + return left.Modulo(right); + } + public static SingleDataFrameColumn operator %(short left, SingleDataFrameColumn right) + { + return right.ReverseModulo(left); + } + public static SingleDataFrameColumn operator %(SingleDataFrameColumn left, uint right) + { + return left.Modulo(right); + } + public static SingleDataFrameColumn operator %(uint left, SingleDataFrameColumn right) + { + return right.ReverseModulo(left); + } + public static SingleDataFrameColumn operator %(SingleDataFrameColumn left, ulong right) + { + return left.Modulo(right); + } + public static SingleDataFrameColumn operator %(ulong left, SingleDataFrameColumn right) + { + return right.ReverseModulo(left); + } + public static SingleDataFrameColumn operator %(SingleDataFrameColumn left, ushort right) + { + return left.Modulo(right); + } + public static SingleDataFrameColumn operator %(ushort left, SingleDataFrameColumn right) + { + return right.ReverseModulo(left); + } + } + public partial class Int32DataFrameColumn + { + public static Int32DataFrameColumn operator %(Int32DataFrameColumn left, byte right) + { + return left.Modulo(right); + } + public static Int32DataFrameColumn operator %(byte left, Int32DataFrameColumn right) + { + return right.ReverseModulo(left); + } + public static DecimalDataFrameColumn operator %(Int32DataFrameColumn left, decimal right) + { + return left.Modulo(right); + } + public static DecimalDataFrameColumn operator %(decimal left, Int32DataFrameColumn right) + { + return right.ReverseModulo(left); + } + public static DoubleDataFrameColumn operator %(Int32DataFrameColumn left, double right) + { + return left.Modulo(right); + } + public static DoubleDataFrameColumn operator %(double left, Int32DataFrameColumn right) + { + return right.ReverseModulo(left); + } + public static SingleDataFrameColumn operator %(Int32DataFrameColumn left, float right) + { + return left.Modulo(right); + } + public static SingleDataFrameColumn operator %(float left, Int32DataFrameColumn right) + { + return right.ReverseModulo(left); + } + public static Int32DataFrameColumn operator %(Int32DataFrameColumn left, int right) + { + return left.Modulo(right); + } + public static Int32DataFrameColumn operator %(int left, Int32DataFrameColumn right) + { + return right.ReverseModulo(left); + } + public static Int64DataFrameColumn operator %(Int32DataFrameColumn left, long right) + { + return left.Modulo(right); + } + public static Int64DataFrameColumn operator %(long left, Int32DataFrameColumn right) + { + return right.ReverseModulo(left); + } + public static Int32DataFrameColumn operator %(Int32DataFrameColumn left, sbyte right) + { + return left.Modulo(right); + } + public static Int32DataFrameColumn operator %(sbyte left, Int32DataFrameColumn right) + { + return right.ReverseModulo(left); + } + public static Int32DataFrameColumn operator %(Int32DataFrameColumn left, short right) + { + return left.Modulo(right); + } + public static Int32DataFrameColumn operator %(short left, Int32DataFrameColumn right) + { + return right.ReverseModulo(left); + } + public static Int64DataFrameColumn operator %(Int32DataFrameColumn left, uint right) + { + return left.Modulo(right); + } + public static Int64DataFrameColumn operator %(uint left, Int32DataFrameColumn right) + { + return right.ReverseModulo(left); + } + public static SingleDataFrameColumn operator %(Int32DataFrameColumn left, ulong right) + { + return left.Modulo(right); + } + public static SingleDataFrameColumn operator %(ulong left, Int32DataFrameColumn right) + { + return right.ReverseModulo(left); + } + public static Int32DataFrameColumn operator %(Int32DataFrameColumn left, ushort right) + { + return left.Modulo(right); + } + public static Int32DataFrameColumn operator %(ushort left, Int32DataFrameColumn right) + { + return right.ReverseModulo(left); + } + } + public partial class Int64DataFrameColumn + { + public static Int64DataFrameColumn operator %(Int64DataFrameColumn left, byte right) + { + return left.Modulo(right); + } + public static Int64DataFrameColumn operator %(byte left, Int64DataFrameColumn right) + { + return right.ReverseModulo(left); + } + public static DecimalDataFrameColumn operator %(Int64DataFrameColumn left, decimal right) + { + return left.Modulo(right); + } + public static DecimalDataFrameColumn operator %(decimal left, Int64DataFrameColumn right) + { + return right.ReverseModulo(left); + } + public static DoubleDataFrameColumn operator %(Int64DataFrameColumn left, double right) + { + return left.Modulo(right); + } + public static DoubleDataFrameColumn operator %(double left, Int64DataFrameColumn right) + { + return right.ReverseModulo(left); + } + public static SingleDataFrameColumn operator %(Int64DataFrameColumn left, float right) + { + return left.Modulo(right); + } + public static SingleDataFrameColumn operator %(float left, Int64DataFrameColumn right) + { + return right.ReverseModulo(left); + } + public static Int64DataFrameColumn operator %(Int64DataFrameColumn left, int right) + { + return left.Modulo(right); + } + public static Int64DataFrameColumn operator %(int left, Int64DataFrameColumn right) + { + return right.ReverseModulo(left); + } + public static Int64DataFrameColumn operator %(Int64DataFrameColumn left, long right) + { + return left.Modulo(right); + } + public static Int64DataFrameColumn operator %(long left, Int64DataFrameColumn right) + { + return right.ReverseModulo(left); + } + public static Int64DataFrameColumn operator %(Int64DataFrameColumn left, sbyte right) + { + return left.Modulo(right); + } + public static Int64DataFrameColumn operator %(sbyte left, Int64DataFrameColumn right) + { + return right.ReverseModulo(left); + } + public static Int64DataFrameColumn operator %(Int64DataFrameColumn left, short right) + { + return left.Modulo(right); + } + public static Int64DataFrameColumn operator %(short left, Int64DataFrameColumn right) + { + return right.ReverseModulo(left); + } + public static Int64DataFrameColumn operator %(Int64DataFrameColumn left, uint right) + { + return left.Modulo(right); + } + public static Int64DataFrameColumn operator %(uint left, Int64DataFrameColumn right) + { + return right.ReverseModulo(left); + } + public static Int64DataFrameColumn operator %(Int64DataFrameColumn left, ushort right) + { + return left.Modulo(right); + } + public static Int64DataFrameColumn operator %(ushort left, Int64DataFrameColumn right) + { + return right.ReverseModulo(left); + } + } + public partial class SByteDataFrameColumn + { + public static Int32DataFrameColumn operator %(SByteDataFrameColumn left, byte right) + { + return left.Modulo(right); + } + public static Int32DataFrameColumn operator %(byte left, SByteDataFrameColumn right) + { + return right.ReverseModulo(left); + } + public static DecimalDataFrameColumn operator %(SByteDataFrameColumn left, decimal right) + { + return left.Modulo(right); + } + public static DecimalDataFrameColumn operator %(decimal left, SByteDataFrameColumn right) + { + return right.ReverseModulo(left); + } + public static DoubleDataFrameColumn operator %(SByteDataFrameColumn left, double right) + { + return left.Modulo(right); + } + public static DoubleDataFrameColumn operator %(double left, SByteDataFrameColumn right) + { + return right.ReverseModulo(left); + } + public static SingleDataFrameColumn operator %(SByteDataFrameColumn left, float right) + { + return left.Modulo(right); + } + public static SingleDataFrameColumn operator %(float left, SByteDataFrameColumn right) + { + return right.ReverseModulo(left); + } + public static Int32DataFrameColumn operator %(SByteDataFrameColumn left, int right) + { + return left.Modulo(right); + } + public static Int32DataFrameColumn operator %(int left, SByteDataFrameColumn right) + { + return right.ReverseModulo(left); + } + public static Int64DataFrameColumn operator %(SByteDataFrameColumn left, long right) + { + return left.Modulo(right); + } + public static Int64DataFrameColumn operator %(long left, SByteDataFrameColumn right) + { + return right.ReverseModulo(left); + } + public static Int32DataFrameColumn operator %(SByteDataFrameColumn left, sbyte right) + { + return left.Modulo(right); + } + public static Int32DataFrameColumn operator %(sbyte left, SByteDataFrameColumn right) + { + return right.ReverseModulo(left); + } + public static Int32DataFrameColumn operator %(SByteDataFrameColumn left, short right) + { + return left.Modulo(right); + } + public static Int32DataFrameColumn operator %(short left, SByteDataFrameColumn right) + { + return right.ReverseModulo(left); + } + public static Int64DataFrameColumn operator %(SByteDataFrameColumn left, uint right) + { + return left.Modulo(right); + } + public static Int64DataFrameColumn operator %(uint left, SByteDataFrameColumn right) + { + return right.ReverseModulo(left); + } + public static SingleDataFrameColumn operator %(SByteDataFrameColumn left, ulong right) + { + return left.Modulo(right); + } + public static SingleDataFrameColumn operator %(ulong left, SByteDataFrameColumn right) + { + return right.ReverseModulo(left); + } + public static Int32DataFrameColumn operator %(SByteDataFrameColumn left, ushort right) + { + return left.Modulo(right); + } + public static Int32DataFrameColumn operator %(ushort left, SByteDataFrameColumn right) + { + return right.ReverseModulo(left); + } + } + public partial class Int16DataFrameColumn + { + public static Int32DataFrameColumn operator %(Int16DataFrameColumn left, byte right) + { + return left.Modulo(right); + } + public static Int32DataFrameColumn operator %(byte left, Int16DataFrameColumn right) + { + return right.ReverseModulo(left); + } + public static DecimalDataFrameColumn operator %(Int16DataFrameColumn left, decimal right) + { + return left.Modulo(right); + } + public static DecimalDataFrameColumn operator %(decimal left, Int16DataFrameColumn right) + { + return right.ReverseModulo(left); + } + public static DoubleDataFrameColumn operator %(Int16DataFrameColumn left, double right) + { + return left.Modulo(right); + } + public static DoubleDataFrameColumn operator %(double left, Int16DataFrameColumn right) + { + return right.ReverseModulo(left); + } + public static SingleDataFrameColumn operator %(Int16DataFrameColumn left, float right) + { + return left.Modulo(right); + } + public static SingleDataFrameColumn operator %(float left, Int16DataFrameColumn right) + { + return right.ReverseModulo(left); + } + public static Int32DataFrameColumn operator %(Int16DataFrameColumn left, int right) + { + return left.Modulo(right); + } + public static Int32DataFrameColumn operator %(int left, Int16DataFrameColumn right) + { + return right.ReverseModulo(left); + } + public static Int64DataFrameColumn operator %(Int16DataFrameColumn left, long right) + { + return left.Modulo(right); + } + public static Int64DataFrameColumn operator %(long left, Int16DataFrameColumn right) + { + return right.ReverseModulo(left); + } + public static Int32DataFrameColumn operator %(Int16DataFrameColumn left, sbyte right) + { + return left.Modulo(right); + } + public static Int32DataFrameColumn operator %(sbyte left, Int16DataFrameColumn right) + { + return right.ReverseModulo(left); + } + public static Int32DataFrameColumn operator %(Int16DataFrameColumn left, short right) + { + return left.Modulo(right); + } + public static Int32DataFrameColumn operator %(short left, Int16DataFrameColumn right) + { + return right.ReverseModulo(left); + } + public static Int64DataFrameColumn operator %(Int16DataFrameColumn left, uint right) + { + return left.Modulo(right); + } + public static Int64DataFrameColumn operator %(uint left, Int16DataFrameColumn right) + { + return right.ReverseModulo(left); + } + public static SingleDataFrameColumn operator %(Int16DataFrameColumn left, ulong right) + { + return left.Modulo(right); + } + public static SingleDataFrameColumn operator %(ulong left, Int16DataFrameColumn right) + { + return right.ReverseModulo(left); + } + public static Int32DataFrameColumn operator %(Int16DataFrameColumn left, ushort right) + { + return left.Modulo(right); + } + public static Int32DataFrameColumn operator %(ushort left, Int16DataFrameColumn right) + { + return right.ReverseModulo(left); + } + } + public partial class UInt32DataFrameColumn + { + public static UInt32DataFrameColumn operator %(UInt32DataFrameColumn left, byte right) + { + return left.Modulo(right); + } + public static UInt32DataFrameColumn operator %(byte left, UInt32DataFrameColumn right) + { + return right.ReverseModulo(left); + } + public static DecimalDataFrameColumn operator %(UInt32DataFrameColumn left, decimal right) + { + return left.Modulo(right); + } + public static DecimalDataFrameColumn operator %(decimal left, UInt32DataFrameColumn right) + { + return right.ReverseModulo(left); + } + public static DoubleDataFrameColumn operator %(UInt32DataFrameColumn left, double right) + { + return left.Modulo(right); + } + public static DoubleDataFrameColumn operator %(double left, UInt32DataFrameColumn right) + { + return right.ReverseModulo(left); + } + public static SingleDataFrameColumn operator %(UInt32DataFrameColumn left, float right) + { + return left.Modulo(right); + } + public static SingleDataFrameColumn operator %(float left, UInt32DataFrameColumn right) + { + return right.ReverseModulo(left); + } + public static Int64DataFrameColumn operator %(UInt32DataFrameColumn left, int right) + { + return left.Modulo(right); + } + public static Int64DataFrameColumn operator %(int left, UInt32DataFrameColumn right) + { + return right.ReverseModulo(left); + } + public static Int64DataFrameColumn operator %(UInt32DataFrameColumn left, long right) + { + return left.Modulo(right); + } + public static Int64DataFrameColumn operator %(long left, UInt32DataFrameColumn right) + { + return right.ReverseModulo(left); + } + public static Int64DataFrameColumn operator %(UInt32DataFrameColumn left, sbyte right) + { + return left.Modulo(right); + } + public static Int64DataFrameColumn operator %(sbyte left, UInt32DataFrameColumn right) + { + return right.ReverseModulo(left); + } + public static Int64DataFrameColumn operator %(UInt32DataFrameColumn left, short right) + { + return left.Modulo(right); + } + public static Int64DataFrameColumn operator %(short left, UInt32DataFrameColumn right) + { + return right.ReverseModulo(left); + } + public static UInt32DataFrameColumn operator %(UInt32DataFrameColumn left, uint right) + { + return left.Modulo(right); + } + public static UInt32DataFrameColumn operator %(uint left, UInt32DataFrameColumn right) + { + return right.ReverseModulo(left); + } + public static UInt64DataFrameColumn operator %(UInt32DataFrameColumn left, ulong right) + { + return left.Modulo(right); + } + public static UInt64DataFrameColumn operator %(ulong left, UInt32DataFrameColumn right) + { + return right.ReverseModulo(left); + } + public static UInt32DataFrameColumn operator %(UInt32DataFrameColumn left, ushort right) + { + return left.Modulo(right); + } + public static UInt32DataFrameColumn operator %(ushort left, UInt32DataFrameColumn right) + { + return right.ReverseModulo(left); + } + } + public partial class UInt64DataFrameColumn + { + public static UInt64DataFrameColumn operator %(UInt64DataFrameColumn left, byte right) + { + return left.Modulo(right); + } + public static UInt64DataFrameColumn operator %(byte left, UInt64DataFrameColumn right) + { + return right.ReverseModulo(left); + } + public static DecimalDataFrameColumn operator %(UInt64DataFrameColumn left, decimal right) + { + return left.Modulo(right); + } + public static DecimalDataFrameColumn operator %(decimal left, UInt64DataFrameColumn right) + { + return right.ReverseModulo(left); + } + public static DoubleDataFrameColumn operator %(UInt64DataFrameColumn left, double right) + { + return left.Modulo(right); + } + public static DoubleDataFrameColumn operator %(double left, UInt64DataFrameColumn right) + { + return right.ReverseModulo(left); + } + public static SingleDataFrameColumn operator %(UInt64DataFrameColumn left, float right) + { + return left.Modulo(right); + } + public static SingleDataFrameColumn operator %(float left, UInt64DataFrameColumn right) + { + return right.ReverseModulo(left); + } + public static SingleDataFrameColumn operator %(UInt64DataFrameColumn left, int right) + { + return left.Modulo(right); + } + public static SingleDataFrameColumn operator %(int left, UInt64DataFrameColumn right) + { + return right.ReverseModulo(left); + } + public static SingleDataFrameColumn operator %(UInt64DataFrameColumn left, sbyte right) + { + return left.Modulo(right); + } + public static SingleDataFrameColumn operator %(sbyte left, UInt64DataFrameColumn right) + { + return right.ReverseModulo(left); + } + public static SingleDataFrameColumn operator %(UInt64DataFrameColumn left, short right) + { + return left.Modulo(right); + } + public static SingleDataFrameColumn operator %(short left, UInt64DataFrameColumn right) + { + return right.ReverseModulo(left); + } + public static UInt64DataFrameColumn operator %(UInt64DataFrameColumn left, uint right) + { + return left.Modulo(right); + } + public static UInt64DataFrameColumn operator %(uint left, UInt64DataFrameColumn right) + { + return right.ReverseModulo(left); + } + public static UInt64DataFrameColumn operator %(UInt64DataFrameColumn left, ulong right) + { + return left.Modulo(right); + } + public static UInt64DataFrameColumn operator %(ulong left, UInt64DataFrameColumn right) + { + return right.ReverseModulo(left); + } + public static UInt64DataFrameColumn operator %(UInt64DataFrameColumn left, ushort right) + { + return left.Modulo(right); + } + public static UInt64DataFrameColumn operator %(ushort left, UInt64DataFrameColumn right) + { + return right.ReverseModulo(left); + } + } + public partial class UInt16DataFrameColumn + { + public static Int32DataFrameColumn operator %(UInt16DataFrameColumn left, byte right) + { + return left.Modulo(right); + } + public static Int32DataFrameColumn operator %(byte left, UInt16DataFrameColumn right) + { + return right.ReverseModulo(left); + } + public static DecimalDataFrameColumn operator %(UInt16DataFrameColumn left, decimal right) + { + return left.Modulo(right); + } + public static DecimalDataFrameColumn operator %(decimal left, UInt16DataFrameColumn right) + { + return right.ReverseModulo(left); + } + public static DoubleDataFrameColumn operator %(UInt16DataFrameColumn left, double right) + { + return left.Modulo(right); + } + public static DoubleDataFrameColumn operator %(double left, UInt16DataFrameColumn right) + { + return right.ReverseModulo(left); + } + public static SingleDataFrameColumn operator %(UInt16DataFrameColumn left, float right) + { + return left.Modulo(right); + } + public static SingleDataFrameColumn operator %(float left, UInt16DataFrameColumn right) + { + return right.ReverseModulo(left); + } + public static Int32DataFrameColumn operator %(UInt16DataFrameColumn left, int right) + { + return left.Modulo(right); + } + public static Int32DataFrameColumn operator %(int left, UInt16DataFrameColumn right) + { + return right.ReverseModulo(left); + } + public static Int64DataFrameColumn operator %(UInt16DataFrameColumn left, long right) + { + return left.Modulo(right); + } + public static Int64DataFrameColumn operator %(long left, UInt16DataFrameColumn right) + { + return right.ReverseModulo(left); + } + public static Int32DataFrameColumn operator %(UInt16DataFrameColumn left, sbyte right) + { + return left.Modulo(right); + } + public static Int32DataFrameColumn operator %(sbyte left, UInt16DataFrameColumn right) + { + return right.ReverseModulo(left); + } + public static Int32DataFrameColumn operator %(UInt16DataFrameColumn left, short right) + { + return left.Modulo(right); + } + public static Int32DataFrameColumn operator %(short left, UInt16DataFrameColumn right) + { + return right.ReverseModulo(left); + } + public static UInt32DataFrameColumn operator %(UInt16DataFrameColumn left, uint right) + { + return left.Modulo(right); + } + public static UInt32DataFrameColumn operator %(uint left, UInt16DataFrameColumn right) + { + return right.ReverseModulo(left); + } + public static UInt64DataFrameColumn operator %(UInt16DataFrameColumn left, ulong right) + { + return left.Modulo(right); + } + public static UInt64DataFrameColumn operator %(ulong left, UInt16DataFrameColumn right) + { + return right.ReverseModulo(left); + } + public static Int32DataFrameColumn operator %(UInt16DataFrameColumn left, ushort right) + { + return left.Modulo(right); + } + public static Int32DataFrameColumn operator %(ushort left, UInt16DataFrameColumn right) + { + return right.ReverseModulo(left); + } + } + public partial class BooleanDataFrameColumn + { + public static BooleanDataFrameColumn operator &(BooleanDataFrameColumn left, BooleanDataFrameColumn right) + { + return left.And(right); + } + } + public partial class BooleanDataFrameColumn + { + public static BooleanDataFrameColumn operator &(BooleanDataFrameColumn left, bool right) + { + return left.And(right); + } + } + public partial class BooleanDataFrameColumn + { + public static BooleanDataFrameColumn operator |(BooleanDataFrameColumn left, BooleanDataFrameColumn right) + { + return left.Or(right); + } + } + public partial class BooleanDataFrameColumn + { + public static BooleanDataFrameColumn operator |(BooleanDataFrameColumn left, bool right) + { + return left.Or(right); + } + } + public partial class BooleanDataFrameColumn + { + public static BooleanDataFrameColumn operator ^(BooleanDataFrameColumn left, BooleanDataFrameColumn right) + { + return left.Xor(right); + } + } + public partial class BooleanDataFrameColumn + { + public static BooleanDataFrameColumn operator ^(BooleanDataFrameColumn left, bool right) + { + return left.Xor(right); + } + } + public partial class ByteDataFrameColumn + { + public static Int32DataFrameColumn operator <<(ByteDataFrameColumn left, int value) + { + return left.LeftShift(value); + } + } + public partial class Int32DataFrameColumn + { + public static Int32DataFrameColumn operator <<(Int32DataFrameColumn left, int value) + { + return left.LeftShift(value); + } + } + public partial class Int64DataFrameColumn + { + public static Int64DataFrameColumn operator <<(Int64DataFrameColumn left, int value) + { + return left.LeftShift(value); + } + } + public partial class SByteDataFrameColumn + { + public static Int32DataFrameColumn operator <<(SByteDataFrameColumn left, int value) + { + return left.LeftShift(value); + } + } + public partial class Int16DataFrameColumn + { + public static Int32DataFrameColumn operator <<(Int16DataFrameColumn left, int value) + { + return left.LeftShift(value); + } + } + public partial class UInt32DataFrameColumn + { + public static UInt32DataFrameColumn operator <<(UInt32DataFrameColumn left, int value) + { + return left.LeftShift(value); + } + } + public partial class UInt64DataFrameColumn + { + public static UInt64DataFrameColumn operator <<(UInt64DataFrameColumn left, int value) + { + return left.LeftShift(value); + } + } + public partial class UInt16DataFrameColumn + { + public static Int32DataFrameColumn operator <<(UInt16DataFrameColumn left, int value) + { + return left.LeftShift(value); + } + } + public partial class ByteDataFrameColumn + { + public static Int32DataFrameColumn operator >>(ByteDataFrameColumn left, int value) + { + return left.RightShift(value); + } + } + public partial class Int32DataFrameColumn + { + public static Int32DataFrameColumn operator >>(Int32DataFrameColumn left, int value) + { + return left.RightShift(value); + } + } + public partial class Int64DataFrameColumn + { + public static Int64DataFrameColumn operator >>(Int64DataFrameColumn left, int value) + { + return left.RightShift(value); + } + } + public partial class SByteDataFrameColumn + { + public static Int32DataFrameColumn operator >>(SByteDataFrameColumn left, int value) + { + return left.RightShift(value); + } + } + public partial class Int16DataFrameColumn + { + public static Int32DataFrameColumn operator >>(Int16DataFrameColumn left, int value) + { + return left.RightShift(value); + } + } + public partial class UInt32DataFrameColumn + { + public static UInt32DataFrameColumn operator >>(UInt32DataFrameColumn left, int value) + { + return left.RightShift(value); + } + } + public partial class UInt64DataFrameColumn + { + public static UInt64DataFrameColumn operator >>(UInt64DataFrameColumn left, int value) + { + return left.RightShift(value); + } + } + public partial class UInt16DataFrameColumn + { + public static Int32DataFrameColumn operator >>(UInt16DataFrameColumn left, int value) + { + return left.RightShift(value); + } + } +} diff --git a/src/Microsoft.Data.Analysis/PrimitiveDataFrameColumn.BinaryOperators.tt b/src/Microsoft.Data.Analysis/PrimitiveDataFrameColumn.BinaryOperators.tt new file mode 100644 index 0000000000..777dc4026d --- /dev/null +++ b/src/Microsoft.Data.Analysis/PrimitiveDataFrameColumn.BinaryOperators.tt @@ -0,0 +1,236 @@ +<#@ template debug="false" hostspecific="false" language="C#" #> +<#@ assembly name="System.Core" #> +<#@ import namespace="System.Linq" #> +<#@ import namespace="System.Text" #> +<#@ import namespace="System.Collections.Generic" #> +<#@ output extension=".cs" #> +<#@ include file="ColumnArithmeticTemplate.ttinclude" #> +<#@ include file="PrimitiveDataFrameColumn.BinaryOperations.Combinations.ttinclude" #> +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System; +using System.Collections.Generic; +using System.Text; + +namespace Microsoft.Data.Analysis +{ +<# +void GenerateAllBinaryCombinationsForOperator(string op, string methodName) +{ + HashSet visited = new HashSet { }; + foreach (TypeCombination outer in BinaryOperationCombinations.binaryOperationCombinations) + { + string outerColumnType = outer.ThisColumnType; + if (visited.Contains(outerColumnType)) + { + continue; + } + visited.Add(outerColumnType); + string fullOuterColumnType = GetCapitalizedPrimitiveTypes(outerColumnType) + "DataFrameColumn"; +#> + public partial class <#=fullOuterColumnType#> + { +<# + foreach (TypeCombination types in BinaryOperationCombinations.binaryOperationCombinations.Where((ACombination) => ACombination.ThisColumnType == outerColumnType)) + { + string returnType = types.ReturnColumnType; + string columnType = types.ThisColumnType; + string otherColumnType = types.OtherColumnType; + + string fullColumnType = GetCapitalizedPrimitiveTypes(columnType) + "DataFrameColumn"; + string fullReturnType = GetCapitalizedPrimitiveTypes(returnType) + "DataFrameColumn"; + string fullOtherColumnType = GetCapitalizedPrimitiveTypes(otherColumnType) + "DataFrameColumn"; +#> + public static <#=fullReturnType#> operator <#=op#>(<#=fullColumnType#> left, <#=fullOtherColumnType#> right) + { + return left.<#=methodName#>(right); + } +<# + } +#> + } +<# +} +} +#> +<# +void GenerateAllBinaryScalarCombinationsForOperator(string op, string methodName) +{ + HashSet visited = new HashSet { }; + foreach (TypeCombination outer in BinaryOperationCombinations.binaryOperationCombinations) + { + string outerColumnType = outer.ThisColumnType; + if (visited.Contains(outerColumnType)) + { + continue; + } + visited.Add(outerColumnType); + string fullOuterColumnType = GetCapitalizedPrimitiveTypes(outerColumnType) + "DataFrameColumn"; +#> + public partial class <#=fullOuterColumnType#> + { +<# + foreach (TypeCombination types in BinaryOperationCombinations.binaryOperationCombinations.Where((ACombination) => ACombination.ThisColumnType == outerColumnType)) + { + string returnType = types.ReturnColumnType; + string columnType = types.ThisColumnType; + string otherColumnType = types.OtherColumnType; + + string fullColumnType = GetCapitalizedPrimitiveTypes(columnType) + "DataFrameColumn"; + string fullReturnType = GetCapitalizedPrimitiveTypes(returnType) + "DataFrameColumn"; +#> + public static <#=fullReturnType#> operator <#=op#>(<#=fullColumnType#> left, <#=otherColumnType#> right) + { + return left.<#=methodName#>(right); + } + public static <#=fullReturnType#> operator <#=op#>(<#=otherColumnType#> left, <#=fullColumnType#> right) + { + return right.Reverse<#=methodName#>(left); + } +<# + } +#> + } +<# +} +} +#> +<# +void GenerateAllBinaryBitwiseCombinationsForOperator(string op, string methodName) +{ +#> + public partial class BooleanDataFrameColumn + { + public static BooleanDataFrameColumn operator <#=op#>(BooleanDataFrameColumn left, BooleanDataFrameColumn right) + { + return left.<#=methodName#>(right); + } + } +<# +} +#> +<# +void GenerateAllBinaryScalarBitwiseCombinationsForOperator(string op, string methodName) +{ +#> + public partial class BooleanDataFrameColumn + { + public static BooleanDataFrameColumn operator <#=op#>(BooleanDataFrameColumn left, bool right) + { + return left.<#=methodName#>(right); + } + } +<# +} +#> +<# +void GenerateAllBinaryIntBitwiseCombinationsForOperator(string op, string methodName) +{ + foreach (var type in typeConfiguration) + { + if (!type.SupportsNumeric || !type.SupportsBitwise || type.TypeName == "char") + { + continue; + } + string returnType = GetBinaryShiftOperationReturnType(type); + if (returnType == string.Empty) + { + continue; + } + string fullReturnType = GetCapitalizedPrimitiveTypes(returnType) + "DataFrameColumn"; + string fullColumnType = GetCapitalizedPrimitiveTypes(type.TypeName) + "DataFrameColumn"; + string capitalizedReturnType = GetCapitalizedPrimitiveTypes(returnType); +#> + public partial class <#=fullColumnType#> + { + public static <#=fullReturnType#> operator <#=op#>(<#=fullColumnType#> left, int value) + { + return left.<#=methodName#>(value); + } + } +<# + } +} +#> +<# +void GenerateAllComparisonCombinationsForOperator(string op, string methodName) +{ + foreach (TypeCombination types in ComparisonOperationCombinations.comparisonOperationCombinations) + { + string returnType = types.ReturnColumnType; + string columnType = types.ThisColumnType; + string otherColumnType = types.OtherColumnType; + + string fullColumnType = GetCapitalizedPrimitiveTypes(columnType) + "DataFrameColumn"; + string fullReturnType = GetCapitalizedPrimitiveTypes(returnType) + "DataFrameColumn"; + string fullOtherColumnType = GetCapitalizedPrimitiveTypes(otherColumnType) + "DataFrameColumn"; + + string capitalizedReturnType = GetCapitalizedPrimitiveTypes(returnType); + +#> + public partial class <#=fullColumnType#> + { + public static <#=fullReturnType#> operator <#=op#>(<#=fullColumnType#> left, <#=fullOtherColumnType#> right) + { + return left.<#=methodName#>(right); + } + } +<# + } + } +#> +<# +void GenerateAllComparisonScalarCombinationsForOperator(string op, string methodName) +{ + foreach (TypeCombination types in ComparisonOperationCombinations.comparisonOperationCombinations) + { + string returnType = types.ReturnColumnType; + string columnType = types.ThisColumnType; + string otherColumnType = types.OtherColumnType; + + string fullColumnType = GetCapitalizedPrimitiveTypes(columnType) + "DataFrameColumn"; + string fullReturnType = GetCapitalizedPrimitiveTypes(returnType) + "DataFrameColumn"; + + string capitalizedReturnType = GetCapitalizedPrimitiveTypes(returnType); + +#> + public partial class <#=fullColumnType#> + { + public static <#=fullReturnType#> operator <#=op#>(<#=fullColumnType#> left, <#=otherColumnType#> right) + { + return left.<#=methodName#>(right); + } + } +<# + } + } +#> +<# +foreach (MethodConfiguration method in methodConfiguration) +{ + // Don't generate method for Comparison and ComparisonScalar methods here + if (method.MethodType == MethodType.Binary && method.IsNumeric) + { + GenerateAllBinaryCombinationsForOperator(method.Operator, method.MethodName); + } + else if (method.MethodType == MethodType.BinaryScalar && method.IsNumeric) + { + GenerateAllBinaryScalarCombinationsForOperator(method.Operator, method.MethodName); + } + else if (method.MethodType == MethodType.Binary && method.IsBitwise) + { + GenerateAllBinaryBitwiseCombinationsForOperator(method.Operator, method.MethodName); + } + else if (method.MethodType == MethodType.BinaryScalar && method.IsBitwise) + { + GenerateAllBinaryScalarBitwiseCombinationsForOperator(method.Operator, method.MethodName); + } + else if (method.MethodType == MethodType.BinaryInt) + { + GenerateAllBinaryIntBitwiseCombinationsForOperator(method.Operator, method.MethodName); + } +} +#> +} diff --git a/src/Microsoft.Data.Analysis/PrimitiveDataFrameColumn.Computations.cs b/src/Microsoft.Data.Analysis/PrimitiveDataFrameColumn.Computations.cs new file mode 100644 index 0000000000..58e6a1e7c5 --- /dev/null +++ b/src/Microsoft.Data.Analysis/PrimitiveDataFrameColumn.Computations.cs @@ -0,0 +1,149 @@ + + +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +// Generated from PrimitiveDataFrameColumn.Computations.tt. Do not modify directly + +using System; +using System.Collections.Generic; +using System.Text; + +namespace Microsoft.Data.Analysis +{ + public partial class PrimitiveDataFrameColumn : DataFrameColumn + where T : unmanaged + { + /// + public override DataFrameColumn Abs(bool inPlace = false) + { + PrimitiveDataFrameColumn ret = inPlace ? this : Clone(); + PrimitiveColumnComputation.Instance.Abs(ret._columnContainer); + return ret; + } + /// + public override bool All() + { + PrimitiveColumnComputation.Instance.All(_columnContainer, out bool ret); + return ret; + } + /// + public override bool Any() + { + PrimitiveColumnComputation.Instance.Any(_columnContainer, out bool ret); + return ret; + } + /// + public override DataFrameColumn CumulativeMax(bool inPlace = false) + { + PrimitiveDataFrameColumn ret = inPlace ? this : Clone(); + PrimitiveColumnComputation.Instance.CumulativeMax(ret._columnContainer); + return ret; + } + /// + public override DataFrameColumn CumulativeMax(IEnumerable rowIndices, bool inPlace = false) + { + PrimitiveDataFrameColumn ret = inPlace ? this : Clone(); + PrimitiveColumnComputation.Instance.CumulativeMax(ret._columnContainer, rowIndices); + return ret; + } + /// + public override DataFrameColumn CumulativeMin(bool inPlace = false) + { + PrimitiveDataFrameColumn ret = inPlace ? this : Clone(); + PrimitiveColumnComputation.Instance.CumulativeMin(ret._columnContainer); + return ret; + } + /// + public override DataFrameColumn CumulativeMin(IEnumerable rowIndices, bool inPlace = false) + { + PrimitiveDataFrameColumn ret = inPlace ? this : Clone(); + PrimitiveColumnComputation.Instance.CumulativeMin(ret._columnContainer, rowIndices); + return ret; + } + /// + public override DataFrameColumn CumulativeProduct(bool inPlace = false) + { + PrimitiveDataFrameColumn ret = inPlace ? this : Clone(); + PrimitiveColumnComputation.Instance.CumulativeProduct(ret._columnContainer); + return ret; + } + /// + public override DataFrameColumn CumulativeProduct(IEnumerable rowIndices, bool inPlace = false) + { + PrimitiveDataFrameColumn ret = inPlace ? this : Clone(); + PrimitiveColumnComputation.Instance.CumulativeProduct(ret._columnContainer, rowIndices); + return ret; + } + /// + public override DataFrameColumn CumulativeSum(bool inPlace = false) + { + PrimitiveDataFrameColumn ret = inPlace ? this : Clone(); + PrimitiveColumnComputation.Instance.CumulativeSum(ret._columnContainer); + return ret; + } + /// + public override DataFrameColumn CumulativeSum(IEnumerable rowIndices, bool inPlace = false) + { + PrimitiveDataFrameColumn ret = inPlace ? this : Clone(); + PrimitiveColumnComputation.Instance.CumulativeSum(ret._columnContainer, rowIndices); + return ret; + } + /// + public override object Max() + { + PrimitiveColumnComputation.Instance.Max(_columnContainer, out T ret); + return ret; + } + /// + public override object Max(IEnumerable rowIndices) + { + PrimitiveColumnComputation.Instance.Max(_columnContainer, rowIndices, out T ret); + return ret; + } + /// + public override object Min() + { + PrimitiveColumnComputation.Instance.Min(_columnContainer, out T ret); + return ret; + } + /// + public override object Min(IEnumerable rowIndices) + { + PrimitiveColumnComputation.Instance.Min(_columnContainer, rowIndices, out T ret); + return ret; + } + /// + public override object Product() + { + PrimitiveColumnComputation.Instance.Product(_columnContainer, out T ret); + return ret; + } + /// + public override object Product(IEnumerable rowIndices) + { + PrimitiveColumnComputation.Instance.Product(_columnContainer, rowIndices, out T ret); + return ret; + } + /// + public override object Sum() + { + PrimitiveColumnComputation.Instance.Sum(_columnContainer, out T ret); + return ret; + } + /// + public override object Sum(IEnumerable rowIndices) + { + PrimitiveColumnComputation.Instance.Sum(_columnContainer, rowIndices, out T ret); + return ret; + } + /// + public override DataFrameColumn Round(bool inPlace = false) + { + PrimitiveDataFrameColumn ret = inPlace ? this : Clone(); + PrimitiveColumnComputation.Instance.Round(ret._columnContainer); + return ret; + } + } +} diff --git a/src/Microsoft.Data.Analysis/PrimitiveDataFrameColumn.Computations.tt b/src/Microsoft.Data.Analysis/PrimitiveDataFrameColumn.Computations.tt new file mode 100644 index 0000000000..0d09ea3e37 --- /dev/null +++ b/src/Microsoft.Data.Analysis/PrimitiveDataFrameColumn.Computations.tt @@ -0,0 +1,69 @@ +<#@ template debug="false" hostspecific="false" language="C#" #> +<#@ assembly name="System.Core" #> +<#@ import namespace="System.Linq" #> +<#@ import namespace="System.Text" #> +<#@ import namespace="System.Collections.Generic" #> +<#@ output extension=".cs" #> +<#@ include file="ColumnArithmeticTemplate.ttinclude" #> + +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +// Generated from PrimitiveDataFrameColumn.Computations.tt. Do not modify directly + +using System; +using System.Collections.Generic; +using System.Text; + +namespace Microsoft.Data.Analysis +{ + public partial class PrimitiveDataFrameColumn : DataFrameColumn + where T : unmanaged + { +<# foreach (MethodConfiguration compMethod in computationMethodConfiguration) { #> +<# if (compMethod.MethodType == MethodType.ElementwiseComputation && compMethod.HasReturnValue == false && compMethod.SupportsRowSubsets == true) {#> + /// + public override DataFrameColumn <#=compMethod.MethodName#>(IEnumerable rowIndices, bool inPlace = false) +<# } else if (compMethod.MethodType == MethodType.ElementwiseComputation && compMethod.HasReturnValue == false) {#> + /// + public override DataFrameColumn <#=compMethod.MethodName#>(bool inPlace = false) +<# } else if (compMethod.MethodType == MethodType.ElementwiseComputation && compMethod.HasReturnValue == true) {#> + /// + public override object <#=compMethod.MethodName#>() +<# } else if (compMethod.MethodType == MethodType.Reduction && compMethod.IsNumeric == true && compMethod.SupportsRowSubsets == true) { #> + /// + public override object <#=compMethod.MethodName#>(IEnumerable rowIndices) +<# } else if (compMethod.MethodType == MethodType.Reduction && compMethod.IsNumeric == true) { #> + /// + public override object <#=compMethod.MethodName#>() +<# } else { #> + /// + public override bool <#=compMethod.MethodName#>() +<# } #> + { +<# if (compMethod.MethodType == MethodType.ElementwiseComputation && compMethod.HasReturnValue == false && compMethod.SupportsRowSubsets == true) {#> + PrimitiveDataFrameColumn ret = <#=GenerateInPlaceStatement("this", "Clone()")#>; + PrimitiveColumnComputation.Instance.<#=compMethod.MethodName#>(ret._columnContainer, rowIndices); + return ret; +<# } else if (compMethod.MethodType == MethodType.ElementwiseComputation && compMethod.HasReturnValue == false) {#> + PrimitiveDataFrameColumn ret = <#=GenerateInPlaceStatement("this", "Clone()")#>; + PrimitiveColumnComputation.Instance.<#=compMethod.MethodName#>(ret._columnContainer); + return ret; +<# } else if (compMethod.MethodType == MethodType.ElementwiseComputation && compMethod.HasReturnValue == true) {#> + PrimitiveColumnComputation.Instance.<#=compMethod.MethodName#>(_columnContainer, out T ret); + return ret; +<# } else if (compMethod.MethodType == MethodType.Reduction && compMethod.IsNumeric == true && compMethod.SupportsRowSubsets == true) { #> + PrimitiveColumnComputation.Instance.<#=compMethod.MethodName#>(_columnContainer, rowIndices, out T ret); + return ret; +<# } else if (compMethod.MethodType == MethodType.Reduction && compMethod.IsNumeric == true) { #> + PrimitiveColumnComputation.Instance.<#=compMethod.MethodName#>(_columnContainer, out T ret); + return ret; +<# } else { #> + PrimitiveColumnComputation.Instance.<#=compMethod.MethodName#>(_columnContainer, out bool ret); + return ret; +<# } #> + } +<# } #> + } +} diff --git a/src/Microsoft.Data.Analysis/PrimitiveDataFrameColumn.ReversedBinaryOperations.cs b/src/Microsoft.Data.Analysis/PrimitiveDataFrameColumn.ReversedBinaryOperations.cs new file mode 100644 index 0000000000..ba04893e7e --- /dev/null +++ b/src/Microsoft.Data.Analysis/PrimitiveDataFrameColumn.ReversedBinaryOperations.cs @@ -0,0 +1,433 @@ + +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +// Generated from PrimitiveDataFrameColumn.ReversedBinaryOperations.tt. Do not modify directly + +using System; +using System.Collections.Generic; +using System.Runtime.CompilerServices; + +namespace Microsoft.Data.Analysis +{ + public partial class PrimitiveDataFrameColumn : DataFrameColumn + where T : unmanaged + { + + /// + public override DataFrameColumn ReverseAdd(U value, bool inPlace = false) + { + switch (this) + { + case PrimitiveDataFrameColumn boolColumn: + throw new NotSupportedException(); + case PrimitiveDataFrameColumn decimalColumn: + if (typeof(U) == typeof(bool)) + { + throw new NotSupportedException(); + } + if (typeof(U) == typeof(T)) + { + // No conversions + PrimitiveDataFrameColumn newColumn = inPlace ? this : Clone(); + newColumn._columnContainer.ReverseAdd(Unsafe.As(ref value)); + return newColumn; + } + else + { + if (inPlace) + { + throw new ArgumentException(string.Format(Strings.MismatchedValueType, typeof(T)), nameof(value)); + } + PrimitiveDataFrameColumn clonedDecimalColumn = CloneAsDecimalColumn(); + clonedDecimalColumn._columnContainer.ReverseAdd(DecimalConverter.Instance.GetDecimal(value)); + return clonedDecimalColumn; + } + case PrimitiveDataFrameColumn byteColumn: + case PrimitiveDataFrameColumn charColumn: + case PrimitiveDataFrameColumn doubleColumn: + case PrimitiveDataFrameColumn floatColumn: + case PrimitiveDataFrameColumn intColumn: + case PrimitiveDataFrameColumn longColumn: + case PrimitiveDataFrameColumn sbyteColumn: + case PrimitiveDataFrameColumn shortColumn: + case PrimitiveDataFrameColumn uintColumn: + case PrimitiveDataFrameColumn ulongColumn: + case PrimitiveDataFrameColumn ushortColumn: + if (typeof(U) == typeof(bool)) + { + throw new NotSupportedException(); + } + if (typeof(U) == typeof(T)) + { + // No conversions + PrimitiveDataFrameColumn newColumn = inPlace ? this : Clone(); + newColumn._columnContainer.ReverseAdd(Unsafe.As(ref value)); + return newColumn; + } + else + { + if (inPlace) + { + throw new ArgumentException(string.Format(Strings.MismatchedValueType, typeof(T)), nameof(value)); + } + if (typeof(U) == typeof(decimal)) + { + PrimitiveDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + decimalColumn._columnContainer.ReverseAdd(DecimalConverter.Instance.GetDecimal(value)); + return decimalColumn; + } + else + { + PrimitiveDataFrameColumn clonedDoubleColumn = CloneAsDoubleColumn(); + clonedDoubleColumn._columnContainer.ReverseAdd(DoubleConverter.Instance.GetDouble(value)); + return clonedDoubleColumn; + } + } + default: + throw new NotSupportedException(); + } + } + /// + public override DataFrameColumn ReverseSubtract(U value, bool inPlace = false) + { + switch (this) + { + case PrimitiveDataFrameColumn boolColumn: + throw new NotSupportedException(); + case PrimitiveDataFrameColumn decimalColumn: + if (typeof(U) == typeof(bool)) + { + throw new NotSupportedException(); + } + if (typeof(U) == typeof(T)) + { + // No conversions + PrimitiveDataFrameColumn newColumn = inPlace ? this : Clone(); + newColumn._columnContainer.ReverseSubtract(Unsafe.As(ref value)); + return newColumn; + } + else + { + if (inPlace) + { + throw new ArgumentException(string.Format(Strings.MismatchedValueType, typeof(T)), nameof(value)); + } + PrimitiveDataFrameColumn clonedDecimalColumn = CloneAsDecimalColumn(); + clonedDecimalColumn._columnContainer.ReverseSubtract(DecimalConverter.Instance.GetDecimal(value)); + return clonedDecimalColumn; + } + case PrimitiveDataFrameColumn byteColumn: + case PrimitiveDataFrameColumn charColumn: + case PrimitiveDataFrameColumn doubleColumn: + case PrimitiveDataFrameColumn floatColumn: + case PrimitiveDataFrameColumn intColumn: + case PrimitiveDataFrameColumn longColumn: + case PrimitiveDataFrameColumn sbyteColumn: + case PrimitiveDataFrameColumn shortColumn: + case PrimitiveDataFrameColumn uintColumn: + case PrimitiveDataFrameColumn ulongColumn: + case PrimitiveDataFrameColumn ushortColumn: + if (typeof(U) == typeof(bool)) + { + throw new NotSupportedException(); + } + if (typeof(U) == typeof(T)) + { + // No conversions + PrimitiveDataFrameColumn newColumn = inPlace ? this : Clone(); + newColumn._columnContainer.ReverseSubtract(Unsafe.As(ref value)); + return newColumn; + } + else + { + if (inPlace) + { + throw new ArgumentException(string.Format(Strings.MismatchedValueType, typeof(T)), nameof(value)); + } + if (typeof(U) == typeof(decimal)) + { + PrimitiveDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + decimalColumn._columnContainer.ReverseSubtract(DecimalConverter.Instance.GetDecimal(value)); + return decimalColumn; + } + else + { + PrimitiveDataFrameColumn clonedDoubleColumn = CloneAsDoubleColumn(); + clonedDoubleColumn._columnContainer.ReverseSubtract(DoubleConverter.Instance.GetDouble(value)); + return clonedDoubleColumn; + } + } + default: + throw new NotSupportedException(); + } + } + /// + public override DataFrameColumn ReverseMultiply(U value, bool inPlace = false) + { + switch (this) + { + case PrimitiveDataFrameColumn boolColumn: + throw new NotSupportedException(); + case PrimitiveDataFrameColumn decimalColumn: + if (typeof(U) == typeof(bool)) + { + throw new NotSupportedException(); + } + if (typeof(U) == typeof(T)) + { + // No conversions + PrimitiveDataFrameColumn newColumn = inPlace ? this : Clone(); + newColumn._columnContainer.ReverseMultiply(Unsafe.As(ref value)); + return newColumn; + } + else + { + if (inPlace) + { + throw new ArgumentException(string.Format(Strings.MismatchedValueType, typeof(T)), nameof(value)); + } + PrimitiveDataFrameColumn clonedDecimalColumn = CloneAsDecimalColumn(); + clonedDecimalColumn._columnContainer.ReverseMultiply(DecimalConverter.Instance.GetDecimal(value)); + return clonedDecimalColumn; + } + case PrimitiveDataFrameColumn byteColumn: + case PrimitiveDataFrameColumn charColumn: + case PrimitiveDataFrameColumn doubleColumn: + case PrimitiveDataFrameColumn floatColumn: + case PrimitiveDataFrameColumn intColumn: + case PrimitiveDataFrameColumn longColumn: + case PrimitiveDataFrameColumn sbyteColumn: + case PrimitiveDataFrameColumn shortColumn: + case PrimitiveDataFrameColumn uintColumn: + case PrimitiveDataFrameColumn ulongColumn: + case PrimitiveDataFrameColumn ushortColumn: + if (typeof(U) == typeof(bool)) + { + throw new NotSupportedException(); + } + if (typeof(U) == typeof(T)) + { + // No conversions + PrimitiveDataFrameColumn newColumn = inPlace ? this : Clone(); + newColumn._columnContainer.ReverseMultiply(Unsafe.As(ref value)); + return newColumn; + } + else + { + if (inPlace) + { + throw new ArgumentException(string.Format(Strings.MismatchedValueType, typeof(T)), nameof(value)); + } + if (typeof(U) == typeof(decimal)) + { + PrimitiveDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + decimalColumn._columnContainer.ReverseMultiply(DecimalConverter.Instance.GetDecimal(value)); + return decimalColumn; + } + else + { + PrimitiveDataFrameColumn clonedDoubleColumn = CloneAsDoubleColumn(); + clonedDoubleColumn._columnContainer.ReverseMultiply(DoubleConverter.Instance.GetDouble(value)); + return clonedDoubleColumn; + } + } + default: + throw new NotSupportedException(); + } + } + /// + public override DataFrameColumn ReverseDivide(U value, bool inPlace = false) + { + switch (this) + { + case PrimitiveDataFrameColumn boolColumn: + throw new NotSupportedException(); + case PrimitiveDataFrameColumn decimalColumn: + if (typeof(U) == typeof(bool)) + { + throw new NotSupportedException(); + } + if (typeof(U) == typeof(T)) + { + // No conversions + PrimitiveDataFrameColumn newColumn = inPlace ? this : Clone(); + newColumn._columnContainer.ReverseDivide(Unsafe.As(ref value)); + return newColumn; + } + else + { + if (inPlace) + { + throw new ArgumentException(string.Format(Strings.MismatchedValueType, typeof(T)), nameof(value)); + } + PrimitiveDataFrameColumn clonedDecimalColumn = CloneAsDecimalColumn(); + clonedDecimalColumn._columnContainer.ReverseDivide(DecimalConverter.Instance.GetDecimal(value)); + return clonedDecimalColumn; + } + case PrimitiveDataFrameColumn byteColumn: + case PrimitiveDataFrameColumn charColumn: + case PrimitiveDataFrameColumn doubleColumn: + case PrimitiveDataFrameColumn floatColumn: + case PrimitiveDataFrameColumn intColumn: + case PrimitiveDataFrameColumn longColumn: + case PrimitiveDataFrameColumn sbyteColumn: + case PrimitiveDataFrameColumn shortColumn: + case PrimitiveDataFrameColumn uintColumn: + case PrimitiveDataFrameColumn ulongColumn: + case PrimitiveDataFrameColumn ushortColumn: + if (typeof(U) == typeof(bool)) + { + throw new NotSupportedException(); + } + if (typeof(U) == typeof(T)) + { + // No conversions + PrimitiveDataFrameColumn newColumn = inPlace ? this : Clone(); + newColumn._columnContainer.ReverseDivide(Unsafe.As(ref value)); + return newColumn; + } + else + { + if (inPlace) + { + throw new ArgumentException(string.Format(Strings.MismatchedValueType, typeof(T)), nameof(value)); + } + if (typeof(U) == typeof(decimal)) + { + PrimitiveDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + decimalColumn._columnContainer.ReverseDivide(DecimalConverter.Instance.GetDecimal(value)); + return decimalColumn; + } + else + { + PrimitiveDataFrameColumn clonedDoubleColumn = CloneAsDoubleColumn(); + clonedDoubleColumn._columnContainer.ReverseDivide(DoubleConverter.Instance.GetDouble(value)); + return clonedDoubleColumn; + } + } + default: + throw new NotSupportedException(); + } + } + /// + public override DataFrameColumn ReverseModulo(U value, bool inPlace = false) + { + switch (this) + { + case PrimitiveDataFrameColumn boolColumn: + throw new NotSupportedException(); + case PrimitiveDataFrameColumn decimalColumn: + if (typeof(U) == typeof(bool)) + { + throw new NotSupportedException(); + } + if (typeof(U) == typeof(T)) + { + // No conversions + PrimitiveDataFrameColumn newColumn = inPlace ? this : Clone(); + newColumn._columnContainer.ReverseModulo(Unsafe.As(ref value)); + return newColumn; + } + else + { + if (inPlace) + { + throw new ArgumentException(string.Format(Strings.MismatchedValueType, typeof(T)), nameof(value)); + } + PrimitiveDataFrameColumn clonedDecimalColumn = CloneAsDecimalColumn(); + clonedDecimalColumn._columnContainer.ReverseModulo(DecimalConverter.Instance.GetDecimal(value)); + return clonedDecimalColumn; + } + case PrimitiveDataFrameColumn byteColumn: + case PrimitiveDataFrameColumn charColumn: + case PrimitiveDataFrameColumn doubleColumn: + case PrimitiveDataFrameColumn floatColumn: + case PrimitiveDataFrameColumn intColumn: + case PrimitiveDataFrameColumn longColumn: + case PrimitiveDataFrameColumn sbyteColumn: + case PrimitiveDataFrameColumn shortColumn: + case PrimitiveDataFrameColumn uintColumn: + case PrimitiveDataFrameColumn ulongColumn: + case PrimitiveDataFrameColumn ushortColumn: + if (typeof(U) == typeof(bool)) + { + throw new NotSupportedException(); + } + if (typeof(U) == typeof(T)) + { + // No conversions + PrimitiveDataFrameColumn newColumn = inPlace ? this : Clone(); + newColumn._columnContainer.ReverseModulo(Unsafe.As(ref value)); + return newColumn; + } + else + { + if (inPlace) + { + throw new ArgumentException(string.Format(Strings.MismatchedValueType, typeof(T)), nameof(value)); + } + if (typeof(U) == typeof(decimal)) + { + PrimitiveDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + decimalColumn._columnContainer.ReverseModulo(DecimalConverter.Instance.GetDecimal(value)); + return decimalColumn; + } + else + { + PrimitiveDataFrameColumn clonedDoubleColumn = CloneAsDoubleColumn(); + clonedDoubleColumn._columnContainer.ReverseModulo(DoubleConverter.Instance.GetDouble(value)); + return clonedDoubleColumn; + } + } + default: + throw new NotSupportedException(); + } + } + /// + public override PrimitiveDataFrameColumn ReverseAnd(bool value, bool inPlace = false) + { + switch (this) + { + case PrimitiveDataFrameColumn boolColumn: + PrimitiveDataFrameColumn retColumn = inPlace ? boolColumn : boolColumn.Clone(); + retColumn._columnContainer.ReverseAnd(value); + return retColumn; + default: + throw new NotSupportedException(); + + } + } + /// + public override PrimitiveDataFrameColumn ReverseOr(bool value, bool inPlace = false) + { + switch (this) + { + case PrimitiveDataFrameColumn boolColumn: + PrimitiveDataFrameColumn retColumn = inPlace ? boolColumn : boolColumn.Clone(); + retColumn._columnContainer.ReverseOr(value); + return retColumn; + default: + throw new NotSupportedException(); + + } + } + /// + public override PrimitiveDataFrameColumn ReverseXor(bool value, bool inPlace = false) + { + switch (this) + { + case PrimitiveDataFrameColumn boolColumn: + PrimitiveDataFrameColumn retColumn = inPlace ? boolColumn : boolColumn.Clone(); + retColumn._columnContainer.ReverseXor(value); + return retColumn; + default: + throw new NotSupportedException(); + + } + } + + + } +} diff --git a/src/Microsoft.Data.Analysis/PrimitiveDataFrameColumn.ReversedBinaryOperations.tt b/src/Microsoft.Data.Analysis/PrimitiveDataFrameColumn.ReversedBinaryOperations.tt new file mode 100644 index 0000000000..68382f5b92 --- /dev/null +++ b/src/Microsoft.Data.Analysis/PrimitiveDataFrameColumn.ReversedBinaryOperations.tt @@ -0,0 +1,119 @@ +<#@ template debug="false" hostspecific="false" language="C#" #> +<#@ assembly name="System.Core" #> +<#@ import namespace="System.Linq" #> +<#@ import namespace="System.Text" #> +<#@ import namespace="System.Collections.Generic" #> +<#@ output extension=".cs" #> +<#@ include file="ColumnArithmeticTemplate.ttinclude" #> +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +// Generated from PrimitiveDataFrameColumn.ReversedBinaryOperations.tt. Do not modify directly + +using System; +using System.Collections.Generic; +using System.Runtime.CompilerServices; + +namespace Microsoft.Data.Analysis +{ + public partial class PrimitiveDataFrameColumn : DataFrameColumn + where T : unmanaged + { + +<# foreach (MethodConfiguration method in methodConfiguration) { #> +<# if (method.MethodType == MethodType.BinaryScalar) {#> +<# if (method.IsBitwise == true) { #> + /// + public override PrimitiveDataFrameColumn Reverse<#=method.MethodName#>(bool value, bool inPlace = false) +<# } else { #> + /// + public override DataFrameColumn Reverse<#=method.MethodName#>(U value, bool inPlace = false) +<# } #> + { +<# if (method.IsBitwise == true) { #> + switch (this) + { + case PrimitiveDataFrameColumn boolColumn: + PrimitiveDataFrameColumn retColumn = inPlace ? boolColumn : boolColumn.Clone(); + retColumn._columnContainer.Reverse<#=method.MethodName#>(value); + return retColumn; + default: + throw new NotSupportedException(); + + } +<# } else { #> + switch (this) + { + case PrimitiveDataFrameColumn boolColumn: + throw new NotSupportedException(); + case PrimitiveDataFrameColumn decimalColumn: + if (typeof(U) == typeof(bool)) + { + throw new NotSupportedException(); + } + if (typeof(U) == typeof(T)) + { + // No conversions + PrimitiveDataFrameColumn newColumn = inPlace ? this : Clone(); + newColumn._columnContainer.Reverse<#=method.MethodName#>(Unsafe.As(ref value)); + return newColumn; + } + else + { + if (inPlace) + { + throw new ArgumentException(string.Format(Strings.MismatchedValueType, typeof(T)), nameof(value)); + } + PrimitiveDataFrameColumn clonedDecimalColumn = CloneAsDecimalColumn(); + clonedDecimalColumn._columnContainer.Reverse<#=method.MethodName#>(DecimalConverter.Instance.GetDecimal(value)); + return clonedDecimalColumn; + } +<# foreach (TypeConfiguration type in typeConfiguration) { #> +<# if (type.TypeName == "bool") { #> +<# } else if (type.TypeName == "decimal") { #> +<# } else { #> + case PrimitiveDataFrameColumn<<#=type.TypeName#>> <#=type.TypeName#>Column: +<# } #> +<# } #> + if (typeof(U) == typeof(bool)) + { + throw new NotSupportedException(); + } + if (typeof(U) == typeof(T)) + { + // No conversions + PrimitiveDataFrameColumn newColumn = inPlace ? this : Clone(); + newColumn._columnContainer.Reverse<#=method.MethodName#>(Unsafe.As(ref value)); + return newColumn; + } + else + { + if (inPlace) + { + throw new ArgumentException(string.Format(Strings.MismatchedValueType, typeof(T)), nameof(value)); + } + if (typeof(U) == typeof(decimal)) + { + PrimitiveDataFrameColumn decimalColumn = CloneAsDecimalColumn(); + decimalColumn._columnContainer.Reverse<#=method.MethodName#>(DecimalConverter.Instance.GetDecimal(value)); + return decimalColumn; + } + else + { + PrimitiveDataFrameColumn clonedDoubleColumn = CloneAsDoubleColumn(); + clonedDoubleColumn._columnContainer.Reverse<#=method.MethodName#>(DoubleConverter.Instance.GetDouble(value)); + return clonedDoubleColumn; + } + } + default: + throw new NotSupportedException(); + } +<# } #> + } +<# } #> +<# } #> + + + } +} diff --git a/src/Microsoft.Data.Analysis/PrimitiveDataFrameColumn.Sort.cs b/src/Microsoft.Data.Analysis/PrimitiveDataFrameColumn.Sort.cs new file mode 100644 index 0000000000..60f7e21046 --- /dev/null +++ b/src/Microsoft.Data.Analysis/PrimitiveDataFrameColumn.Sort.cs @@ -0,0 +1,100 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System; +using System.Collections.Generic; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +namespace Microsoft.Data.Analysis +{ + public partial class PrimitiveDataFrameColumn : DataFrameColumn + where T : unmanaged + { + public new PrimitiveDataFrameColumn Sort(bool ascending = true) + { + PrimitiveDataFrameColumn sortIndices = GetAscendingSortIndices(); + return Clone(sortIndices, !ascending, NullCount); + } + + internal override PrimitiveDataFrameColumn GetAscendingSortIndices() + { + // The return sortIndices contains only the non null indices. + GetSortIndices(Comparer.Default, out PrimitiveDataFrameColumn sortIndices); + return sortIndices; + } + + private void GetSortIndices(IComparer comparer, out PrimitiveDataFrameColumn columnSortIndices) + { + List> bufferSortIndices = new List>(_columnContainer.Buffers.Count); + // Sort each buffer first + for (int b = 0; b < _columnContainer.Buffers.Count; b++) + { + ReadOnlyDataFrameBuffer buffer = _columnContainer.Buffers[b]; + ReadOnlySpan nullBitMapSpan = _columnContainer.NullBitMapBuffers[b].ReadOnlySpan; + int[] sortIndices = new int[buffer.Length]; + for (int i = 0; i < buffer.Length; i++) + sortIndices[i] = i; + IntrospectiveSort(buffer.ReadOnlySpan, buffer.Length, sortIndices, comparer); + // Bug fix: QuickSort is not stable. When PrimitiveDataFrameColumn has null values and default values, they move around + List nonNullSortIndices = new List(); + for (int i = 0; i < sortIndices.Length; i++) + { + if (_columnContainer.IsValid(nullBitMapSpan, sortIndices[i])) + nonNullSortIndices.Add(sortIndices[i]); + + } + bufferSortIndices.Add(nonNullSortIndices); + } + // Simple merge sort to build the full column's sort indices + ValueTuple GetFirstNonNullValueAndBufferIndexStartingAtIndex(int bufferIndex, int startIndex) + { + int index = bufferSortIndices[bufferIndex][startIndex]; + T value; + ReadOnlyMemory buffer = _columnContainer.Buffers[bufferIndex].ReadOnlyBuffer; + ReadOnlyMemory typedBuffer = Unsafe.As, ReadOnlyMemory>(ref buffer); + if (!typedBuffer.IsEmpty) + { + bool isArray = MemoryMarshal.TryGetArray(typedBuffer, out ArraySegment arraySegment); + if (isArray) + { + value = arraySegment.Array[index + arraySegment.Offset]; + } + else + value = _columnContainer.Buffers[bufferIndex][index]; + } + else + { + value = _columnContainer.Buffers[bufferIndex][index]; + } + return (value, startIndex); + } + SortedDictionary>> heapOfValueAndListOfTupleOfSortAndBufferIndex = new SortedDictionary>>(comparer); + IList> buffers = _columnContainer.Buffers; + for (int i = 0; i < buffers.Count; i++) + { + ReadOnlyDataFrameBuffer buffer = buffers[i]; + if (bufferSortIndices[i].Count == 0) + { + // All nulls + continue; + } + ValueTuple valueAndBufferIndex = GetFirstNonNullValueAndBufferIndexStartingAtIndex(i, 0); + if (heapOfValueAndListOfTupleOfSortAndBufferIndex.ContainsKey(valueAndBufferIndex.Item1)) + { + heapOfValueAndListOfTupleOfSortAndBufferIndex[valueAndBufferIndex.Item1].Add((valueAndBufferIndex.Item2, i)); + } + else + { + heapOfValueAndListOfTupleOfSortAndBufferIndex.Add(valueAndBufferIndex.Item1, new List>() { (valueAndBufferIndex.Item2, i) }); + } + } + columnSortIndices = new PrimitiveDataFrameColumn("SortIndices"); + GetBufferSortIndex getBufferSortIndex = new GetBufferSortIndex((int bufferIndex, int sortIndex) => (bufferSortIndices[bufferIndex][sortIndex]) + bufferIndex * bufferSortIndices[0].Count); + GetValueAndBufferSortIndexAtBuffer getValueAndBufferSortIndexAtBuffer = new GetValueAndBufferSortIndexAtBuffer((int bufferIndex, int sortIndex) => GetFirstNonNullValueAndBufferIndexStartingAtIndex(bufferIndex, sortIndex)); + GetBufferLengthAtIndex getBufferLengthAtIndex = new GetBufferLengthAtIndex((int bufferIndex) => bufferSortIndices[bufferIndex].Count); + PopulateColumnSortIndicesWithHeap(heapOfValueAndListOfTupleOfSortAndBufferIndex, columnSortIndices, getBufferSortIndex, getValueAndBufferSortIndexAtBuffer, getBufferLengthAtIndex); + } + } +} diff --git a/src/Microsoft.Data.Analysis/PrimitiveDataFrameColumn.cs b/src/Microsoft.Data.Analysis/PrimitiveDataFrameColumn.cs new file mode 100644 index 0000000000..a7e7d20cb9 --- /dev/null +++ b/src/Microsoft.Data.Analysis/PrimitiveDataFrameColumn.cs @@ -0,0 +1,805 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Diagnostics; +using Apache.Arrow; +using Apache.Arrow.Types; +using Microsoft.ML; +using Microsoft.ML.Data; + +namespace Microsoft.Data.Analysis +{ + /// + /// A column to hold primitive types such as int, float etc. + /// + /// + public partial class PrimitiveDataFrameColumn : DataFrameColumn, IEnumerable + where T : unmanaged + { + private PrimitiveColumnContainer _columnContainer; + + internal PrimitiveColumnContainer ColumnContainer => _columnContainer; + + internal PrimitiveDataFrameColumn(string name, PrimitiveColumnContainer column) : base(name, column.Length, typeof(T)) + { + _columnContainer = column; + } + + public PrimitiveDataFrameColumn(string name, IEnumerable values) : base(name, 0, typeof(T)) + { + _columnContainer = new PrimitiveColumnContainer(values); + Length = _columnContainer.Length; + } + + public PrimitiveDataFrameColumn(string name, IEnumerable values) : base(name, 0, typeof(T)) + { + _columnContainer = new PrimitiveColumnContainer(values); + Length = _columnContainer.Length; + } + + public PrimitiveDataFrameColumn(string name, long length = 0) : base(name, length, typeof(T)) + { + _columnContainer = new PrimitiveColumnContainer(length); + } + + public PrimitiveDataFrameColumn(string name, ReadOnlyMemory buffer, ReadOnlyMemory nullBitMap, int length = 0, int nullCount = 0) : base(name, length, typeof(T)) + { + _columnContainer = new PrimitiveColumnContainer(buffer, nullBitMap, length, nullCount); + } + + /// + /// Returns an enumerable of immutable memory buffers representing the underlying values + /// + /// values are encoded in the buffers returned by GetReadOnlyNullBitmapBuffers in the Apache Arrow format + /// IEnumerable + public IEnumerable> GetReadOnlyDataBuffers() + { + for (int i = 0; i < _columnContainer.Buffers.Count; i++) + { + ReadOnlyDataFrameBuffer buffer = _columnContainer.Buffers[i]; + yield return buffer.ReadOnlyMemory; + } + } + + /// + /// Returns an enumerable of immutable buffers representing values in the Apache Arrow format + /// + /// Each encodes the values for its corresponding Data buffer + /// IEnumerable + public IEnumerable> GetReadOnlyNullBitMapBuffers() + { + for (int i = 0; i < _columnContainer.NullBitMapBuffers.Count; i++) + { + ReadOnlyDataFrameBuffer buffer = _columnContainer.NullBitMapBuffers[i]; + yield return buffer.RawReadOnlyMemory; + } + } + + private IArrowType GetArrowType() + { + if (typeof(T) == typeof(bool)) + return BooleanType.Default; + else if (typeof(T) == typeof(double)) + return DoubleType.Default; + else if (typeof(T) == typeof(float)) + return FloatType.Default; + else if (typeof(T) == typeof(sbyte)) + return Int8Type.Default; + else if (typeof(T) == typeof(int)) + return Int32Type.Default; + else if (typeof(T) == typeof(long)) + return Int64Type.Default; + else if (typeof(T) == typeof(short)) + return Int16Type.Default; + else if (typeof(T) == typeof(byte)) + return UInt8Type.Default; + else if (typeof(T) == typeof(uint)) + return UInt32Type.Default; + else if (typeof(T) == typeof(ulong)) + return UInt64Type.Default; + else if (typeof(T) == typeof(ushort)) + return UInt16Type.Default; + else + throw new NotImplementedException(nameof(T)); + } + + protected internal override Field GetArrowField() => new Field(Name, GetArrowType(), NullCount != 0); + + protected internal override int GetMaxRecordBatchLength(long startIndex) => _columnContainer.MaxRecordBatchLength(startIndex); + + private int GetNullCount(long startIndex, int numberOfRows) + { + int nullCount = 0; + for (long i = startIndex; i < numberOfRows; i++) + { + if (!IsValid(i)) + nullCount++; + } + return nullCount; + } + + protected internal override Apache.Arrow.Array ToArrowArray(long startIndex, int numberOfRows) + { + int arrayIndex = numberOfRows == 0 ? 0 : _columnContainer.GetArrayContainingRowIndex(startIndex); + int offset = (int)(startIndex - arrayIndex * ReadOnlyDataFrameBuffer.MaxCapacity); + if (numberOfRows != 0 && numberOfRows > _columnContainer.Buffers[arrayIndex].Length - offset) + { + throw new ArgumentException(Strings.SpansMultipleBuffers, nameof(numberOfRows)); + } + ArrowBuffer valueBuffer = numberOfRows == 0 ? ArrowBuffer.Empty : new ArrowBuffer(_columnContainer.GetValueBuffer(startIndex)); + ArrowBuffer nullBuffer = numberOfRows == 0 ? ArrowBuffer.Empty : new ArrowBuffer(_columnContainer.GetNullBuffer(startIndex)); + int nullCount = GetNullCount(startIndex, numberOfRows); + Type type = this.DataType; + if (type == typeof(bool)) + return new BooleanArray(valueBuffer, nullBuffer, numberOfRows, nullCount, offset); + else if (type == typeof(double)) + return new DoubleArray(valueBuffer, nullBuffer, numberOfRows, nullCount, offset); + else if (type == typeof(float)) + return new FloatArray(valueBuffer, nullBuffer, numberOfRows, nullCount, offset); + else if (type == typeof(int)) + return new Int32Array(valueBuffer, nullBuffer, numberOfRows, nullCount, offset); + else if (type == typeof(long)) + return new Int64Array(valueBuffer, nullBuffer, numberOfRows, nullCount, offset); + else if (type == typeof(sbyte)) + return new Int8Array(valueBuffer, nullBuffer, numberOfRows, nullCount, offset); + else if (type == typeof(short)) + return new Int16Array(valueBuffer, nullBuffer, numberOfRows, nullCount, offset); + else if (type == typeof(uint)) + return new UInt32Array(valueBuffer, nullBuffer, numberOfRows, nullCount, offset); + else if (type == typeof(ulong)) + return new UInt64Array(valueBuffer, nullBuffer, numberOfRows, nullCount, offset); + else if (type == typeof(ushort)) + return new UInt16Array(valueBuffer, nullBuffer, numberOfRows, nullCount, offset); + else if (type == typeof(byte)) + return new UInt8Array(valueBuffer, nullBuffer, numberOfRows, nullCount, offset); + else + throw new NotImplementedException(type.ToString()); + } + + public new IReadOnlyList this[long startIndex, int length] + { + get + { + if (startIndex > Length) + { + throw new ArgumentOutOfRangeException(nameof(startIndex)); + } + return _columnContainer[startIndex, length]; + } + } + + protected override IReadOnlyList GetValues(long startIndex, int length) + { + if (startIndex > Length) + { + throw new ArgumentOutOfRangeException(nameof(startIndex)); + } + + var ret = new List(length); + long endIndex = Math.Min(Length, startIndex + length); + for (long i = startIndex; i < endIndex; i++) + { + ret.Add(this[i]); + } + return ret; + } + + internal T? GetTypedValue(long rowIndex) => _columnContainer[rowIndex]; + + protected override object GetValue(long rowIndex) => GetTypedValue(rowIndex); + + protected override void SetValue(long rowIndex, object value) + { + if (value == null || value.GetType() == typeof(T)) + { + _columnContainer[rowIndex] = (T?)value; + } + else + { + throw new ArgumentException(string.Format(Strings.MismatchedValueType, DataType), nameof(value)); + } + } + + public new T? this[long rowIndex] + { + get => GetTypedValue(rowIndex); + set + { + if (value == null || value.GetType() == typeof(T)) + { + _columnContainer[rowIndex] = value; + } + else + { + throw new ArgumentException(string.Format(Strings.MismatchedValueType, DataType), nameof(value)); + } + } + } + + public override double Median() + { + // Not the most efficient implementation. Using a selection algorithm here would be O(n) instead of O(nLogn) + if (Length == 0) + return 0; + PrimitiveDataFrameColumn sortIndices = GetAscendingSortIndices(); + long middle = sortIndices.Length / 2; + double middleValue = (double)Convert.ChangeType(this[sortIndices[middle].Value].Value, typeof(double)); + if (Length % 2 == 0) + { + double otherMiddleValue = (double)Convert.ChangeType(this[sortIndices[middle - 1].Value].Value, typeof(double)); + return (middleValue + otherMiddleValue) / 2; + } + else + { + return middleValue; + } + } + + public override double Mean() + { + if (Length == 0) + return 0; + return (double)Convert.ChangeType((T)Sum(), typeof(double)) / Length; + } + + protected internal override void Resize(long length) + { + _columnContainer.Resize(length); + Length = _columnContainer.Length; + } + + public void Append(T? value) + { + _columnContainer.Append(value); + Length++; + } + + public void AppendMany(T? value, long count) + { + _columnContainer.AppendMany(value, count); + Length += count; + } + + public override long NullCount + { + get + { + Debug.Assert(_columnContainer.NullCount >= 0); + return _columnContainer.NullCount; + } + } + + public bool IsValid(long index) => _columnContainer.IsValid(index); + + public IEnumerator GetEnumerator() => _columnContainer.GetEnumerator(); + + protected override IEnumerator GetEnumeratorCore() => GetEnumerator(); + + public override bool IsNumericColumn() + { + bool ret = true; + if (typeof(T) == typeof(char) || typeof(T) == typeof(bool)) + ret = false; + return ret; + } + + /// + /// Returns a new column with nulls replaced by value + /// + /// + /// Indicates if the operation should be performed in place + public PrimitiveDataFrameColumn FillNulls(T value, bool inPlace = false) + { + PrimitiveDataFrameColumn column = inPlace ? this : Clone(); + column.ApplyElementwise((T? columnValue, long index) => + { + if (columnValue.HasValue == false) + return value; + else + return columnValue.Value; + }); + return column; + } + + protected override DataFrameColumn FillNullsImplementation(object value, bool inPlace) + { + T convertedValue = (T)Convert.ChangeType(value, typeof(T)); + return FillNulls(convertedValue, inPlace); + } + + public override DataFrame ValueCounts() + { + Dictionary> groupedValues = GroupColumnValues(); + PrimitiveDataFrameColumn keys = new PrimitiveDataFrameColumn("Values"); + PrimitiveDataFrameColumn counts = new PrimitiveDataFrameColumn("Counts"); + foreach (KeyValuePair> keyValuePair in groupedValues) + { + keys.Append(keyValuePair.Key); + counts.Append(keyValuePair.Value.Count); + } + return new DataFrame(new List { keys, counts }); + } + + /// + public override bool HasDescription() => IsNumericColumn(); + + /// + /// Returns a preview of the column contents as a formatted string. + /// + public override string ToString() + { + return $"{Name}: {_columnContainer.ToString()}"; + } + + /// + /// Returns a clone of this column + /// + /// A column who values are used as indices + /// + /// + /// + public new PrimitiveDataFrameColumn Clone(DataFrameColumn mapIndices, bool invertMapIndices, long numberOfNullsToAppend) + { + PrimitiveDataFrameColumn clone; + if (!(mapIndices is null)) + { + Type dataType = mapIndices.DataType; + if (dataType != typeof(long) && dataType != typeof(int) && dataType != typeof(bool)) + throw new ArgumentException(String.Format(Strings.MultipleMismatchedValueType, typeof(long), typeof(int), typeof(bool)), nameof(mapIndices)); + if (dataType == typeof(long)) + clone = Clone(mapIndices as PrimitiveDataFrameColumn, invertMapIndices); + else if (dataType == typeof(int)) + clone = Clone(mapIndices as PrimitiveDataFrameColumn, invertMapIndices); + else + clone = Clone(mapIndices as PrimitiveDataFrameColumn); + } + else + { + clone = Clone(); + } + Debug.Assert(!ReferenceEquals(clone, null)); + clone.AppendMany(null, numberOfNullsToAppend); + return clone; + } + + /// + protected override DataFrameColumn CloneImplementation(DataFrameColumn mapIndices, bool invertMapIndices, long numberOfNullsToAppend) + { + return Clone(mapIndices, invertMapIndices, numberOfNullsToAppend); + } + + private PrimitiveDataFrameColumn Clone(PrimitiveDataFrameColumn boolColumn) + { + if (boolColumn.Length > Length) + throw new ArgumentException(Strings.MapIndicesExceedsColumnLenth, nameof(boolColumn)); + PrimitiveDataFrameColumn ret = new PrimitiveDataFrameColumn(Name); + for (long i = 0; i < boolColumn.Length; i++) + { + bool? value = boolColumn[i]; + if (value.HasValue && value.Value == true) + ret.Append(this[i]); + } + return ret; + } + + private PrimitiveDataFrameColumn CloneImplementation(PrimitiveDataFrameColumn mapIndices, bool invertMapIndices = false) + where U : unmanaged + { + if (!mapIndices.IsNumericColumn()) + throw new ArgumentException(String.Format(Strings.MismatchedValueType, Strings.NumericColumnType), nameof(mapIndices)); + + PrimitiveColumnContainer retContainer; + if (mapIndices.DataType == typeof(long)) + { + retContainer = _columnContainer.Clone(mapIndices._columnContainer, typeof(long), invertMapIndices); + } + else if (mapIndices.DataType == typeof(int)) + { + retContainer = _columnContainer.Clone(mapIndices._columnContainer, typeof(int), invertMapIndices); + } + else + throw new NotImplementedException(); + PrimitiveDataFrameColumn ret = new PrimitiveDataFrameColumn(Name, retContainer); + return ret; + } + + public PrimitiveDataFrameColumn Clone(PrimitiveDataFrameColumn mapIndices = null, bool invertMapIndices = false) + { + if (mapIndices is null) + { + PrimitiveColumnContainer newColumnContainer = _columnContainer.Clone(); + return new PrimitiveDataFrameColumn(Name, newColumnContainer); + } + else + { + return CloneImplementation(mapIndices, invertMapIndices); + } + } + + public PrimitiveDataFrameColumn Clone(PrimitiveDataFrameColumn mapIndices, bool invertMapIndices = false) + { + return CloneImplementation(mapIndices, invertMapIndices); + } + + public PrimitiveDataFrameColumn Clone(IEnumerable mapIndices) + { + IEnumerator rows = mapIndices.GetEnumerator(); + PrimitiveDataFrameColumn ret = new PrimitiveDataFrameColumn(Name); + ret._columnContainer._modifyNullCountWhileIndexing = false; + long numberOfRows = 0; + while (rows.MoveNext() && numberOfRows < Length) + { + numberOfRows++; + long curRow = rows.Current; + T? value = _columnContainer[curRow]; + ret[curRow] = value; + if (!value.HasValue) + ret._columnContainer.NullCount++; + } + ret._columnContainer._modifyNullCountWhileIndexing = true; + return ret; + } + + internal BooleanDataFrameColumn CloneAsBooleanColumn() + { + PrimitiveColumnContainer newColumnContainer = _columnContainer.CloneAsBoolContainer(); + return new BooleanDataFrameColumn(Name, newColumnContainer); + } + + internal ByteDataFrameColumn CloneAsByteColumn() + { + PrimitiveColumnContainer newColumnContainer = _columnContainer.CloneAsByteContainer(); + return new ByteDataFrameColumn(Name, newColumnContainer); + } + + internal SByteDataFrameColumn CloneAsSByteColumn() + { + PrimitiveColumnContainer newColumnContainer = _columnContainer.CloneAsSByteContainer(); + return new SByteDataFrameColumn(Name, newColumnContainer); + } + + internal DoubleDataFrameColumn CloneAsDoubleColumn() + { + PrimitiveColumnContainer newColumnContainer = _columnContainer.CloneAsDoubleContainer(); + return new DoubleDataFrameColumn(Name, newColumnContainer); + } + + internal DecimalDataFrameColumn CloneAsDecimalColumn() + { + PrimitiveColumnContainer newColumnContainer = _columnContainer.CloneAsDecimalContainer(); + return new DecimalDataFrameColumn(Name, newColumnContainer); + } + + internal Int16DataFrameColumn CloneAsInt16Column() + { + PrimitiveColumnContainer newColumnContainer = _columnContainer.CloneAsShortContainer(); + return new Int16DataFrameColumn(Name, newColumnContainer); + } + + + internal UInt16DataFrameColumn CloneAsUInt16Column() + { + PrimitiveColumnContainer newColumnContainer = _columnContainer.CloneAsUShortContainer(); + return new UInt16DataFrameColumn(Name, newColumnContainer); + } + + internal Int32DataFrameColumn CloneAsInt32Column() + { + PrimitiveColumnContainer newColumnContainer = _columnContainer.CloneAsIntContainer(); + return new Int32DataFrameColumn(Name, newColumnContainer); + } + + internal UInt32DataFrameColumn CloneAsUInt32Column() + { + PrimitiveColumnContainer newColumnContainer = _columnContainer.CloneAsUIntContainer(); + return new UInt32DataFrameColumn(Name, newColumnContainer); + } + + internal Int64DataFrameColumn CloneAsInt64Column() + { + PrimitiveColumnContainer newColumnContainer = _columnContainer.CloneAsLongContainer(); + return new Int64DataFrameColumn(Name, newColumnContainer); + } + + internal UInt64DataFrameColumn CloneAsUInt64Column() + { + PrimitiveColumnContainer newColumnContainer = _columnContainer.CloneAsULongContainer(); + return new UInt64DataFrameColumn(Name, newColumnContainer); + } + + internal SingleDataFrameColumn CloneAsSingleColumn() + { + PrimitiveColumnContainer newColumnContainer = _columnContainer.CloneAsFloatContainer(); + return new SingleDataFrameColumn(Name, newColumnContainer); + } + + /// + public override GroupBy GroupBy(int columnIndex, DataFrame parent) + { + Dictionary> dictionary = GroupColumnValues(); + return new GroupBy(parent, columnIndex, dictionary); + } + + public override Dictionary> GroupColumnValues() + { + if (typeof(TKey) == typeof(T)) + { + Dictionary> multimap = new Dictionary>(EqualityComparer.Default); + for (int b = 0; b < _columnContainer.Buffers.Count; b++) + { + ReadOnlyDataFrameBuffer buffer = _columnContainer.Buffers[b]; + ReadOnlySpan readOnlySpan = buffer.ReadOnlySpan; + long previousLength = b * ReadOnlyDataFrameBuffer.MaxCapacity; + for (int i = 0; i < readOnlySpan.Length; i++) + { + long currentLength = i + previousLength; + bool containsKey = multimap.TryGetValue(readOnlySpan[i], out ICollection values); + if (containsKey) + { + values.Add(currentLength); + } + else + { + multimap.Add(readOnlySpan[i], new List() { currentLength }); + } + } + } + return multimap as Dictionary>; + } + else + { + throw new NotImplementedException(nameof(TKey)); + } + } + + public void ApplyElementwise(Func func) => _columnContainer.ApplyElementwise(func); + + /// + /// Applies a function to all the values + /// + /// The new column's type + /// The function to apply + /// A new PrimitiveDataFrameColumn containing the new values + public PrimitiveDataFrameColumn Apply(Func func) where TResult : unmanaged + { + var resultColumn = new PrimitiveDataFrameColumn("Result", Length); + _columnContainer.Apply(func, resultColumn._columnContainer); + return resultColumn; + } + + /// + /// Clamps values beyond the specified thresholds + /// + /// Minimum value. All values below this threshold will be set to it + /// Maximum value. All values above this threshold will be set to it + /// Indicates if the operation should be performed in place + public PrimitiveDataFrameColumn Clamp(T min, T max, bool inPlace = false) + { + PrimitiveDataFrameColumn ret = inPlace ? this : Clone(); + + Comparer comparer = Comparer.Default; + for (long i = 0; i < ret.Length; i++) + { + T? value = ret[i]; + if (value == null) + continue; + + if (comparer.Compare(value.Value, min) < 0) + ret[i] = min; + + if (comparer.Compare(value.Value, max) > 0) + ret[i] = max; + } + return ret; + } + + protected override DataFrameColumn ClampImplementation(U min, U max, bool inPlace) + { + object convertedLower = Convert.ChangeType(min, typeof(T)); + if (typeof(T) == typeof(U) || convertedLower != null) + return Clamp((T)convertedLower, (T)Convert.ChangeType(max, typeof(T)), inPlace); + else + throw new ArgumentException(string.Format(Strings.MismatchedValueType, typeof(T)), nameof(U)); + } + + /// + /// Returns a new column filtered by the lower and upper bounds + /// + /// The minimum value in the resulting column + /// The maximum value in the resulting column + public PrimitiveDataFrameColumn Filter(T min, T max) + { + PrimitiveDataFrameColumn ret = new PrimitiveDataFrameColumn(Name); + Comparer comparer = Comparer.Default; + for (long i = 0; i < Length; i++) + { + T? value = this[i]; + if (value == null) + continue; + + if (comparer.Compare(value.Value, min) >= 0 && comparer.Compare(value.Value, max) <= 0) + ret.Append(value); + } + return ret; + } + + protected override DataFrameColumn FilterImplementation(U min, U max) + { + object convertedLower = Convert.ChangeType(min, typeof(T)); + if (typeof(T) == typeof(U) || convertedLower != null) + return Filter((T)convertedLower, (T)Convert.ChangeType(max, typeof(T))); + else + throw new ArgumentException(string.Format(Strings.MismatchedValueType, typeof(T)), nameof(U)); + } + + public override DataFrameColumn Description() + { + float? max; + float? min; + float? mean; + try + { + max = (float)Convert.ChangeType(Max(), typeof(float)); + } + catch (Exception) + { + max = null; + } + try + { + min = (float)Convert.ChangeType(Min(), typeof(float)); + } + catch (Exception) + { + min = null; + } + try + { + mean = (float)Convert.ChangeType(Sum(), typeof(float)) / Length; + } + catch (Exception) + { + mean = null; + } + PrimitiveDataFrameColumn column = new PrimitiveDataFrameColumn(Name); + column.Append(Length - NullCount); + column.Append(max); + column.Append(min); + column.Append(mean); + return column; + } + + protected internal override void AddDataViewColumn(DataViewSchema.Builder builder) + { + builder.AddColumn(Name, GetDataViewType()); + } + + private static DataViewType GetDataViewType() + { + if (typeof(T) == typeof(bool)) + { + return BooleanDataViewType.Instance; + } + else if (typeof(T) == typeof(byte)) + { + return NumberDataViewType.Byte; + } + else if (typeof(T) == typeof(double)) + { + return NumberDataViewType.Double; + } + else if (typeof(T) == typeof(float)) + { + return NumberDataViewType.Single; + } + else if (typeof(T) == typeof(int)) + { + return NumberDataViewType.Int32; + } + else if (typeof(T) == typeof(long)) + { + return NumberDataViewType.Int64; + } + else if (typeof(T) == typeof(sbyte)) + { + return NumberDataViewType.SByte; + } + else if (typeof(T) == typeof(short)) + { + return NumberDataViewType.Int16; + } + else if (typeof(T) == typeof(uint)) + { + return NumberDataViewType.UInt32; + } + else if (typeof(T) == typeof(ulong)) + { + return NumberDataViewType.UInt64; + } + else if (typeof(T) == typeof(ushort)) + { + return NumberDataViewType.UInt16; + } + // The following 2 implementations are not ideal, but IDataView doesn't support + // these types + else if (typeof(T) == typeof(char)) + { + return NumberDataViewType.UInt16; + } + else if (typeof(T) == typeof(decimal)) + { + return NumberDataViewType.Double; + } + + throw new NotSupportedException(); + } + + protected internal override Delegate GetDataViewGetter(DataViewRowCursor cursor) + { + // special cases for types that have NA values + if (typeof(T) == typeof(float)) + { + return CreateSingleValueGetterDelegate(cursor, (PrimitiveDataFrameColumn)(object)this); + } + else if (typeof(T) == typeof(double)) + { + return CreateDoubleValueGetterDelegate(cursor, (PrimitiveDataFrameColumn)(object)this); + } + // special cases for types not supported + else if (typeof(T) == typeof(char)) + { + return CreateCharValueGetterDelegate(cursor, (PrimitiveDataFrameColumn)(object)this); + } + else if (typeof(T) == typeof(decimal)) + { + return CreateDecimalValueGetterDelegate(cursor, (PrimitiveDataFrameColumn)(object)this); + } + return CreateValueGetterDelegate(cursor); + } + + private ValueGetter CreateValueGetterDelegate(DataViewRowCursor cursor) => + (ref T value) => value = this[cursor.Position].GetValueOrDefault(); + + private static ValueGetter CreateSingleValueGetterDelegate(DataViewRowCursor cursor, PrimitiveDataFrameColumn column) => + (ref float value) => value = column[cursor.Position] ?? float.NaN; + + private static ValueGetter CreateDoubleValueGetterDelegate(DataViewRowCursor cursor, PrimitiveDataFrameColumn column) => + (ref double value) => value = column[cursor.Position] ?? double.NaN; + + private static ValueGetter CreateCharValueGetterDelegate(DataViewRowCursor cursor, PrimitiveDataFrameColumn column) => + (ref ushort value) => value = column[cursor.Position].GetValueOrDefault(); + + private static ValueGetter CreateDecimalValueGetterDelegate(DataViewRowCursor cursor, PrimitiveDataFrameColumn column) => + (ref double value) => value = (double?)column[cursor.Position] ?? double.NaN; + + protected internal override void AddValueUsingCursor(DataViewRowCursor cursor, Delegate getter) + { + long row = cursor.Position; + T value = default; + Debug.Assert(getter != null, "Excepted getter to be valid"); + (getter as ValueGetter)(ref value); + + if (Length > row) + { + this[row] = value; + } + else if (Length == row) + { + Append(value); + } + else + { + throw new IndexOutOfRangeException(nameof(row)); + } + } + + protected internal override Delegate GetValueGetterUsingCursor(DataViewRowCursor cursor, DataViewSchema.Column schemaColumn) + { + return cursor.GetGetter(schemaColumn); + } + } +} diff --git a/src/Microsoft.Data.Analysis/PrimitiveDataFrameColumnArithmetic.cs b/src/Microsoft.Data.Analysis/PrimitiveDataFrameColumnArithmetic.cs new file mode 100644 index 0000000000..c4129026a1 --- /dev/null +++ b/src/Microsoft.Data.Analysis/PrimitiveDataFrameColumnArithmetic.cs @@ -0,0 +1,6770 @@ + + +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +// Generated from PrimitiveDataFrameColumnArithmetic.tt. Do not modify directly + +using System; + +namespace Microsoft.Data.Analysis +{ + internal interface IPrimitiveDataFrameColumnArithmetic + where T : struct + { + void Add(PrimitiveColumnContainer left, PrimitiveColumnContainer right); + void Add(PrimitiveColumnContainer column, T scalar); + void Add(T scalar, PrimitiveColumnContainer column); + void Subtract(PrimitiveColumnContainer left, PrimitiveColumnContainer right); + void Subtract(PrimitiveColumnContainer column, T scalar); + void Subtract(T scalar, PrimitiveColumnContainer column); + void Multiply(PrimitiveColumnContainer left, PrimitiveColumnContainer right); + void Multiply(PrimitiveColumnContainer column, T scalar); + void Multiply(T scalar, PrimitiveColumnContainer column); + void Divide(PrimitiveColumnContainer left, PrimitiveColumnContainer right); + void Divide(PrimitiveColumnContainer column, T scalar); + void Divide(T scalar, PrimitiveColumnContainer column); + void Modulo(PrimitiveColumnContainer left, PrimitiveColumnContainer right); + void Modulo(PrimitiveColumnContainer column, T scalar); + void Modulo(T scalar, PrimitiveColumnContainer column); + void And(PrimitiveColumnContainer left, PrimitiveColumnContainer right); + void And(PrimitiveColumnContainer column, T scalar); + void And(T scalar, PrimitiveColumnContainer column); + void Or(PrimitiveColumnContainer left, PrimitiveColumnContainer right); + void Or(PrimitiveColumnContainer column, T scalar); + void Or(T scalar, PrimitiveColumnContainer column); + void Xor(PrimitiveColumnContainer left, PrimitiveColumnContainer right); + void Xor(PrimitiveColumnContainer column, T scalar); + void Xor(T scalar, PrimitiveColumnContainer column); + void LeftShift(PrimitiveColumnContainer column, int value); + void RightShift(PrimitiveColumnContainer column, int value); + void ElementwiseEquals(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret); + void ElementwiseEquals(PrimitiveColumnContainer column, T scalar, PrimitiveColumnContainer ret); + void ElementwiseNotEquals(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret); + void ElementwiseNotEquals(PrimitiveColumnContainer column, T scalar, PrimitiveColumnContainer ret); + void ElementwiseGreaterThanOrEqual(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret); + void ElementwiseGreaterThanOrEqual(PrimitiveColumnContainer column, T scalar, PrimitiveColumnContainer ret); + void ElementwiseLessThanOrEqual(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret); + void ElementwiseLessThanOrEqual(PrimitiveColumnContainer column, T scalar, PrimitiveColumnContainer ret); + void ElementwiseGreaterThan(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret); + void ElementwiseGreaterThan(PrimitiveColumnContainer column, T scalar, PrimitiveColumnContainer ret); + void ElementwiseLessThan(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret); + void ElementwiseLessThan(PrimitiveColumnContainer column, T scalar, PrimitiveColumnContainer ret); + } + + internal static class PrimitiveDataFrameColumnArithmetic + where T : struct + { + public static IPrimitiveDataFrameColumnArithmetic Instance { get; } = PrimitiveDataFrameColumnArithmetic.GetArithmetic(); + } + + internal static class PrimitiveDataFrameColumnArithmetic + { + public static IPrimitiveDataFrameColumnArithmetic GetArithmetic() + where T : struct + { + if (typeof(T) == typeof(bool)) + { + return (IPrimitiveDataFrameColumnArithmetic)new BoolArithmetic(); + } + else if (typeof(T) == typeof(byte)) + { + return (IPrimitiveDataFrameColumnArithmetic)new ByteArithmetic(); + } + else if (typeof(T) == typeof(char)) + { + return (IPrimitiveDataFrameColumnArithmetic)new CharArithmetic(); + } + else if (typeof(T) == typeof(decimal)) + { + return (IPrimitiveDataFrameColumnArithmetic)new DecimalArithmetic(); + } + else if (typeof(T) == typeof(double)) + { + return (IPrimitiveDataFrameColumnArithmetic)new DoubleArithmetic(); + } + else if (typeof(T) == typeof(float)) + { + return (IPrimitiveDataFrameColumnArithmetic)new FloatArithmetic(); + } + else if (typeof(T) == typeof(int)) + { + return (IPrimitiveDataFrameColumnArithmetic)new IntArithmetic(); + } + else if (typeof(T) == typeof(long)) + { + return (IPrimitiveDataFrameColumnArithmetic)new LongArithmetic(); + } + else if (typeof(T) == typeof(sbyte)) + { + return (IPrimitiveDataFrameColumnArithmetic)new SByteArithmetic(); + } + else if (typeof(T) == typeof(short)) + { + return (IPrimitiveDataFrameColumnArithmetic)new ShortArithmetic(); + } + else if (typeof(T) == typeof(uint)) + { + return (IPrimitiveDataFrameColumnArithmetic)new UIntArithmetic(); + } + else if (typeof(T) == typeof(ulong)) + { + return (IPrimitiveDataFrameColumnArithmetic)new ULongArithmetic(); + } + else if (typeof(T) == typeof(ushort)) + { + return (IPrimitiveDataFrameColumnArithmetic)new UShortArithmetic(); + } + throw new NotSupportedException(); + } + } + + internal class BoolArithmetic : IPrimitiveDataFrameColumnArithmetic + { + public void Add(PrimitiveColumnContainer left, PrimitiveColumnContainer right) + { + throw new NotSupportedException(); + } + public void Add(PrimitiveColumnContainer column, bool scalar) + { + throw new NotSupportedException(); + } + + public void Add(bool scalar, PrimitiveColumnContainer column) + { + throw new NotSupportedException(); + } + public void Subtract(PrimitiveColumnContainer left, PrimitiveColumnContainer right) + { + throw new NotSupportedException(); + } + public void Subtract(PrimitiveColumnContainer column, bool scalar) + { + throw new NotSupportedException(); + } + + public void Subtract(bool scalar, PrimitiveColumnContainer column) + { + throw new NotSupportedException(); + } + public void Multiply(PrimitiveColumnContainer left, PrimitiveColumnContainer right) + { + throw new NotSupportedException(); + } + public void Multiply(PrimitiveColumnContainer column, bool scalar) + { + throw new NotSupportedException(); + } + + public void Multiply(bool scalar, PrimitiveColumnContainer column) + { + throw new NotSupportedException(); + } + public void Divide(PrimitiveColumnContainer left, PrimitiveColumnContainer right) + { + throw new NotSupportedException(); + } + public void Divide(PrimitiveColumnContainer column, bool scalar) + { + throw new NotSupportedException(); + } + + public void Divide(bool scalar, PrimitiveColumnContainer column) + { + throw new NotSupportedException(); + } + public void Modulo(PrimitiveColumnContainer left, PrimitiveColumnContainer right) + { + throw new NotSupportedException(); + } + public void Modulo(PrimitiveColumnContainer column, bool scalar) + { + throw new NotSupportedException(); + } + + public void Modulo(bool scalar, PrimitiveColumnContainer column) + { + throw new NotSupportedException(); + } + public void And(PrimitiveColumnContainer left, PrimitiveColumnContainer right) + { + for (int b = 0 ; b < left.Buffers.Count; b++) + { + var buffer = left.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + left.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + var otherSpan = right.Buffers[b].ReadOnlySpan; + for (int i = 0; i < span.Length; i++) + { + span[i] = (bool)(span[i] & otherSpan[i]); + } + } + } + public void And(PrimitiveColumnContainer column, bool scalar) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + span[i] = (bool)(span[i] & scalar); + } + } + } + + public void And(bool scalar, PrimitiveColumnContainer column) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + span[i] = (bool)(scalar & span[i]); + } + } + } + public void Or(PrimitiveColumnContainer left, PrimitiveColumnContainer right) + { + for (int b = 0 ; b < left.Buffers.Count; b++) + { + var buffer = left.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + left.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + var otherSpan = right.Buffers[b].ReadOnlySpan; + for (int i = 0; i < span.Length; i++) + { + span[i] = (bool)(span[i] | otherSpan[i]); + } + } + } + public void Or(PrimitiveColumnContainer column, bool scalar) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + span[i] = (bool)(span[i] | scalar); + } + } + } + + public void Or(bool scalar, PrimitiveColumnContainer column) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + span[i] = (bool)(scalar | span[i]); + } + } + } + public void Xor(PrimitiveColumnContainer left, PrimitiveColumnContainer right) + { + for (int b = 0 ; b < left.Buffers.Count; b++) + { + var buffer = left.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + left.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + var otherSpan = right.Buffers[b].ReadOnlySpan; + for (int i = 0; i < span.Length; i++) + { + span[i] = (bool)(span[i] ^ otherSpan[i]); + } + } + } + public void Xor(PrimitiveColumnContainer column, bool scalar) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + span[i] = (bool)(span[i] ^ scalar); + } + } + } + + public void Xor(bool scalar, PrimitiveColumnContainer column) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + span[i] = (bool)(scalar ^ span[i]); + } + } + } + public void LeftShift(PrimitiveColumnContainer column, int value) + { + throw new NotSupportedException(); + } + public void RightShift(PrimitiveColumnContainer column, int value) + { + throw new NotSupportedException(); + } + public void ElementwiseEquals(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) + { + for (int b = 0 ; b < left.Buffers.Count; b++) + { + var buffer = left.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + left.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + var otherSpan = right.Buffers[b].ReadOnlySpan; + for (int i = 0; i < span.Length; i++) + { + ret[i] = (span[i] == otherSpan[i]); + } + } + } + public void ElementwiseEquals(PrimitiveColumnContainer column, bool scalar, PrimitiveColumnContainer ret) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + ret[i] = (span[i] == scalar); + } + } + } + public void ElementwiseNotEquals(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) + { + for (int b = 0 ; b < left.Buffers.Count; b++) + { + var buffer = left.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + left.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + var otherSpan = right.Buffers[b].ReadOnlySpan; + for (int i = 0; i < span.Length; i++) + { + ret[i] = (span[i] != otherSpan[i]); + } + } + } + public void ElementwiseNotEquals(PrimitiveColumnContainer column, bool scalar, PrimitiveColumnContainer ret) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + ret[i] = (span[i] != scalar); + } + } + } + public void ElementwiseGreaterThanOrEqual(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) + { + throw new NotSupportedException(); + } + public void ElementwiseGreaterThanOrEqual(PrimitiveColumnContainer column, bool scalar, PrimitiveColumnContainer ret) + { + throw new NotSupportedException(); + } + public void ElementwiseLessThanOrEqual(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) + { + throw new NotSupportedException(); + } + public void ElementwiseLessThanOrEqual(PrimitiveColumnContainer column, bool scalar, PrimitiveColumnContainer ret) + { + throw new NotSupportedException(); + } + public void ElementwiseGreaterThan(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) + { + throw new NotSupportedException(); + } + public void ElementwiseGreaterThan(PrimitiveColumnContainer column, bool scalar, PrimitiveColumnContainer ret) + { + throw new NotSupportedException(); + } + public void ElementwiseLessThan(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) + { + throw new NotSupportedException(); + } + public void ElementwiseLessThan(PrimitiveColumnContainer column, bool scalar, PrimitiveColumnContainer ret) + { + throw new NotSupportedException(); + } + } + internal class ByteArithmetic : IPrimitiveDataFrameColumnArithmetic + { + public void Add(PrimitiveColumnContainer left, PrimitiveColumnContainer right) + { + for (int b = 0 ; b < left.Buffers.Count; b++) + { + var buffer = left.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + left.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + var otherSpan = right.Buffers[b].ReadOnlySpan; + for (int i = 0; i < span.Length; i++) + { + span[i] = (byte)(span[i] + otherSpan[i]); + } + } + } + public void Add(PrimitiveColumnContainer column, byte scalar) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + span[i] = (byte)(span[i] + scalar); + } + } + } + + public void Add(byte scalar, PrimitiveColumnContainer column) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + span[i] = (byte)(scalar + span[i]); + } + } + } + public void Subtract(PrimitiveColumnContainer left, PrimitiveColumnContainer right) + { + for (int b = 0 ; b < left.Buffers.Count; b++) + { + var buffer = left.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + left.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + var otherSpan = right.Buffers[b].ReadOnlySpan; + for (int i = 0; i < span.Length; i++) + { + span[i] = (byte)(span[i] - otherSpan[i]); + } + } + } + public void Subtract(PrimitiveColumnContainer column, byte scalar) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + span[i] = (byte)(span[i] - scalar); + } + } + } + + public void Subtract(byte scalar, PrimitiveColumnContainer column) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + span[i] = (byte)(scalar - span[i]); + } + } + } + public void Multiply(PrimitiveColumnContainer left, PrimitiveColumnContainer right) + { + for (int b = 0 ; b < left.Buffers.Count; b++) + { + var buffer = left.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + left.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + var otherSpan = right.Buffers[b].ReadOnlySpan; + for (int i = 0; i < span.Length; i++) + { + span[i] = (byte)(span[i] * otherSpan[i]); + } + } + } + public void Multiply(PrimitiveColumnContainer column, byte scalar) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + span[i] = (byte)(span[i] * scalar); + } + } + } + + public void Multiply(byte scalar, PrimitiveColumnContainer column) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + span[i] = (byte)(scalar * span[i]); + } + } + } + public void Divide(PrimitiveColumnContainer left, PrimitiveColumnContainer right) + { + for (int b = 0 ; b < left.Buffers.Count; b++) + { + var buffer = left.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + left.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + var otherSpan = right.Buffers[b].ReadOnlySpan; + for (int i = 0; i < span.Length; i++) + { + span[i] = (byte)(span[i] / otherSpan[i]); + } + } + } + public void Divide(PrimitiveColumnContainer column, byte scalar) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + span[i] = (byte)(span[i] / scalar); + } + } + } + + public void Divide(byte scalar, PrimitiveColumnContainer column) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + span[i] = (byte)(scalar / span[i]); + } + } + } + public void Modulo(PrimitiveColumnContainer left, PrimitiveColumnContainer right) + { + for (int b = 0 ; b < left.Buffers.Count; b++) + { + var buffer = left.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + left.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + var otherSpan = right.Buffers[b].ReadOnlySpan; + for (int i = 0; i < span.Length; i++) + { + span[i] = (byte)(span[i] % otherSpan[i]); + } + } + } + public void Modulo(PrimitiveColumnContainer column, byte scalar) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + span[i] = (byte)(span[i] % scalar); + } + } + } + + public void Modulo(byte scalar, PrimitiveColumnContainer column) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + span[i] = (byte)(scalar % span[i]); + } + } + } + public void And(PrimitiveColumnContainer left, PrimitiveColumnContainer right) + { + for (int b = 0 ; b < left.Buffers.Count; b++) + { + var buffer = left.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + left.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + var otherSpan = right.Buffers[b].ReadOnlySpan; + for (int i = 0; i < span.Length; i++) + { + span[i] = (byte)(span[i] & otherSpan[i]); + } + } + } + public void And(PrimitiveColumnContainer column, byte scalar) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + span[i] = (byte)(span[i] & scalar); + } + } + } + + public void And(byte scalar, PrimitiveColumnContainer column) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + span[i] = (byte)(scalar & span[i]); + } + } + } + public void Or(PrimitiveColumnContainer left, PrimitiveColumnContainer right) + { + for (int b = 0 ; b < left.Buffers.Count; b++) + { + var buffer = left.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + left.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + var otherSpan = right.Buffers[b].ReadOnlySpan; + for (int i = 0; i < span.Length; i++) + { + span[i] = (byte)(span[i] | otherSpan[i]); + } + } + } + public void Or(PrimitiveColumnContainer column, byte scalar) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + span[i] = (byte)(span[i] | scalar); + } + } + } + + public void Or(byte scalar, PrimitiveColumnContainer column) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + span[i] = (byte)(scalar | span[i]); + } + } + } + public void Xor(PrimitiveColumnContainer left, PrimitiveColumnContainer right) + { + for (int b = 0 ; b < left.Buffers.Count; b++) + { + var buffer = left.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + left.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + var otherSpan = right.Buffers[b].ReadOnlySpan; + for (int i = 0; i < span.Length; i++) + { + span[i] = (byte)(span[i] ^ otherSpan[i]); + } + } + } + public void Xor(PrimitiveColumnContainer column, byte scalar) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + span[i] = (byte)(span[i] ^ scalar); + } + } + } + + public void Xor(byte scalar, PrimitiveColumnContainer column) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + span[i] = (byte)(scalar ^ span[i]); + } + } + } + public void LeftShift(PrimitiveColumnContainer column, int value) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + span[i] = (byte)(span[i] << value); + } + } + } + public void RightShift(PrimitiveColumnContainer column, int value) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + span[i] = (byte)(span[i] >> value); + } + } + } + public void ElementwiseEquals(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) + { + for (int b = 0 ; b < left.Buffers.Count; b++) + { + var buffer = left.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + left.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + var otherSpan = right.Buffers[b].ReadOnlySpan; + for (int i = 0; i < span.Length; i++) + { + ret[i] = (span[i] == otherSpan[i]); + } + } + } + public void ElementwiseEquals(PrimitiveColumnContainer column, byte scalar, PrimitiveColumnContainer ret) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + ret[i] = (span[i] == scalar); + } + } + } + public void ElementwiseNotEquals(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) + { + for (int b = 0 ; b < left.Buffers.Count; b++) + { + var buffer = left.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + left.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + var otherSpan = right.Buffers[b].ReadOnlySpan; + for (int i = 0; i < span.Length; i++) + { + ret[i] = (span[i] != otherSpan[i]); + } + } + } + public void ElementwiseNotEquals(PrimitiveColumnContainer column, byte scalar, PrimitiveColumnContainer ret) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + ret[i] = (span[i] != scalar); + } + } + } + public void ElementwiseGreaterThanOrEqual(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) + { + for (int b = 0 ; b < left.Buffers.Count; b++) + { + var buffer = left.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + left.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + var otherSpan = right.Buffers[b].ReadOnlySpan; + for (int i = 0; i < span.Length; i++) + { + ret[i] = (span[i] >= otherSpan[i]); + } + } + } + public void ElementwiseGreaterThanOrEqual(PrimitiveColumnContainer column, byte scalar, PrimitiveColumnContainer ret) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + ret[i] = (span[i] >= scalar); + } + } + } + public void ElementwiseLessThanOrEqual(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) + { + for (int b = 0 ; b < left.Buffers.Count; b++) + { + var buffer = left.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + left.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + var otherSpan = right.Buffers[b].ReadOnlySpan; + for (int i = 0; i < span.Length; i++) + { + ret[i] = (span[i] <= otherSpan[i]); + } + } + } + public void ElementwiseLessThanOrEqual(PrimitiveColumnContainer column, byte scalar, PrimitiveColumnContainer ret) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + ret[i] = (span[i] <= scalar); + } + } + } + public void ElementwiseGreaterThan(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) + { + for (int b = 0 ; b < left.Buffers.Count; b++) + { + var buffer = left.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + left.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + var otherSpan = right.Buffers[b].ReadOnlySpan; + for (int i = 0; i < span.Length; i++) + { + ret[i] = (span[i] > otherSpan[i]); + } + } + } + public void ElementwiseGreaterThan(PrimitiveColumnContainer column, byte scalar, PrimitiveColumnContainer ret) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + ret[i] = (span[i] > scalar); + } + } + } + public void ElementwiseLessThan(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) + { + for (int b = 0 ; b < left.Buffers.Count; b++) + { + var buffer = left.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + left.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + var otherSpan = right.Buffers[b].ReadOnlySpan; + for (int i = 0; i < span.Length; i++) + { + ret[i] = (span[i] < otherSpan[i]); + } + } + } + public void ElementwiseLessThan(PrimitiveColumnContainer column, byte scalar, PrimitiveColumnContainer ret) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + ret[i] = (span[i] < scalar); + } + } + } + } + internal class CharArithmetic : IPrimitiveDataFrameColumnArithmetic + { + public void Add(PrimitiveColumnContainer left, PrimitiveColumnContainer right) + { + for (int b = 0 ; b < left.Buffers.Count; b++) + { + var buffer = left.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + left.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + var otherSpan = right.Buffers[b].ReadOnlySpan; + for (int i = 0; i < span.Length; i++) + { + span[i] = (char)(span[i] + otherSpan[i]); + } + } + } + public void Add(PrimitiveColumnContainer column, char scalar) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + span[i] = (char)(span[i] + scalar); + } + } + } + + public void Add(char scalar, PrimitiveColumnContainer column) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + span[i] = (char)(scalar + span[i]); + } + } + } + public void Subtract(PrimitiveColumnContainer left, PrimitiveColumnContainer right) + { + for (int b = 0 ; b < left.Buffers.Count; b++) + { + var buffer = left.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + left.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + var otherSpan = right.Buffers[b].ReadOnlySpan; + for (int i = 0; i < span.Length; i++) + { + span[i] = (char)(span[i] - otherSpan[i]); + } + } + } + public void Subtract(PrimitiveColumnContainer column, char scalar) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + span[i] = (char)(span[i] - scalar); + } + } + } + + public void Subtract(char scalar, PrimitiveColumnContainer column) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + span[i] = (char)(scalar - span[i]); + } + } + } + public void Multiply(PrimitiveColumnContainer left, PrimitiveColumnContainer right) + { + for (int b = 0 ; b < left.Buffers.Count; b++) + { + var buffer = left.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + left.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + var otherSpan = right.Buffers[b].ReadOnlySpan; + for (int i = 0; i < span.Length; i++) + { + span[i] = (char)(span[i] * otherSpan[i]); + } + } + } + public void Multiply(PrimitiveColumnContainer column, char scalar) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + span[i] = (char)(span[i] * scalar); + } + } + } + + public void Multiply(char scalar, PrimitiveColumnContainer column) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + span[i] = (char)(scalar * span[i]); + } + } + } + public void Divide(PrimitiveColumnContainer left, PrimitiveColumnContainer right) + { + for (int b = 0 ; b < left.Buffers.Count; b++) + { + var buffer = left.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + left.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + var otherSpan = right.Buffers[b].ReadOnlySpan; + for (int i = 0; i < span.Length; i++) + { + span[i] = (char)(span[i] / otherSpan[i]); + } + } + } + public void Divide(PrimitiveColumnContainer column, char scalar) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + span[i] = (char)(span[i] / scalar); + } + } + } + + public void Divide(char scalar, PrimitiveColumnContainer column) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + span[i] = (char)(scalar / span[i]); + } + } + } + public void Modulo(PrimitiveColumnContainer left, PrimitiveColumnContainer right) + { + for (int b = 0 ; b < left.Buffers.Count; b++) + { + var buffer = left.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + left.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + var otherSpan = right.Buffers[b].ReadOnlySpan; + for (int i = 0; i < span.Length; i++) + { + span[i] = (char)(span[i] % otherSpan[i]); + } + } + } + public void Modulo(PrimitiveColumnContainer column, char scalar) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + span[i] = (char)(span[i] % scalar); + } + } + } + + public void Modulo(char scalar, PrimitiveColumnContainer column) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + span[i] = (char)(scalar % span[i]); + } + } + } + public void And(PrimitiveColumnContainer left, PrimitiveColumnContainer right) + { + for (int b = 0 ; b < left.Buffers.Count; b++) + { + var buffer = left.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + left.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + var otherSpan = right.Buffers[b].ReadOnlySpan; + for (int i = 0; i < span.Length; i++) + { + span[i] = (char)(span[i] & otherSpan[i]); + } + } + } + public void And(PrimitiveColumnContainer column, char scalar) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + span[i] = (char)(span[i] & scalar); + } + } + } + + public void And(char scalar, PrimitiveColumnContainer column) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + span[i] = (char)(scalar & span[i]); + } + } + } + public void Or(PrimitiveColumnContainer left, PrimitiveColumnContainer right) + { + for (int b = 0 ; b < left.Buffers.Count; b++) + { + var buffer = left.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + left.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + var otherSpan = right.Buffers[b].ReadOnlySpan; + for (int i = 0; i < span.Length; i++) + { + span[i] = (char)(span[i] | otherSpan[i]); + } + } + } + public void Or(PrimitiveColumnContainer column, char scalar) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + span[i] = (char)(span[i] | scalar); + } + } + } + + public void Or(char scalar, PrimitiveColumnContainer column) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + span[i] = (char)(scalar | span[i]); + } + } + } + public void Xor(PrimitiveColumnContainer left, PrimitiveColumnContainer right) + { + for (int b = 0 ; b < left.Buffers.Count; b++) + { + var buffer = left.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + left.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + var otherSpan = right.Buffers[b].ReadOnlySpan; + for (int i = 0; i < span.Length; i++) + { + span[i] = (char)(span[i] ^ otherSpan[i]); + } + } + } + public void Xor(PrimitiveColumnContainer column, char scalar) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + span[i] = (char)(span[i] ^ scalar); + } + } + } + + public void Xor(char scalar, PrimitiveColumnContainer column) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + span[i] = (char)(scalar ^ span[i]); + } + } + } + public void LeftShift(PrimitiveColumnContainer column, int value) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + span[i] = (char)(span[i] << value); + } + } + } + public void RightShift(PrimitiveColumnContainer column, int value) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + span[i] = (char)(span[i] >> value); + } + } + } + public void ElementwiseEquals(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) + { + for (int b = 0 ; b < left.Buffers.Count; b++) + { + var buffer = left.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + left.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + var otherSpan = right.Buffers[b].ReadOnlySpan; + for (int i = 0; i < span.Length; i++) + { + ret[i] = (span[i] == otherSpan[i]); + } + } + } + public void ElementwiseEquals(PrimitiveColumnContainer column, char scalar, PrimitiveColumnContainer ret) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + ret[i] = (span[i] == scalar); + } + } + } + public void ElementwiseNotEquals(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) + { + for (int b = 0 ; b < left.Buffers.Count; b++) + { + var buffer = left.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + left.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + var otherSpan = right.Buffers[b].ReadOnlySpan; + for (int i = 0; i < span.Length; i++) + { + ret[i] = (span[i] != otherSpan[i]); + } + } + } + public void ElementwiseNotEquals(PrimitiveColumnContainer column, char scalar, PrimitiveColumnContainer ret) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + ret[i] = (span[i] != scalar); + } + } + } + public void ElementwiseGreaterThanOrEqual(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) + { + for (int b = 0 ; b < left.Buffers.Count; b++) + { + var buffer = left.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + left.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + var otherSpan = right.Buffers[b].ReadOnlySpan; + for (int i = 0; i < span.Length; i++) + { + ret[i] = (span[i] >= otherSpan[i]); + } + } + } + public void ElementwiseGreaterThanOrEqual(PrimitiveColumnContainer column, char scalar, PrimitiveColumnContainer ret) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + ret[i] = (span[i] >= scalar); + } + } + } + public void ElementwiseLessThanOrEqual(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) + { + for (int b = 0 ; b < left.Buffers.Count; b++) + { + var buffer = left.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + left.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + var otherSpan = right.Buffers[b].ReadOnlySpan; + for (int i = 0; i < span.Length; i++) + { + ret[i] = (span[i] <= otherSpan[i]); + } + } + } + public void ElementwiseLessThanOrEqual(PrimitiveColumnContainer column, char scalar, PrimitiveColumnContainer ret) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + ret[i] = (span[i] <= scalar); + } + } + } + public void ElementwiseGreaterThan(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) + { + for (int b = 0 ; b < left.Buffers.Count; b++) + { + var buffer = left.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + left.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + var otherSpan = right.Buffers[b].ReadOnlySpan; + for (int i = 0; i < span.Length; i++) + { + ret[i] = (span[i] > otherSpan[i]); + } + } + } + public void ElementwiseGreaterThan(PrimitiveColumnContainer column, char scalar, PrimitiveColumnContainer ret) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + ret[i] = (span[i] > scalar); + } + } + } + public void ElementwiseLessThan(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) + { + for (int b = 0 ; b < left.Buffers.Count; b++) + { + var buffer = left.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + left.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + var otherSpan = right.Buffers[b].ReadOnlySpan; + for (int i = 0; i < span.Length; i++) + { + ret[i] = (span[i] < otherSpan[i]); + } + } + } + public void ElementwiseLessThan(PrimitiveColumnContainer column, char scalar, PrimitiveColumnContainer ret) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + ret[i] = (span[i] < scalar); + } + } + } + } + internal class DecimalArithmetic : IPrimitiveDataFrameColumnArithmetic + { + public void Add(PrimitiveColumnContainer left, PrimitiveColumnContainer right) + { + for (int b = 0 ; b < left.Buffers.Count; b++) + { + var buffer = left.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + left.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + var otherSpan = right.Buffers[b].ReadOnlySpan; + for (int i = 0; i < span.Length; i++) + { + span[i] = (decimal)(span[i] + otherSpan[i]); + } + } + } + public void Add(PrimitiveColumnContainer column, decimal scalar) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + span[i] = (decimal)(span[i] + scalar); + } + } + } + + public void Add(decimal scalar, PrimitiveColumnContainer column) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + span[i] = (decimal)(scalar + span[i]); + } + } + } + public void Subtract(PrimitiveColumnContainer left, PrimitiveColumnContainer right) + { + for (int b = 0 ; b < left.Buffers.Count; b++) + { + var buffer = left.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + left.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + var otherSpan = right.Buffers[b].ReadOnlySpan; + for (int i = 0; i < span.Length; i++) + { + span[i] = (decimal)(span[i] - otherSpan[i]); + } + } + } + public void Subtract(PrimitiveColumnContainer column, decimal scalar) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + span[i] = (decimal)(span[i] - scalar); + } + } + } + + public void Subtract(decimal scalar, PrimitiveColumnContainer column) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + span[i] = (decimal)(scalar - span[i]); + } + } + } + public void Multiply(PrimitiveColumnContainer left, PrimitiveColumnContainer right) + { + for (int b = 0 ; b < left.Buffers.Count; b++) + { + var buffer = left.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + left.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + var otherSpan = right.Buffers[b].ReadOnlySpan; + for (int i = 0; i < span.Length; i++) + { + span[i] = (decimal)(span[i] * otherSpan[i]); + } + } + } + public void Multiply(PrimitiveColumnContainer column, decimal scalar) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + span[i] = (decimal)(span[i] * scalar); + } + } + } + + public void Multiply(decimal scalar, PrimitiveColumnContainer column) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + span[i] = (decimal)(scalar * span[i]); + } + } + } + public void Divide(PrimitiveColumnContainer left, PrimitiveColumnContainer right) + { + for (int b = 0 ; b < left.Buffers.Count; b++) + { + var buffer = left.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + left.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + var otherSpan = right.Buffers[b].ReadOnlySpan; + for (int i = 0; i < span.Length; i++) + { + span[i] = (decimal)(span[i] / otherSpan[i]); + } + } + } + public void Divide(PrimitiveColumnContainer column, decimal scalar) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + span[i] = (decimal)(span[i] / scalar); + } + } + } + + public void Divide(decimal scalar, PrimitiveColumnContainer column) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + span[i] = (decimal)(scalar / span[i]); + } + } + } + public void Modulo(PrimitiveColumnContainer left, PrimitiveColumnContainer right) + { + for (int b = 0 ; b < left.Buffers.Count; b++) + { + var buffer = left.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + left.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + var otherSpan = right.Buffers[b].ReadOnlySpan; + for (int i = 0; i < span.Length; i++) + { + span[i] = (decimal)(span[i] % otherSpan[i]); + } + } + } + public void Modulo(PrimitiveColumnContainer column, decimal scalar) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + span[i] = (decimal)(span[i] % scalar); + } + } + } + + public void Modulo(decimal scalar, PrimitiveColumnContainer column) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + span[i] = (decimal)(scalar % span[i]); + } + } + } + public void And(PrimitiveColumnContainer left, PrimitiveColumnContainer right) + { + throw new NotSupportedException(); + } + public void And(PrimitiveColumnContainer column, decimal scalar) + { + throw new NotSupportedException(); + } + + public void And(decimal scalar, PrimitiveColumnContainer column) + { + throw new NotSupportedException(); + } + public void Or(PrimitiveColumnContainer left, PrimitiveColumnContainer right) + { + throw new NotSupportedException(); + } + public void Or(PrimitiveColumnContainer column, decimal scalar) + { + throw new NotSupportedException(); + } + + public void Or(decimal scalar, PrimitiveColumnContainer column) + { + throw new NotSupportedException(); + } + public void Xor(PrimitiveColumnContainer left, PrimitiveColumnContainer right) + { + throw new NotSupportedException(); + } + public void Xor(PrimitiveColumnContainer column, decimal scalar) + { + throw new NotSupportedException(); + } + + public void Xor(decimal scalar, PrimitiveColumnContainer column) + { + throw new NotSupportedException(); + } + public void LeftShift(PrimitiveColumnContainer column, int value) + { + throw new NotSupportedException(); + } + public void RightShift(PrimitiveColumnContainer column, int value) + { + throw new NotSupportedException(); + } + public void ElementwiseEquals(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) + { + for (int b = 0 ; b < left.Buffers.Count; b++) + { + var buffer = left.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + left.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + var otherSpan = right.Buffers[b].ReadOnlySpan; + for (int i = 0; i < span.Length; i++) + { + ret[i] = (span[i] == otherSpan[i]); + } + } + } + public void ElementwiseEquals(PrimitiveColumnContainer column, decimal scalar, PrimitiveColumnContainer ret) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + ret[i] = (span[i] == scalar); + } + } + } + public void ElementwiseNotEquals(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) + { + for (int b = 0 ; b < left.Buffers.Count; b++) + { + var buffer = left.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + left.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + var otherSpan = right.Buffers[b].ReadOnlySpan; + for (int i = 0; i < span.Length; i++) + { + ret[i] = (span[i] != otherSpan[i]); + } + } + } + public void ElementwiseNotEquals(PrimitiveColumnContainer column, decimal scalar, PrimitiveColumnContainer ret) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + ret[i] = (span[i] != scalar); + } + } + } + public void ElementwiseGreaterThanOrEqual(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) + { + for (int b = 0 ; b < left.Buffers.Count; b++) + { + var buffer = left.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + left.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + var otherSpan = right.Buffers[b].ReadOnlySpan; + for (int i = 0; i < span.Length; i++) + { + ret[i] = (span[i] >= otherSpan[i]); + } + } + } + public void ElementwiseGreaterThanOrEqual(PrimitiveColumnContainer column, decimal scalar, PrimitiveColumnContainer ret) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + ret[i] = (span[i] >= scalar); + } + } + } + public void ElementwiseLessThanOrEqual(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) + { + for (int b = 0 ; b < left.Buffers.Count; b++) + { + var buffer = left.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + left.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + var otherSpan = right.Buffers[b].ReadOnlySpan; + for (int i = 0; i < span.Length; i++) + { + ret[i] = (span[i] <= otherSpan[i]); + } + } + } + public void ElementwiseLessThanOrEqual(PrimitiveColumnContainer column, decimal scalar, PrimitiveColumnContainer ret) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + ret[i] = (span[i] <= scalar); + } + } + } + public void ElementwiseGreaterThan(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) + { + for (int b = 0 ; b < left.Buffers.Count; b++) + { + var buffer = left.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + left.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + var otherSpan = right.Buffers[b].ReadOnlySpan; + for (int i = 0; i < span.Length; i++) + { + ret[i] = (span[i] > otherSpan[i]); + } + } + } + public void ElementwiseGreaterThan(PrimitiveColumnContainer column, decimal scalar, PrimitiveColumnContainer ret) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + ret[i] = (span[i] > scalar); + } + } + } + public void ElementwiseLessThan(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) + { + for (int b = 0 ; b < left.Buffers.Count; b++) + { + var buffer = left.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + left.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + var otherSpan = right.Buffers[b].ReadOnlySpan; + for (int i = 0; i < span.Length; i++) + { + ret[i] = (span[i] < otherSpan[i]); + } + } + } + public void ElementwiseLessThan(PrimitiveColumnContainer column, decimal scalar, PrimitiveColumnContainer ret) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + ret[i] = (span[i] < scalar); + } + } + } + } + internal class DoubleArithmetic : IPrimitiveDataFrameColumnArithmetic + { + public void Add(PrimitiveColumnContainer left, PrimitiveColumnContainer right) + { + for (int b = 0 ; b < left.Buffers.Count; b++) + { + var buffer = left.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + left.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + var otherSpan = right.Buffers[b].ReadOnlySpan; + for (int i = 0; i < span.Length; i++) + { + span[i] = (double)(span[i] + otherSpan[i]); + } + } + } + public void Add(PrimitiveColumnContainer column, double scalar) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + span[i] = (double)(span[i] + scalar); + } + } + } + + public void Add(double scalar, PrimitiveColumnContainer column) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + span[i] = (double)(scalar + span[i]); + } + } + } + public void Subtract(PrimitiveColumnContainer left, PrimitiveColumnContainer right) + { + for (int b = 0 ; b < left.Buffers.Count; b++) + { + var buffer = left.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + left.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + var otherSpan = right.Buffers[b].ReadOnlySpan; + for (int i = 0; i < span.Length; i++) + { + span[i] = (double)(span[i] - otherSpan[i]); + } + } + } + public void Subtract(PrimitiveColumnContainer column, double scalar) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + span[i] = (double)(span[i] - scalar); + } + } + } + + public void Subtract(double scalar, PrimitiveColumnContainer column) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + span[i] = (double)(scalar - span[i]); + } + } + } + public void Multiply(PrimitiveColumnContainer left, PrimitiveColumnContainer right) + { + for (int b = 0 ; b < left.Buffers.Count; b++) + { + var buffer = left.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + left.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + var otherSpan = right.Buffers[b].ReadOnlySpan; + for (int i = 0; i < span.Length; i++) + { + span[i] = (double)(span[i] * otherSpan[i]); + } + } + } + public void Multiply(PrimitiveColumnContainer column, double scalar) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + span[i] = (double)(span[i] * scalar); + } + } + } + + public void Multiply(double scalar, PrimitiveColumnContainer column) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + span[i] = (double)(scalar * span[i]); + } + } + } + public void Divide(PrimitiveColumnContainer left, PrimitiveColumnContainer right) + { + for (int b = 0 ; b < left.Buffers.Count; b++) + { + var buffer = left.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + left.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + var otherSpan = right.Buffers[b].ReadOnlySpan; + for (int i = 0; i < span.Length; i++) + { + span[i] = (double)(span[i] / otherSpan[i]); + } + } + } + public void Divide(PrimitiveColumnContainer column, double scalar) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + span[i] = (double)(span[i] / scalar); + } + } + } + + public void Divide(double scalar, PrimitiveColumnContainer column) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + span[i] = (double)(scalar / span[i]); + } + } + } + public void Modulo(PrimitiveColumnContainer left, PrimitiveColumnContainer right) + { + for (int b = 0 ; b < left.Buffers.Count; b++) + { + var buffer = left.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + left.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + var otherSpan = right.Buffers[b].ReadOnlySpan; + for (int i = 0; i < span.Length; i++) + { + span[i] = (double)(span[i] % otherSpan[i]); + } + } + } + public void Modulo(PrimitiveColumnContainer column, double scalar) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + span[i] = (double)(span[i] % scalar); + } + } + } + + public void Modulo(double scalar, PrimitiveColumnContainer column) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + span[i] = (double)(scalar % span[i]); + } + } + } + public void And(PrimitiveColumnContainer left, PrimitiveColumnContainer right) + { + throw new NotSupportedException(); + } + public void And(PrimitiveColumnContainer column, double scalar) + { + throw new NotSupportedException(); + } + + public void And(double scalar, PrimitiveColumnContainer column) + { + throw new NotSupportedException(); + } + public void Or(PrimitiveColumnContainer left, PrimitiveColumnContainer right) + { + throw new NotSupportedException(); + } + public void Or(PrimitiveColumnContainer column, double scalar) + { + throw new NotSupportedException(); + } + + public void Or(double scalar, PrimitiveColumnContainer column) + { + throw new NotSupportedException(); + } + public void Xor(PrimitiveColumnContainer left, PrimitiveColumnContainer right) + { + throw new NotSupportedException(); + } + public void Xor(PrimitiveColumnContainer column, double scalar) + { + throw new NotSupportedException(); + } + + public void Xor(double scalar, PrimitiveColumnContainer column) + { + throw new NotSupportedException(); + } + public void LeftShift(PrimitiveColumnContainer column, int value) + { + throw new NotSupportedException(); + } + public void RightShift(PrimitiveColumnContainer column, int value) + { + throw new NotSupportedException(); + } + public void ElementwiseEquals(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) + { + for (int b = 0 ; b < left.Buffers.Count; b++) + { + var buffer = left.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + left.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + var otherSpan = right.Buffers[b].ReadOnlySpan; + for (int i = 0; i < span.Length; i++) + { + ret[i] = (span[i] == otherSpan[i]); + } + } + } + public void ElementwiseEquals(PrimitiveColumnContainer column, double scalar, PrimitiveColumnContainer ret) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + ret[i] = (span[i] == scalar); + } + } + } + public void ElementwiseNotEquals(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) + { + for (int b = 0 ; b < left.Buffers.Count; b++) + { + var buffer = left.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + left.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + var otherSpan = right.Buffers[b].ReadOnlySpan; + for (int i = 0; i < span.Length; i++) + { + ret[i] = (span[i] != otherSpan[i]); + } + } + } + public void ElementwiseNotEquals(PrimitiveColumnContainer column, double scalar, PrimitiveColumnContainer ret) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + ret[i] = (span[i] != scalar); + } + } + } + public void ElementwiseGreaterThanOrEqual(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) + { + for (int b = 0 ; b < left.Buffers.Count; b++) + { + var buffer = left.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + left.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + var otherSpan = right.Buffers[b].ReadOnlySpan; + for (int i = 0; i < span.Length; i++) + { + ret[i] = (span[i] >= otherSpan[i]); + } + } + } + public void ElementwiseGreaterThanOrEqual(PrimitiveColumnContainer column, double scalar, PrimitiveColumnContainer ret) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + ret[i] = (span[i] >= scalar); + } + } + } + public void ElementwiseLessThanOrEqual(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) + { + for (int b = 0 ; b < left.Buffers.Count; b++) + { + var buffer = left.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + left.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + var otherSpan = right.Buffers[b].ReadOnlySpan; + for (int i = 0; i < span.Length; i++) + { + ret[i] = (span[i] <= otherSpan[i]); + } + } + } + public void ElementwiseLessThanOrEqual(PrimitiveColumnContainer column, double scalar, PrimitiveColumnContainer ret) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + ret[i] = (span[i] <= scalar); + } + } + } + public void ElementwiseGreaterThan(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) + { + for (int b = 0 ; b < left.Buffers.Count; b++) + { + var buffer = left.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + left.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + var otherSpan = right.Buffers[b].ReadOnlySpan; + for (int i = 0; i < span.Length; i++) + { + ret[i] = (span[i] > otherSpan[i]); + } + } + } + public void ElementwiseGreaterThan(PrimitiveColumnContainer column, double scalar, PrimitiveColumnContainer ret) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + ret[i] = (span[i] > scalar); + } + } + } + public void ElementwiseLessThan(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) + { + for (int b = 0 ; b < left.Buffers.Count; b++) + { + var buffer = left.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + left.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + var otherSpan = right.Buffers[b].ReadOnlySpan; + for (int i = 0; i < span.Length; i++) + { + ret[i] = (span[i] < otherSpan[i]); + } + } + } + public void ElementwiseLessThan(PrimitiveColumnContainer column, double scalar, PrimitiveColumnContainer ret) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + ret[i] = (span[i] < scalar); + } + } + } + } + internal class FloatArithmetic : IPrimitiveDataFrameColumnArithmetic + { + public void Add(PrimitiveColumnContainer left, PrimitiveColumnContainer right) + { + for (int b = 0 ; b < left.Buffers.Count; b++) + { + var buffer = left.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + left.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + var otherSpan = right.Buffers[b].ReadOnlySpan; + for (int i = 0; i < span.Length; i++) + { + span[i] = (float)(span[i] + otherSpan[i]); + } + } + } + public void Add(PrimitiveColumnContainer column, float scalar) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + span[i] = (float)(span[i] + scalar); + } + } + } + + public void Add(float scalar, PrimitiveColumnContainer column) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + span[i] = (float)(scalar + span[i]); + } + } + } + public void Subtract(PrimitiveColumnContainer left, PrimitiveColumnContainer right) + { + for (int b = 0 ; b < left.Buffers.Count; b++) + { + var buffer = left.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + left.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + var otherSpan = right.Buffers[b].ReadOnlySpan; + for (int i = 0; i < span.Length; i++) + { + span[i] = (float)(span[i] - otherSpan[i]); + } + } + } + public void Subtract(PrimitiveColumnContainer column, float scalar) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + span[i] = (float)(span[i] - scalar); + } + } + } + + public void Subtract(float scalar, PrimitiveColumnContainer column) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + span[i] = (float)(scalar - span[i]); + } + } + } + public void Multiply(PrimitiveColumnContainer left, PrimitiveColumnContainer right) + { + for (int b = 0 ; b < left.Buffers.Count; b++) + { + var buffer = left.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + left.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + var otherSpan = right.Buffers[b].ReadOnlySpan; + for (int i = 0; i < span.Length; i++) + { + span[i] = (float)(span[i] * otherSpan[i]); + } + } + } + public void Multiply(PrimitiveColumnContainer column, float scalar) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + span[i] = (float)(span[i] * scalar); + } + } + } + + public void Multiply(float scalar, PrimitiveColumnContainer column) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + span[i] = (float)(scalar * span[i]); + } + } + } + public void Divide(PrimitiveColumnContainer left, PrimitiveColumnContainer right) + { + for (int b = 0 ; b < left.Buffers.Count; b++) + { + var buffer = left.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + left.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + var otherSpan = right.Buffers[b].ReadOnlySpan; + for (int i = 0; i < span.Length; i++) + { + span[i] = (float)(span[i] / otherSpan[i]); + } + } + } + public void Divide(PrimitiveColumnContainer column, float scalar) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + span[i] = (float)(span[i] / scalar); + } + } + } + + public void Divide(float scalar, PrimitiveColumnContainer column) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + span[i] = (float)(scalar / span[i]); + } + } + } + public void Modulo(PrimitiveColumnContainer left, PrimitiveColumnContainer right) + { + for (int b = 0 ; b < left.Buffers.Count; b++) + { + var buffer = left.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + left.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + var otherSpan = right.Buffers[b].ReadOnlySpan; + for (int i = 0; i < span.Length; i++) + { + span[i] = (float)(span[i] % otherSpan[i]); + } + } + } + public void Modulo(PrimitiveColumnContainer column, float scalar) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + span[i] = (float)(span[i] % scalar); + } + } + } + + public void Modulo(float scalar, PrimitiveColumnContainer column) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + span[i] = (float)(scalar % span[i]); + } + } + } + public void And(PrimitiveColumnContainer left, PrimitiveColumnContainer right) + { + throw new NotSupportedException(); + } + public void And(PrimitiveColumnContainer column, float scalar) + { + throw new NotSupportedException(); + } + + public void And(float scalar, PrimitiveColumnContainer column) + { + throw new NotSupportedException(); + } + public void Or(PrimitiveColumnContainer left, PrimitiveColumnContainer right) + { + throw new NotSupportedException(); + } + public void Or(PrimitiveColumnContainer column, float scalar) + { + throw new NotSupportedException(); + } + + public void Or(float scalar, PrimitiveColumnContainer column) + { + throw new NotSupportedException(); + } + public void Xor(PrimitiveColumnContainer left, PrimitiveColumnContainer right) + { + throw new NotSupportedException(); + } + public void Xor(PrimitiveColumnContainer column, float scalar) + { + throw new NotSupportedException(); + } + + public void Xor(float scalar, PrimitiveColumnContainer column) + { + throw new NotSupportedException(); + } + public void LeftShift(PrimitiveColumnContainer column, int value) + { + throw new NotSupportedException(); + } + public void RightShift(PrimitiveColumnContainer column, int value) + { + throw new NotSupportedException(); + } + public void ElementwiseEquals(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) + { + for (int b = 0 ; b < left.Buffers.Count; b++) + { + var buffer = left.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + left.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + var otherSpan = right.Buffers[b].ReadOnlySpan; + for (int i = 0; i < span.Length; i++) + { + ret[i] = (span[i] == otherSpan[i]); + } + } + } + public void ElementwiseEquals(PrimitiveColumnContainer column, float scalar, PrimitiveColumnContainer ret) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + ret[i] = (span[i] == scalar); + } + } + } + public void ElementwiseNotEquals(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) + { + for (int b = 0 ; b < left.Buffers.Count; b++) + { + var buffer = left.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + left.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + var otherSpan = right.Buffers[b].ReadOnlySpan; + for (int i = 0; i < span.Length; i++) + { + ret[i] = (span[i] != otherSpan[i]); + } + } + } + public void ElementwiseNotEquals(PrimitiveColumnContainer column, float scalar, PrimitiveColumnContainer ret) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + ret[i] = (span[i] != scalar); + } + } + } + public void ElementwiseGreaterThanOrEqual(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) + { + for (int b = 0 ; b < left.Buffers.Count; b++) + { + var buffer = left.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + left.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + var otherSpan = right.Buffers[b].ReadOnlySpan; + for (int i = 0; i < span.Length; i++) + { + ret[i] = (span[i] >= otherSpan[i]); + } + } + } + public void ElementwiseGreaterThanOrEqual(PrimitiveColumnContainer column, float scalar, PrimitiveColumnContainer ret) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + ret[i] = (span[i] >= scalar); + } + } + } + public void ElementwiseLessThanOrEqual(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) + { + for (int b = 0 ; b < left.Buffers.Count; b++) + { + var buffer = left.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + left.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + var otherSpan = right.Buffers[b].ReadOnlySpan; + for (int i = 0; i < span.Length; i++) + { + ret[i] = (span[i] <= otherSpan[i]); + } + } + } + public void ElementwiseLessThanOrEqual(PrimitiveColumnContainer column, float scalar, PrimitiveColumnContainer ret) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + ret[i] = (span[i] <= scalar); + } + } + } + public void ElementwiseGreaterThan(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) + { + for (int b = 0 ; b < left.Buffers.Count; b++) + { + var buffer = left.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + left.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + var otherSpan = right.Buffers[b].ReadOnlySpan; + for (int i = 0; i < span.Length; i++) + { + ret[i] = (span[i] > otherSpan[i]); + } + } + } + public void ElementwiseGreaterThan(PrimitiveColumnContainer column, float scalar, PrimitiveColumnContainer ret) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + ret[i] = (span[i] > scalar); + } + } + } + public void ElementwiseLessThan(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) + { + for (int b = 0 ; b < left.Buffers.Count; b++) + { + var buffer = left.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + left.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + var otherSpan = right.Buffers[b].ReadOnlySpan; + for (int i = 0; i < span.Length; i++) + { + ret[i] = (span[i] < otherSpan[i]); + } + } + } + public void ElementwiseLessThan(PrimitiveColumnContainer column, float scalar, PrimitiveColumnContainer ret) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + ret[i] = (span[i] < scalar); + } + } + } + } + internal class IntArithmetic : IPrimitiveDataFrameColumnArithmetic + { + public void Add(PrimitiveColumnContainer left, PrimitiveColumnContainer right) + { + for (int b = 0 ; b < left.Buffers.Count; b++) + { + var buffer = left.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + left.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + var otherSpan = right.Buffers[b].ReadOnlySpan; + for (int i = 0; i < span.Length; i++) + { + span[i] = (int)(span[i] + otherSpan[i]); + } + } + } + public void Add(PrimitiveColumnContainer column, int scalar) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + span[i] = (int)(span[i] + scalar); + } + } + } + + public void Add(int scalar, PrimitiveColumnContainer column) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + span[i] = (int)(scalar + span[i]); + } + } + } + public void Subtract(PrimitiveColumnContainer left, PrimitiveColumnContainer right) + { + for (int b = 0 ; b < left.Buffers.Count; b++) + { + var buffer = left.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + left.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + var otherSpan = right.Buffers[b].ReadOnlySpan; + for (int i = 0; i < span.Length; i++) + { + span[i] = (int)(span[i] - otherSpan[i]); + } + } + } + public void Subtract(PrimitiveColumnContainer column, int scalar) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + span[i] = (int)(span[i] - scalar); + } + } + } + + public void Subtract(int scalar, PrimitiveColumnContainer column) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + span[i] = (int)(scalar - span[i]); + } + } + } + public void Multiply(PrimitiveColumnContainer left, PrimitiveColumnContainer right) + { + for (int b = 0 ; b < left.Buffers.Count; b++) + { + var buffer = left.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + left.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + var otherSpan = right.Buffers[b].ReadOnlySpan; + for (int i = 0; i < span.Length; i++) + { + span[i] = (int)(span[i] * otherSpan[i]); + } + } + } + public void Multiply(PrimitiveColumnContainer column, int scalar) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + span[i] = (int)(span[i] * scalar); + } + } + } + + public void Multiply(int scalar, PrimitiveColumnContainer column) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + span[i] = (int)(scalar * span[i]); + } + } + } + public void Divide(PrimitiveColumnContainer left, PrimitiveColumnContainer right) + { + for (int b = 0 ; b < left.Buffers.Count; b++) + { + var buffer = left.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + left.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + var otherSpan = right.Buffers[b].ReadOnlySpan; + for (int i = 0; i < span.Length; i++) + { + span[i] = (int)(span[i] / otherSpan[i]); + } + } + } + public void Divide(PrimitiveColumnContainer column, int scalar) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + span[i] = (int)(span[i] / scalar); + } + } + } + + public void Divide(int scalar, PrimitiveColumnContainer column) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + span[i] = (int)(scalar / span[i]); + } + } + } + public void Modulo(PrimitiveColumnContainer left, PrimitiveColumnContainer right) + { + for (int b = 0 ; b < left.Buffers.Count; b++) + { + var buffer = left.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + left.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + var otherSpan = right.Buffers[b].ReadOnlySpan; + for (int i = 0; i < span.Length; i++) + { + span[i] = (int)(span[i] % otherSpan[i]); + } + } + } + public void Modulo(PrimitiveColumnContainer column, int scalar) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + span[i] = (int)(span[i] % scalar); + } + } + } + + public void Modulo(int scalar, PrimitiveColumnContainer column) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + span[i] = (int)(scalar % span[i]); + } + } + } + public void And(PrimitiveColumnContainer left, PrimitiveColumnContainer right) + { + for (int b = 0 ; b < left.Buffers.Count; b++) + { + var buffer = left.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + left.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + var otherSpan = right.Buffers[b].ReadOnlySpan; + for (int i = 0; i < span.Length; i++) + { + span[i] = (int)(span[i] & otherSpan[i]); + } + } + } + public void And(PrimitiveColumnContainer column, int scalar) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + span[i] = (int)(span[i] & scalar); + } + } + } + + public void And(int scalar, PrimitiveColumnContainer column) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + span[i] = (int)(scalar & span[i]); + } + } + } + public void Or(PrimitiveColumnContainer left, PrimitiveColumnContainer right) + { + for (int b = 0 ; b < left.Buffers.Count; b++) + { + var buffer = left.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + left.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + var otherSpan = right.Buffers[b].ReadOnlySpan; + for (int i = 0; i < span.Length; i++) + { + span[i] = (int)(span[i] | otherSpan[i]); + } + } + } + public void Or(PrimitiveColumnContainer column, int scalar) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + span[i] = (int)(span[i] | scalar); + } + } + } + + public void Or(int scalar, PrimitiveColumnContainer column) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + span[i] = (int)(scalar | span[i]); + } + } + } + public void Xor(PrimitiveColumnContainer left, PrimitiveColumnContainer right) + { + for (int b = 0 ; b < left.Buffers.Count; b++) + { + var buffer = left.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + left.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + var otherSpan = right.Buffers[b].ReadOnlySpan; + for (int i = 0; i < span.Length; i++) + { + span[i] = (int)(span[i] ^ otherSpan[i]); + } + } + } + public void Xor(PrimitiveColumnContainer column, int scalar) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + span[i] = (int)(span[i] ^ scalar); + } + } + } + + public void Xor(int scalar, PrimitiveColumnContainer column) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + span[i] = (int)(scalar ^ span[i]); + } + } + } + public void LeftShift(PrimitiveColumnContainer column, int value) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + span[i] = (int)(span[i] << value); + } + } + } + public void RightShift(PrimitiveColumnContainer column, int value) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + span[i] = (int)(span[i] >> value); + } + } + } + public void ElementwiseEquals(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) + { + for (int b = 0 ; b < left.Buffers.Count; b++) + { + var buffer = left.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + left.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + var otherSpan = right.Buffers[b].ReadOnlySpan; + for (int i = 0; i < span.Length; i++) + { + ret[i] = (span[i] == otherSpan[i]); + } + } + } + public void ElementwiseEquals(PrimitiveColumnContainer column, int scalar, PrimitiveColumnContainer ret) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + ret[i] = (span[i] == scalar); + } + } + } + public void ElementwiseNotEquals(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) + { + for (int b = 0 ; b < left.Buffers.Count; b++) + { + var buffer = left.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + left.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + var otherSpan = right.Buffers[b].ReadOnlySpan; + for (int i = 0; i < span.Length; i++) + { + ret[i] = (span[i] != otherSpan[i]); + } + } + } + public void ElementwiseNotEquals(PrimitiveColumnContainer column, int scalar, PrimitiveColumnContainer ret) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + ret[i] = (span[i] != scalar); + } + } + } + public void ElementwiseGreaterThanOrEqual(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) + { + for (int b = 0 ; b < left.Buffers.Count; b++) + { + var buffer = left.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + left.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + var otherSpan = right.Buffers[b].ReadOnlySpan; + for (int i = 0; i < span.Length; i++) + { + ret[i] = (span[i] >= otherSpan[i]); + } + } + } + public void ElementwiseGreaterThanOrEqual(PrimitiveColumnContainer column, int scalar, PrimitiveColumnContainer ret) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + ret[i] = (span[i] >= scalar); + } + } + } + public void ElementwiseLessThanOrEqual(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) + { + for (int b = 0 ; b < left.Buffers.Count; b++) + { + var buffer = left.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + left.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + var otherSpan = right.Buffers[b].ReadOnlySpan; + for (int i = 0; i < span.Length; i++) + { + ret[i] = (span[i] <= otherSpan[i]); + } + } + } + public void ElementwiseLessThanOrEqual(PrimitiveColumnContainer column, int scalar, PrimitiveColumnContainer ret) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + ret[i] = (span[i] <= scalar); + } + } + } + public void ElementwiseGreaterThan(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) + { + for (int b = 0 ; b < left.Buffers.Count; b++) + { + var buffer = left.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + left.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + var otherSpan = right.Buffers[b].ReadOnlySpan; + for (int i = 0; i < span.Length; i++) + { + ret[i] = (span[i] > otherSpan[i]); + } + } + } + public void ElementwiseGreaterThan(PrimitiveColumnContainer column, int scalar, PrimitiveColumnContainer ret) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + ret[i] = (span[i] > scalar); + } + } + } + public void ElementwiseLessThan(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) + { + for (int b = 0 ; b < left.Buffers.Count; b++) + { + var buffer = left.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + left.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + var otherSpan = right.Buffers[b].ReadOnlySpan; + for (int i = 0; i < span.Length; i++) + { + ret[i] = (span[i] < otherSpan[i]); + } + } + } + public void ElementwiseLessThan(PrimitiveColumnContainer column, int scalar, PrimitiveColumnContainer ret) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + ret[i] = (span[i] < scalar); + } + } + } + } + internal class LongArithmetic : IPrimitiveDataFrameColumnArithmetic + { + public void Add(PrimitiveColumnContainer left, PrimitiveColumnContainer right) + { + for (int b = 0 ; b < left.Buffers.Count; b++) + { + var buffer = left.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + left.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + var otherSpan = right.Buffers[b].ReadOnlySpan; + for (int i = 0; i < span.Length; i++) + { + span[i] = (long)(span[i] + otherSpan[i]); + } + } + } + public void Add(PrimitiveColumnContainer column, long scalar) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + span[i] = (long)(span[i] + scalar); + } + } + } + + public void Add(long scalar, PrimitiveColumnContainer column) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + span[i] = (long)(scalar + span[i]); + } + } + } + public void Subtract(PrimitiveColumnContainer left, PrimitiveColumnContainer right) + { + for (int b = 0 ; b < left.Buffers.Count; b++) + { + var buffer = left.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + left.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + var otherSpan = right.Buffers[b].ReadOnlySpan; + for (int i = 0; i < span.Length; i++) + { + span[i] = (long)(span[i] - otherSpan[i]); + } + } + } + public void Subtract(PrimitiveColumnContainer column, long scalar) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + span[i] = (long)(span[i] - scalar); + } + } + } + + public void Subtract(long scalar, PrimitiveColumnContainer column) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + span[i] = (long)(scalar - span[i]); + } + } + } + public void Multiply(PrimitiveColumnContainer left, PrimitiveColumnContainer right) + { + for (int b = 0 ; b < left.Buffers.Count; b++) + { + var buffer = left.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + left.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + var otherSpan = right.Buffers[b].ReadOnlySpan; + for (int i = 0; i < span.Length; i++) + { + span[i] = (long)(span[i] * otherSpan[i]); + } + } + } + public void Multiply(PrimitiveColumnContainer column, long scalar) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + span[i] = (long)(span[i] * scalar); + } + } + } + + public void Multiply(long scalar, PrimitiveColumnContainer column) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + span[i] = (long)(scalar * span[i]); + } + } + } + public void Divide(PrimitiveColumnContainer left, PrimitiveColumnContainer right) + { + for (int b = 0 ; b < left.Buffers.Count; b++) + { + var buffer = left.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + left.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + var otherSpan = right.Buffers[b].ReadOnlySpan; + for (int i = 0; i < span.Length; i++) + { + span[i] = (long)(span[i] / otherSpan[i]); + } + } + } + public void Divide(PrimitiveColumnContainer column, long scalar) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + span[i] = (long)(span[i] / scalar); + } + } + } + + public void Divide(long scalar, PrimitiveColumnContainer column) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + span[i] = (long)(scalar / span[i]); + } + } + } + public void Modulo(PrimitiveColumnContainer left, PrimitiveColumnContainer right) + { + for (int b = 0 ; b < left.Buffers.Count; b++) + { + var buffer = left.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + left.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + var otherSpan = right.Buffers[b].ReadOnlySpan; + for (int i = 0; i < span.Length; i++) + { + span[i] = (long)(span[i] % otherSpan[i]); + } + } + } + public void Modulo(PrimitiveColumnContainer column, long scalar) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + span[i] = (long)(span[i] % scalar); + } + } + } + + public void Modulo(long scalar, PrimitiveColumnContainer column) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + span[i] = (long)(scalar % span[i]); + } + } + } + public void And(PrimitiveColumnContainer left, PrimitiveColumnContainer right) + { + for (int b = 0 ; b < left.Buffers.Count; b++) + { + var buffer = left.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + left.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + var otherSpan = right.Buffers[b].ReadOnlySpan; + for (int i = 0; i < span.Length; i++) + { + span[i] = (long)(span[i] & otherSpan[i]); + } + } + } + public void And(PrimitiveColumnContainer column, long scalar) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + span[i] = (long)(span[i] & scalar); + } + } + } + + public void And(long scalar, PrimitiveColumnContainer column) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + span[i] = (long)(scalar & span[i]); + } + } + } + public void Or(PrimitiveColumnContainer left, PrimitiveColumnContainer right) + { + for (int b = 0 ; b < left.Buffers.Count; b++) + { + var buffer = left.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + left.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + var otherSpan = right.Buffers[b].ReadOnlySpan; + for (int i = 0; i < span.Length; i++) + { + span[i] = (long)(span[i] | otherSpan[i]); + } + } + } + public void Or(PrimitiveColumnContainer column, long scalar) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + span[i] = (long)(span[i] | scalar); + } + } + } + + public void Or(long scalar, PrimitiveColumnContainer column) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + span[i] = (long)(scalar | span[i]); + } + } + } + public void Xor(PrimitiveColumnContainer left, PrimitiveColumnContainer right) + { + for (int b = 0 ; b < left.Buffers.Count; b++) + { + var buffer = left.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + left.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + var otherSpan = right.Buffers[b].ReadOnlySpan; + for (int i = 0; i < span.Length; i++) + { + span[i] = (long)(span[i] ^ otherSpan[i]); + } + } + } + public void Xor(PrimitiveColumnContainer column, long scalar) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + span[i] = (long)(span[i] ^ scalar); + } + } + } + + public void Xor(long scalar, PrimitiveColumnContainer column) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + span[i] = (long)(scalar ^ span[i]); + } + } + } + public void LeftShift(PrimitiveColumnContainer column, int value) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + span[i] = (long)(span[i] << value); + } + } + } + public void RightShift(PrimitiveColumnContainer column, int value) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + span[i] = (long)(span[i] >> value); + } + } + } + public void ElementwiseEquals(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) + { + for (int b = 0 ; b < left.Buffers.Count; b++) + { + var buffer = left.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + left.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + var otherSpan = right.Buffers[b].ReadOnlySpan; + for (int i = 0; i < span.Length; i++) + { + ret[i] = (span[i] == otherSpan[i]); + } + } + } + public void ElementwiseEquals(PrimitiveColumnContainer column, long scalar, PrimitiveColumnContainer ret) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + ret[i] = (span[i] == scalar); + } + } + } + public void ElementwiseNotEquals(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) + { + for (int b = 0 ; b < left.Buffers.Count; b++) + { + var buffer = left.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + left.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + var otherSpan = right.Buffers[b].ReadOnlySpan; + for (int i = 0; i < span.Length; i++) + { + ret[i] = (span[i] != otherSpan[i]); + } + } + } + public void ElementwiseNotEquals(PrimitiveColumnContainer column, long scalar, PrimitiveColumnContainer ret) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + ret[i] = (span[i] != scalar); + } + } + } + public void ElementwiseGreaterThanOrEqual(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) + { + for (int b = 0 ; b < left.Buffers.Count; b++) + { + var buffer = left.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + left.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + var otherSpan = right.Buffers[b].ReadOnlySpan; + for (int i = 0; i < span.Length; i++) + { + ret[i] = (span[i] >= otherSpan[i]); + } + } + } + public void ElementwiseGreaterThanOrEqual(PrimitiveColumnContainer column, long scalar, PrimitiveColumnContainer ret) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + ret[i] = (span[i] >= scalar); + } + } + } + public void ElementwiseLessThanOrEqual(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) + { + for (int b = 0 ; b < left.Buffers.Count; b++) + { + var buffer = left.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + left.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + var otherSpan = right.Buffers[b].ReadOnlySpan; + for (int i = 0; i < span.Length; i++) + { + ret[i] = (span[i] <= otherSpan[i]); + } + } + } + public void ElementwiseLessThanOrEqual(PrimitiveColumnContainer column, long scalar, PrimitiveColumnContainer ret) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + ret[i] = (span[i] <= scalar); + } + } + } + public void ElementwiseGreaterThan(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) + { + for (int b = 0 ; b < left.Buffers.Count; b++) + { + var buffer = left.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + left.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + var otherSpan = right.Buffers[b].ReadOnlySpan; + for (int i = 0; i < span.Length; i++) + { + ret[i] = (span[i] > otherSpan[i]); + } + } + } + public void ElementwiseGreaterThan(PrimitiveColumnContainer column, long scalar, PrimitiveColumnContainer ret) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + ret[i] = (span[i] > scalar); + } + } + } + public void ElementwiseLessThan(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) + { + for (int b = 0 ; b < left.Buffers.Count; b++) + { + var buffer = left.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + left.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + var otherSpan = right.Buffers[b].ReadOnlySpan; + for (int i = 0; i < span.Length; i++) + { + ret[i] = (span[i] < otherSpan[i]); + } + } + } + public void ElementwiseLessThan(PrimitiveColumnContainer column, long scalar, PrimitiveColumnContainer ret) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + ret[i] = (span[i] < scalar); + } + } + } + } + internal class SByteArithmetic : IPrimitiveDataFrameColumnArithmetic + { + public void Add(PrimitiveColumnContainer left, PrimitiveColumnContainer right) + { + for (int b = 0 ; b < left.Buffers.Count; b++) + { + var buffer = left.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + left.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + var otherSpan = right.Buffers[b].ReadOnlySpan; + for (int i = 0; i < span.Length; i++) + { + span[i] = (sbyte)(span[i] + otherSpan[i]); + } + } + } + public void Add(PrimitiveColumnContainer column, sbyte scalar) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + span[i] = (sbyte)(span[i] + scalar); + } + } + } + + public void Add(sbyte scalar, PrimitiveColumnContainer column) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + span[i] = (sbyte)(scalar + span[i]); + } + } + } + public void Subtract(PrimitiveColumnContainer left, PrimitiveColumnContainer right) + { + for (int b = 0 ; b < left.Buffers.Count; b++) + { + var buffer = left.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + left.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + var otherSpan = right.Buffers[b].ReadOnlySpan; + for (int i = 0; i < span.Length; i++) + { + span[i] = (sbyte)(span[i] - otherSpan[i]); + } + } + } + public void Subtract(PrimitiveColumnContainer column, sbyte scalar) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + span[i] = (sbyte)(span[i] - scalar); + } + } + } + + public void Subtract(sbyte scalar, PrimitiveColumnContainer column) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + span[i] = (sbyte)(scalar - span[i]); + } + } + } + public void Multiply(PrimitiveColumnContainer left, PrimitiveColumnContainer right) + { + for (int b = 0 ; b < left.Buffers.Count; b++) + { + var buffer = left.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + left.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + var otherSpan = right.Buffers[b].ReadOnlySpan; + for (int i = 0; i < span.Length; i++) + { + span[i] = (sbyte)(span[i] * otherSpan[i]); + } + } + } + public void Multiply(PrimitiveColumnContainer column, sbyte scalar) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + span[i] = (sbyte)(span[i] * scalar); + } + } + } + + public void Multiply(sbyte scalar, PrimitiveColumnContainer column) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + span[i] = (sbyte)(scalar * span[i]); + } + } + } + public void Divide(PrimitiveColumnContainer left, PrimitiveColumnContainer right) + { + for (int b = 0 ; b < left.Buffers.Count; b++) + { + var buffer = left.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + left.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + var otherSpan = right.Buffers[b].ReadOnlySpan; + for (int i = 0; i < span.Length; i++) + { + span[i] = (sbyte)(span[i] / otherSpan[i]); + } + } + } + public void Divide(PrimitiveColumnContainer column, sbyte scalar) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + span[i] = (sbyte)(span[i] / scalar); + } + } + } + + public void Divide(sbyte scalar, PrimitiveColumnContainer column) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + span[i] = (sbyte)(scalar / span[i]); + } + } + } + public void Modulo(PrimitiveColumnContainer left, PrimitiveColumnContainer right) + { + for (int b = 0 ; b < left.Buffers.Count; b++) + { + var buffer = left.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + left.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + var otherSpan = right.Buffers[b].ReadOnlySpan; + for (int i = 0; i < span.Length; i++) + { + span[i] = (sbyte)(span[i] % otherSpan[i]); + } + } + } + public void Modulo(PrimitiveColumnContainer column, sbyte scalar) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + span[i] = (sbyte)(span[i] % scalar); + } + } + } + + public void Modulo(sbyte scalar, PrimitiveColumnContainer column) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + span[i] = (sbyte)(scalar % span[i]); + } + } + } + public void And(PrimitiveColumnContainer left, PrimitiveColumnContainer right) + { + for (int b = 0 ; b < left.Buffers.Count; b++) + { + var buffer = left.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + left.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + var otherSpan = right.Buffers[b].ReadOnlySpan; + for (int i = 0; i < span.Length; i++) + { + span[i] = (sbyte)(span[i] & otherSpan[i]); + } + } + } + public void And(PrimitiveColumnContainer column, sbyte scalar) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + span[i] = (sbyte)(span[i] & scalar); + } + } + } + + public void And(sbyte scalar, PrimitiveColumnContainer column) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + span[i] = (sbyte)(scalar & span[i]); + } + } + } + public void Or(PrimitiveColumnContainer left, PrimitiveColumnContainer right) + { + for (int b = 0 ; b < left.Buffers.Count; b++) + { + var buffer = left.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + left.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + var otherSpan = right.Buffers[b].ReadOnlySpan; + for (int i = 0; i < span.Length; i++) + { + span[i] = (sbyte)(span[i] | otherSpan[i]); + } + } + } + public void Or(PrimitiveColumnContainer column, sbyte scalar) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + span[i] = (sbyte)(span[i] | scalar); + } + } + } + + public void Or(sbyte scalar, PrimitiveColumnContainer column) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + span[i] = (sbyte)(scalar | span[i]); + } + } + } + public void Xor(PrimitiveColumnContainer left, PrimitiveColumnContainer right) + { + for (int b = 0 ; b < left.Buffers.Count; b++) + { + var buffer = left.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + left.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + var otherSpan = right.Buffers[b].ReadOnlySpan; + for (int i = 0; i < span.Length; i++) + { + span[i] = (sbyte)(span[i] ^ otherSpan[i]); + } + } + } + public void Xor(PrimitiveColumnContainer column, sbyte scalar) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + span[i] = (sbyte)(span[i] ^ scalar); + } + } + } + + public void Xor(sbyte scalar, PrimitiveColumnContainer column) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + span[i] = (sbyte)(scalar ^ span[i]); + } + } + } + public void LeftShift(PrimitiveColumnContainer column, int value) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + span[i] = (sbyte)(span[i] << value); + } + } + } + public void RightShift(PrimitiveColumnContainer column, int value) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + span[i] = (sbyte)(span[i] >> value); + } + } + } + public void ElementwiseEquals(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) + { + for (int b = 0 ; b < left.Buffers.Count; b++) + { + var buffer = left.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + left.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + var otherSpan = right.Buffers[b].ReadOnlySpan; + for (int i = 0; i < span.Length; i++) + { + ret[i] = (span[i] == otherSpan[i]); + } + } + } + public void ElementwiseEquals(PrimitiveColumnContainer column, sbyte scalar, PrimitiveColumnContainer ret) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + ret[i] = (span[i] == scalar); + } + } + } + public void ElementwiseNotEquals(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) + { + for (int b = 0 ; b < left.Buffers.Count; b++) + { + var buffer = left.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + left.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + var otherSpan = right.Buffers[b].ReadOnlySpan; + for (int i = 0; i < span.Length; i++) + { + ret[i] = (span[i] != otherSpan[i]); + } + } + } + public void ElementwiseNotEquals(PrimitiveColumnContainer column, sbyte scalar, PrimitiveColumnContainer ret) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + ret[i] = (span[i] != scalar); + } + } + } + public void ElementwiseGreaterThanOrEqual(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) + { + for (int b = 0 ; b < left.Buffers.Count; b++) + { + var buffer = left.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + left.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + var otherSpan = right.Buffers[b].ReadOnlySpan; + for (int i = 0; i < span.Length; i++) + { + ret[i] = (span[i] >= otherSpan[i]); + } + } + } + public void ElementwiseGreaterThanOrEqual(PrimitiveColumnContainer column, sbyte scalar, PrimitiveColumnContainer ret) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + ret[i] = (span[i] >= scalar); + } + } + } + public void ElementwiseLessThanOrEqual(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) + { + for (int b = 0 ; b < left.Buffers.Count; b++) + { + var buffer = left.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + left.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + var otherSpan = right.Buffers[b].ReadOnlySpan; + for (int i = 0; i < span.Length; i++) + { + ret[i] = (span[i] <= otherSpan[i]); + } + } + } + public void ElementwiseLessThanOrEqual(PrimitiveColumnContainer column, sbyte scalar, PrimitiveColumnContainer ret) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + ret[i] = (span[i] <= scalar); + } + } + } + public void ElementwiseGreaterThan(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) + { + for (int b = 0 ; b < left.Buffers.Count; b++) + { + var buffer = left.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + left.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + var otherSpan = right.Buffers[b].ReadOnlySpan; + for (int i = 0; i < span.Length; i++) + { + ret[i] = (span[i] > otherSpan[i]); + } + } + } + public void ElementwiseGreaterThan(PrimitiveColumnContainer column, sbyte scalar, PrimitiveColumnContainer ret) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + ret[i] = (span[i] > scalar); + } + } + } + public void ElementwiseLessThan(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) + { + for (int b = 0 ; b < left.Buffers.Count; b++) + { + var buffer = left.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + left.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + var otherSpan = right.Buffers[b].ReadOnlySpan; + for (int i = 0; i < span.Length; i++) + { + ret[i] = (span[i] < otherSpan[i]); + } + } + } + public void ElementwiseLessThan(PrimitiveColumnContainer column, sbyte scalar, PrimitiveColumnContainer ret) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + ret[i] = (span[i] < scalar); + } + } + } + } + internal class ShortArithmetic : IPrimitiveDataFrameColumnArithmetic + { + public void Add(PrimitiveColumnContainer left, PrimitiveColumnContainer right) + { + for (int b = 0 ; b < left.Buffers.Count; b++) + { + var buffer = left.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + left.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + var otherSpan = right.Buffers[b].ReadOnlySpan; + for (int i = 0; i < span.Length; i++) + { + span[i] = (short)(span[i] + otherSpan[i]); + } + } + } + public void Add(PrimitiveColumnContainer column, short scalar) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + span[i] = (short)(span[i] + scalar); + } + } + } + + public void Add(short scalar, PrimitiveColumnContainer column) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + span[i] = (short)(scalar + span[i]); + } + } + } + public void Subtract(PrimitiveColumnContainer left, PrimitiveColumnContainer right) + { + for (int b = 0 ; b < left.Buffers.Count; b++) + { + var buffer = left.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + left.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + var otherSpan = right.Buffers[b].ReadOnlySpan; + for (int i = 0; i < span.Length; i++) + { + span[i] = (short)(span[i] - otherSpan[i]); + } + } + } + public void Subtract(PrimitiveColumnContainer column, short scalar) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + span[i] = (short)(span[i] - scalar); + } + } + } + + public void Subtract(short scalar, PrimitiveColumnContainer column) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + span[i] = (short)(scalar - span[i]); + } + } + } + public void Multiply(PrimitiveColumnContainer left, PrimitiveColumnContainer right) + { + for (int b = 0 ; b < left.Buffers.Count; b++) + { + var buffer = left.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + left.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + var otherSpan = right.Buffers[b].ReadOnlySpan; + for (int i = 0; i < span.Length; i++) + { + span[i] = (short)(span[i] * otherSpan[i]); + } + } + } + public void Multiply(PrimitiveColumnContainer column, short scalar) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + span[i] = (short)(span[i] * scalar); + } + } + } + + public void Multiply(short scalar, PrimitiveColumnContainer column) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + span[i] = (short)(scalar * span[i]); + } + } + } + public void Divide(PrimitiveColumnContainer left, PrimitiveColumnContainer right) + { + for (int b = 0 ; b < left.Buffers.Count; b++) + { + var buffer = left.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + left.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + var otherSpan = right.Buffers[b].ReadOnlySpan; + for (int i = 0; i < span.Length; i++) + { + span[i] = (short)(span[i] / otherSpan[i]); + } + } + } + public void Divide(PrimitiveColumnContainer column, short scalar) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + span[i] = (short)(span[i] / scalar); + } + } + } + + public void Divide(short scalar, PrimitiveColumnContainer column) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + span[i] = (short)(scalar / span[i]); + } + } + } + public void Modulo(PrimitiveColumnContainer left, PrimitiveColumnContainer right) + { + for (int b = 0 ; b < left.Buffers.Count; b++) + { + var buffer = left.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + left.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + var otherSpan = right.Buffers[b].ReadOnlySpan; + for (int i = 0; i < span.Length; i++) + { + span[i] = (short)(span[i] % otherSpan[i]); + } + } + } + public void Modulo(PrimitiveColumnContainer column, short scalar) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + span[i] = (short)(span[i] % scalar); + } + } + } + + public void Modulo(short scalar, PrimitiveColumnContainer column) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + span[i] = (short)(scalar % span[i]); + } + } + } + public void And(PrimitiveColumnContainer left, PrimitiveColumnContainer right) + { + for (int b = 0 ; b < left.Buffers.Count; b++) + { + var buffer = left.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + left.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + var otherSpan = right.Buffers[b].ReadOnlySpan; + for (int i = 0; i < span.Length; i++) + { + span[i] = (short)(span[i] & otherSpan[i]); + } + } + } + public void And(PrimitiveColumnContainer column, short scalar) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + span[i] = (short)(span[i] & scalar); + } + } + } + + public void And(short scalar, PrimitiveColumnContainer column) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + span[i] = (short)(scalar & span[i]); + } + } + } + public void Or(PrimitiveColumnContainer left, PrimitiveColumnContainer right) + { + for (int b = 0 ; b < left.Buffers.Count; b++) + { + var buffer = left.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + left.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + var otherSpan = right.Buffers[b].ReadOnlySpan; + for (int i = 0; i < span.Length; i++) + { + span[i] = (short)(span[i] | otherSpan[i]); + } + } + } + public void Or(PrimitiveColumnContainer column, short scalar) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + span[i] = (short)(span[i] | scalar); + } + } + } + + public void Or(short scalar, PrimitiveColumnContainer column) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + span[i] = (short)(scalar | span[i]); + } + } + } + public void Xor(PrimitiveColumnContainer left, PrimitiveColumnContainer right) + { + for (int b = 0 ; b < left.Buffers.Count; b++) + { + var buffer = left.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + left.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + var otherSpan = right.Buffers[b].ReadOnlySpan; + for (int i = 0; i < span.Length; i++) + { + span[i] = (short)(span[i] ^ otherSpan[i]); + } + } + } + public void Xor(PrimitiveColumnContainer column, short scalar) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + span[i] = (short)(span[i] ^ scalar); + } + } + } + + public void Xor(short scalar, PrimitiveColumnContainer column) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + span[i] = (short)(scalar ^ span[i]); + } + } + } + public void LeftShift(PrimitiveColumnContainer column, int value) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + span[i] = (short)(span[i] << value); + } + } + } + public void RightShift(PrimitiveColumnContainer column, int value) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + span[i] = (short)(span[i] >> value); + } + } + } + public void ElementwiseEquals(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) + { + for (int b = 0 ; b < left.Buffers.Count; b++) + { + var buffer = left.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + left.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + var otherSpan = right.Buffers[b].ReadOnlySpan; + for (int i = 0; i < span.Length; i++) + { + ret[i] = (span[i] == otherSpan[i]); + } + } + } + public void ElementwiseEquals(PrimitiveColumnContainer column, short scalar, PrimitiveColumnContainer ret) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + ret[i] = (span[i] == scalar); + } + } + } + public void ElementwiseNotEquals(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) + { + for (int b = 0 ; b < left.Buffers.Count; b++) + { + var buffer = left.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + left.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + var otherSpan = right.Buffers[b].ReadOnlySpan; + for (int i = 0; i < span.Length; i++) + { + ret[i] = (span[i] != otherSpan[i]); + } + } + } + public void ElementwiseNotEquals(PrimitiveColumnContainer column, short scalar, PrimitiveColumnContainer ret) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + ret[i] = (span[i] != scalar); + } + } + } + public void ElementwiseGreaterThanOrEqual(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) + { + for (int b = 0 ; b < left.Buffers.Count; b++) + { + var buffer = left.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + left.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + var otherSpan = right.Buffers[b].ReadOnlySpan; + for (int i = 0; i < span.Length; i++) + { + ret[i] = (span[i] >= otherSpan[i]); + } + } + } + public void ElementwiseGreaterThanOrEqual(PrimitiveColumnContainer column, short scalar, PrimitiveColumnContainer ret) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + ret[i] = (span[i] >= scalar); + } + } + } + public void ElementwiseLessThanOrEqual(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) + { + for (int b = 0 ; b < left.Buffers.Count; b++) + { + var buffer = left.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + left.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + var otherSpan = right.Buffers[b].ReadOnlySpan; + for (int i = 0; i < span.Length; i++) + { + ret[i] = (span[i] <= otherSpan[i]); + } + } + } + public void ElementwiseLessThanOrEqual(PrimitiveColumnContainer column, short scalar, PrimitiveColumnContainer ret) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + ret[i] = (span[i] <= scalar); + } + } + } + public void ElementwiseGreaterThan(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) + { + for (int b = 0 ; b < left.Buffers.Count; b++) + { + var buffer = left.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + left.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + var otherSpan = right.Buffers[b].ReadOnlySpan; + for (int i = 0; i < span.Length; i++) + { + ret[i] = (span[i] > otherSpan[i]); + } + } + } + public void ElementwiseGreaterThan(PrimitiveColumnContainer column, short scalar, PrimitiveColumnContainer ret) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + ret[i] = (span[i] > scalar); + } + } + } + public void ElementwiseLessThan(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) + { + for (int b = 0 ; b < left.Buffers.Count; b++) + { + var buffer = left.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + left.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + var otherSpan = right.Buffers[b].ReadOnlySpan; + for (int i = 0; i < span.Length; i++) + { + ret[i] = (span[i] < otherSpan[i]); + } + } + } + public void ElementwiseLessThan(PrimitiveColumnContainer column, short scalar, PrimitiveColumnContainer ret) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + ret[i] = (span[i] < scalar); + } + } + } + } + internal class UIntArithmetic : IPrimitiveDataFrameColumnArithmetic + { + public void Add(PrimitiveColumnContainer left, PrimitiveColumnContainer right) + { + for (int b = 0 ; b < left.Buffers.Count; b++) + { + var buffer = left.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + left.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + var otherSpan = right.Buffers[b].ReadOnlySpan; + for (int i = 0; i < span.Length; i++) + { + span[i] = (uint)(span[i] + otherSpan[i]); + } + } + } + public void Add(PrimitiveColumnContainer column, uint scalar) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + span[i] = (uint)(span[i] + scalar); + } + } + } + + public void Add(uint scalar, PrimitiveColumnContainer column) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + span[i] = (uint)(scalar + span[i]); + } + } + } + public void Subtract(PrimitiveColumnContainer left, PrimitiveColumnContainer right) + { + for (int b = 0 ; b < left.Buffers.Count; b++) + { + var buffer = left.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + left.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + var otherSpan = right.Buffers[b].ReadOnlySpan; + for (int i = 0; i < span.Length; i++) + { + span[i] = (uint)(span[i] - otherSpan[i]); + } + } + } + public void Subtract(PrimitiveColumnContainer column, uint scalar) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + span[i] = (uint)(span[i] - scalar); + } + } + } + + public void Subtract(uint scalar, PrimitiveColumnContainer column) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + span[i] = (uint)(scalar - span[i]); + } + } + } + public void Multiply(PrimitiveColumnContainer left, PrimitiveColumnContainer right) + { + for (int b = 0 ; b < left.Buffers.Count; b++) + { + var buffer = left.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + left.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + var otherSpan = right.Buffers[b].ReadOnlySpan; + for (int i = 0; i < span.Length; i++) + { + span[i] = (uint)(span[i] * otherSpan[i]); + } + } + } + public void Multiply(PrimitiveColumnContainer column, uint scalar) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + span[i] = (uint)(span[i] * scalar); + } + } + } + + public void Multiply(uint scalar, PrimitiveColumnContainer column) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + span[i] = (uint)(scalar * span[i]); + } + } + } + public void Divide(PrimitiveColumnContainer left, PrimitiveColumnContainer right) + { + for (int b = 0 ; b < left.Buffers.Count; b++) + { + var buffer = left.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + left.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + var otherSpan = right.Buffers[b].ReadOnlySpan; + for (int i = 0; i < span.Length; i++) + { + span[i] = (uint)(span[i] / otherSpan[i]); + } + } + } + public void Divide(PrimitiveColumnContainer column, uint scalar) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + span[i] = (uint)(span[i] / scalar); + } + } + } + + public void Divide(uint scalar, PrimitiveColumnContainer column) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + span[i] = (uint)(scalar / span[i]); + } + } + } + public void Modulo(PrimitiveColumnContainer left, PrimitiveColumnContainer right) + { + for (int b = 0 ; b < left.Buffers.Count; b++) + { + var buffer = left.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + left.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + var otherSpan = right.Buffers[b].ReadOnlySpan; + for (int i = 0; i < span.Length; i++) + { + span[i] = (uint)(span[i] % otherSpan[i]); + } + } + } + public void Modulo(PrimitiveColumnContainer column, uint scalar) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + span[i] = (uint)(span[i] % scalar); + } + } + } + + public void Modulo(uint scalar, PrimitiveColumnContainer column) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + span[i] = (uint)(scalar % span[i]); + } + } + } + public void And(PrimitiveColumnContainer left, PrimitiveColumnContainer right) + { + for (int b = 0 ; b < left.Buffers.Count; b++) + { + var buffer = left.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + left.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + var otherSpan = right.Buffers[b].ReadOnlySpan; + for (int i = 0; i < span.Length; i++) + { + span[i] = (uint)(span[i] & otherSpan[i]); + } + } + } + public void And(PrimitiveColumnContainer column, uint scalar) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + span[i] = (uint)(span[i] & scalar); + } + } + } + + public void And(uint scalar, PrimitiveColumnContainer column) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + span[i] = (uint)(scalar & span[i]); + } + } + } + public void Or(PrimitiveColumnContainer left, PrimitiveColumnContainer right) + { + for (int b = 0 ; b < left.Buffers.Count; b++) + { + var buffer = left.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + left.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + var otherSpan = right.Buffers[b].ReadOnlySpan; + for (int i = 0; i < span.Length; i++) + { + span[i] = (uint)(span[i] | otherSpan[i]); + } + } + } + public void Or(PrimitiveColumnContainer column, uint scalar) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + span[i] = (uint)(span[i] | scalar); + } + } + } + + public void Or(uint scalar, PrimitiveColumnContainer column) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + span[i] = (uint)(scalar | span[i]); + } + } + } + public void Xor(PrimitiveColumnContainer left, PrimitiveColumnContainer right) + { + for (int b = 0 ; b < left.Buffers.Count; b++) + { + var buffer = left.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + left.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + var otherSpan = right.Buffers[b].ReadOnlySpan; + for (int i = 0; i < span.Length; i++) + { + span[i] = (uint)(span[i] ^ otherSpan[i]); + } + } + } + public void Xor(PrimitiveColumnContainer column, uint scalar) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + span[i] = (uint)(span[i] ^ scalar); + } + } + } + + public void Xor(uint scalar, PrimitiveColumnContainer column) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + span[i] = (uint)(scalar ^ span[i]); + } + } + } + public void LeftShift(PrimitiveColumnContainer column, int value) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + span[i] = (uint)(span[i] << value); + } + } + } + public void RightShift(PrimitiveColumnContainer column, int value) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + span[i] = (uint)(span[i] >> value); + } + } + } + public void ElementwiseEquals(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) + { + for (int b = 0 ; b < left.Buffers.Count; b++) + { + var buffer = left.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + left.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + var otherSpan = right.Buffers[b].ReadOnlySpan; + for (int i = 0; i < span.Length; i++) + { + ret[i] = (span[i] == otherSpan[i]); + } + } + } + public void ElementwiseEquals(PrimitiveColumnContainer column, uint scalar, PrimitiveColumnContainer ret) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + ret[i] = (span[i] == scalar); + } + } + } + public void ElementwiseNotEquals(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) + { + for (int b = 0 ; b < left.Buffers.Count; b++) + { + var buffer = left.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + left.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + var otherSpan = right.Buffers[b].ReadOnlySpan; + for (int i = 0; i < span.Length; i++) + { + ret[i] = (span[i] != otherSpan[i]); + } + } + } + public void ElementwiseNotEquals(PrimitiveColumnContainer column, uint scalar, PrimitiveColumnContainer ret) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + ret[i] = (span[i] != scalar); + } + } + } + public void ElementwiseGreaterThanOrEqual(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) + { + for (int b = 0 ; b < left.Buffers.Count; b++) + { + var buffer = left.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + left.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + var otherSpan = right.Buffers[b].ReadOnlySpan; + for (int i = 0; i < span.Length; i++) + { + ret[i] = (span[i] >= otherSpan[i]); + } + } + } + public void ElementwiseGreaterThanOrEqual(PrimitiveColumnContainer column, uint scalar, PrimitiveColumnContainer ret) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + ret[i] = (span[i] >= scalar); + } + } + } + public void ElementwiseLessThanOrEqual(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) + { + for (int b = 0 ; b < left.Buffers.Count; b++) + { + var buffer = left.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + left.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + var otherSpan = right.Buffers[b].ReadOnlySpan; + for (int i = 0; i < span.Length; i++) + { + ret[i] = (span[i] <= otherSpan[i]); + } + } + } + public void ElementwiseLessThanOrEqual(PrimitiveColumnContainer column, uint scalar, PrimitiveColumnContainer ret) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + ret[i] = (span[i] <= scalar); + } + } + } + public void ElementwiseGreaterThan(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) + { + for (int b = 0 ; b < left.Buffers.Count; b++) + { + var buffer = left.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + left.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + var otherSpan = right.Buffers[b].ReadOnlySpan; + for (int i = 0; i < span.Length; i++) + { + ret[i] = (span[i] > otherSpan[i]); + } + } + } + public void ElementwiseGreaterThan(PrimitiveColumnContainer column, uint scalar, PrimitiveColumnContainer ret) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + ret[i] = (span[i] > scalar); + } + } + } + public void ElementwiseLessThan(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) + { + for (int b = 0 ; b < left.Buffers.Count; b++) + { + var buffer = left.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + left.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + var otherSpan = right.Buffers[b].ReadOnlySpan; + for (int i = 0; i < span.Length; i++) + { + ret[i] = (span[i] < otherSpan[i]); + } + } + } + public void ElementwiseLessThan(PrimitiveColumnContainer column, uint scalar, PrimitiveColumnContainer ret) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + ret[i] = (span[i] < scalar); + } + } + } + } + internal class ULongArithmetic : IPrimitiveDataFrameColumnArithmetic + { + public void Add(PrimitiveColumnContainer left, PrimitiveColumnContainer right) + { + for (int b = 0 ; b < left.Buffers.Count; b++) + { + var buffer = left.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + left.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + var otherSpan = right.Buffers[b].ReadOnlySpan; + for (int i = 0; i < span.Length; i++) + { + span[i] = (ulong)(span[i] + otherSpan[i]); + } + } + } + public void Add(PrimitiveColumnContainer column, ulong scalar) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + span[i] = (ulong)(span[i] + scalar); + } + } + } + + public void Add(ulong scalar, PrimitiveColumnContainer column) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + span[i] = (ulong)(scalar + span[i]); + } + } + } + public void Subtract(PrimitiveColumnContainer left, PrimitiveColumnContainer right) + { + for (int b = 0 ; b < left.Buffers.Count; b++) + { + var buffer = left.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + left.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + var otherSpan = right.Buffers[b].ReadOnlySpan; + for (int i = 0; i < span.Length; i++) + { + span[i] = (ulong)(span[i] - otherSpan[i]); + } + } + } + public void Subtract(PrimitiveColumnContainer column, ulong scalar) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + span[i] = (ulong)(span[i] - scalar); + } + } + } + + public void Subtract(ulong scalar, PrimitiveColumnContainer column) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + span[i] = (ulong)(scalar - span[i]); + } + } + } + public void Multiply(PrimitiveColumnContainer left, PrimitiveColumnContainer right) + { + for (int b = 0 ; b < left.Buffers.Count; b++) + { + var buffer = left.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + left.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + var otherSpan = right.Buffers[b].ReadOnlySpan; + for (int i = 0; i < span.Length; i++) + { + span[i] = (ulong)(span[i] * otherSpan[i]); + } + } + } + public void Multiply(PrimitiveColumnContainer column, ulong scalar) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + span[i] = (ulong)(span[i] * scalar); + } + } + } + + public void Multiply(ulong scalar, PrimitiveColumnContainer column) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + span[i] = (ulong)(scalar * span[i]); + } + } + } + public void Divide(PrimitiveColumnContainer left, PrimitiveColumnContainer right) + { + for (int b = 0 ; b < left.Buffers.Count; b++) + { + var buffer = left.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + left.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + var otherSpan = right.Buffers[b].ReadOnlySpan; + for (int i = 0; i < span.Length; i++) + { + span[i] = (ulong)(span[i] / otherSpan[i]); + } + } + } + public void Divide(PrimitiveColumnContainer column, ulong scalar) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + span[i] = (ulong)(span[i] / scalar); + } + } + } + + public void Divide(ulong scalar, PrimitiveColumnContainer column) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + span[i] = (ulong)(scalar / span[i]); + } + } + } + public void Modulo(PrimitiveColumnContainer left, PrimitiveColumnContainer right) + { + for (int b = 0 ; b < left.Buffers.Count; b++) + { + var buffer = left.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + left.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + var otherSpan = right.Buffers[b].ReadOnlySpan; + for (int i = 0; i < span.Length; i++) + { + span[i] = (ulong)(span[i] % otherSpan[i]); + } + } + } + public void Modulo(PrimitiveColumnContainer column, ulong scalar) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + span[i] = (ulong)(span[i] % scalar); + } + } + } + + public void Modulo(ulong scalar, PrimitiveColumnContainer column) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + span[i] = (ulong)(scalar % span[i]); + } + } + } + public void And(PrimitiveColumnContainer left, PrimitiveColumnContainer right) + { + for (int b = 0 ; b < left.Buffers.Count; b++) + { + var buffer = left.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + left.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + var otherSpan = right.Buffers[b].ReadOnlySpan; + for (int i = 0; i < span.Length; i++) + { + span[i] = (ulong)(span[i] & otherSpan[i]); + } + } + } + public void And(PrimitiveColumnContainer column, ulong scalar) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + span[i] = (ulong)(span[i] & scalar); + } + } + } + + public void And(ulong scalar, PrimitiveColumnContainer column) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + span[i] = (ulong)(scalar & span[i]); + } + } + } + public void Or(PrimitiveColumnContainer left, PrimitiveColumnContainer right) + { + for (int b = 0 ; b < left.Buffers.Count; b++) + { + var buffer = left.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + left.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + var otherSpan = right.Buffers[b].ReadOnlySpan; + for (int i = 0; i < span.Length; i++) + { + span[i] = (ulong)(span[i] | otherSpan[i]); + } + } + } + public void Or(PrimitiveColumnContainer column, ulong scalar) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + span[i] = (ulong)(span[i] | scalar); + } + } + } + + public void Or(ulong scalar, PrimitiveColumnContainer column) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + span[i] = (ulong)(scalar | span[i]); + } + } + } + public void Xor(PrimitiveColumnContainer left, PrimitiveColumnContainer right) + { + for (int b = 0 ; b < left.Buffers.Count; b++) + { + var buffer = left.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + left.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + var otherSpan = right.Buffers[b].ReadOnlySpan; + for (int i = 0; i < span.Length; i++) + { + span[i] = (ulong)(span[i] ^ otherSpan[i]); + } + } + } + public void Xor(PrimitiveColumnContainer column, ulong scalar) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + span[i] = (ulong)(span[i] ^ scalar); + } + } + } + + public void Xor(ulong scalar, PrimitiveColumnContainer column) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + span[i] = (ulong)(scalar ^ span[i]); + } + } + } + public void LeftShift(PrimitiveColumnContainer column, int value) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + span[i] = (ulong)(span[i] << value); + } + } + } + public void RightShift(PrimitiveColumnContainer column, int value) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + span[i] = (ulong)(span[i] >> value); + } + } + } + public void ElementwiseEquals(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) + { + for (int b = 0 ; b < left.Buffers.Count; b++) + { + var buffer = left.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + left.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + var otherSpan = right.Buffers[b].ReadOnlySpan; + for (int i = 0; i < span.Length; i++) + { + ret[i] = (span[i] == otherSpan[i]); + } + } + } + public void ElementwiseEquals(PrimitiveColumnContainer column, ulong scalar, PrimitiveColumnContainer ret) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + ret[i] = (span[i] == scalar); + } + } + } + public void ElementwiseNotEquals(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) + { + for (int b = 0 ; b < left.Buffers.Count; b++) + { + var buffer = left.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + left.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + var otherSpan = right.Buffers[b].ReadOnlySpan; + for (int i = 0; i < span.Length; i++) + { + ret[i] = (span[i] != otherSpan[i]); + } + } + } + public void ElementwiseNotEquals(PrimitiveColumnContainer column, ulong scalar, PrimitiveColumnContainer ret) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + ret[i] = (span[i] != scalar); + } + } + } + public void ElementwiseGreaterThanOrEqual(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) + { + for (int b = 0 ; b < left.Buffers.Count; b++) + { + var buffer = left.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + left.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + var otherSpan = right.Buffers[b].ReadOnlySpan; + for (int i = 0; i < span.Length; i++) + { + ret[i] = (span[i] >= otherSpan[i]); + } + } + } + public void ElementwiseGreaterThanOrEqual(PrimitiveColumnContainer column, ulong scalar, PrimitiveColumnContainer ret) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + ret[i] = (span[i] >= scalar); + } + } + } + public void ElementwiseLessThanOrEqual(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) + { + for (int b = 0 ; b < left.Buffers.Count; b++) + { + var buffer = left.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + left.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + var otherSpan = right.Buffers[b].ReadOnlySpan; + for (int i = 0; i < span.Length; i++) + { + ret[i] = (span[i] <= otherSpan[i]); + } + } + } + public void ElementwiseLessThanOrEqual(PrimitiveColumnContainer column, ulong scalar, PrimitiveColumnContainer ret) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + ret[i] = (span[i] <= scalar); + } + } + } + public void ElementwiseGreaterThan(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) + { + for (int b = 0 ; b < left.Buffers.Count; b++) + { + var buffer = left.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + left.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + var otherSpan = right.Buffers[b].ReadOnlySpan; + for (int i = 0; i < span.Length; i++) + { + ret[i] = (span[i] > otherSpan[i]); + } + } + } + public void ElementwiseGreaterThan(PrimitiveColumnContainer column, ulong scalar, PrimitiveColumnContainer ret) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + ret[i] = (span[i] > scalar); + } + } + } + public void ElementwiseLessThan(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) + { + for (int b = 0 ; b < left.Buffers.Count; b++) + { + var buffer = left.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + left.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + var otherSpan = right.Buffers[b].ReadOnlySpan; + for (int i = 0; i < span.Length; i++) + { + ret[i] = (span[i] < otherSpan[i]); + } + } + } + public void ElementwiseLessThan(PrimitiveColumnContainer column, ulong scalar, PrimitiveColumnContainer ret) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + ret[i] = (span[i] < scalar); + } + } + } + } + internal class UShortArithmetic : IPrimitiveDataFrameColumnArithmetic + { + public void Add(PrimitiveColumnContainer left, PrimitiveColumnContainer right) + { + for (int b = 0 ; b < left.Buffers.Count; b++) + { + var buffer = left.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + left.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + var otherSpan = right.Buffers[b].ReadOnlySpan; + for (int i = 0; i < span.Length; i++) + { + span[i] = (ushort)(span[i] + otherSpan[i]); + } + } + } + public void Add(PrimitiveColumnContainer column, ushort scalar) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + span[i] = (ushort)(span[i] + scalar); + } + } + } + + public void Add(ushort scalar, PrimitiveColumnContainer column) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + span[i] = (ushort)(scalar + span[i]); + } + } + } + public void Subtract(PrimitiveColumnContainer left, PrimitiveColumnContainer right) + { + for (int b = 0 ; b < left.Buffers.Count; b++) + { + var buffer = left.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + left.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + var otherSpan = right.Buffers[b].ReadOnlySpan; + for (int i = 0; i < span.Length; i++) + { + span[i] = (ushort)(span[i] - otherSpan[i]); + } + } + } + public void Subtract(PrimitiveColumnContainer column, ushort scalar) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + span[i] = (ushort)(span[i] - scalar); + } + } + } + + public void Subtract(ushort scalar, PrimitiveColumnContainer column) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + span[i] = (ushort)(scalar - span[i]); + } + } + } + public void Multiply(PrimitiveColumnContainer left, PrimitiveColumnContainer right) + { + for (int b = 0 ; b < left.Buffers.Count; b++) + { + var buffer = left.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + left.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + var otherSpan = right.Buffers[b].ReadOnlySpan; + for (int i = 0; i < span.Length; i++) + { + span[i] = (ushort)(span[i] * otherSpan[i]); + } + } + } + public void Multiply(PrimitiveColumnContainer column, ushort scalar) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + span[i] = (ushort)(span[i] * scalar); + } + } + } + + public void Multiply(ushort scalar, PrimitiveColumnContainer column) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + span[i] = (ushort)(scalar * span[i]); + } + } + } + public void Divide(PrimitiveColumnContainer left, PrimitiveColumnContainer right) + { + for (int b = 0 ; b < left.Buffers.Count; b++) + { + var buffer = left.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + left.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + var otherSpan = right.Buffers[b].ReadOnlySpan; + for (int i = 0; i < span.Length; i++) + { + span[i] = (ushort)(span[i] / otherSpan[i]); + } + } + } + public void Divide(PrimitiveColumnContainer column, ushort scalar) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + span[i] = (ushort)(span[i] / scalar); + } + } + } + + public void Divide(ushort scalar, PrimitiveColumnContainer column) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + span[i] = (ushort)(scalar / span[i]); + } + } + } + public void Modulo(PrimitiveColumnContainer left, PrimitiveColumnContainer right) + { + for (int b = 0 ; b < left.Buffers.Count; b++) + { + var buffer = left.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + left.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + var otherSpan = right.Buffers[b].ReadOnlySpan; + for (int i = 0; i < span.Length; i++) + { + span[i] = (ushort)(span[i] % otherSpan[i]); + } + } + } + public void Modulo(PrimitiveColumnContainer column, ushort scalar) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + span[i] = (ushort)(span[i] % scalar); + } + } + } + + public void Modulo(ushort scalar, PrimitiveColumnContainer column) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + span[i] = (ushort)(scalar % span[i]); + } + } + } + public void And(PrimitiveColumnContainer left, PrimitiveColumnContainer right) + { + for (int b = 0 ; b < left.Buffers.Count; b++) + { + var buffer = left.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + left.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + var otherSpan = right.Buffers[b].ReadOnlySpan; + for (int i = 0; i < span.Length; i++) + { + span[i] = (ushort)(span[i] & otherSpan[i]); + } + } + } + public void And(PrimitiveColumnContainer column, ushort scalar) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + span[i] = (ushort)(span[i] & scalar); + } + } + } + + public void And(ushort scalar, PrimitiveColumnContainer column) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + span[i] = (ushort)(scalar & span[i]); + } + } + } + public void Or(PrimitiveColumnContainer left, PrimitiveColumnContainer right) + { + for (int b = 0 ; b < left.Buffers.Count; b++) + { + var buffer = left.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + left.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + var otherSpan = right.Buffers[b].ReadOnlySpan; + for (int i = 0; i < span.Length; i++) + { + span[i] = (ushort)(span[i] | otherSpan[i]); + } + } + } + public void Or(PrimitiveColumnContainer column, ushort scalar) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + span[i] = (ushort)(span[i] | scalar); + } + } + } + + public void Or(ushort scalar, PrimitiveColumnContainer column) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + span[i] = (ushort)(scalar | span[i]); + } + } + } + public void Xor(PrimitiveColumnContainer left, PrimitiveColumnContainer right) + { + for (int b = 0 ; b < left.Buffers.Count; b++) + { + var buffer = left.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + left.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + var otherSpan = right.Buffers[b].ReadOnlySpan; + for (int i = 0; i < span.Length; i++) + { + span[i] = (ushort)(span[i] ^ otherSpan[i]); + } + } + } + public void Xor(PrimitiveColumnContainer column, ushort scalar) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + span[i] = (ushort)(span[i] ^ scalar); + } + } + } + + public void Xor(ushort scalar, PrimitiveColumnContainer column) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + span[i] = (ushort)(scalar ^ span[i]); + } + } + } + public void LeftShift(PrimitiveColumnContainer column, int value) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + span[i] = (ushort)(span[i] << value); + } + } + } + public void RightShift(PrimitiveColumnContainer column, int value) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + span[i] = (ushort)(span[i] >> value); + } + } + } + public void ElementwiseEquals(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) + { + for (int b = 0 ; b < left.Buffers.Count; b++) + { + var buffer = left.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + left.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + var otherSpan = right.Buffers[b].ReadOnlySpan; + for (int i = 0; i < span.Length; i++) + { + ret[i] = (span[i] == otherSpan[i]); + } + } + } + public void ElementwiseEquals(PrimitiveColumnContainer column, ushort scalar, PrimitiveColumnContainer ret) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + ret[i] = (span[i] == scalar); + } + } + } + public void ElementwiseNotEquals(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) + { + for (int b = 0 ; b < left.Buffers.Count; b++) + { + var buffer = left.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + left.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + var otherSpan = right.Buffers[b].ReadOnlySpan; + for (int i = 0; i < span.Length; i++) + { + ret[i] = (span[i] != otherSpan[i]); + } + } + } + public void ElementwiseNotEquals(PrimitiveColumnContainer column, ushort scalar, PrimitiveColumnContainer ret) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + ret[i] = (span[i] != scalar); + } + } + } + public void ElementwiseGreaterThanOrEqual(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) + { + for (int b = 0 ; b < left.Buffers.Count; b++) + { + var buffer = left.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + left.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + var otherSpan = right.Buffers[b].ReadOnlySpan; + for (int i = 0; i < span.Length; i++) + { + ret[i] = (span[i] >= otherSpan[i]); + } + } + } + public void ElementwiseGreaterThanOrEqual(PrimitiveColumnContainer column, ushort scalar, PrimitiveColumnContainer ret) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + ret[i] = (span[i] >= scalar); + } + } + } + public void ElementwiseLessThanOrEqual(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) + { + for (int b = 0 ; b < left.Buffers.Count; b++) + { + var buffer = left.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + left.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + var otherSpan = right.Buffers[b].ReadOnlySpan; + for (int i = 0; i < span.Length; i++) + { + ret[i] = (span[i] <= otherSpan[i]); + } + } + } + public void ElementwiseLessThanOrEqual(PrimitiveColumnContainer column, ushort scalar, PrimitiveColumnContainer ret) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + ret[i] = (span[i] <= scalar); + } + } + } + public void ElementwiseGreaterThan(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) + { + for (int b = 0 ; b < left.Buffers.Count; b++) + { + var buffer = left.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + left.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + var otherSpan = right.Buffers[b].ReadOnlySpan; + for (int i = 0; i < span.Length; i++) + { + ret[i] = (span[i] > otherSpan[i]); + } + } + } + public void ElementwiseGreaterThan(PrimitiveColumnContainer column, ushort scalar, PrimitiveColumnContainer ret) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + ret[i] = (span[i] > scalar); + } + } + } + public void ElementwiseLessThan(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) + { + for (int b = 0 ; b < left.Buffers.Count; b++) + { + var buffer = left.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + left.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + var otherSpan = right.Buffers[b].ReadOnlySpan; + for (int i = 0; i < span.Length; i++) + { + ret[i] = (span[i] < otherSpan[i]); + } + } + } + public void ElementwiseLessThan(PrimitiveColumnContainer column, ushort scalar, PrimitiveColumnContainer ret) + { + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + column.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; + for (int i = 0; i < span.Length; i++) + { + ret[i] = (span[i] < scalar); + } + } + } + } + + + + +} diff --git a/src/Microsoft.Data.Analysis/PrimitiveDataFrameColumnArithmetic.tt b/src/Microsoft.Data.Analysis/PrimitiveDataFrameColumnArithmetic.tt new file mode 100644 index 0000000000..7af9f7b040 --- /dev/null +++ b/src/Microsoft.Data.Analysis/PrimitiveDataFrameColumnArithmetic.tt @@ -0,0 +1,119 @@ +<#@ template debug="false" hostspecific="false" language="C#" #> +<#@ assembly name="System" #> +<#@ assembly name="System.Core" #> +<#@ import namespace="System.Linq" #> +<#@ import namespace="System.Text" #> +<#@ import namespace="System.Collections.Generic" #> +<#@ output extension=".cs" #> +<#@ include file="ColumnArithmeticTemplate.ttinclude" #> + +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +// Generated from PrimitiveDataFrameColumnArithmetic.tt. Do not modify directly + +using System; + +namespace Microsoft.Data.Analysis +{ + internal interface IPrimitiveDataFrameColumnArithmetic + where T : struct + { +<# foreach (MethodConfiguration method in methodConfiguration) { #> + <#= method.GetMethodSignature("PrimitiveColumnContainer", "T")#>; +<# if (method.MethodType == MethodType.BinaryScalar) { #> + <#= method.GetInvertedMethodSignatureForBinaryScalarsOps("PrimitiveColumnContainer", "T")#>; +<# } #> +<# } #> + } + + internal static class PrimitiveDataFrameColumnArithmetic + where T : struct + { + public static IPrimitiveDataFrameColumnArithmetic Instance { get; } = PrimitiveDataFrameColumnArithmetic.GetArithmetic(); + } + + internal static class PrimitiveDataFrameColumnArithmetic + { + public static IPrimitiveDataFrameColumnArithmetic GetArithmetic() + where T : struct + { +<# foreach (TypeConfiguration type in typeConfiguration) { #> + <#=GenerateIfStatementHeader(type)#> + { + return (IPrimitiveDataFrameColumnArithmetic)new <#=type.ClassPrefix#>Arithmetic(); + } +<# } #> + throw new NotSupportedException(); + } + } + +<# foreach (TypeConfiguration type in typeConfiguration) { #> + internal class <#=type.ClassPrefix#>Arithmetic : IPrimitiveDataFrameColumnArithmetic<<#=type.TypeName#>> + { +<# foreach (MethodConfiguration method in methodConfiguration) { #> + public <#= method.GetMethodSignature("PrimitiveColumnContainer", type.TypeName) #> + { +<# if ((method.IsNumeric && !type.SupportsNumeric) || (method.IsBitwise && !type.SupportsBitwise) || (type.UnsupportedMethods.Contains(method.MethodName))) { #> + throw new NotSupportedException(); +<# } else if (method.Operator != null) { #> + for (int b = 0 ; b < <#= method.Op1Name #>.Buffers.Count; b++) + { + var buffer = <#= method.Op1Name #>.Buffers[b]; + var mutableBuffer = DataFrameBuffer<<#=type.TypeName#>>.GetMutableBuffer(buffer); + <#= method.Op1Name #>.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; +<# if (method.MethodType == MethodType.Binary || method.MethodType == MethodType.Comparison) { #> + var otherSpan = <#=method.Op2Name#>.Buffers[b].ReadOnlySpan; +<# } #> + for (int i = 0; i < span.Length; i++) + { +<# if (method.MethodType == MethodType.BinaryScalar || method.MethodType == MethodType.BinaryInt) { #> + span[i] = (<#=type.TypeName#>)(span[i] <#= method.Operator #> <#= method.Op2Name #>); +<# } else if (method.MethodType == MethodType.Binary) { #> + span[i] = (<#=type.TypeName#>)(span[i] <#= method.Operator #> otherSpan[i]); +<# } else if (method.MethodType == MethodType.Comparison) { #> + ret[i] = (span[i] <#= method.Operator #> otherSpan[i]); +<# } else if (method.MethodType == MethodType.ComparisonScalar) { #> + ret[i] = (span[i] <#= method.Operator #> <#= method.Op2Name #>); +<# } else {#> + throw new NotImplementedException(); +<# } #> + } + } +<# } #> + } +<# if (method.MethodType == MethodType.BinaryScalar) { #> + public <#= method.GetInvertedMethodSignatureForBinaryScalarsOps("PrimitiveColumnContainer", type.TypeName) #> + { +<# if ((method.IsNumeric && !type.SupportsNumeric) || (method.IsBitwise && !type.SupportsBitwise) || (type.UnsupportedMethods.Contains(method.MethodName))) { #> + throw new NotSupportedException(); +<# } else if (method.Operator != null) { #> + for (int b = 0 ; b < <#= method.Op1Name #>.Buffers.Count; b++) + { + var buffer = <#= method.Op1Name #>.Buffers[b]; + var mutableBuffer = DataFrameBuffer<<#=type.TypeName#>>.GetMutableBuffer(buffer); + <#= method.Op1Name #>.Buffers[b] = mutableBuffer; + var span = mutableBuffer.Span; +<# if (method.MethodType == MethodType.Binary || method.MethodType == MethodType.Comparison) { #> + var otherSpan = <#=method.Op2Name#>.Buffers[b].ReadOnlySpan; +<# } #> + for (int i = 0; i < span.Length; i++) + { +<# if (method.MethodType == MethodType.BinaryScalar || method.MethodType == MethodType.BinaryInt) { #> + span[i] = (<#=type.TypeName#>)(<#= method.Op2Name #> <#= method.Operator #> span[i]); +<# } #> + } + } +<# } #> + } +<# } #> +<# } #> + } +<# } #> + + + + +} diff --git a/src/Microsoft.Data.Analysis/PrimitiveDataFrameColumnComputations.cs b/src/Microsoft.Data.Analysis/PrimitiveDataFrameColumnComputations.cs new file mode 100644 index 0000000000..987209fa1a --- /dev/null +++ b/src/Microsoft.Data.Analysis/PrimitiveDataFrameColumnComputations.cs @@ -0,0 +1,5359 @@ + + +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +// Generated from PrimitiveColumnComputations.tt. Do not modify directly + +using System; +using System.Collections.Generic; + +namespace Microsoft.Data.Analysis +{ + internal interface IPrimitiveColumnComputation + where T : struct + { + void Abs(PrimitiveColumnContainer column); + void All(PrimitiveColumnContainer column, out bool ret); + void Any(PrimitiveColumnContainer column, out bool ret); + void CumulativeMax(PrimitiveColumnContainer column); + void CumulativeMax(PrimitiveColumnContainer column, IEnumerable rows); + void CumulativeMin(PrimitiveColumnContainer column); + void CumulativeMin(PrimitiveColumnContainer column, IEnumerable rows); + void CumulativeProduct(PrimitiveColumnContainer column); + void CumulativeProduct(PrimitiveColumnContainer column, IEnumerable rows); + void CumulativeSum(PrimitiveColumnContainer column); + void CumulativeSum(PrimitiveColumnContainer column, IEnumerable rows); + void Max(PrimitiveColumnContainer column, out T ret); + void Max(PrimitiveColumnContainer column, IEnumerable rows, out T ret); + void Min(PrimitiveColumnContainer column, out T ret); + void Min(PrimitiveColumnContainer column, IEnumerable rows, out T ret); + void Product(PrimitiveColumnContainer column, out T ret); + void Product(PrimitiveColumnContainer column, IEnumerable rows, out T ret); + void Sum(PrimitiveColumnContainer column, out T ret); + void Sum(PrimitiveColumnContainer column, IEnumerable rows, out T ret); + void Round(PrimitiveColumnContainer column); + } + + internal static class PrimitiveColumnComputation + where T : struct + { + public static IPrimitiveColumnComputation Instance { get; } = PrimitiveColumnComputation.GetComputation(); + } + + internal static class PrimitiveColumnComputation + { + public static IPrimitiveColumnComputation GetComputation() + where T : struct + { + if (typeof(T) == typeof(bool)) + { + return (IPrimitiveColumnComputation)new BoolComputation(); + } + else if (typeof(T) == typeof(byte)) + { + return (IPrimitiveColumnComputation)new ByteComputation(); + } + else if (typeof(T) == typeof(char)) + { + return (IPrimitiveColumnComputation)new CharComputation(); + } + else if (typeof(T) == typeof(decimal)) + { + return (IPrimitiveColumnComputation)new DecimalComputation(); + } + else if (typeof(T) == typeof(double)) + { + return (IPrimitiveColumnComputation)new DoubleComputation(); + } + else if (typeof(T) == typeof(float)) + { + return (IPrimitiveColumnComputation)new FloatComputation(); + } + else if (typeof(T) == typeof(int)) + { + return (IPrimitiveColumnComputation)new IntComputation(); + } + else if (typeof(T) == typeof(long)) + { + return (IPrimitiveColumnComputation)new LongComputation(); + } + else if (typeof(T) == typeof(sbyte)) + { + return (IPrimitiveColumnComputation)new SByteComputation(); + } + else if (typeof(T) == typeof(short)) + { + return (IPrimitiveColumnComputation)new ShortComputation(); + } + else if (typeof(T) == typeof(uint)) + { + return (IPrimitiveColumnComputation)new UIntComputation(); + } + else if (typeof(T) == typeof(ulong)) + { + return (IPrimitiveColumnComputation)new ULongComputation(); + } + else if (typeof(T) == typeof(ushort)) + { + return (IPrimitiveColumnComputation)new UShortComputation(); + } + throw new NotSupportedException(); + } + } + + internal class BoolComputation : IPrimitiveColumnComputation + { + public void Abs(PrimitiveColumnContainer column) + { + throw new NotSupportedException(); + } + + public void All(PrimitiveColumnContainer column, out bool ret) + { + ret = true; + for (int b = 0; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var span = buffer.ReadOnlySpan; + for (int i = 0; i < span.Length; i++) + { + if (span[i] == false) + { + ret = false; + return; + } + } + } + } + + public void Any(PrimitiveColumnContainer column, out bool ret) + { + ret = false; + for (int b = 0; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var span = buffer.ReadOnlySpan; + for (int i = 0; i < span.Length; i++) + { + if (span[i] == true) + { + ret = true; + return; + } + } + } + } + + public void CumulativeMax(PrimitiveColumnContainer column) + { + throw new NotSupportedException(); + } + + public void CumulativeMax(PrimitiveColumnContainer column, IEnumerable rows) + { + throw new NotSupportedException(); + } + + public void CumulativeMin(PrimitiveColumnContainer column) + { + throw new NotSupportedException(); + } + + public void CumulativeMin(PrimitiveColumnContainer column, IEnumerable rows) + { + throw new NotSupportedException(); + } + + public void CumulativeProduct(PrimitiveColumnContainer column) + { + throw new NotSupportedException(); + } + + public void CumulativeProduct(PrimitiveColumnContainer column, IEnumerable rows) + { + throw new NotSupportedException(); + } + + public void CumulativeSum(PrimitiveColumnContainer column) + { + throw new NotSupportedException(); + } + + public void CumulativeSum(PrimitiveColumnContainer column, IEnumerable rows) + { + throw new NotSupportedException(); + } + + public void Max(PrimitiveColumnContainer column, out bool ret) + { + throw new NotSupportedException(); + } + + public void Max(PrimitiveColumnContainer column, IEnumerable rows, out bool ret) + { + throw new NotSupportedException(); + } + + public void Min(PrimitiveColumnContainer column, out bool ret) + { + throw new NotSupportedException(); + } + + public void Min(PrimitiveColumnContainer column, IEnumerable rows, out bool ret) + { + throw new NotSupportedException(); + } + + public void Product(PrimitiveColumnContainer column, out bool ret) + { + throw new NotSupportedException(); + } + + public void Product(PrimitiveColumnContainer column, IEnumerable rows, out bool ret) + { + throw new NotSupportedException(); + } + + public void Sum(PrimitiveColumnContainer column, out bool ret) + { + throw new NotSupportedException(); + } + + public void Sum(PrimitiveColumnContainer column, IEnumerable rows, out bool ret) + { + throw new NotSupportedException(); + } + + public void Round(PrimitiveColumnContainer column) + { + throw new NotSupportedException(); + } + + } + internal class ByteComputation : IPrimitiveColumnComputation + { + public void Abs(PrimitiveColumnContainer column) + { + for (int b = 0; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + var mutableSpan = mutableBuffer.Span; + for (int i = 0; i < mutableSpan.Length; i++) + { + mutableSpan[i] = (byte)(Math.Abs((decimal)mutableSpan[i])); + } + column.Buffers[b] = mutableBuffer; + } + } + + public void All(PrimitiveColumnContainer column, out bool ret) + { + throw new NotSupportedException(); + } + + public void Any(PrimitiveColumnContainer column, out bool ret) + { + throw new NotSupportedException(); + } + + public void CumulativeMax(PrimitiveColumnContainer column) + { + var ret = column.Buffers[0].ReadOnlySpan[0]; + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + var mutableSpan = mutableBuffer.Span; + var readOnlySpan = buffer.ReadOnlySpan; + for (int i = 0; i < readOnlySpan.Length; i++) + { + ret = (byte)(Math.Max(readOnlySpan[i], ret)); + mutableSpan[i] = ret; + } + column.Buffers[b] = mutableBuffer; + } + } + + public void CumulativeMax(PrimitiveColumnContainer column, IEnumerable rows) + { + var ret = default(byte); + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(column.Buffers[0]); + var span = mutableBuffer.Span; + long minRange = 0; + long maxRange = ReadOnlyDataFrameBuffer.MaxCapacity; + long maxCapacity = maxRange; + IEnumerator enumerator = rows.GetEnumerator(); + if (enumerator.MoveNext()) + { + long row = enumerator.Current; + if (row < minRange || row >= maxRange) + { + int bufferIndex = (int)(row / maxCapacity); + mutableBuffer = DataFrameBuffer.GetMutableBuffer(column.Buffers[bufferIndex]); + span = mutableBuffer.Span; + minRange = checked(bufferIndex * maxCapacity); + maxRange = checked((bufferIndex + 1) * maxCapacity); + } + row -= minRange; + ret = span[(int)row]; + } + + while (enumerator.MoveNext()) + { + long row = enumerator.Current; + if (row < minRange || row >= maxRange) + { + int bufferIndex = (int)(row / maxCapacity); + mutableBuffer = DataFrameBuffer.GetMutableBuffer(column.Buffers[bufferIndex]); + span = mutableBuffer.Span; + minRange = checked(bufferIndex * maxCapacity); + maxRange = checked((bufferIndex + 1) * maxCapacity); + } + row -= minRange; + ret = (byte)Math.Max(span[(int)row], ret); + span[(int)row] = ret; + } + } + + public void CumulativeMin(PrimitiveColumnContainer column) + { + var ret = column.Buffers[0].ReadOnlySpan[0]; + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + var mutableSpan = mutableBuffer.Span; + var readOnlySpan = buffer.ReadOnlySpan; + for (int i = 0; i < readOnlySpan.Length; i++) + { + ret = (byte)(Math.Min(readOnlySpan[i], ret)); + mutableSpan[i] = ret; + } + column.Buffers[b] = mutableBuffer; + } + } + + public void CumulativeMin(PrimitiveColumnContainer column, IEnumerable rows) + { + var ret = default(byte); + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(column.Buffers[0]); + var span = mutableBuffer.Span; + long minRange = 0; + long maxRange = ReadOnlyDataFrameBuffer.MaxCapacity; + long maxCapacity = maxRange; + IEnumerator enumerator = rows.GetEnumerator(); + if (enumerator.MoveNext()) + { + long row = enumerator.Current; + if (row < minRange || row >= maxRange) + { + int bufferIndex = (int)(row / maxCapacity); + mutableBuffer = DataFrameBuffer.GetMutableBuffer(column.Buffers[bufferIndex]); + span = mutableBuffer.Span; + minRange = checked(bufferIndex * maxCapacity); + maxRange = checked((bufferIndex + 1) * maxCapacity); + } + row -= minRange; + ret = span[(int)row]; + } + + while (enumerator.MoveNext()) + { + long row = enumerator.Current; + if (row < minRange || row >= maxRange) + { + int bufferIndex = (int)(row / maxCapacity); + mutableBuffer = DataFrameBuffer.GetMutableBuffer(column.Buffers[bufferIndex]); + span = mutableBuffer.Span; + minRange = checked(bufferIndex * maxCapacity); + maxRange = checked((bufferIndex + 1) * maxCapacity); + } + row -= minRange; + ret = (byte)Math.Min(span[(int)row], ret); + span[(int)row] = ret; + } + } + + public void CumulativeProduct(PrimitiveColumnContainer column) + { + var ret = (byte)1; + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + var mutableSpan = mutableBuffer.Span; + var readOnlySpan = buffer.ReadOnlySpan; + for (int i = 0; i < readOnlySpan.Length; i++) + { + ret = (byte)(readOnlySpan[i] * ret); + mutableSpan[i] = ret; + } + column.Buffers[b] = mutableBuffer; + } + } + + public void CumulativeProduct(PrimitiveColumnContainer column, IEnumerable rows) + { + var ret = default(byte); + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(column.Buffers[0]); + var span = mutableBuffer.Span; + long minRange = 0; + long maxRange = ReadOnlyDataFrameBuffer.MaxCapacity; + long maxCapacity = maxRange; + IEnumerator enumerator = rows.GetEnumerator(); + if (enumerator.MoveNext()) + { + long row = enumerator.Current; + if (row < minRange || row >= maxRange) + { + int bufferIndex = (int)(row / maxCapacity); + mutableBuffer = DataFrameBuffer.GetMutableBuffer(column.Buffers[bufferIndex]); + span = mutableBuffer.Span; + minRange = checked(bufferIndex * maxCapacity); + maxRange = checked((bufferIndex + 1) * maxCapacity); + } + row -= minRange; + ret = span[(int)row]; + } + + while (enumerator.MoveNext()) + { + long row = enumerator.Current; + if (row < minRange || row >= maxRange) + { + int bufferIndex = (int)(row / maxCapacity); + mutableBuffer = DataFrameBuffer.GetMutableBuffer(column.Buffers[bufferIndex]); + span = mutableBuffer.Span; + minRange = checked(bufferIndex * maxCapacity); + maxRange = checked((bufferIndex + 1) * maxCapacity); + } + row -= minRange; + ret = checked((byte)((span[(int)row]) * ret)); + span[(int)row] = ret; + } + } + + public void CumulativeSum(PrimitiveColumnContainer column) + { + var ret = (byte)0; + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + var mutableSpan = mutableBuffer.Span; + var readOnlySpan = buffer.ReadOnlySpan; + for (int i = 0; i < readOnlySpan.Length; i++) + { + ret = (byte)(readOnlySpan[i] + ret); + mutableSpan[i] = ret; + } + column.Buffers[b] = mutableBuffer; + } + } + + public void CumulativeSum(PrimitiveColumnContainer column, IEnumerable rows) + { + var ret = default(byte); + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(column.Buffers[0]); + var span = mutableBuffer.Span; + long minRange = 0; + long maxRange = ReadOnlyDataFrameBuffer.MaxCapacity; + long maxCapacity = maxRange; + IEnumerator enumerator = rows.GetEnumerator(); + if (enumerator.MoveNext()) + { + long row = enumerator.Current; + if (row < minRange || row >= maxRange) + { + int bufferIndex = (int)(row / maxCapacity); + mutableBuffer = DataFrameBuffer.GetMutableBuffer(column.Buffers[bufferIndex]); + span = mutableBuffer.Span; + minRange = checked(bufferIndex * maxCapacity); + maxRange = checked((bufferIndex + 1) * maxCapacity); + } + row -= minRange; + ret = span[(int)row]; + } + + while (enumerator.MoveNext()) + { + long row = enumerator.Current; + if (row < minRange || row >= maxRange) + { + int bufferIndex = (int)(row / maxCapacity); + mutableBuffer = DataFrameBuffer.GetMutableBuffer(column.Buffers[bufferIndex]); + span = mutableBuffer.Span; + minRange = checked(bufferIndex * maxCapacity); + maxRange = checked((bufferIndex + 1) * maxCapacity); + } + row -= minRange; + ret = checked((byte)((span[(int)row]) + ret)); + span[(int)row] = ret; + } + } + + public void Max(PrimitiveColumnContainer column, out byte ret) + { + ret = column.Buffers[0].ReadOnlySpan[0]; + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var readOnlySpan = buffer.ReadOnlySpan; + for (int i = 0; i < readOnlySpan.Length; i++) + { + ret = (byte)(Math.Max(readOnlySpan[i], ret)); + } + } + } + + public void Max(PrimitiveColumnContainer column, IEnumerable rows, out byte ret) + { + ret = default; + var readOnlySpan = column.Buffers[0].ReadOnlySpan; + long minRange = 0; + long maxRange = ReadOnlyDataFrameBuffer.MaxCapacity; + long maxCapacity = maxRange; + IEnumerator enumerator = rows.GetEnumerator(); + while (enumerator.MoveNext()) + { + long row = enumerator.Current; + if (row < minRange || row >= maxRange) + { + int bufferIndex = (int)(row / maxCapacity); + readOnlySpan = column.Buffers[bufferIndex].ReadOnlySpan; + minRange = checked(bufferIndex * maxCapacity); + maxRange = checked((bufferIndex + 1) * maxCapacity); + } + row -= minRange; + ret = (byte)(Math.Max(readOnlySpan[(int)row], ret)); + } + } + + public void Min(PrimitiveColumnContainer column, out byte ret) + { + ret = column.Buffers[0].ReadOnlySpan[0]; + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var readOnlySpan = buffer.ReadOnlySpan; + for (int i = 0; i < readOnlySpan.Length; i++) + { + ret = (byte)(Math.Min(readOnlySpan[i], ret)); + } + } + } + + public void Min(PrimitiveColumnContainer column, IEnumerable rows, out byte ret) + { + ret = default; + var readOnlySpan = column.Buffers[0].ReadOnlySpan; + long minRange = 0; + long maxRange = ReadOnlyDataFrameBuffer.MaxCapacity; + long maxCapacity = maxRange; + IEnumerator enumerator = rows.GetEnumerator(); + while (enumerator.MoveNext()) + { + long row = enumerator.Current; + if (row < minRange || row >= maxRange) + { + int bufferIndex = (int)(row / maxCapacity); + readOnlySpan = column.Buffers[bufferIndex].ReadOnlySpan; + minRange = checked(bufferIndex * maxCapacity); + maxRange = checked((bufferIndex + 1) * maxCapacity); + } + row -= minRange; + ret = (byte)(Math.Min(readOnlySpan[(int)row], ret)); + } + } + + public void Product(PrimitiveColumnContainer column, out byte ret) + { + ret = (byte)1; + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var readOnlySpan = buffer.ReadOnlySpan; + for (int i = 0; i < readOnlySpan.Length; i++) + { + ret = (byte)(readOnlySpan[i] * ret); + } + } + } + + public void Product(PrimitiveColumnContainer column, IEnumerable rows, out byte ret) + { + ret = default; + var readOnlySpan = column.Buffers[0].ReadOnlySpan; + long minRange = 0; + long maxRange = ReadOnlyDataFrameBuffer.MaxCapacity; + long maxCapacity = maxRange; + IEnumerator enumerator = rows.GetEnumerator(); + while (enumerator.MoveNext()) + { + long row = enumerator.Current; + if (row < minRange || row >= maxRange) + { + int bufferIndex = (int)(row / maxCapacity); + readOnlySpan = column.Buffers[bufferIndex].ReadOnlySpan; + minRange = checked(bufferIndex * maxCapacity); + maxRange = checked((bufferIndex + 1) * maxCapacity); + } + row -= minRange; + ret = checked((byte)(readOnlySpan[(int)row] * ret)); + } + } + + public void Sum(PrimitiveColumnContainer column, out byte ret) + { + ret = (byte)0; + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var readOnlySpan = buffer.ReadOnlySpan; + for (int i = 0; i < readOnlySpan.Length; i++) + { + ret = (byte)(readOnlySpan[i] + ret); + } + } + } + + public void Sum(PrimitiveColumnContainer column, IEnumerable rows, out byte ret) + { + ret = default; + var readOnlySpan = column.Buffers[0].ReadOnlySpan; + long minRange = 0; + long maxRange = ReadOnlyDataFrameBuffer.MaxCapacity; + long maxCapacity = maxRange; + IEnumerator enumerator = rows.GetEnumerator(); + while (enumerator.MoveNext()) + { + long row = enumerator.Current; + if (row < minRange || row >= maxRange) + { + int bufferIndex = (int)(row / maxCapacity); + readOnlySpan = column.Buffers[bufferIndex].ReadOnlySpan; + minRange = checked(bufferIndex * maxCapacity); + maxRange = checked((bufferIndex + 1) * maxCapacity); + } + row -= minRange; + ret = checked((byte)(readOnlySpan[(int)row] + ret)); + } + } + + public void Round(PrimitiveColumnContainer column) + { + for (int b = 0; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + var mutableSpan = mutableBuffer.Span; + for (int i = 0; i < mutableSpan.Length; i++) + { + mutableSpan[i] = (byte)(Math.Round((decimal)mutableSpan[i])); + } + column.Buffers[b] = mutableBuffer; + } + } + + } + internal class CharComputation : IPrimitiveColumnComputation + { + public void Abs(PrimitiveColumnContainer column) + { + for (int b = 0; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + var mutableSpan = mutableBuffer.Span; + for (int i = 0; i < mutableSpan.Length; i++) + { + mutableSpan[i] = (char)(Math.Abs((decimal)mutableSpan[i])); + } + column.Buffers[b] = mutableBuffer; + } + } + + public void All(PrimitiveColumnContainer column, out bool ret) + { + throw new NotSupportedException(); + } + + public void Any(PrimitiveColumnContainer column, out bool ret) + { + throw new NotSupportedException(); + } + + public void CumulativeMax(PrimitiveColumnContainer column) + { + var ret = column.Buffers[0].ReadOnlySpan[0]; + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + var mutableSpan = mutableBuffer.Span; + var readOnlySpan = buffer.ReadOnlySpan; + for (int i = 0; i < readOnlySpan.Length; i++) + { + ret = (char)(Math.Max(readOnlySpan[i], ret)); + mutableSpan[i] = ret; + } + column.Buffers[b] = mutableBuffer; + } + } + + public void CumulativeMax(PrimitiveColumnContainer column, IEnumerable rows) + { + var ret = default(char); + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(column.Buffers[0]); + var span = mutableBuffer.Span; + long minRange = 0; + long maxRange = ReadOnlyDataFrameBuffer.MaxCapacity; + long maxCapacity = maxRange; + IEnumerator enumerator = rows.GetEnumerator(); + if (enumerator.MoveNext()) + { + long row = enumerator.Current; + if (row < minRange || row >= maxRange) + { + int bufferIndex = (int)(row / maxCapacity); + mutableBuffer = DataFrameBuffer.GetMutableBuffer(column.Buffers[bufferIndex]); + span = mutableBuffer.Span; + minRange = checked(bufferIndex * maxCapacity); + maxRange = checked((bufferIndex + 1) * maxCapacity); + } + row -= minRange; + ret = span[(int)row]; + } + + while (enumerator.MoveNext()) + { + long row = enumerator.Current; + if (row < minRange || row >= maxRange) + { + int bufferIndex = (int)(row / maxCapacity); + mutableBuffer = DataFrameBuffer.GetMutableBuffer(column.Buffers[bufferIndex]); + span = mutableBuffer.Span; + minRange = checked(bufferIndex * maxCapacity); + maxRange = checked((bufferIndex + 1) * maxCapacity); + } + row -= minRange; + ret = (char)Math.Max(span[(int)row], ret); + span[(int)row] = ret; + } + } + + public void CumulativeMin(PrimitiveColumnContainer column) + { + var ret = column.Buffers[0].ReadOnlySpan[0]; + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + var mutableSpan = mutableBuffer.Span; + var readOnlySpan = buffer.ReadOnlySpan; + for (int i = 0; i < readOnlySpan.Length; i++) + { + ret = (char)(Math.Min(readOnlySpan[i], ret)); + mutableSpan[i] = ret; + } + column.Buffers[b] = mutableBuffer; + } + } + + public void CumulativeMin(PrimitiveColumnContainer column, IEnumerable rows) + { + var ret = default(char); + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(column.Buffers[0]); + var span = mutableBuffer.Span; + long minRange = 0; + long maxRange = ReadOnlyDataFrameBuffer.MaxCapacity; + long maxCapacity = maxRange; + IEnumerator enumerator = rows.GetEnumerator(); + if (enumerator.MoveNext()) + { + long row = enumerator.Current; + if (row < minRange || row >= maxRange) + { + int bufferIndex = (int)(row / maxCapacity); + mutableBuffer = DataFrameBuffer.GetMutableBuffer(column.Buffers[bufferIndex]); + span = mutableBuffer.Span; + minRange = checked(bufferIndex * maxCapacity); + maxRange = checked((bufferIndex + 1) * maxCapacity); + } + row -= minRange; + ret = span[(int)row]; + } + + while (enumerator.MoveNext()) + { + long row = enumerator.Current; + if (row < minRange || row >= maxRange) + { + int bufferIndex = (int)(row / maxCapacity); + mutableBuffer = DataFrameBuffer.GetMutableBuffer(column.Buffers[bufferIndex]); + span = mutableBuffer.Span; + minRange = checked(bufferIndex * maxCapacity); + maxRange = checked((bufferIndex + 1) * maxCapacity); + } + row -= minRange; + ret = (char)Math.Min(span[(int)row], ret); + span[(int)row] = ret; + } + } + + public void CumulativeProduct(PrimitiveColumnContainer column) + { + var ret = (char)1; + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + var mutableSpan = mutableBuffer.Span; + var readOnlySpan = buffer.ReadOnlySpan; + for (int i = 0; i < readOnlySpan.Length; i++) + { + ret = (char)(readOnlySpan[i] * ret); + mutableSpan[i] = ret; + } + column.Buffers[b] = mutableBuffer; + } + } + + public void CumulativeProduct(PrimitiveColumnContainer column, IEnumerable rows) + { + var ret = default(char); + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(column.Buffers[0]); + var span = mutableBuffer.Span; + long minRange = 0; + long maxRange = ReadOnlyDataFrameBuffer.MaxCapacity; + long maxCapacity = maxRange; + IEnumerator enumerator = rows.GetEnumerator(); + if (enumerator.MoveNext()) + { + long row = enumerator.Current; + if (row < minRange || row >= maxRange) + { + int bufferIndex = (int)(row / maxCapacity); + mutableBuffer = DataFrameBuffer.GetMutableBuffer(column.Buffers[bufferIndex]); + span = mutableBuffer.Span; + minRange = checked(bufferIndex * maxCapacity); + maxRange = checked((bufferIndex + 1) * maxCapacity); + } + row -= minRange; + ret = span[(int)row]; + } + + while (enumerator.MoveNext()) + { + long row = enumerator.Current; + if (row < minRange || row >= maxRange) + { + int bufferIndex = (int)(row / maxCapacity); + mutableBuffer = DataFrameBuffer.GetMutableBuffer(column.Buffers[bufferIndex]); + span = mutableBuffer.Span; + minRange = checked(bufferIndex * maxCapacity); + maxRange = checked((bufferIndex + 1) * maxCapacity); + } + row -= minRange; + ret = checked((char)((span[(int)row]) * ret)); + span[(int)row] = ret; + } + } + + public void CumulativeSum(PrimitiveColumnContainer column) + { + var ret = (char)0; + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + var mutableSpan = mutableBuffer.Span; + var readOnlySpan = buffer.ReadOnlySpan; + for (int i = 0; i < readOnlySpan.Length; i++) + { + ret = (char)(readOnlySpan[i] + ret); + mutableSpan[i] = ret; + } + column.Buffers[b] = mutableBuffer; + } + } + + public void CumulativeSum(PrimitiveColumnContainer column, IEnumerable rows) + { + var ret = default(char); + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(column.Buffers[0]); + var span = mutableBuffer.Span; + long minRange = 0; + long maxRange = ReadOnlyDataFrameBuffer.MaxCapacity; + long maxCapacity = maxRange; + IEnumerator enumerator = rows.GetEnumerator(); + if (enumerator.MoveNext()) + { + long row = enumerator.Current; + if (row < minRange || row >= maxRange) + { + int bufferIndex = (int)(row / maxCapacity); + mutableBuffer = DataFrameBuffer.GetMutableBuffer(column.Buffers[bufferIndex]); + span = mutableBuffer.Span; + minRange = checked(bufferIndex * maxCapacity); + maxRange = checked((bufferIndex + 1) * maxCapacity); + } + row -= minRange; + ret = span[(int)row]; + } + + while (enumerator.MoveNext()) + { + long row = enumerator.Current; + if (row < minRange || row >= maxRange) + { + int bufferIndex = (int)(row / maxCapacity); + mutableBuffer = DataFrameBuffer.GetMutableBuffer(column.Buffers[bufferIndex]); + span = mutableBuffer.Span; + minRange = checked(bufferIndex * maxCapacity); + maxRange = checked((bufferIndex + 1) * maxCapacity); + } + row -= minRange; + ret = checked((char)((span[(int)row]) + ret)); + span[(int)row] = ret; + } + } + + public void Max(PrimitiveColumnContainer column, out char ret) + { + ret = column.Buffers[0].ReadOnlySpan[0]; + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var readOnlySpan = buffer.ReadOnlySpan; + for (int i = 0; i < readOnlySpan.Length; i++) + { + ret = (char)(Math.Max(readOnlySpan[i], ret)); + } + } + } + + public void Max(PrimitiveColumnContainer column, IEnumerable rows, out char ret) + { + ret = default; + var readOnlySpan = column.Buffers[0].ReadOnlySpan; + long minRange = 0; + long maxRange = ReadOnlyDataFrameBuffer.MaxCapacity; + long maxCapacity = maxRange; + IEnumerator enumerator = rows.GetEnumerator(); + while (enumerator.MoveNext()) + { + long row = enumerator.Current; + if (row < minRange || row >= maxRange) + { + int bufferIndex = (int)(row / maxCapacity); + readOnlySpan = column.Buffers[bufferIndex].ReadOnlySpan; + minRange = checked(bufferIndex * maxCapacity); + maxRange = checked((bufferIndex + 1) * maxCapacity); + } + row -= minRange; + ret = (char)(Math.Max(readOnlySpan[(int)row], ret)); + } + } + + public void Min(PrimitiveColumnContainer column, out char ret) + { + ret = column.Buffers[0].ReadOnlySpan[0]; + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var readOnlySpan = buffer.ReadOnlySpan; + for (int i = 0; i < readOnlySpan.Length; i++) + { + ret = (char)(Math.Min(readOnlySpan[i], ret)); + } + } + } + + public void Min(PrimitiveColumnContainer column, IEnumerable rows, out char ret) + { + ret = default; + var readOnlySpan = column.Buffers[0].ReadOnlySpan; + long minRange = 0; + long maxRange = ReadOnlyDataFrameBuffer.MaxCapacity; + long maxCapacity = maxRange; + IEnumerator enumerator = rows.GetEnumerator(); + while (enumerator.MoveNext()) + { + long row = enumerator.Current; + if (row < minRange || row >= maxRange) + { + int bufferIndex = (int)(row / maxCapacity); + readOnlySpan = column.Buffers[bufferIndex].ReadOnlySpan; + minRange = checked(bufferIndex * maxCapacity); + maxRange = checked((bufferIndex + 1) * maxCapacity); + } + row -= minRange; + ret = (char)(Math.Min(readOnlySpan[(int)row], ret)); + } + } + + public void Product(PrimitiveColumnContainer column, out char ret) + { + ret = (char)1; + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var readOnlySpan = buffer.ReadOnlySpan; + for (int i = 0; i < readOnlySpan.Length; i++) + { + ret = (char)(readOnlySpan[i] * ret); + } + } + } + + public void Product(PrimitiveColumnContainer column, IEnumerable rows, out char ret) + { + ret = default; + var readOnlySpan = column.Buffers[0].ReadOnlySpan; + long minRange = 0; + long maxRange = ReadOnlyDataFrameBuffer.MaxCapacity; + long maxCapacity = maxRange; + IEnumerator enumerator = rows.GetEnumerator(); + while (enumerator.MoveNext()) + { + long row = enumerator.Current; + if (row < minRange || row >= maxRange) + { + int bufferIndex = (int)(row / maxCapacity); + readOnlySpan = column.Buffers[bufferIndex].ReadOnlySpan; + minRange = checked(bufferIndex * maxCapacity); + maxRange = checked((bufferIndex + 1) * maxCapacity); + } + row -= minRange; + ret = checked((char)(readOnlySpan[(int)row] * ret)); + } + } + + public void Sum(PrimitiveColumnContainer column, out char ret) + { + ret = (char)0; + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var readOnlySpan = buffer.ReadOnlySpan; + for (int i = 0; i < readOnlySpan.Length; i++) + { + ret = (char)(readOnlySpan[i] + ret); + } + } + } + + public void Sum(PrimitiveColumnContainer column, IEnumerable rows, out char ret) + { + ret = default; + var readOnlySpan = column.Buffers[0].ReadOnlySpan; + long minRange = 0; + long maxRange = ReadOnlyDataFrameBuffer.MaxCapacity; + long maxCapacity = maxRange; + IEnumerator enumerator = rows.GetEnumerator(); + while (enumerator.MoveNext()) + { + long row = enumerator.Current; + if (row < minRange || row >= maxRange) + { + int bufferIndex = (int)(row / maxCapacity); + readOnlySpan = column.Buffers[bufferIndex].ReadOnlySpan; + minRange = checked(bufferIndex * maxCapacity); + maxRange = checked((bufferIndex + 1) * maxCapacity); + } + row -= minRange; + ret = checked((char)(readOnlySpan[(int)row] + ret)); + } + } + + public void Round(PrimitiveColumnContainer column) + { + for (int b = 0; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + var mutableSpan = mutableBuffer.Span; + for (int i = 0; i < mutableSpan.Length; i++) + { + mutableSpan[i] = (char)(Math.Round((decimal)mutableSpan[i])); + } + column.Buffers[b] = mutableBuffer; + } + } + + } + internal class DecimalComputation : IPrimitiveColumnComputation + { + public void Abs(PrimitiveColumnContainer column) + { + for (int b = 0; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + var mutableSpan = mutableBuffer.Span; + for (int i = 0; i < mutableSpan.Length; i++) + { + mutableSpan[i] = (decimal)(Math.Abs((decimal)mutableSpan[i])); + } + column.Buffers[b] = mutableBuffer; + } + } + + public void All(PrimitiveColumnContainer column, out bool ret) + { + throw new NotSupportedException(); + } + + public void Any(PrimitiveColumnContainer column, out bool ret) + { + throw new NotSupportedException(); + } + + public void CumulativeMax(PrimitiveColumnContainer column) + { + var ret = column.Buffers[0].ReadOnlySpan[0]; + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + var mutableSpan = mutableBuffer.Span; + var readOnlySpan = buffer.ReadOnlySpan; + for (int i = 0; i < readOnlySpan.Length; i++) + { + ret = (decimal)(Math.Max(readOnlySpan[i], ret)); + mutableSpan[i] = ret; + } + column.Buffers[b] = mutableBuffer; + } + } + + public void CumulativeMax(PrimitiveColumnContainer column, IEnumerable rows) + { + var ret = default(decimal); + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(column.Buffers[0]); + var span = mutableBuffer.Span; + long minRange = 0; + long maxRange = ReadOnlyDataFrameBuffer.MaxCapacity; + long maxCapacity = maxRange; + IEnumerator enumerator = rows.GetEnumerator(); + if (enumerator.MoveNext()) + { + long row = enumerator.Current; + if (row < minRange || row >= maxRange) + { + int bufferIndex = (int)(row / maxCapacity); + mutableBuffer = DataFrameBuffer.GetMutableBuffer(column.Buffers[bufferIndex]); + span = mutableBuffer.Span; + minRange = checked(bufferIndex * maxCapacity); + maxRange = checked((bufferIndex + 1) * maxCapacity); + } + row -= minRange; + ret = span[(int)row]; + } + + while (enumerator.MoveNext()) + { + long row = enumerator.Current; + if (row < minRange || row >= maxRange) + { + int bufferIndex = (int)(row / maxCapacity); + mutableBuffer = DataFrameBuffer.GetMutableBuffer(column.Buffers[bufferIndex]); + span = mutableBuffer.Span; + minRange = checked(bufferIndex * maxCapacity); + maxRange = checked((bufferIndex + 1) * maxCapacity); + } + row -= minRange; + ret = (decimal)Math.Max(span[(int)row], ret); + span[(int)row] = ret; + } + } + + public void CumulativeMin(PrimitiveColumnContainer column) + { + var ret = column.Buffers[0].ReadOnlySpan[0]; + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + var mutableSpan = mutableBuffer.Span; + var readOnlySpan = buffer.ReadOnlySpan; + for (int i = 0; i < readOnlySpan.Length; i++) + { + ret = (decimal)(Math.Min(readOnlySpan[i], ret)); + mutableSpan[i] = ret; + } + column.Buffers[b] = mutableBuffer; + } + } + + public void CumulativeMin(PrimitiveColumnContainer column, IEnumerable rows) + { + var ret = default(decimal); + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(column.Buffers[0]); + var span = mutableBuffer.Span; + long minRange = 0; + long maxRange = ReadOnlyDataFrameBuffer.MaxCapacity; + long maxCapacity = maxRange; + IEnumerator enumerator = rows.GetEnumerator(); + if (enumerator.MoveNext()) + { + long row = enumerator.Current; + if (row < minRange || row >= maxRange) + { + int bufferIndex = (int)(row / maxCapacity); + mutableBuffer = DataFrameBuffer.GetMutableBuffer(column.Buffers[bufferIndex]); + span = mutableBuffer.Span; + minRange = checked(bufferIndex * maxCapacity); + maxRange = checked((bufferIndex + 1) * maxCapacity); + } + row -= minRange; + ret = span[(int)row]; + } + + while (enumerator.MoveNext()) + { + long row = enumerator.Current; + if (row < minRange || row >= maxRange) + { + int bufferIndex = (int)(row / maxCapacity); + mutableBuffer = DataFrameBuffer.GetMutableBuffer(column.Buffers[bufferIndex]); + span = mutableBuffer.Span; + minRange = checked(bufferIndex * maxCapacity); + maxRange = checked((bufferIndex + 1) * maxCapacity); + } + row -= minRange; + ret = (decimal)Math.Min(span[(int)row], ret); + span[(int)row] = ret; + } + } + + public void CumulativeProduct(PrimitiveColumnContainer column) + { + var ret = (decimal)1; + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + var mutableSpan = mutableBuffer.Span; + var readOnlySpan = buffer.ReadOnlySpan; + for (int i = 0; i < readOnlySpan.Length; i++) + { + ret = (decimal)(readOnlySpan[i] * ret); + mutableSpan[i] = ret; + } + column.Buffers[b] = mutableBuffer; + } + } + + public void CumulativeProduct(PrimitiveColumnContainer column, IEnumerable rows) + { + var ret = default(decimal); + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(column.Buffers[0]); + var span = mutableBuffer.Span; + long minRange = 0; + long maxRange = ReadOnlyDataFrameBuffer.MaxCapacity; + long maxCapacity = maxRange; + IEnumerator enumerator = rows.GetEnumerator(); + if (enumerator.MoveNext()) + { + long row = enumerator.Current; + if (row < minRange || row >= maxRange) + { + int bufferIndex = (int)(row / maxCapacity); + mutableBuffer = DataFrameBuffer.GetMutableBuffer(column.Buffers[bufferIndex]); + span = mutableBuffer.Span; + minRange = checked(bufferIndex * maxCapacity); + maxRange = checked((bufferIndex + 1) * maxCapacity); + } + row -= minRange; + ret = span[(int)row]; + } + + while (enumerator.MoveNext()) + { + long row = enumerator.Current; + if (row < minRange || row >= maxRange) + { + int bufferIndex = (int)(row / maxCapacity); + mutableBuffer = DataFrameBuffer.GetMutableBuffer(column.Buffers[bufferIndex]); + span = mutableBuffer.Span; + minRange = checked(bufferIndex * maxCapacity); + maxRange = checked((bufferIndex + 1) * maxCapacity); + } + row -= minRange; + ret = checked((decimal)((span[(int)row]) * ret)); + span[(int)row] = ret; + } + } + + public void CumulativeSum(PrimitiveColumnContainer column) + { + var ret = (decimal)0; + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + var mutableSpan = mutableBuffer.Span; + var readOnlySpan = buffer.ReadOnlySpan; + for (int i = 0; i < readOnlySpan.Length; i++) + { + ret = (decimal)(readOnlySpan[i] + ret); + mutableSpan[i] = ret; + } + column.Buffers[b] = mutableBuffer; + } + } + + public void CumulativeSum(PrimitiveColumnContainer column, IEnumerable rows) + { + var ret = default(decimal); + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(column.Buffers[0]); + var span = mutableBuffer.Span; + long minRange = 0; + long maxRange = ReadOnlyDataFrameBuffer.MaxCapacity; + long maxCapacity = maxRange; + IEnumerator enumerator = rows.GetEnumerator(); + if (enumerator.MoveNext()) + { + long row = enumerator.Current; + if (row < minRange || row >= maxRange) + { + int bufferIndex = (int)(row / maxCapacity); + mutableBuffer = DataFrameBuffer.GetMutableBuffer(column.Buffers[bufferIndex]); + span = mutableBuffer.Span; + minRange = checked(bufferIndex * maxCapacity); + maxRange = checked((bufferIndex + 1) * maxCapacity); + } + row -= minRange; + ret = span[(int)row]; + } + + while (enumerator.MoveNext()) + { + long row = enumerator.Current; + if (row < minRange || row >= maxRange) + { + int bufferIndex = (int)(row / maxCapacity); + mutableBuffer = DataFrameBuffer.GetMutableBuffer(column.Buffers[bufferIndex]); + span = mutableBuffer.Span; + minRange = checked(bufferIndex * maxCapacity); + maxRange = checked((bufferIndex + 1) * maxCapacity); + } + row -= minRange; + ret = checked((decimal)((span[(int)row]) + ret)); + span[(int)row] = ret; + } + } + + public void Max(PrimitiveColumnContainer column, out decimal ret) + { + ret = column.Buffers[0].ReadOnlySpan[0]; + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var readOnlySpan = buffer.ReadOnlySpan; + for (int i = 0; i < readOnlySpan.Length; i++) + { + ret = (decimal)(Math.Max(readOnlySpan[i], ret)); + } + } + } + + public void Max(PrimitiveColumnContainer column, IEnumerable rows, out decimal ret) + { + ret = default; + var readOnlySpan = column.Buffers[0].ReadOnlySpan; + long minRange = 0; + long maxRange = ReadOnlyDataFrameBuffer.MaxCapacity; + long maxCapacity = maxRange; + IEnumerator enumerator = rows.GetEnumerator(); + while (enumerator.MoveNext()) + { + long row = enumerator.Current; + if (row < minRange || row >= maxRange) + { + int bufferIndex = (int)(row / maxCapacity); + readOnlySpan = column.Buffers[bufferIndex].ReadOnlySpan; + minRange = checked(bufferIndex * maxCapacity); + maxRange = checked((bufferIndex + 1) * maxCapacity); + } + row -= minRange; + ret = (decimal)(Math.Max(readOnlySpan[(int)row], ret)); + } + } + + public void Min(PrimitiveColumnContainer column, out decimal ret) + { + ret = column.Buffers[0].ReadOnlySpan[0]; + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var readOnlySpan = buffer.ReadOnlySpan; + for (int i = 0; i < readOnlySpan.Length; i++) + { + ret = (decimal)(Math.Min(readOnlySpan[i], ret)); + } + } + } + + public void Min(PrimitiveColumnContainer column, IEnumerable rows, out decimal ret) + { + ret = default; + var readOnlySpan = column.Buffers[0].ReadOnlySpan; + long minRange = 0; + long maxRange = ReadOnlyDataFrameBuffer.MaxCapacity; + long maxCapacity = maxRange; + IEnumerator enumerator = rows.GetEnumerator(); + while (enumerator.MoveNext()) + { + long row = enumerator.Current; + if (row < minRange || row >= maxRange) + { + int bufferIndex = (int)(row / maxCapacity); + readOnlySpan = column.Buffers[bufferIndex].ReadOnlySpan; + minRange = checked(bufferIndex * maxCapacity); + maxRange = checked((bufferIndex + 1) * maxCapacity); + } + row -= minRange; + ret = (decimal)(Math.Min(readOnlySpan[(int)row], ret)); + } + } + + public void Product(PrimitiveColumnContainer column, out decimal ret) + { + ret = (decimal)1; + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var readOnlySpan = buffer.ReadOnlySpan; + for (int i = 0; i < readOnlySpan.Length; i++) + { + ret = (decimal)(readOnlySpan[i] * ret); + } + } + } + + public void Product(PrimitiveColumnContainer column, IEnumerable rows, out decimal ret) + { + ret = default; + var readOnlySpan = column.Buffers[0].ReadOnlySpan; + long minRange = 0; + long maxRange = ReadOnlyDataFrameBuffer.MaxCapacity; + long maxCapacity = maxRange; + IEnumerator enumerator = rows.GetEnumerator(); + while (enumerator.MoveNext()) + { + long row = enumerator.Current; + if (row < minRange || row >= maxRange) + { + int bufferIndex = (int)(row / maxCapacity); + readOnlySpan = column.Buffers[bufferIndex].ReadOnlySpan; + minRange = checked(bufferIndex * maxCapacity); + maxRange = checked((bufferIndex + 1) * maxCapacity); + } + row -= minRange; + ret = checked((decimal)(readOnlySpan[(int)row] * ret)); + } + } + + public void Sum(PrimitiveColumnContainer column, out decimal ret) + { + ret = (decimal)0; + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var readOnlySpan = buffer.ReadOnlySpan; + for (int i = 0; i < readOnlySpan.Length; i++) + { + ret = (decimal)(readOnlySpan[i] + ret); + } + } + } + + public void Sum(PrimitiveColumnContainer column, IEnumerable rows, out decimal ret) + { + ret = default; + var readOnlySpan = column.Buffers[0].ReadOnlySpan; + long minRange = 0; + long maxRange = ReadOnlyDataFrameBuffer.MaxCapacity; + long maxCapacity = maxRange; + IEnumerator enumerator = rows.GetEnumerator(); + while (enumerator.MoveNext()) + { + long row = enumerator.Current; + if (row < minRange || row >= maxRange) + { + int bufferIndex = (int)(row / maxCapacity); + readOnlySpan = column.Buffers[bufferIndex].ReadOnlySpan; + minRange = checked(bufferIndex * maxCapacity); + maxRange = checked((bufferIndex + 1) * maxCapacity); + } + row -= minRange; + ret = checked((decimal)(readOnlySpan[(int)row] + ret)); + } + } + + public void Round(PrimitiveColumnContainer column) + { + for (int b = 0; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + var mutableSpan = mutableBuffer.Span; + for (int i = 0; i < mutableSpan.Length; i++) + { + mutableSpan[i] = (decimal)(Math.Round((decimal)mutableSpan[i])); + } + column.Buffers[b] = mutableBuffer; + } + } + + } + internal class DoubleComputation : IPrimitiveColumnComputation + { + public void Abs(PrimitiveColumnContainer column) + { + for (int b = 0; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + var mutableSpan = mutableBuffer.Span; + for (int i = 0; i < mutableSpan.Length; i++) + { + mutableSpan[i] = (double)(Math.Abs((decimal)mutableSpan[i])); + } + column.Buffers[b] = mutableBuffer; + } + } + + public void All(PrimitiveColumnContainer column, out bool ret) + { + throw new NotSupportedException(); + } + + public void Any(PrimitiveColumnContainer column, out bool ret) + { + throw new NotSupportedException(); + } + + public void CumulativeMax(PrimitiveColumnContainer column) + { + var ret = column.Buffers[0].ReadOnlySpan[0]; + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + var mutableSpan = mutableBuffer.Span; + var readOnlySpan = buffer.ReadOnlySpan; + for (int i = 0; i < readOnlySpan.Length; i++) + { + ret = (double)(Math.Max(readOnlySpan[i], ret)); + mutableSpan[i] = ret; + } + column.Buffers[b] = mutableBuffer; + } + } + + public void CumulativeMax(PrimitiveColumnContainer column, IEnumerable rows) + { + var ret = default(double); + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(column.Buffers[0]); + var span = mutableBuffer.Span; + long minRange = 0; + long maxRange = ReadOnlyDataFrameBuffer.MaxCapacity; + long maxCapacity = maxRange; + IEnumerator enumerator = rows.GetEnumerator(); + if (enumerator.MoveNext()) + { + long row = enumerator.Current; + if (row < minRange || row >= maxRange) + { + int bufferIndex = (int)(row / maxCapacity); + mutableBuffer = DataFrameBuffer.GetMutableBuffer(column.Buffers[bufferIndex]); + span = mutableBuffer.Span; + minRange = checked(bufferIndex * maxCapacity); + maxRange = checked((bufferIndex + 1) * maxCapacity); + } + row -= minRange; + ret = span[(int)row]; + } + + while (enumerator.MoveNext()) + { + long row = enumerator.Current; + if (row < minRange || row >= maxRange) + { + int bufferIndex = (int)(row / maxCapacity); + mutableBuffer = DataFrameBuffer.GetMutableBuffer(column.Buffers[bufferIndex]); + span = mutableBuffer.Span; + minRange = checked(bufferIndex * maxCapacity); + maxRange = checked((bufferIndex + 1) * maxCapacity); + } + row -= minRange; + ret = (double)Math.Max(span[(int)row], ret); + span[(int)row] = ret; + } + } + + public void CumulativeMin(PrimitiveColumnContainer column) + { + var ret = column.Buffers[0].ReadOnlySpan[0]; + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + var mutableSpan = mutableBuffer.Span; + var readOnlySpan = buffer.ReadOnlySpan; + for (int i = 0; i < readOnlySpan.Length; i++) + { + ret = (double)(Math.Min(readOnlySpan[i], ret)); + mutableSpan[i] = ret; + } + column.Buffers[b] = mutableBuffer; + } + } + + public void CumulativeMin(PrimitiveColumnContainer column, IEnumerable rows) + { + var ret = default(double); + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(column.Buffers[0]); + var span = mutableBuffer.Span; + long minRange = 0; + long maxRange = ReadOnlyDataFrameBuffer.MaxCapacity; + long maxCapacity = maxRange; + IEnumerator enumerator = rows.GetEnumerator(); + if (enumerator.MoveNext()) + { + long row = enumerator.Current; + if (row < minRange || row >= maxRange) + { + int bufferIndex = (int)(row / maxCapacity); + mutableBuffer = DataFrameBuffer.GetMutableBuffer(column.Buffers[bufferIndex]); + span = mutableBuffer.Span; + minRange = checked(bufferIndex * maxCapacity); + maxRange = checked((bufferIndex + 1) * maxCapacity); + } + row -= minRange; + ret = span[(int)row]; + } + + while (enumerator.MoveNext()) + { + long row = enumerator.Current; + if (row < minRange || row >= maxRange) + { + int bufferIndex = (int)(row / maxCapacity); + mutableBuffer = DataFrameBuffer.GetMutableBuffer(column.Buffers[bufferIndex]); + span = mutableBuffer.Span; + minRange = checked(bufferIndex * maxCapacity); + maxRange = checked((bufferIndex + 1) * maxCapacity); + } + row -= minRange; + ret = (double)Math.Min(span[(int)row], ret); + span[(int)row] = ret; + } + } + + public void CumulativeProduct(PrimitiveColumnContainer column) + { + var ret = (double)1; + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + var mutableSpan = mutableBuffer.Span; + var readOnlySpan = buffer.ReadOnlySpan; + for (int i = 0; i < readOnlySpan.Length; i++) + { + ret = (double)(readOnlySpan[i] * ret); + mutableSpan[i] = ret; + } + column.Buffers[b] = mutableBuffer; + } + } + + public void CumulativeProduct(PrimitiveColumnContainer column, IEnumerable rows) + { + var ret = default(double); + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(column.Buffers[0]); + var span = mutableBuffer.Span; + long minRange = 0; + long maxRange = ReadOnlyDataFrameBuffer.MaxCapacity; + long maxCapacity = maxRange; + IEnumerator enumerator = rows.GetEnumerator(); + if (enumerator.MoveNext()) + { + long row = enumerator.Current; + if (row < minRange || row >= maxRange) + { + int bufferIndex = (int)(row / maxCapacity); + mutableBuffer = DataFrameBuffer.GetMutableBuffer(column.Buffers[bufferIndex]); + span = mutableBuffer.Span; + minRange = checked(bufferIndex * maxCapacity); + maxRange = checked((bufferIndex + 1) * maxCapacity); + } + row -= minRange; + ret = span[(int)row]; + } + + while (enumerator.MoveNext()) + { + long row = enumerator.Current; + if (row < minRange || row >= maxRange) + { + int bufferIndex = (int)(row / maxCapacity); + mutableBuffer = DataFrameBuffer.GetMutableBuffer(column.Buffers[bufferIndex]); + span = mutableBuffer.Span; + minRange = checked(bufferIndex * maxCapacity); + maxRange = checked((bufferIndex + 1) * maxCapacity); + } + row -= minRange; + ret = checked((double)((span[(int)row]) * ret)); + span[(int)row] = ret; + } + } + + public void CumulativeSum(PrimitiveColumnContainer column) + { + var ret = (double)0; + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + var mutableSpan = mutableBuffer.Span; + var readOnlySpan = buffer.ReadOnlySpan; + for (int i = 0; i < readOnlySpan.Length; i++) + { + ret = (double)(readOnlySpan[i] + ret); + mutableSpan[i] = ret; + } + column.Buffers[b] = mutableBuffer; + } + } + + public void CumulativeSum(PrimitiveColumnContainer column, IEnumerable rows) + { + var ret = default(double); + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(column.Buffers[0]); + var span = mutableBuffer.Span; + long minRange = 0; + long maxRange = ReadOnlyDataFrameBuffer.MaxCapacity; + long maxCapacity = maxRange; + IEnumerator enumerator = rows.GetEnumerator(); + if (enumerator.MoveNext()) + { + long row = enumerator.Current; + if (row < minRange || row >= maxRange) + { + int bufferIndex = (int)(row / maxCapacity); + mutableBuffer = DataFrameBuffer.GetMutableBuffer(column.Buffers[bufferIndex]); + span = mutableBuffer.Span; + minRange = checked(bufferIndex * maxCapacity); + maxRange = checked((bufferIndex + 1) * maxCapacity); + } + row -= minRange; + ret = span[(int)row]; + } + + while (enumerator.MoveNext()) + { + long row = enumerator.Current; + if (row < minRange || row >= maxRange) + { + int bufferIndex = (int)(row / maxCapacity); + mutableBuffer = DataFrameBuffer.GetMutableBuffer(column.Buffers[bufferIndex]); + span = mutableBuffer.Span; + minRange = checked(bufferIndex * maxCapacity); + maxRange = checked((bufferIndex + 1) * maxCapacity); + } + row -= minRange; + ret = checked((double)((span[(int)row]) + ret)); + span[(int)row] = ret; + } + } + + public void Max(PrimitiveColumnContainer column, out double ret) + { + ret = column.Buffers[0].ReadOnlySpan[0]; + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var readOnlySpan = buffer.ReadOnlySpan; + for (int i = 0; i < readOnlySpan.Length; i++) + { + ret = (double)(Math.Max(readOnlySpan[i], ret)); + } + } + } + + public void Max(PrimitiveColumnContainer column, IEnumerable rows, out double ret) + { + ret = default; + var readOnlySpan = column.Buffers[0].ReadOnlySpan; + long minRange = 0; + long maxRange = ReadOnlyDataFrameBuffer.MaxCapacity; + long maxCapacity = maxRange; + IEnumerator enumerator = rows.GetEnumerator(); + while (enumerator.MoveNext()) + { + long row = enumerator.Current; + if (row < minRange || row >= maxRange) + { + int bufferIndex = (int)(row / maxCapacity); + readOnlySpan = column.Buffers[bufferIndex].ReadOnlySpan; + minRange = checked(bufferIndex * maxCapacity); + maxRange = checked((bufferIndex + 1) * maxCapacity); + } + row -= minRange; + ret = (double)(Math.Max(readOnlySpan[(int)row], ret)); + } + } + + public void Min(PrimitiveColumnContainer column, out double ret) + { + ret = column.Buffers[0].ReadOnlySpan[0]; + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var readOnlySpan = buffer.ReadOnlySpan; + for (int i = 0; i < readOnlySpan.Length; i++) + { + ret = (double)(Math.Min(readOnlySpan[i], ret)); + } + } + } + + public void Min(PrimitiveColumnContainer column, IEnumerable rows, out double ret) + { + ret = default; + var readOnlySpan = column.Buffers[0].ReadOnlySpan; + long minRange = 0; + long maxRange = ReadOnlyDataFrameBuffer.MaxCapacity; + long maxCapacity = maxRange; + IEnumerator enumerator = rows.GetEnumerator(); + while (enumerator.MoveNext()) + { + long row = enumerator.Current; + if (row < minRange || row >= maxRange) + { + int bufferIndex = (int)(row / maxCapacity); + readOnlySpan = column.Buffers[bufferIndex].ReadOnlySpan; + minRange = checked(bufferIndex * maxCapacity); + maxRange = checked((bufferIndex + 1) * maxCapacity); + } + row -= minRange; + ret = (double)(Math.Min(readOnlySpan[(int)row], ret)); + } + } + + public void Product(PrimitiveColumnContainer column, out double ret) + { + ret = (double)1; + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var readOnlySpan = buffer.ReadOnlySpan; + for (int i = 0; i < readOnlySpan.Length; i++) + { + ret = (double)(readOnlySpan[i] * ret); + } + } + } + + public void Product(PrimitiveColumnContainer column, IEnumerable rows, out double ret) + { + ret = default; + var readOnlySpan = column.Buffers[0].ReadOnlySpan; + long minRange = 0; + long maxRange = ReadOnlyDataFrameBuffer.MaxCapacity; + long maxCapacity = maxRange; + IEnumerator enumerator = rows.GetEnumerator(); + while (enumerator.MoveNext()) + { + long row = enumerator.Current; + if (row < minRange || row >= maxRange) + { + int bufferIndex = (int)(row / maxCapacity); + readOnlySpan = column.Buffers[bufferIndex].ReadOnlySpan; + minRange = checked(bufferIndex * maxCapacity); + maxRange = checked((bufferIndex + 1) * maxCapacity); + } + row -= minRange; + ret = checked((double)(readOnlySpan[(int)row] * ret)); + } + } + + public void Sum(PrimitiveColumnContainer column, out double ret) + { + ret = (double)0; + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var readOnlySpan = buffer.ReadOnlySpan; + for (int i = 0; i < readOnlySpan.Length; i++) + { + ret = (double)(readOnlySpan[i] + ret); + } + } + } + + public void Sum(PrimitiveColumnContainer column, IEnumerable rows, out double ret) + { + ret = default; + var readOnlySpan = column.Buffers[0].ReadOnlySpan; + long minRange = 0; + long maxRange = ReadOnlyDataFrameBuffer.MaxCapacity; + long maxCapacity = maxRange; + IEnumerator enumerator = rows.GetEnumerator(); + while (enumerator.MoveNext()) + { + long row = enumerator.Current; + if (row < minRange || row >= maxRange) + { + int bufferIndex = (int)(row / maxCapacity); + readOnlySpan = column.Buffers[bufferIndex].ReadOnlySpan; + minRange = checked(bufferIndex * maxCapacity); + maxRange = checked((bufferIndex + 1) * maxCapacity); + } + row -= minRange; + ret = checked((double)(readOnlySpan[(int)row] + ret)); + } + } + + public void Round(PrimitiveColumnContainer column) + { + for (int b = 0; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + var mutableSpan = mutableBuffer.Span; + for (int i = 0; i < mutableSpan.Length; i++) + { + mutableSpan[i] = (double)(Math.Round((decimal)mutableSpan[i])); + } + column.Buffers[b] = mutableBuffer; + } + } + + } + internal class FloatComputation : IPrimitiveColumnComputation + { + public void Abs(PrimitiveColumnContainer column) + { + for (int b = 0; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + var mutableSpan = mutableBuffer.Span; + for (int i = 0; i < mutableSpan.Length; i++) + { + mutableSpan[i] = (float)(Math.Abs((decimal)mutableSpan[i])); + } + column.Buffers[b] = mutableBuffer; + } + } + + public void All(PrimitiveColumnContainer column, out bool ret) + { + throw new NotSupportedException(); + } + + public void Any(PrimitiveColumnContainer column, out bool ret) + { + throw new NotSupportedException(); + } + + public void CumulativeMax(PrimitiveColumnContainer column) + { + var ret = column.Buffers[0].ReadOnlySpan[0]; + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + var mutableSpan = mutableBuffer.Span; + var readOnlySpan = buffer.ReadOnlySpan; + for (int i = 0; i < readOnlySpan.Length; i++) + { + ret = (float)(Math.Max(readOnlySpan[i], ret)); + mutableSpan[i] = ret; + } + column.Buffers[b] = mutableBuffer; + } + } + + public void CumulativeMax(PrimitiveColumnContainer column, IEnumerable rows) + { + var ret = default(float); + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(column.Buffers[0]); + var span = mutableBuffer.Span; + long minRange = 0; + long maxRange = ReadOnlyDataFrameBuffer.MaxCapacity; + long maxCapacity = maxRange; + IEnumerator enumerator = rows.GetEnumerator(); + if (enumerator.MoveNext()) + { + long row = enumerator.Current; + if (row < minRange || row >= maxRange) + { + int bufferIndex = (int)(row / maxCapacity); + mutableBuffer = DataFrameBuffer.GetMutableBuffer(column.Buffers[bufferIndex]); + span = mutableBuffer.Span; + minRange = checked(bufferIndex * maxCapacity); + maxRange = checked((bufferIndex + 1) * maxCapacity); + } + row -= minRange; + ret = span[(int)row]; + } + + while (enumerator.MoveNext()) + { + long row = enumerator.Current; + if (row < minRange || row >= maxRange) + { + int bufferIndex = (int)(row / maxCapacity); + mutableBuffer = DataFrameBuffer.GetMutableBuffer(column.Buffers[bufferIndex]); + span = mutableBuffer.Span; + minRange = checked(bufferIndex * maxCapacity); + maxRange = checked((bufferIndex + 1) * maxCapacity); + } + row -= minRange; + ret = (float)Math.Max(span[(int)row], ret); + span[(int)row] = ret; + } + } + + public void CumulativeMin(PrimitiveColumnContainer column) + { + var ret = column.Buffers[0].ReadOnlySpan[0]; + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + var mutableSpan = mutableBuffer.Span; + var readOnlySpan = buffer.ReadOnlySpan; + for (int i = 0; i < readOnlySpan.Length; i++) + { + ret = (float)(Math.Min(readOnlySpan[i], ret)); + mutableSpan[i] = ret; + } + column.Buffers[b] = mutableBuffer; + } + } + + public void CumulativeMin(PrimitiveColumnContainer column, IEnumerable rows) + { + var ret = default(float); + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(column.Buffers[0]); + var span = mutableBuffer.Span; + long minRange = 0; + long maxRange = ReadOnlyDataFrameBuffer.MaxCapacity; + long maxCapacity = maxRange; + IEnumerator enumerator = rows.GetEnumerator(); + if (enumerator.MoveNext()) + { + long row = enumerator.Current; + if (row < minRange || row >= maxRange) + { + int bufferIndex = (int)(row / maxCapacity); + mutableBuffer = DataFrameBuffer.GetMutableBuffer(column.Buffers[bufferIndex]); + span = mutableBuffer.Span; + minRange = checked(bufferIndex * maxCapacity); + maxRange = checked((bufferIndex + 1) * maxCapacity); + } + row -= minRange; + ret = span[(int)row]; + } + + while (enumerator.MoveNext()) + { + long row = enumerator.Current; + if (row < minRange || row >= maxRange) + { + int bufferIndex = (int)(row / maxCapacity); + mutableBuffer = DataFrameBuffer.GetMutableBuffer(column.Buffers[bufferIndex]); + span = mutableBuffer.Span; + minRange = checked(bufferIndex * maxCapacity); + maxRange = checked((bufferIndex + 1) * maxCapacity); + } + row -= minRange; + ret = (float)Math.Min(span[(int)row], ret); + span[(int)row] = ret; + } + } + + public void CumulativeProduct(PrimitiveColumnContainer column) + { + var ret = (float)1; + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + var mutableSpan = mutableBuffer.Span; + var readOnlySpan = buffer.ReadOnlySpan; + for (int i = 0; i < readOnlySpan.Length; i++) + { + ret = (float)(readOnlySpan[i] * ret); + mutableSpan[i] = ret; + } + column.Buffers[b] = mutableBuffer; + } + } + + public void CumulativeProduct(PrimitiveColumnContainer column, IEnumerable rows) + { + var ret = default(float); + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(column.Buffers[0]); + var span = mutableBuffer.Span; + long minRange = 0; + long maxRange = ReadOnlyDataFrameBuffer.MaxCapacity; + long maxCapacity = maxRange; + IEnumerator enumerator = rows.GetEnumerator(); + if (enumerator.MoveNext()) + { + long row = enumerator.Current; + if (row < minRange || row >= maxRange) + { + int bufferIndex = (int)(row / maxCapacity); + mutableBuffer = DataFrameBuffer.GetMutableBuffer(column.Buffers[bufferIndex]); + span = mutableBuffer.Span; + minRange = checked(bufferIndex * maxCapacity); + maxRange = checked((bufferIndex + 1) * maxCapacity); + } + row -= minRange; + ret = span[(int)row]; + } + + while (enumerator.MoveNext()) + { + long row = enumerator.Current; + if (row < minRange || row >= maxRange) + { + int bufferIndex = (int)(row / maxCapacity); + mutableBuffer = DataFrameBuffer.GetMutableBuffer(column.Buffers[bufferIndex]); + span = mutableBuffer.Span; + minRange = checked(bufferIndex * maxCapacity); + maxRange = checked((bufferIndex + 1) * maxCapacity); + } + row -= minRange; + ret = checked((float)((span[(int)row]) * ret)); + span[(int)row] = ret; + } + } + + public void CumulativeSum(PrimitiveColumnContainer column) + { + var ret = (float)0; + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + var mutableSpan = mutableBuffer.Span; + var readOnlySpan = buffer.ReadOnlySpan; + for (int i = 0; i < readOnlySpan.Length; i++) + { + ret = (float)(readOnlySpan[i] + ret); + mutableSpan[i] = ret; + } + column.Buffers[b] = mutableBuffer; + } + } + + public void CumulativeSum(PrimitiveColumnContainer column, IEnumerable rows) + { + var ret = default(float); + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(column.Buffers[0]); + var span = mutableBuffer.Span; + long minRange = 0; + long maxRange = ReadOnlyDataFrameBuffer.MaxCapacity; + long maxCapacity = maxRange; + IEnumerator enumerator = rows.GetEnumerator(); + if (enumerator.MoveNext()) + { + long row = enumerator.Current; + if (row < minRange || row >= maxRange) + { + int bufferIndex = (int)(row / maxCapacity); + mutableBuffer = DataFrameBuffer.GetMutableBuffer(column.Buffers[bufferIndex]); + span = mutableBuffer.Span; + minRange = checked(bufferIndex * maxCapacity); + maxRange = checked((bufferIndex + 1) * maxCapacity); + } + row -= minRange; + ret = span[(int)row]; + } + + while (enumerator.MoveNext()) + { + long row = enumerator.Current; + if (row < minRange || row >= maxRange) + { + int bufferIndex = (int)(row / maxCapacity); + mutableBuffer = DataFrameBuffer.GetMutableBuffer(column.Buffers[bufferIndex]); + span = mutableBuffer.Span; + minRange = checked(bufferIndex * maxCapacity); + maxRange = checked((bufferIndex + 1) * maxCapacity); + } + row -= minRange; + ret = checked((float)((span[(int)row]) + ret)); + span[(int)row] = ret; + } + } + + public void Max(PrimitiveColumnContainer column, out float ret) + { + ret = column.Buffers[0].ReadOnlySpan[0]; + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var readOnlySpan = buffer.ReadOnlySpan; + for (int i = 0; i < readOnlySpan.Length; i++) + { + ret = (float)(Math.Max(readOnlySpan[i], ret)); + } + } + } + + public void Max(PrimitiveColumnContainer column, IEnumerable rows, out float ret) + { + ret = default; + var readOnlySpan = column.Buffers[0].ReadOnlySpan; + long minRange = 0; + long maxRange = ReadOnlyDataFrameBuffer.MaxCapacity; + long maxCapacity = maxRange; + IEnumerator enumerator = rows.GetEnumerator(); + while (enumerator.MoveNext()) + { + long row = enumerator.Current; + if (row < minRange || row >= maxRange) + { + int bufferIndex = (int)(row / maxCapacity); + readOnlySpan = column.Buffers[bufferIndex].ReadOnlySpan; + minRange = checked(bufferIndex * maxCapacity); + maxRange = checked((bufferIndex + 1) * maxCapacity); + } + row -= minRange; + ret = (float)(Math.Max(readOnlySpan[(int)row], ret)); + } + } + + public void Min(PrimitiveColumnContainer column, out float ret) + { + ret = column.Buffers[0].ReadOnlySpan[0]; + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var readOnlySpan = buffer.ReadOnlySpan; + for (int i = 0; i < readOnlySpan.Length; i++) + { + ret = (float)(Math.Min(readOnlySpan[i], ret)); + } + } + } + + public void Min(PrimitiveColumnContainer column, IEnumerable rows, out float ret) + { + ret = default; + var readOnlySpan = column.Buffers[0].ReadOnlySpan; + long minRange = 0; + long maxRange = ReadOnlyDataFrameBuffer.MaxCapacity; + long maxCapacity = maxRange; + IEnumerator enumerator = rows.GetEnumerator(); + while (enumerator.MoveNext()) + { + long row = enumerator.Current; + if (row < minRange || row >= maxRange) + { + int bufferIndex = (int)(row / maxCapacity); + readOnlySpan = column.Buffers[bufferIndex].ReadOnlySpan; + minRange = checked(bufferIndex * maxCapacity); + maxRange = checked((bufferIndex + 1) * maxCapacity); + } + row -= minRange; + ret = (float)(Math.Min(readOnlySpan[(int)row], ret)); + } + } + + public void Product(PrimitiveColumnContainer column, out float ret) + { + ret = (float)1; + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var readOnlySpan = buffer.ReadOnlySpan; + for (int i = 0; i < readOnlySpan.Length; i++) + { + ret = (float)(readOnlySpan[i] * ret); + } + } + } + + public void Product(PrimitiveColumnContainer column, IEnumerable rows, out float ret) + { + ret = default; + var readOnlySpan = column.Buffers[0].ReadOnlySpan; + long minRange = 0; + long maxRange = ReadOnlyDataFrameBuffer.MaxCapacity; + long maxCapacity = maxRange; + IEnumerator enumerator = rows.GetEnumerator(); + while (enumerator.MoveNext()) + { + long row = enumerator.Current; + if (row < minRange || row >= maxRange) + { + int bufferIndex = (int)(row / maxCapacity); + readOnlySpan = column.Buffers[bufferIndex].ReadOnlySpan; + minRange = checked(bufferIndex * maxCapacity); + maxRange = checked((bufferIndex + 1) * maxCapacity); + } + row -= minRange; + ret = checked((float)(readOnlySpan[(int)row] * ret)); + } + } + + public void Sum(PrimitiveColumnContainer column, out float ret) + { + ret = (float)0; + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var readOnlySpan = buffer.ReadOnlySpan; + for (int i = 0; i < readOnlySpan.Length; i++) + { + ret = (float)(readOnlySpan[i] + ret); + } + } + } + + public void Sum(PrimitiveColumnContainer column, IEnumerable rows, out float ret) + { + ret = default; + var readOnlySpan = column.Buffers[0].ReadOnlySpan; + long minRange = 0; + long maxRange = ReadOnlyDataFrameBuffer.MaxCapacity; + long maxCapacity = maxRange; + IEnumerator enumerator = rows.GetEnumerator(); + while (enumerator.MoveNext()) + { + long row = enumerator.Current; + if (row < minRange || row >= maxRange) + { + int bufferIndex = (int)(row / maxCapacity); + readOnlySpan = column.Buffers[bufferIndex].ReadOnlySpan; + minRange = checked(bufferIndex * maxCapacity); + maxRange = checked((bufferIndex + 1) * maxCapacity); + } + row -= minRange; + ret = checked((float)(readOnlySpan[(int)row] + ret)); + } + } + + public void Round(PrimitiveColumnContainer column) + { + for (int b = 0; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + var mutableSpan = mutableBuffer.Span; + for (int i = 0; i < mutableSpan.Length; i++) + { + mutableSpan[i] = (float)(Math.Round((decimal)mutableSpan[i])); + } + column.Buffers[b] = mutableBuffer; + } + } + + } + internal class IntComputation : IPrimitiveColumnComputation + { + public void Abs(PrimitiveColumnContainer column) + { + for (int b = 0; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + var mutableSpan = mutableBuffer.Span; + for (int i = 0; i < mutableSpan.Length; i++) + { + mutableSpan[i] = (int)(Math.Abs((decimal)mutableSpan[i])); + } + column.Buffers[b] = mutableBuffer; + } + } + + public void All(PrimitiveColumnContainer column, out bool ret) + { + throw new NotSupportedException(); + } + + public void Any(PrimitiveColumnContainer column, out bool ret) + { + throw new NotSupportedException(); + } + + public void CumulativeMax(PrimitiveColumnContainer column) + { + var ret = column.Buffers[0].ReadOnlySpan[0]; + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + var mutableSpan = mutableBuffer.Span; + var readOnlySpan = buffer.ReadOnlySpan; + for (int i = 0; i < readOnlySpan.Length; i++) + { + ret = (int)(Math.Max(readOnlySpan[i], ret)); + mutableSpan[i] = ret; + } + column.Buffers[b] = mutableBuffer; + } + } + + public void CumulativeMax(PrimitiveColumnContainer column, IEnumerable rows) + { + var ret = default(int); + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(column.Buffers[0]); + var span = mutableBuffer.Span; + long minRange = 0; + long maxRange = ReadOnlyDataFrameBuffer.MaxCapacity; + long maxCapacity = maxRange; + IEnumerator enumerator = rows.GetEnumerator(); + if (enumerator.MoveNext()) + { + long row = enumerator.Current; + if (row < minRange || row >= maxRange) + { + int bufferIndex = (int)(row / maxCapacity); + mutableBuffer = DataFrameBuffer.GetMutableBuffer(column.Buffers[bufferIndex]); + span = mutableBuffer.Span; + minRange = checked(bufferIndex * maxCapacity); + maxRange = checked((bufferIndex + 1) * maxCapacity); + } + row -= minRange; + ret = span[(int)row]; + } + + while (enumerator.MoveNext()) + { + long row = enumerator.Current; + if (row < minRange || row >= maxRange) + { + int bufferIndex = (int)(row / maxCapacity); + mutableBuffer = DataFrameBuffer.GetMutableBuffer(column.Buffers[bufferIndex]); + span = mutableBuffer.Span; + minRange = checked(bufferIndex * maxCapacity); + maxRange = checked((bufferIndex + 1) * maxCapacity); + } + row -= minRange; + ret = (int)Math.Max(span[(int)row], ret); + span[(int)row] = ret; + } + } + + public void CumulativeMin(PrimitiveColumnContainer column) + { + var ret = column.Buffers[0].ReadOnlySpan[0]; + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + var mutableSpan = mutableBuffer.Span; + var readOnlySpan = buffer.ReadOnlySpan; + for (int i = 0; i < readOnlySpan.Length; i++) + { + ret = (int)(Math.Min(readOnlySpan[i], ret)); + mutableSpan[i] = ret; + } + column.Buffers[b] = mutableBuffer; + } + } + + public void CumulativeMin(PrimitiveColumnContainer column, IEnumerable rows) + { + var ret = default(int); + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(column.Buffers[0]); + var span = mutableBuffer.Span; + long minRange = 0; + long maxRange = ReadOnlyDataFrameBuffer.MaxCapacity; + long maxCapacity = maxRange; + IEnumerator enumerator = rows.GetEnumerator(); + if (enumerator.MoveNext()) + { + long row = enumerator.Current; + if (row < minRange || row >= maxRange) + { + int bufferIndex = (int)(row / maxCapacity); + mutableBuffer = DataFrameBuffer.GetMutableBuffer(column.Buffers[bufferIndex]); + span = mutableBuffer.Span; + minRange = checked(bufferIndex * maxCapacity); + maxRange = checked((bufferIndex + 1) * maxCapacity); + } + row -= minRange; + ret = span[(int)row]; + } + + while (enumerator.MoveNext()) + { + long row = enumerator.Current; + if (row < minRange || row >= maxRange) + { + int bufferIndex = (int)(row / maxCapacity); + mutableBuffer = DataFrameBuffer.GetMutableBuffer(column.Buffers[bufferIndex]); + span = mutableBuffer.Span; + minRange = checked(bufferIndex * maxCapacity); + maxRange = checked((bufferIndex + 1) * maxCapacity); + } + row -= minRange; + ret = (int)Math.Min(span[(int)row], ret); + span[(int)row] = ret; + } + } + + public void CumulativeProduct(PrimitiveColumnContainer column) + { + var ret = (int)1; + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + var mutableSpan = mutableBuffer.Span; + var readOnlySpan = buffer.ReadOnlySpan; + for (int i = 0; i < readOnlySpan.Length; i++) + { + ret = (int)(readOnlySpan[i] * ret); + mutableSpan[i] = ret; + } + column.Buffers[b] = mutableBuffer; + } + } + + public void CumulativeProduct(PrimitiveColumnContainer column, IEnumerable rows) + { + var ret = default(int); + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(column.Buffers[0]); + var span = mutableBuffer.Span; + long minRange = 0; + long maxRange = ReadOnlyDataFrameBuffer.MaxCapacity; + long maxCapacity = maxRange; + IEnumerator enumerator = rows.GetEnumerator(); + if (enumerator.MoveNext()) + { + long row = enumerator.Current; + if (row < minRange || row >= maxRange) + { + int bufferIndex = (int)(row / maxCapacity); + mutableBuffer = DataFrameBuffer.GetMutableBuffer(column.Buffers[bufferIndex]); + span = mutableBuffer.Span; + minRange = checked(bufferIndex * maxCapacity); + maxRange = checked((bufferIndex + 1) * maxCapacity); + } + row -= minRange; + ret = span[(int)row]; + } + + while (enumerator.MoveNext()) + { + long row = enumerator.Current; + if (row < minRange || row >= maxRange) + { + int bufferIndex = (int)(row / maxCapacity); + mutableBuffer = DataFrameBuffer.GetMutableBuffer(column.Buffers[bufferIndex]); + span = mutableBuffer.Span; + minRange = checked(bufferIndex * maxCapacity); + maxRange = checked((bufferIndex + 1) * maxCapacity); + } + row -= minRange; + ret = checked((int)((span[(int)row]) * ret)); + span[(int)row] = ret; + } + } + + public void CumulativeSum(PrimitiveColumnContainer column) + { + var ret = (int)0; + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + var mutableSpan = mutableBuffer.Span; + var readOnlySpan = buffer.ReadOnlySpan; + for (int i = 0; i < readOnlySpan.Length; i++) + { + ret = (int)(readOnlySpan[i] + ret); + mutableSpan[i] = ret; + } + column.Buffers[b] = mutableBuffer; + } + } + + public void CumulativeSum(PrimitiveColumnContainer column, IEnumerable rows) + { + var ret = default(int); + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(column.Buffers[0]); + var span = mutableBuffer.Span; + long minRange = 0; + long maxRange = ReadOnlyDataFrameBuffer.MaxCapacity; + long maxCapacity = maxRange; + IEnumerator enumerator = rows.GetEnumerator(); + if (enumerator.MoveNext()) + { + long row = enumerator.Current; + if (row < minRange || row >= maxRange) + { + int bufferIndex = (int)(row / maxCapacity); + mutableBuffer = DataFrameBuffer.GetMutableBuffer(column.Buffers[bufferIndex]); + span = mutableBuffer.Span; + minRange = checked(bufferIndex * maxCapacity); + maxRange = checked((bufferIndex + 1) * maxCapacity); + } + row -= minRange; + ret = span[(int)row]; + } + + while (enumerator.MoveNext()) + { + long row = enumerator.Current; + if (row < minRange || row >= maxRange) + { + int bufferIndex = (int)(row / maxCapacity); + mutableBuffer = DataFrameBuffer.GetMutableBuffer(column.Buffers[bufferIndex]); + span = mutableBuffer.Span; + minRange = checked(bufferIndex * maxCapacity); + maxRange = checked((bufferIndex + 1) * maxCapacity); + } + row -= minRange; + ret = checked((int)((span[(int)row]) + ret)); + span[(int)row] = ret; + } + } + + public void Max(PrimitiveColumnContainer column, out int ret) + { + ret = column.Buffers[0].ReadOnlySpan[0]; + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var readOnlySpan = buffer.ReadOnlySpan; + for (int i = 0; i < readOnlySpan.Length; i++) + { + ret = (int)(Math.Max(readOnlySpan[i], ret)); + } + } + } + + public void Max(PrimitiveColumnContainer column, IEnumerable rows, out int ret) + { + ret = default; + var readOnlySpan = column.Buffers[0].ReadOnlySpan; + long minRange = 0; + long maxRange = ReadOnlyDataFrameBuffer.MaxCapacity; + long maxCapacity = maxRange; + IEnumerator enumerator = rows.GetEnumerator(); + while (enumerator.MoveNext()) + { + long row = enumerator.Current; + if (row < minRange || row >= maxRange) + { + int bufferIndex = (int)(row / maxCapacity); + readOnlySpan = column.Buffers[bufferIndex].ReadOnlySpan; + minRange = checked(bufferIndex * maxCapacity); + maxRange = checked((bufferIndex + 1) * maxCapacity); + } + row -= minRange; + ret = (int)(Math.Max(readOnlySpan[(int)row], ret)); + } + } + + public void Min(PrimitiveColumnContainer column, out int ret) + { + ret = column.Buffers[0].ReadOnlySpan[0]; + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var readOnlySpan = buffer.ReadOnlySpan; + for (int i = 0; i < readOnlySpan.Length; i++) + { + ret = (int)(Math.Min(readOnlySpan[i], ret)); + } + } + } + + public void Min(PrimitiveColumnContainer column, IEnumerable rows, out int ret) + { + ret = default; + var readOnlySpan = column.Buffers[0].ReadOnlySpan; + long minRange = 0; + long maxRange = ReadOnlyDataFrameBuffer.MaxCapacity; + long maxCapacity = maxRange; + IEnumerator enumerator = rows.GetEnumerator(); + while (enumerator.MoveNext()) + { + long row = enumerator.Current; + if (row < minRange || row >= maxRange) + { + int bufferIndex = (int)(row / maxCapacity); + readOnlySpan = column.Buffers[bufferIndex].ReadOnlySpan; + minRange = checked(bufferIndex * maxCapacity); + maxRange = checked((bufferIndex + 1) * maxCapacity); + } + row -= minRange; + ret = (int)(Math.Min(readOnlySpan[(int)row], ret)); + } + } + + public void Product(PrimitiveColumnContainer column, out int ret) + { + ret = (int)1; + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var readOnlySpan = buffer.ReadOnlySpan; + for (int i = 0; i < readOnlySpan.Length; i++) + { + ret = (int)(readOnlySpan[i] * ret); + } + } + } + + public void Product(PrimitiveColumnContainer column, IEnumerable rows, out int ret) + { + ret = default; + var readOnlySpan = column.Buffers[0].ReadOnlySpan; + long minRange = 0; + long maxRange = ReadOnlyDataFrameBuffer.MaxCapacity; + long maxCapacity = maxRange; + IEnumerator enumerator = rows.GetEnumerator(); + while (enumerator.MoveNext()) + { + long row = enumerator.Current; + if (row < minRange || row >= maxRange) + { + int bufferIndex = (int)(row / maxCapacity); + readOnlySpan = column.Buffers[bufferIndex].ReadOnlySpan; + minRange = checked(bufferIndex * maxCapacity); + maxRange = checked((bufferIndex + 1) * maxCapacity); + } + row -= minRange; + ret = checked((int)(readOnlySpan[(int)row] * ret)); + } + } + + public void Sum(PrimitiveColumnContainer column, out int ret) + { + ret = (int)0; + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var readOnlySpan = buffer.ReadOnlySpan; + for (int i = 0; i < readOnlySpan.Length; i++) + { + ret = (int)(readOnlySpan[i] + ret); + } + } + } + + public void Sum(PrimitiveColumnContainer column, IEnumerable rows, out int ret) + { + ret = default; + var readOnlySpan = column.Buffers[0].ReadOnlySpan; + long minRange = 0; + long maxRange = ReadOnlyDataFrameBuffer.MaxCapacity; + long maxCapacity = maxRange; + IEnumerator enumerator = rows.GetEnumerator(); + while (enumerator.MoveNext()) + { + long row = enumerator.Current; + if (row < minRange || row >= maxRange) + { + int bufferIndex = (int)(row / maxCapacity); + readOnlySpan = column.Buffers[bufferIndex].ReadOnlySpan; + minRange = checked(bufferIndex * maxCapacity); + maxRange = checked((bufferIndex + 1) * maxCapacity); + } + row -= minRange; + ret = checked((int)(readOnlySpan[(int)row] + ret)); + } + } + + public void Round(PrimitiveColumnContainer column) + { + for (int b = 0; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + var mutableSpan = mutableBuffer.Span; + for (int i = 0; i < mutableSpan.Length; i++) + { + mutableSpan[i] = (int)(Math.Round((decimal)mutableSpan[i])); + } + column.Buffers[b] = mutableBuffer; + } + } + + } + internal class LongComputation : IPrimitiveColumnComputation + { + public void Abs(PrimitiveColumnContainer column) + { + for (int b = 0; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + var mutableSpan = mutableBuffer.Span; + for (int i = 0; i < mutableSpan.Length; i++) + { + mutableSpan[i] = (long)(Math.Abs((decimal)mutableSpan[i])); + } + column.Buffers[b] = mutableBuffer; + } + } + + public void All(PrimitiveColumnContainer column, out bool ret) + { + throw new NotSupportedException(); + } + + public void Any(PrimitiveColumnContainer column, out bool ret) + { + throw new NotSupportedException(); + } + + public void CumulativeMax(PrimitiveColumnContainer column) + { + var ret = column.Buffers[0].ReadOnlySpan[0]; + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + var mutableSpan = mutableBuffer.Span; + var readOnlySpan = buffer.ReadOnlySpan; + for (int i = 0; i < readOnlySpan.Length; i++) + { + ret = (long)(Math.Max(readOnlySpan[i], ret)); + mutableSpan[i] = ret; + } + column.Buffers[b] = mutableBuffer; + } + } + + public void CumulativeMax(PrimitiveColumnContainer column, IEnumerable rows) + { + var ret = default(long); + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(column.Buffers[0]); + var span = mutableBuffer.Span; + long minRange = 0; + long maxRange = ReadOnlyDataFrameBuffer.MaxCapacity; + long maxCapacity = maxRange; + IEnumerator enumerator = rows.GetEnumerator(); + if (enumerator.MoveNext()) + { + long row = enumerator.Current; + if (row < minRange || row >= maxRange) + { + int bufferIndex = (int)(row / maxCapacity); + mutableBuffer = DataFrameBuffer.GetMutableBuffer(column.Buffers[bufferIndex]); + span = mutableBuffer.Span; + minRange = checked(bufferIndex * maxCapacity); + maxRange = checked((bufferIndex + 1) * maxCapacity); + } + row -= minRange; + ret = span[(int)row]; + } + + while (enumerator.MoveNext()) + { + long row = enumerator.Current; + if (row < minRange || row >= maxRange) + { + int bufferIndex = (int)(row / maxCapacity); + mutableBuffer = DataFrameBuffer.GetMutableBuffer(column.Buffers[bufferIndex]); + span = mutableBuffer.Span; + minRange = checked(bufferIndex * maxCapacity); + maxRange = checked((bufferIndex + 1) * maxCapacity); + } + row -= minRange; + ret = (long)Math.Max(span[(int)row], ret); + span[(int)row] = ret; + } + } + + public void CumulativeMin(PrimitiveColumnContainer column) + { + var ret = column.Buffers[0].ReadOnlySpan[0]; + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + var mutableSpan = mutableBuffer.Span; + var readOnlySpan = buffer.ReadOnlySpan; + for (int i = 0; i < readOnlySpan.Length; i++) + { + ret = (long)(Math.Min(readOnlySpan[i], ret)); + mutableSpan[i] = ret; + } + column.Buffers[b] = mutableBuffer; + } + } + + public void CumulativeMin(PrimitiveColumnContainer column, IEnumerable rows) + { + var ret = default(long); + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(column.Buffers[0]); + var span = mutableBuffer.Span; + long minRange = 0; + long maxRange = ReadOnlyDataFrameBuffer.MaxCapacity; + long maxCapacity = maxRange; + IEnumerator enumerator = rows.GetEnumerator(); + if (enumerator.MoveNext()) + { + long row = enumerator.Current; + if (row < minRange || row >= maxRange) + { + int bufferIndex = (int)(row / maxCapacity); + mutableBuffer = DataFrameBuffer.GetMutableBuffer(column.Buffers[bufferIndex]); + span = mutableBuffer.Span; + minRange = checked(bufferIndex * maxCapacity); + maxRange = checked((bufferIndex + 1) * maxCapacity); + } + row -= minRange; + ret = span[(int)row]; + } + + while (enumerator.MoveNext()) + { + long row = enumerator.Current; + if (row < minRange || row >= maxRange) + { + int bufferIndex = (int)(row / maxCapacity); + mutableBuffer = DataFrameBuffer.GetMutableBuffer(column.Buffers[bufferIndex]); + span = mutableBuffer.Span; + minRange = checked(bufferIndex * maxCapacity); + maxRange = checked((bufferIndex + 1) * maxCapacity); + } + row -= minRange; + ret = (long)Math.Min(span[(int)row], ret); + span[(int)row] = ret; + } + } + + public void CumulativeProduct(PrimitiveColumnContainer column) + { + var ret = (long)1; + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + var mutableSpan = mutableBuffer.Span; + var readOnlySpan = buffer.ReadOnlySpan; + for (int i = 0; i < readOnlySpan.Length; i++) + { + ret = (long)(readOnlySpan[i] * ret); + mutableSpan[i] = ret; + } + column.Buffers[b] = mutableBuffer; + } + } + + public void CumulativeProduct(PrimitiveColumnContainer column, IEnumerable rows) + { + var ret = default(long); + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(column.Buffers[0]); + var span = mutableBuffer.Span; + long minRange = 0; + long maxRange = ReadOnlyDataFrameBuffer.MaxCapacity; + long maxCapacity = maxRange; + IEnumerator enumerator = rows.GetEnumerator(); + if (enumerator.MoveNext()) + { + long row = enumerator.Current; + if (row < minRange || row >= maxRange) + { + int bufferIndex = (int)(row / maxCapacity); + mutableBuffer = DataFrameBuffer.GetMutableBuffer(column.Buffers[bufferIndex]); + span = mutableBuffer.Span; + minRange = checked(bufferIndex * maxCapacity); + maxRange = checked((bufferIndex + 1) * maxCapacity); + } + row -= minRange; + ret = span[(int)row]; + } + + while (enumerator.MoveNext()) + { + long row = enumerator.Current; + if (row < minRange || row >= maxRange) + { + int bufferIndex = (int)(row / maxCapacity); + mutableBuffer = DataFrameBuffer.GetMutableBuffer(column.Buffers[bufferIndex]); + span = mutableBuffer.Span; + minRange = checked(bufferIndex * maxCapacity); + maxRange = checked((bufferIndex + 1) * maxCapacity); + } + row -= minRange; + ret = checked((long)((span[(int)row]) * ret)); + span[(int)row] = ret; + } + } + + public void CumulativeSum(PrimitiveColumnContainer column) + { + var ret = (long)0; + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + var mutableSpan = mutableBuffer.Span; + var readOnlySpan = buffer.ReadOnlySpan; + for (int i = 0; i < readOnlySpan.Length; i++) + { + ret = (long)(readOnlySpan[i] + ret); + mutableSpan[i] = ret; + } + column.Buffers[b] = mutableBuffer; + } + } + + public void CumulativeSum(PrimitiveColumnContainer column, IEnumerable rows) + { + var ret = default(long); + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(column.Buffers[0]); + var span = mutableBuffer.Span; + long minRange = 0; + long maxRange = ReadOnlyDataFrameBuffer.MaxCapacity; + long maxCapacity = maxRange; + IEnumerator enumerator = rows.GetEnumerator(); + if (enumerator.MoveNext()) + { + long row = enumerator.Current; + if (row < minRange || row >= maxRange) + { + int bufferIndex = (int)(row / maxCapacity); + mutableBuffer = DataFrameBuffer.GetMutableBuffer(column.Buffers[bufferIndex]); + span = mutableBuffer.Span; + minRange = checked(bufferIndex * maxCapacity); + maxRange = checked((bufferIndex + 1) * maxCapacity); + } + row -= minRange; + ret = span[(int)row]; + } + + while (enumerator.MoveNext()) + { + long row = enumerator.Current; + if (row < minRange || row >= maxRange) + { + int bufferIndex = (int)(row / maxCapacity); + mutableBuffer = DataFrameBuffer.GetMutableBuffer(column.Buffers[bufferIndex]); + span = mutableBuffer.Span; + minRange = checked(bufferIndex * maxCapacity); + maxRange = checked((bufferIndex + 1) * maxCapacity); + } + row -= minRange; + ret = checked((long)((span[(int)row]) + ret)); + span[(int)row] = ret; + } + } + + public void Max(PrimitiveColumnContainer column, out long ret) + { + ret = column.Buffers[0].ReadOnlySpan[0]; + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var readOnlySpan = buffer.ReadOnlySpan; + for (int i = 0; i < readOnlySpan.Length; i++) + { + ret = (long)(Math.Max(readOnlySpan[i], ret)); + } + } + } + + public void Max(PrimitiveColumnContainer column, IEnumerable rows, out long ret) + { + ret = default; + var readOnlySpan = column.Buffers[0].ReadOnlySpan; + long minRange = 0; + long maxRange = ReadOnlyDataFrameBuffer.MaxCapacity; + long maxCapacity = maxRange; + IEnumerator enumerator = rows.GetEnumerator(); + while (enumerator.MoveNext()) + { + long row = enumerator.Current; + if (row < minRange || row >= maxRange) + { + int bufferIndex = (int)(row / maxCapacity); + readOnlySpan = column.Buffers[bufferIndex].ReadOnlySpan; + minRange = checked(bufferIndex * maxCapacity); + maxRange = checked((bufferIndex + 1) * maxCapacity); + } + row -= minRange; + ret = (long)(Math.Max(readOnlySpan[(int)row], ret)); + } + } + + public void Min(PrimitiveColumnContainer column, out long ret) + { + ret = column.Buffers[0].ReadOnlySpan[0]; + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var readOnlySpan = buffer.ReadOnlySpan; + for (int i = 0; i < readOnlySpan.Length; i++) + { + ret = (long)(Math.Min(readOnlySpan[i], ret)); + } + } + } + + public void Min(PrimitiveColumnContainer column, IEnumerable rows, out long ret) + { + ret = default; + var readOnlySpan = column.Buffers[0].ReadOnlySpan; + long minRange = 0; + long maxRange = ReadOnlyDataFrameBuffer.MaxCapacity; + long maxCapacity = maxRange; + IEnumerator enumerator = rows.GetEnumerator(); + while (enumerator.MoveNext()) + { + long row = enumerator.Current; + if (row < minRange || row >= maxRange) + { + int bufferIndex = (int)(row / maxCapacity); + readOnlySpan = column.Buffers[bufferIndex].ReadOnlySpan; + minRange = checked(bufferIndex * maxCapacity); + maxRange = checked((bufferIndex + 1) * maxCapacity); + } + row -= minRange; + ret = (long)(Math.Min(readOnlySpan[(int)row], ret)); + } + } + + public void Product(PrimitiveColumnContainer column, out long ret) + { + ret = (long)1; + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var readOnlySpan = buffer.ReadOnlySpan; + for (int i = 0; i < readOnlySpan.Length; i++) + { + ret = (long)(readOnlySpan[i] * ret); + } + } + } + + public void Product(PrimitiveColumnContainer column, IEnumerable rows, out long ret) + { + ret = default; + var readOnlySpan = column.Buffers[0].ReadOnlySpan; + long minRange = 0; + long maxRange = ReadOnlyDataFrameBuffer.MaxCapacity; + long maxCapacity = maxRange; + IEnumerator enumerator = rows.GetEnumerator(); + while (enumerator.MoveNext()) + { + long row = enumerator.Current; + if (row < minRange || row >= maxRange) + { + int bufferIndex = (int)(row / maxCapacity); + readOnlySpan = column.Buffers[bufferIndex].ReadOnlySpan; + minRange = checked(bufferIndex * maxCapacity); + maxRange = checked((bufferIndex + 1) * maxCapacity); + } + row -= minRange; + ret = checked((long)(readOnlySpan[(int)row] * ret)); + } + } + + public void Sum(PrimitiveColumnContainer column, out long ret) + { + ret = (long)0; + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var readOnlySpan = buffer.ReadOnlySpan; + for (int i = 0; i < readOnlySpan.Length; i++) + { + ret = (long)(readOnlySpan[i] + ret); + } + } + } + + public void Sum(PrimitiveColumnContainer column, IEnumerable rows, out long ret) + { + ret = default; + var readOnlySpan = column.Buffers[0].ReadOnlySpan; + long minRange = 0; + long maxRange = ReadOnlyDataFrameBuffer.MaxCapacity; + long maxCapacity = maxRange; + IEnumerator enumerator = rows.GetEnumerator(); + while (enumerator.MoveNext()) + { + long row = enumerator.Current; + if (row < minRange || row >= maxRange) + { + int bufferIndex = (int)(row / maxCapacity); + readOnlySpan = column.Buffers[bufferIndex].ReadOnlySpan; + minRange = checked(bufferIndex * maxCapacity); + maxRange = checked((bufferIndex + 1) * maxCapacity); + } + row -= minRange; + ret = checked((long)(readOnlySpan[(int)row] + ret)); + } + } + + public void Round(PrimitiveColumnContainer column) + { + for (int b = 0; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + var mutableSpan = mutableBuffer.Span; + for (int i = 0; i < mutableSpan.Length; i++) + { + mutableSpan[i] = (long)(Math.Round((decimal)mutableSpan[i])); + } + column.Buffers[b] = mutableBuffer; + } + } + + } + internal class SByteComputation : IPrimitiveColumnComputation + { + public void Abs(PrimitiveColumnContainer column) + { + for (int b = 0; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + var mutableSpan = mutableBuffer.Span; + for (int i = 0; i < mutableSpan.Length; i++) + { + mutableSpan[i] = (sbyte)(Math.Abs((decimal)mutableSpan[i])); + } + column.Buffers[b] = mutableBuffer; + } + } + + public void All(PrimitiveColumnContainer column, out bool ret) + { + throw new NotSupportedException(); + } + + public void Any(PrimitiveColumnContainer column, out bool ret) + { + throw new NotSupportedException(); + } + + public void CumulativeMax(PrimitiveColumnContainer column) + { + var ret = column.Buffers[0].ReadOnlySpan[0]; + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + var mutableSpan = mutableBuffer.Span; + var readOnlySpan = buffer.ReadOnlySpan; + for (int i = 0; i < readOnlySpan.Length; i++) + { + ret = (sbyte)(Math.Max(readOnlySpan[i], ret)); + mutableSpan[i] = ret; + } + column.Buffers[b] = mutableBuffer; + } + } + + public void CumulativeMax(PrimitiveColumnContainer column, IEnumerable rows) + { + var ret = default(sbyte); + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(column.Buffers[0]); + var span = mutableBuffer.Span; + long minRange = 0; + long maxRange = ReadOnlyDataFrameBuffer.MaxCapacity; + long maxCapacity = maxRange; + IEnumerator enumerator = rows.GetEnumerator(); + if (enumerator.MoveNext()) + { + long row = enumerator.Current; + if (row < minRange || row >= maxRange) + { + int bufferIndex = (int)(row / maxCapacity); + mutableBuffer = DataFrameBuffer.GetMutableBuffer(column.Buffers[bufferIndex]); + span = mutableBuffer.Span; + minRange = checked(bufferIndex * maxCapacity); + maxRange = checked((bufferIndex + 1) * maxCapacity); + } + row -= minRange; + ret = span[(int)row]; + } + + while (enumerator.MoveNext()) + { + long row = enumerator.Current; + if (row < minRange || row >= maxRange) + { + int bufferIndex = (int)(row / maxCapacity); + mutableBuffer = DataFrameBuffer.GetMutableBuffer(column.Buffers[bufferIndex]); + span = mutableBuffer.Span; + minRange = checked(bufferIndex * maxCapacity); + maxRange = checked((bufferIndex + 1) * maxCapacity); + } + row -= minRange; + ret = (sbyte)Math.Max(span[(int)row], ret); + span[(int)row] = ret; + } + } + + public void CumulativeMin(PrimitiveColumnContainer column) + { + var ret = column.Buffers[0].ReadOnlySpan[0]; + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + var mutableSpan = mutableBuffer.Span; + var readOnlySpan = buffer.ReadOnlySpan; + for (int i = 0; i < readOnlySpan.Length; i++) + { + ret = (sbyte)(Math.Min(readOnlySpan[i], ret)); + mutableSpan[i] = ret; + } + column.Buffers[b] = mutableBuffer; + } + } + + public void CumulativeMin(PrimitiveColumnContainer column, IEnumerable rows) + { + var ret = default(sbyte); + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(column.Buffers[0]); + var span = mutableBuffer.Span; + long minRange = 0; + long maxRange = ReadOnlyDataFrameBuffer.MaxCapacity; + long maxCapacity = maxRange; + IEnumerator enumerator = rows.GetEnumerator(); + if (enumerator.MoveNext()) + { + long row = enumerator.Current; + if (row < minRange || row >= maxRange) + { + int bufferIndex = (int)(row / maxCapacity); + mutableBuffer = DataFrameBuffer.GetMutableBuffer(column.Buffers[bufferIndex]); + span = mutableBuffer.Span; + minRange = checked(bufferIndex * maxCapacity); + maxRange = checked((bufferIndex + 1) * maxCapacity); + } + row -= minRange; + ret = span[(int)row]; + } + + while (enumerator.MoveNext()) + { + long row = enumerator.Current; + if (row < minRange || row >= maxRange) + { + int bufferIndex = (int)(row / maxCapacity); + mutableBuffer = DataFrameBuffer.GetMutableBuffer(column.Buffers[bufferIndex]); + span = mutableBuffer.Span; + minRange = checked(bufferIndex * maxCapacity); + maxRange = checked((bufferIndex + 1) * maxCapacity); + } + row -= minRange; + ret = (sbyte)Math.Min(span[(int)row], ret); + span[(int)row] = ret; + } + } + + public void CumulativeProduct(PrimitiveColumnContainer column) + { + var ret = (sbyte)1; + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + var mutableSpan = mutableBuffer.Span; + var readOnlySpan = buffer.ReadOnlySpan; + for (int i = 0; i < readOnlySpan.Length; i++) + { + ret = (sbyte)(readOnlySpan[i] * ret); + mutableSpan[i] = ret; + } + column.Buffers[b] = mutableBuffer; + } + } + + public void CumulativeProduct(PrimitiveColumnContainer column, IEnumerable rows) + { + var ret = default(sbyte); + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(column.Buffers[0]); + var span = mutableBuffer.Span; + long minRange = 0; + long maxRange = ReadOnlyDataFrameBuffer.MaxCapacity; + long maxCapacity = maxRange; + IEnumerator enumerator = rows.GetEnumerator(); + if (enumerator.MoveNext()) + { + long row = enumerator.Current; + if (row < minRange || row >= maxRange) + { + int bufferIndex = (int)(row / maxCapacity); + mutableBuffer = DataFrameBuffer.GetMutableBuffer(column.Buffers[bufferIndex]); + span = mutableBuffer.Span; + minRange = checked(bufferIndex * maxCapacity); + maxRange = checked((bufferIndex + 1) * maxCapacity); + } + row -= minRange; + ret = span[(int)row]; + } + + while (enumerator.MoveNext()) + { + long row = enumerator.Current; + if (row < minRange || row >= maxRange) + { + int bufferIndex = (int)(row / maxCapacity); + mutableBuffer = DataFrameBuffer.GetMutableBuffer(column.Buffers[bufferIndex]); + span = mutableBuffer.Span; + minRange = checked(bufferIndex * maxCapacity); + maxRange = checked((bufferIndex + 1) * maxCapacity); + } + row -= minRange; + ret = checked((sbyte)((span[(int)row]) * ret)); + span[(int)row] = ret; + } + } + + public void CumulativeSum(PrimitiveColumnContainer column) + { + var ret = (sbyte)0; + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + var mutableSpan = mutableBuffer.Span; + var readOnlySpan = buffer.ReadOnlySpan; + for (int i = 0; i < readOnlySpan.Length; i++) + { + ret = (sbyte)(readOnlySpan[i] + ret); + mutableSpan[i] = ret; + } + column.Buffers[b] = mutableBuffer; + } + } + + public void CumulativeSum(PrimitiveColumnContainer column, IEnumerable rows) + { + var ret = default(sbyte); + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(column.Buffers[0]); + var span = mutableBuffer.Span; + long minRange = 0; + long maxRange = ReadOnlyDataFrameBuffer.MaxCapacity; + long maxCapacity = maxRange; + IEnumerator enumerator = rows.GetEnumerator(); + if (enumerator.MoveNext()) + { + long row = enumerator.Current; + if (row < minRange || row >= maxRange) + { + int bufferIndex = (int)(row / maxCapacity); + mutableBuffer = DataFrameBuffer.GetMutableBuffer(column.Buffers[bufferIndex]); + span = mutableBuffer.Span; + minRange = checked(bufferIndex * maxCapacity); + maxRange = checked((bufferIndex + 1) * maxCapacity); + } + row -= minRange; + ret = span[(int)row]; + } + + while (enumerator.MoveNext()) + { + long row = enumerator.Current; + if (row < minRange || row >= maxRange) + { + int bufferIndex = (int)(row / maxCapacity); + mutableBuffer = DataFrameBuffer.GetMutableBuffer(column.Buffers[bufferIndex]); + span = mutableBuffer.Span; + minRange = checked(bufferIndex * maxCapacity); + maxRange = checked((bufferIndex + 1) * maxCapacity); + } + row -= minRange; + ret = checked((sbyte)((span[(int)row]) + ret)); + span[(int)row] = ret; + } + } + + public void Max(PrimitiveColumnContainer column, out sbyte ret) + { + ret = column.Buffers[0].ReadOnlySpan[0]; + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var readOnlySpan = buffer.ReadOnlySpan; + for (int i = 0; i < readOnlySpan.Length; i++) + { + ret = (sbyte)(Math.Max(readOnlySpan[i], ret)); + } + } + } + + public void Max(PrimitiveColumnContainer column, IEnumerable rows, out sbyte ret) + { + ret = default; + var readOnlySpan = column.Buffers[0].ReadOnlySpan; + long minRange = 0; + long maxRange = ReadOnlyDataFrameBuffer.MaxCapacity; + long maxCapacity = maxRange; + IEnumerator enumerator = rows.GetEnumerator(); + while (enumerator.MoveNext()) + { + long row = enumerator.Current; + if (row < minRange || row >= maxRange) + { + int bufferIndex = (int)(row / maxCapacity); + readOnlySpan = column.Buffers[bufferIndex].ReadOnlySpan; + minRange = checked(bufferIndex * maxCapacity); + maxRange = checked((bufferIndex + 1) * maxCapacity); + } + row -= minRange; + ret = (sbyte)(Math.Max(readOnlySpan[(int)row], ret)); + } + } + + public void Min(PrimitiveColumnContainer column, out sbyte ret) + { + ret = column.Buffers[0].ReadOnlySpan[0]; + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var readOnlySpan = buffer.ReadOnlySpan; + for (int i = 0; i < readOnlySpan.Length; i++) + { + ret = (sbyte)(Math.Min(readOnlySpan[i], ret)); + } + } + } + + public void Min(PrimitiveColumnContainer column, IEnumerable rows, out sbyte ret) + { + ret = default; + var readOnlySpan = column.Buffers[0].ReadOnlySpan; + long minRange = 0; + long maxRange = ReadOnlyDataFrameBuffer.MaxCapacity; + long maxCapacity = maxRange; + IEnumerator enumerator = rows.GetEnumerator(); + while (enumerator.MoveNext()) + { + long row = enumerator.Current; + if (row < minRange || row >= maxRange) + { + int bufferIndex = (int)(row / maxCapacity); + readOnlySpan = column.Buffers[bufferIndex].ReadOnlySpan; + minRange = checked(bufferIndex * maxCapacity); + maxRange = checked((bufferIndex + 1) * maxCapacity); + } + row -= minRange; + ret = (sbyte)(Math.Min(readOnlySpan[(int)row], ret)); + } + } + + public void Product(PrimitiveColumnContainer column, out sbyte ret) + { + ret = (sbyte)1; + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var readOnlySpan = buffer.ReadOnlySpan; + for (int i = 0; i < readOnlySpan.Length; i++) + { + ret = (sbyte)(readOnlySpan[i] * ret); + } + } + } + + public void Product(PrimitiveColumnContainer column, IEnumerable rows, out sbyte ret) + { + ret = default; + var readOnlySpan = column.Buffers[0].ReadOnlySpan; + long minRange = 0; + long maxRange = ReadOnlyDataFrameBuffer.MaxCapacity; + long maxCapacity = maxRange; + IEnumerator enumerator = rows.GetEnumerator(); + while (enumerator.MoveNext()) + { + long row = enumerator.Current; + if (row < minRange || row >= maxRange) + { + int bufferIndex = (int)(row / maxCapacity); + readOnlySpan = column.Buffers[bufferIndex].ReadOnlySpan; + minRange = checked(bufferIndex * maxCapacity); + maxRange = checked((bufferIndex + 1) * maxCapacity); + } + row -= minRange; + ret = checked((sbyte)(readOnlySpan[(int)row] * ret)); + } + } + + public void Sum(PrimitiveColumnContainer column, out sbyte ret) + { + ret = (sbyte)0; + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var readOnlySpan = buffer.ReadOnlySpan; + for (int i = 0; i < readOnlySpan.Length; i++) + { + ret = (sbyte)(readOnlySpan[i] + ret); + } + } + } + + public void Sum(PrimitiveColumnContainer column, IEnumerable rows, out sbyte ret) + { + ret = default; + var readOnlySpan = column.Buffers[0].ReadOnlySpan; + long minRange = 0; + long maxRange = ReadOnlyDataFrameBuffer.MaxCapacity; + long maxCapacity = maxRange; + IEnumerator enumerator = rows.GetEnumerator(); + while (enumerator.MoveNext()) + { + long row = enumerator.Current; + if (row < minRange || row >= maxRange) + { + int bufferIndex = (int)(row / maxCapacity); + readOnlySpan = column.Buffers[bufferIndex].ReadOnlySpan; + minRange = checked(bufferIndex * maxCapacity); + maxRange = checked((bufferIndex + 1) * maxCapacity); + } + row -= minRange; + ret = checked((sbyte)(readOnlySpan[(int)row] + ret)); + } + } + + public void Round(PrimitiveColumnContainer column) + { + for (int b = 0; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + var mutableSpan = mutableBuffer.Span; + for (int i = 0; i < mutableSpan.Length; i++) + { + mutableSpan[i] = (sbyte)(Math.Round((decimal)mutableSpan[i])); + } + column.Buffers[b] = mutableBuffer; + } + } + + } + internal class ShortComputation : IPrimitiveColumnComputation + { + public void Abs(PrimitiveColumnContainer column) + { + for (int b = 0; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + var mutableSpan = mutableBuffer.Span; + for (int i = 0; i < mutableSpan.Length; i++) + { + mutableSpan[i] = (short)(Math.Abs((decimal)mutableSpan[i])); + } + column.Buffers[b] = mutableBuffer; + } + } + + public void All(PrimitiveColumnContainer column, out bool ret) + { + throw new NotSupportedException(); + } + + public void Any(PrimitiveColumnContainer column, out bool ret) + { + throw new NotSupportedException(); + } + + public void CumulativeMax(PrimitiveColumnContainer column) + { + var ret = column.Buffers[0].ReadOnlySpan[0]; + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + var mutableSpan = mutableBuffer.Span; + var readOnlySpan = buffer.ReadOnlySpan; + for (int i = 0; i < readOnlySpan.Length; i++) + { + ret = (short)(Math.Max(readOnlySpan[i], ret)); + mutableSpan[i] = ret; + } + column.Buffers[b] = mutableBuffer; + } + } + + public void CumulativeMax(PrimitiveColumnContainer column, IEnumerable rows) + { + var ret = default(short); + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(column.Buffers[0]); + var span = mutableBuffer.Span; + long minRange = 0; + long maxRange = ReadOnlyDataFrameBuffer.MaxCapacity; + long maxCapacity = maxRange; + IEnumerator enumerator = rows.GetEnumerator(); + if (enumerator.MoveNext()) + { + long row = enumerator.Current; + if (row < minRange || row >= maxRange) + { + int bufferIndex = (int)(row / maxCapacity); + mutableBuffer = DataFrameBuffer.GetMutableBuffer(column.Buffers[bufferIndex]); + span = mutableBuffer.Span; + minRange = checked(bufferIndex * maxCapacity); + maxRange = checked((bufferIndex + 1) * maxCapacity); + } + row -= minRange; + ret = span[(int)row]; + } + + while (enumerator.MoveNext()) + { + long row = enumerator.Current; + if (row < minRange || row >= maxRange) + { + int bufferIndex = (int)(row / maxCapacity); + mutableBuffer = DataFrameBuffer.GetMutableBuffer(column.Buffers[bufferIndex]); + span = mutableBuffer.Span; + minRange = checked(bufferIndex * maxCapacity); + maxRange = checked((bufferIndex + 1) * maxCapacity); + } + row -= minRange; + ret = (short)Math.Max(span[(int)row], ret); + span[(int)row] = ret; + } + } + + public void CumulativeMin(PrimitiveColumnContainer column) + { + var ret = column.Buffers[0].ReadOnlySpan[0]; + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + var mutableSpan = mutableBuffer.Span; + var readOnlySpan = buffer.ReadOnlySpan; + for (int i = 0; i < readOnlySpan.Length; i++) + { + ret = (short)(Math.Min(readOnlySpan[i], ret)); + mutableSpan[i] = ret; + } + column.Buffers[b] = mutableBuffer; + } + } + + public void CumulativeMin(PrimitiveColumnContainer column, IEnumerable rows) + { + var ret = default(short); + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(column.Buffers[0]); + var span = mutableBuffer.Span; + long minRange = 0; + long maxRange = ReadOnlyDataFrameBuffer.MaxCapacity; + long maxCapacity = maxRange; + IEnumerator enumerator = rows.GetEnumerator(); + if (enumerator.MoveNext()) + { + long row = enumerator.Current; + if (row < minRange || row >= maxRange) + { + int bufferIndex = (int)(row / maxCapacity); + mutableBuffer = DataFrameBuffer.GetMutableBuffer(column.Buffers[bufferIndex]); + span = mutableBuffer.Span; + minRange = checked(bufferIndex * maxCapacity); + maxRange = checked((bufferIndex + 1) * maxCapacity); + } + row -= minRange; + ret = span[(int)row]; + } + + while (enumerator.MoveNext()) + { + long row = enumerator.Current; + if (row < minRange || row >= maxRange) + { + int bufferIndex = (int)(row / maxCapacity); + mutableBuffer = DataFrameBuffer.GetMutableBuffer(column.Buffers[bufferIndex]); + span = mutableBuffer.Span; + minRange = checked(bufferIndex * maxCapacity); + maxRange = checked((bufferIndex + 1) * maxCapacity); + } + row -= minRange; + ret = (short)Math.Min(span[(int)row], ret); + span[(int)row] = ret; + } + } + + public void CumulativeProduct(PrimitiveColumnContainer column) + { + var ret = (short)1; + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + var mutableSpan = mutableBuffer.Span; + var readOnlySpan = buffer.ReadOnlySpan; + for (int i = 0; i < readOnlySpan.Length; i++) + { + ret = (short)(readOnlySpan[i] * ret); + mutableSpan[i] = ret; + } + column.Buffers[b] = mutableBuffer; + } + } + + public void CumulativeProduct(PrimitiveColumnContainer column, IEnumerable rows) + { + var ret = default(short); + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(column.Buffers[0]); + var span = mutableBuffer.Span; + long minRange = 0; + long maxRange = ReadOnlyDataFrameBuffer.MaxCapacity; + long maxCapacity = maxRange; + IEnumerator enumerator = rows.GetEnumerator(); + if (enumerator.MoveNext()) + { + long row = enumerator.Current; + if (row < minRange || row >= maxRange) + { + int bufferIndex = (int)(row / maxCapacity); + mutableBuffer = DataFrameBuffer.GetMutableBuffer(column.Buffers[bufferIndex]); + span = mutableBuffer.Span; + minRange = checked(bufferIndex * maxCapacity); + maxRange = checked((bufferIndex + 1) * maxCapacity); + } + row -= minRange; + ret = span[(int)row]; + } + + while (enumerator.MoveNext()) + { + long row = enumerator.Current; + if (row < minRange || row >= maxRange) + { + int bufferIndex = (int)(row / maxCapacity); + mutableBuffer = DataFrameBuffer.GetMutableBuffer(column.Buffers[bufferIndex]); + span = mutableBuffer.Span; + minRange = checked(bufferIndex * maxCapacity); + maxRange = checked((bufferIndex + 1) * maxCapacity); + } + row -= minRange; + ret = checked((short)((span[(int)row]) * ret)); + span[(int)row] = ret; + } + } + + public void CumulativeSum(PrimitiveColumnContainer column) + { + var ret = (short)0; + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + var mutableSpan = mutableBuffer.Span; + var readOnlySpan = buffer.ReadOnlySpan; + for (int i = 0; i < readOnlySpan.Length; i++) + { + ret = (short)(readOnlySpan[i] + ret); + mutableSpan[i] = ret; + } + column.Buffers[b] = mutableBuffer; + } + } + + public void CumulativeSum(PrimitiveColumnContainer column, IEnumerable rows) + { + var ret = default(short); + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(column.Buffers[0]); + var span = mutableBuffer.Span; + long minRange = 0; + long maxRange = ReadOnlyDataFrameBuffer.MaxCapacity; + long maxCapacity = maxRange; + IEnumerator enumerator = rows.GetEnumerator(); + if (enumerator.MoveNext()) + { + long row = enumerator.Current; + if (row < minRange || row >= maxRange) + { + int bufferIndex = (int)(row / maxCapacity); + mutableBuffer = DataFrameBuffer.GetMutableBuffer(column.Buffers[bufferIndex]); + span = mutableBuffer.Span; + minRange = checked(bufferIndex * maxCapacity); + maxRange = checked((bufferIndex + 1) * maxCapacity); + } + row -= minRange; + ret = span[(int)row]; + } + + while (enumerator.MoveNext()) + { + long row = enumerator.Current; + if (row < minRange || row >= maxRange) + { + int bufferIndex = (int)(row / maxCapacity); + mutableBuffer = DataFrameBuffer.GetMutableBuffer(column.Buffers[bufferIndex]); + span = mutableBuffer.Span; + minRange = checked(bufferIndex * maxCapacity); + maxRange = checked((bufferIndex + 1) * maxCapacity); + } + row -= minRange; + ret = checked((short)((span[(int)row]) + ret)); + span[(int)row] = ret; + } + } + + public void Max(PrimitiveColumnContainer column, out short ret) + { + ret = column.Buffers[0].ReadOnlySpan[0]; + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var readOnlySpan = buffer.ReadOnlySpan; + for (int i = 0; i < readOnlySpan.Length; i++) + { + ret = (short)(Math.Max(readOnlySpan[i], ret)); + } + } + } + + public void Max(PrimitiveColumnContainer column, IEnumerable rows, out short ret) + { + ret = default; + var readOnlySpan = column.Buffers[0].ReadOnlySpan; + long minRange = 0; + long maxRange = ReadOnlyDataFrameBuffer.MaxCapacity; + long maxCapacity = maxRange; + IEnumerator enumerator = rows.GetEnumerator(); + while (enumerator.MoveNext()) + { + long row = enumerator.Current; + if (row < minRange || row >= maxRange) + { + int bufferIndex = (int)(row / maxCapacity); + readOnlySpan = column.Buffers[bufferIndex].ReadOnlySpan; + minRange = checked(bufferIndex * maxCapacity); + maxRange = checked((bufferIndex + 1) * maxCapacity); + } + row -= minRange; + ret = (short)(Math.Max(readOnlySpan[(int)row], ret)); + } + } + + public void Min(PrimitiveColumnContainer column, out short ret) + { + ret = column.Buffers[0].ReadOnlySpan[0]; + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var readOnlySpan = buffer.ReadOnlySpan; + for (int i = 0; i < readOnlySpan.Length; i++) + { + ret = (short)(Math.Min(readOnlySpan[i], ret)); + } + } + } + + public void Min(PrimitiveColumnContainer column, IEnumerable rows, out short ret) + { + ret = default; + var readOnlySpan = column.Buffers[0].ReadOnlySpan; + long minRange = 0; + long maxRange = ReadOnlyDataFrameBuffer.MaxCapacity; + long maxCapacity = maxRange; + IEnumerator enumerator = rows.GetEnumerator(); + while (enumerator.MoveNext()) + { + long row = enumerator.Current; + if (row < minRange || row >= maxRange) + { + int bufferIndex = (int)(row / maxCapacity); + readOnlySpan = column.Buffers[bufferIndex].ReadOnlySpan; + minRange = checked(bufferIndex * maxCapacity); + maxRange = checked((bufferIndex + 1) * maxCapacity); + } + row -= minRange; + ret = (short)(Math.Min(readOnlySpan[(int)row], ret)); + } + } + + public void Product(PrimitiveColumnContainer column, out short ret) + { + ret = (short)1; + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var readOnlySpan = buffer.ReadOnlySpan; + for (int i = 0; i < readOnlySpan.Length; i++) + { + ret = (short)(readOnlySpan[i] * ret); + } + } + } + + public void Product(PrimitiveColumnContainer column, IEnumerable rows, out short ret) + { + ret = default; + var readOnlySpan = column.Buffers[0].ReadOnlySpan; + long minRange = 0; + long maxRange = ReadOnlyDataFrameBuffer.MaxCapacity; + long maxCapacity = maxRange; + IEnumerator enumerator = rows.GetEnumerator(); + while (enumerator.MoveNext()) + { + long row = enumerator.Current; + if (row < minRange || row >= maxRange) + { + int bufferIndex = (int)(row / maxCapacity); + readOnlySpan = column.Buffers[bufferIndex].ReadOnlySpan; + minRange = checked(bufferIndex * maxCapacity); + maxRange = checked((bufferIndex + 1) * maxCapacity); + } + row -= minRange; + ret = checked((short)(readOnlySpan[(int)row] * ret)); + } + } + + public void Sum(PrimitiveColumnContainer column, out short ret) + { + ret = (short)0; + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var readOnlySpan = buffer.ReadOnlySpan; + for (int i = 0; i < readOnlySpan.Length; i++) + { + ret = (short)(readOnlySpan[i] + ret); + } + } + } + + public void Sum(PrimitiveColumnContainer column, IEnumerable rows, out short ret) + { + ret = default; + var readOnlySpan = column.Buffers[0].ReadOnlySpan; + long minRange = 0; + long maxRange = ReadOnlyDataFrameBuffer.MaxCapacity; + long maxCapacity = maxRange; + IEnumerator enumerator = rows.GetEnumerator(); + while (enumerator.MoveNext()) + { + long row = enumerator.Current; + if (row < minRange || row >= maxRange) + { + int bufferIndex = (int)(row / maxCapacity); + readOnlySpan = column.Buffers[bufferIndex].ReadOnlySpan; + minRange = checked(bufferIndex * maxCapacity); + maxRange = checked((bufferIndex + 1) * maxCapacity); + } + row -= minRange; + ret = checked((short)(readOnlySpan[(int)row] + ret)); + } + } + + public void Round(PrimitiveColumnContainer column) + { + for (int b = 0; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + var mutableSpan = mutableBuffer.Span; + for (int i = 0; i < mutableSpan.Length; i++) + { + mutableSpan[i] = (short)(Math.Round((decimal)mutableSpan[i])); + } + column.Buffers[b] = mutableBuffer; + } + } + + } + internal class UIntComputation : IPrimitiveColumnComputation + { + public void Abs(PrimitiveColumnContainer column) + { + for (int b = 0; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + var mutableSpan = mutableBuffer.Span; + for (int i = 0; i < mutableSpan.Length; i++) + { + mutableSpan[i] = (uint)(Math.Abs((decimal)mutableSpan[i])); + } + column.Buffers[b] = mutableBuffer; + } + } + + public void All(PrimitiveColumnContainer column, out bool ret) + { + throw new NotSupportedException(); + } + + public void Any(PrimitiveColumnContainer column, out bool ret) + { + throw new NotSupportedException(); + } + + public void CumulativeMax(PrimitiveColumnContainer column) + { + var ret = column.Buffers[0].ReadOnlySpan[0]; + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + var mutableSpan = mutableBuffer.Span; + var readOnlySpan = buffer.ReadOnlySpan; + for (int i = 0; i < readOnlySpan.Length; i++) + { + ret = (uint)(Math.Max(readOnlySpan[i], ret)); + mutableSpan[i] = ret; + } + column.Buffers[b] = mutableBuffer; + } + } + + public void CumulativeMax(PrimitiveColumnContainer column, IEnumerable rows) + { + var ret = default(uint); + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(column.Buffers[0]); + var span = mutableBuffer.Span; + long minRange = 0; + long maxRange = ReadOnlyDataFrameBuffer.MaxCapacity; + long maxCapacity = maxRange; + IEnumerator enumerator = rows.GetEnumerator(); + if (enumerator.MoveNext()) + { + long row = enumerator.Current; + if (row < minRange || row >= maxRange) + { + int bufferIndex = (int)(row / maxCapacity); + mutableBuffer = DataFrameBuffer.GetMutableBuffer(column.Buffers[bufferIndex]); + span = mutableBuffer.Span; + minRange = checked(bufferIndex * maxCapacity); + maxRange = checked((bufferIndex + 1) * maxCapacity); + } + row -= minRange; + ret = span[(int)row]; + } + + while (enumerator.MoveNext()) + { + long row = enumerator.Current; + if (row < minRange || row >= maxRange) + { + int bufferIndex = (int)(row / maxCapacity); + mutableBuffer = DataFrameBuffer.GetMutableBuffer(column.Buffers[bufferIndex]); + span = mutableBuffer.Span; + minRange = checked(bufferIndex * maxCapacity); + maxRange = checked((bufferIndex + 1) * maxCapacity); + } + row -= minRange; + ret = (uint)Math.Max(span[(int)row], ret); + span[(int)row] = ret; + } + } + + public void CumulativeMin(PrimitiveColumnContainer column) + { + var ret = column.Buffers[0].ReadOnlySpan[0]; + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + var mutableSpan = mutableBuffer.Span; + var readOnlySpan = buffer.ReadOnlySpan; + for (int i = 0; i < readOnlySpan.Length; i++) + { + ret = (uint)(Math.Min(readOnlySpan[i], ret)); + mutableSpan[i] = ret; + } + column.Buffers[b] = mutableBuffer; + } + } + + public void CumulativeMin(PrimitiveColumnContainer column, IEnumerable rows) + { + var ret = default(uint); + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(column.Buffers[0]); + var span = mutableBuffer.Span; + long minRange = 0; + long maxRange = ReadOnlyDataFrameBuffer.MaxCapacity; + long maxCapacity = maxRange; + IEnumerator enumerator = rows.GetEnumerator(); + if (enumerator.MoveNext()) + { + long row = enumerator.Current; + if (row < minRange || row >= maxRange) + { + int bufferIndex = (int)(row / maxCapacity); + mutableBuffer = DataFrameBuffer.GetMutableBuffer(column.Buffers[bufferIndex]); + span = mutableBuffer.Span; + minRange = checked(bufferIndex * maxCapacity); + maxRange = checked((bufferIndex + 1) * maxCapacity); + } + row -= minRange; + ret = span[(int)row]; + } + + while (enumerator.MoveNext()) + { + long row = enumerator.Current; + if (row < minRange || row >= maxRange) + { + int bufferIndex = (int)(row / maxCapacity); + mutableBuffer = DataFrameBuffer.GetMutableBuffer(column.Buffers[bufferIndex]); + span = mutableBuffer.Span; + minRange = checked(bufferIndex * maxCapacity); + maxRange = checked((bufferIndex + 1) * maxCapacity); + } + row -= minRange; + ret = (uint)Math.Min(span[(int)row], ret); + span[(int)row] = ret; + } + } + + public void CumulativeProduct(PrimitiveColumnContainer column) + { + var ret = (uint)1; + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + var mutableSpan = mutableBuffer.Span; + var readOnlySpan = buffer.ReadOnlySpan; + for (int i = 0; i < readOnlySpan.Length; i++) + { + ret = (uint)(readOnlySpan[i] * ret); + mutableSpan[i] = ret; + } + column.Buffers[b] = mutableBuffer; + } + } + + public void CumulativeProduct(PrimitiveColumnContainer column, IEnumerable rows) + { + var ret = default(uint); + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(column.Buffers[0]); + var span = mutableBuffer.Span; + long minRange = 0; + long maxRange = ReadOnlyDataFrameBuffer.MaxCapacity; + long maxCapacity = maxRange; + IEnumerator enumerator = rows.GetEnumerator(); + if (enumerator.MoveNext()) + { + long row = enumerator.Current; + if (row < minRange || row >= maxRange) + { + int bufferIndex = (int)(row / maxCapacity); + mutableBuffer = DataFrameBuffer.GetMutableBuffer(column.Buffers[bufferIndex]); + span = mutableBuffer.Span; + minRange = checked(bufferIndex * maxCapacity); + maxRange = checked((bufferIndex + 1) * maxCapacity); + } + row -= minRange; + ret = span[(int)row]; + } + + while (enumerator.MoveNext()) + { + long row = enumerator.Current; + if (row < minRange || row >= maxRange) + { + int bufferIndex = (int)(row / maxCapacity); + mutableBuffer = DataFrameBuffer.GetMutableBuffer(column.Buffers[bufferIndex]); + span = mutableBuffer.Span; + minRange = checked(bufferIndex * maxCapacity); + maxRange = checked((bufferIndex + 1) * maxCapacity); + } + row -= minRange; + ret = checked((uint)((span[(int)row]) * ret)); + span[(int)row] = ret; + } + } + + public void CumulativeSum(PrimitiveColumnContainer column) + { + var ret = (uint)0; + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + var mutableSpan = mutableBuffer.Span; + var readOnlySpan = buffer.ReadOnlySpan; + for (int i = 0; i < readOnlySpan.Length; i++) + { + ret = (uint)(readOnlySpan[i] + ret); + mutableSpan[i] = ret; + } + column.Buffers[b] = mutableBuffer; + } + } + + public void CumulativeSum(PrimitiveColumnContainer column, IEnumerable rows) + { + var ret = default(uint); + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(column.Buffers[0]); + var span = mutableBuffer.Span; + long minRange = 0; + long maxRange = ReadOnlyDataFrameBuffer.MaxCapacity; + long maxCapacity = maxRange; + IEnumerator enumerator = rows.GetEnumerator(); + if (enumerator.MoveNext()) + { + long row = enumerator.Current; + if (row < minRange || row >= maxRange) + { + int bufferIndex = (int)(row / maxCapacity); + mutableBuffer = DataFrameBuffer.GetMutableBuffer(column.Buffers[bufferIndex]); + span = mutableBuffer.Span; + minRange = checked(bufferIndex * maxCapacity); + maxRange = checked((bufferIndex + 1) * maxCapacity); + } + row -= minRange; + ret = span[(int)row]; + } + + while (enumerator.MoveNext()) + { + long row = enumerator.Current; + if (row < minRange || row >= maxRange) + { + int bufferIndex = (int)(row / maxCapacity); + mutableBuffer = DataFrameBuffer.GetMutableBuffer(column.Buffers[bufferIndex]); + span = mutableBuffer.Span; + minRange = checked(bufferIndex * maxCapacity); + maxRange = checked((bufferIndex + 1) * maxCapacity); + } + row -= minRange; + ret = checked((uint)((span[(int)row]) + ret)); + span[(int)row] = ret; + } + } + + public void Max(PrimitiveColumnContainer column, out uint ret) + { + ret = column.Buffers[0].ReadOnlySpan[0]; + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var readOnlySpan = buffer.ReadOnlySpan; + for (int i = 0; i < readOnlySpan.Length; i++) + { + ret = (uint)(Math.Max(readOnlySpan[i], ret)); + } + } + } + + public void Max(PrimitiveColumnContainer column, IEnumerable rows, out uint ret) + { + ret = default; + var readOnlySpan = column.Buffers[0].ReadOnlySpan; + long minRange = 0; + long maxRange = ReadOnlyDataFrameBuffer.MaxCapacity; + long maxCapacity = maxRange; + IEnumerator enumerator = rows.GetEnumerator(); + while (enumerator.MoveNext()) + { + long row = enumerator.Current; + if (row < minRange || row >= maxRange) + { + int bufferIndex = (int)(row / maxCapacity); + readOnlySpan = column.Buffers[bufferIndex].ReadOnlySpan; + minRange = checked(bufferIndex * maxCapacity); + maxRange = checked((bufferIndex + 1) * maxCapacity); + } + row -= minRange; + ret = (uint)(Math.Max(readOnlySpan[(int)row], ret)); + } + } + + public void Min(PrimitiveColumnContainer column, out uint ret) + { + ret = column.Buffers[0].ReadOnlySpan[0]; + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var readOnlySpan = buffer.ReadOnlySpan; + for (int i = 0; i < readOnlySpan.Length; i++) + { + ret = (uint)(Math.Min(readOnlySpan[i], ret)); + } + } + } + + public void Min(PrimitiveColumnContainer column, IEnumerable rows, out uint ret) + { + ret = default; + var readOnlySpan = column.Buffers[0].ReadOnlySpan; + long minRange = 0; + long maxRange = ReadOnlyDataFrameBuffer.MaxCapacity; + long maxCapacity = maxRange; + IEnumerator enumerator = rows.GetEnumerator(); + while (enumerator.MoveNext()) + { + long row = enumerator.Current; + if (row < minRange || row >= maxRange) + { + int bufferIndex = (int)(row / maxCapacity); + readOnlySpan = column.Buffers[bufferIndex].ReadOnlySpan; + minRange = checked(bufferIndex * maxCapacity); + maxRange = checked((bufferIndex + 1) * maxCapacity); + } + row -= minRange; + ret = (uint)(Math.Min(readOnlySpan[(int)row], ret)); + } + } + + public void Product(PrimitiveColumnContainer column, out uint ret) + { + ret = (uint)1; + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var readOnlySpan = buffer.ReadOnlySpan; + for (int i = 0; i < readOnlySpan.Length; i++) + { + ret = (uint)(readOnlySpan[i] * ret); + } + } + } + + public void Product(PrimitiveColumnContainer column, IEnumerable rows, out uint ret) + { + ret = default; + var readOnlySpan = column.Buffers[0].ReadOnlySpan; + long minRange = 0; + long maxRange = ReadOnlyDataFrameBuffer.MaxCapacity; + long maxCapacity = maxRange; + IEnumerator enumerator = rows.GetEnumerator(); + while (enumerator.MoveNext()) + { + long row = enumerator.Current; + if (row < minRange || row >= maxRange) + { + int bufferIndex = (int)(row / maxCapacity); + readOnlySpan = column.Buffers[bufferIndex].ReadOnlySpan; + minRange = checked(bufferIndex * maxCapacity); + maxRange = checked((bufferIndex + 1) * maxCapacity); + } + row -= minRange; + ret = checked((uint)(readOnlySpan[(int)row] * ret)); + } + } + + public void Sum(PrimitiveColumnContainer column, out uint ret) + { + ret = (uint)0; + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var readOnlySpan = buffer.ReadOnlySpan; + for (int i = 0; i < readOnlySpan.Length; i++) + { + ret = (uint)(readOnlySpan[i] + ret); + } + } + } + + public void Sum(PrimitiveColumnContainer column, IEnumerable rows, out uint ret) + { + ret = default; + var readOnlySpan = column.Buffers[0].ReadOnlySpan; + long minRange = 0; + long maxRange = ReadOnlyDataFrameBuffer.MaxCapacity; + long maxCapacity = maxRange; + IEnumerator enumerator = rows.GetEnumerator(); + while (enumerator.MoveNext()) + { + long row = enumerator.Current; + if (row < minRange || row >= maxRange) + { + int bufferIndex = (int)(row / maxCapacity); + readOnlySpan = column.Buffers[bufferIndex].ReadOnlySpan; + minRange = checked(bufferIndex * maxCapacity); + maxRange = checked((bufferIndex + 1) * maxCapacity); + } + row -= minRange; + ret = checked((uint)(readOnlySpan[(int)row] + ret)); + } + } + + public void Round(PrimitiveColumnContainer column) + { + for (int b = 0; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + var mutableSpan = mutableBuffer.Span; + for (int i = 0; i < mutableSpan.Length; i++) + { + mutableSpan[i] = (uint)(Math.Round((decimal)mutableSpan[i])); + } + column.Buffers[b] = mutableBuffer; + } + } + + } + internal class ULongComputation : IPrimitiveColumnComputation + { + public void Abs(PrimitiveColumnContainer column) + { + for (int b = 0; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + var mutableSpan = mutableBuffer.Span; + for (int i = 0; i < mutableSpan.Length; i++) + { + mutableSpan[i] = (ulong)(Math.Abs((decimal)mutableSpan[i])); + } + column.Buffers[b] = mutableBuffer; + } + } + + public void All(PrimitiveColumnContainer column, out bool ret) + { + throw new NotSupportedException(); + } + + public void Any(PrimitiveColumnContainer column, out bool ret) + { + throw new NotSupportedException(); + } + + public void CumulativeMax(PrimitiveColumnContainer column) + { + var ret = column.Buffers[0].ReadOnlySpan[0]; + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + var mutableSpan = mutableBuffer.Span; + var readOnlySpan = buffer.ReadOnlySpan; + for (int i = 0; i < readOnlySpan.Length; i++) + { + ret = (ulong)(Math.Max(readOnlySpan[i], ret)); + mutableSpan[i] = ret; + } + column.Buffers[b] = mutableBuffer; + } + } + + public void CumulativeMax(PrimitiveColumnContainer column, IEnumerable rows) + { + var ret = default(ulong); + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(column.Buffers[0]); + var span = mutableBuffer.Span; + long minRange = 0; + long maxRange = ReadOnlyDataFrameBuffer.MaxCapacity; + long maxCapacity = maxRange; + IEnumerator enumerator = rows.GetEnumerator(); + if (enumerator.MoveNext()) + { + long row = enumerator.Current; + if (row < minRange || row >= maxRange) + { + int bufferIndex = (int)(row / maxCapacity); + mutableBuffer = DataFrameBuffer.GetMutableBuffer(column.Buffers[bufferIndex]); + span = mutableBuffer.Span; + minRange = checked(bufferIndex * maxCapacity); + maxRange = checked((bufferIndex + 1) * maxCapacity); + } + row -= minRange; + ret = span[(int)row]; + } + + while (enumerator.MoveNext()) + { + long row = enumerator.Current; + if (row < minRange || row >= maxRange) + { + int bufferIndex = (int)(row / maxCapacity); + mutableBuffer = DataFrameBuffer.GetMutableBuffer(column.Buffers[bufferIndex]); + span = mutableBuffer.Span; + minRange = checked(bufferIndex * maxCapacity); + maxRange = checked((bufferIndex + 1) * maxCapacity); + } + row -= minRange; + ret = (ulong)Math.Max(span[(int)row], ret); + span[(int)row] = ret; + } + } + + public void CumulativeMin(PrimitiveColumnContainer column) + { + var ret = column.Buffers[0].ReadOnlySpan[0]; + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + var mutableSpan = mutableBuffer.Span; + var readOnlySpan = buffer.ReadOnlySpan; + for (int i = 0; i < readOnlySpan.Length; i++) + { + ret = (ulong)(Math.Min(readOnlySpan[i], ret)); + mutableSpan[i] = ret; + } + column.Buffers[b] = mutableBuffer; + } + } + + public void CumulativeMin(PrimitiveColumnContainer column, IEnumerable rows) + { + var ret = default(ulong); + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(column.Buffers[0]); + var span = mutableBuffer.Span; + long minRange = 0; + long maxRange = ReadOnlyDataFrameBuffer.MaxCapacity; + long maxCapacity = maxRange; + IEnumerator enumerator = rows.GetEnumerator(); + if (enumerator.MoveNext()) + { + long row = enumerator.Current; + if (row < minRange || row >= maxRange) + { + int bufferIndex = (int)(row / maxCapacity); + mutableBuffer = DataFrameBuffer.GetMutableBuffer(column.Buffers[bufferIndex]); + span = mutableBuffer.Span; + minRange = checked(bufferIndex * maxCapacity); + maxRange = checked((bufferIndex + 1) * maxCapacity); + } + row -= minRange; + ret = span[(int)row]; + } + + while (enumerator.MoveNext()) + { + long row = enumerator.Current; + if (row < minRange || row >= maxRange) + { + int bufferIndex = (int)(row / maxCapacity); + mutableBuffer = DataFrameBuffer.GetMutableBuffer(column.Buffers[bufferIndex]); + span = mutableBuffer.Span; + minRange = checked(bufferIndex * maxCapacity); + maxRange = checked((bufferIndex + 1) * maxCapacity); + } + row -= minRange; + ret = (ulong)Math.Min(span[(int)row], ret); + span[(int)row] = ret; + } + } + + public void CumulativeProduct(PrimitiveColumnContainer column) + { + var ret = (ulong)1; + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + var mutableSpan = mutableBuffer.Span; + var readOnlySpan = buffer.ReadOnlySpan; + for (int i = 0; i < readOnlySpan.Length; i++) + { + ret = (ulong)(readOnlySpan[i] * ret); + mutableSpan[i] = ret; + } + column.Buffers[b] = mutableBuffer; + } + } + + public void CumulativeProduct(PrimitiveColumnContainer column, IEnumerable rows) + { + var ret = default(ulong); + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(column.Buffers[0]); + var span = mutableBuffer.Span; + long minRange = 0; + long maxRange = ReadOnlyDataFrameBuffer.MaxCapacity; + long maxCapacity = maxRange; + IEnumerator enumerator = rows.GetEnumerator(); + if (enumerator.MoveNext()) + { + long row = enumerator.Current; + if (row < minRange || row >= maxRange) + { + int bufferIndex = (int)(row / maxCapacity); + mutableBuffer = DataFrameBuffer.GetMutableBuffer(column.Buffers[bufferIndex]); + span = mutableBuffer.Span; + minRange = checked(bufferIndex * maxCapacity); + maxRange = checked((bufferIndex + 1) * maxCapacity); + } + row -= minRange; + ret = span[(int)row]; + } + + while (enumerator.MoveNext()) + { + long row = enumerator.Current; + if (row < minRange || row >= maxRange) + { + int bufferIndex = (int)(row / maxCapacity); + mutableBuffer = DataFrameBuffer.GetMutableBuffer(column.Buffers[bufferIndex]); + span = mutableBuffer.Span; + minRange = checked(bufferIndex * maxCapacity); + maxRange = checked((bufferIndex + 1) * maxCapacity); + } + row -= minRange; + ret = checked((ulong)((span[(int)row]) * ret)); + span[(int)row] = ret; + } + } + + public void CumulativeSum(PrimitiveColumnContainer column) + { + var ret = (ulong)0; + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + var mutableSpan = mutableBuffer.Span; + var readOnlySpan = buffer.ReadOnlySpan; + for (int i = 0; i < readOnlySpan.Length; i++) + { + ret = (ulong)(readOnlySpan[i] + ret); + mutableSpan[i] = ret; + } + column.Buffers[b] = mutableBuffer; + } + } + + public void CumulativeSum(PrimitiveColumnContainer column, IEnumerable rows) + { + var ret = default(ulong); + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(column.Buffers[0]); + var span = mutableBuffer.Span; + long minRange = 0; + long maxRange = ReadOnlyDataFrameBuffer.MaxCapacity; + long maxCapacity = maxRange; + IEnumerator enumerator = rows.GetEnumerator(); + if (enumerator.MoveNext()) + { + long row = enumerator.Current; + if (row < minRange || row >= maxRange) + { + int bufferIndex = (int)(row / maxCapacity); + mutableBuffer = DataFrameBuffer.GetMutableBuffer(column.Buffers[bufferIndex]); + span = mutableBuffer.Span; + minRange = checked(bufferIndex * maxCapacity); + maxRange = checked((bufferIndex + 1) * maxCapacity); + } + row -= minRange; + ret = span[(int)row]; + } + + while (enumerator.MoveNext()) + { + long row = enumerator.Current; + if (row < minRange || row >= maxRange) + { + int bufferIndex = (int)(row / maxCapacity); + mutableBuffer = DataFrameBuffer.GetMutableBuffer(column.Buffers[bufferIndex]); + span = mutableBuffer.Span; + minRange = checked(bufferIndex * maxCapacity); + maxRange = checked((bufferIndex + 1) * maxCapacity); + } + row -= minRange; + ret = checked((ulong)((span[(int)row]) + ret)); + span[(int)row] = ret; + } + } + + public void Max(PrimitiveColumnContainer column, out ulong ret) + { + ret = column.Buffers[0].ReadOnlySpan[0]; + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var readOnlySpan = buffer.ReadOnlySpan; + for (int i = 0; i < readOnlySpan.Length; i++) + { + ret = (ulong)(Math.Max(readOnlySpan[i], ret)); + } + } + } + + public void Max(PrimitiveColumnContainer column, IEnumerable rows, out ulong ret) + { + ret = default; + var readOnlySpan = column.Buffers[0].ReadOnlySpan; + long minRange = 0; + long maxRange = ReadOnlyDataFrameBuffer.MaxCapacity; + long maxCapacity = maxRange; + IEnumerator enumerator = rows.GetEnumerator(); + while (enumerator.MoveNext()) + { + long row = enumerator.Current; + if (row < minRange || row >= maxRange) + { + int bufferIndex = (int)(row / maxCapacity); + readOnlySpan = column.Buffers[bufferIndex].ReadOnlySpan; + minRange = checked(bufferIndex * maxCapacity); + maxRange = checked((bufferIndex + 1) * maxCapacity); + } + row -= minRange; + ret = (ulong)(Math.Max(readOnlySpan[(int)row], ret)); + } + } + + public void Min(PrimitiveColumnContainer column, out ulong ret) + { + ret = column.Buffers[0].ReadOnlySpan[0]; + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var readOnlySpan = buffer.ReadOnlySpan; + for (int i = 0; i < readOnlySpan.Length; i++) + { + ret = (ulong)(Math.Min(readOnlySpan[i], ret)); + } + } + } + + public void Min(PrimitiveColumnContainer column, IEnumerable rows, out ulong ret) + { + ret = default; + var readOnlySpan = column.Buffers[0].ReadOnlySpan; + long minRange = 0; + long maxRange = ReadOnlyDataFrameBuffer.MaxCapacity; + long maxCapacity = maxRange; + IEnumerator enumerator = rows.GetEnumerator(); + while (enumerator.MoveNext()) + { + long row = enumerator.Current; + if (row < minRange || row >= maxRange) + { + int bufferIndex = (int)(row / maxCapacity); + readOnlySpan = column.Buffers[bufferIndex].ReadOnlySpan; + minRange = checked(bufferIndex * maxCapacity); + maxRange = checked((bufferIndex + 1) * maxCapacity); + } + row -= minRange; + ret = (ulong)(Math.Min(readOnlySpan[(int)row], ret)); + } + } + + public void Product(PrimitiveColumnContainer column, out ulong ret) + { + ret = (ulong)1; + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var readOnlySpan = buffer.ReadOnlySpan; + for (int i = 0; i < readOnlySpan.Length; i++) + { + ret = (ulong)(readOnlySpan[i] * ret); + } + } + } + + public void Product(PrimitiveColumnContainer column, IEnumerable rows, out ulong ret) + { + ret = default; + var readOnlySpan = column.Buffers[0].ReadOnlySpan; + long minRange = 0; + long maxRange = ReadOnlyDataFrameBuffer.MaxCapacity; + long maxCapacity = maxRange; + IEnumerator enumerator = rows.GetEnumerator(); + while (enumerator.MoveNext()) + { + long row = enumerator.Current; + if (row < minRange || row >= maxRange) + { + int bufferIndex = (int)(row / maxCapacity); + readOnlySpan = column.Buffers[bufferIndex].ReadOnlySpan; + minRange = checked(bufferIndex * maxCapacity); + maxRange = checked((bufferIndex + 1) * maxCapacity); + } + row -= minRange; + ret = checked((ulong)(readOnlySpan[(int)row] * ret)); + } + } + + public void Sum(PrimitiveColumnContainer column, out ulong ret) + { + ret = (ulong)0; + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var readOnlySpan = buffer.ReadOnlySpan; + for (int i = 0; i < readOnlySpan.Length; i++) + { + ret = (ulong)(readOnlySpan[i] + ret); + } + } + } + + public void Sum(PrimitiveColumnContainer column, IEnumerable rows, out ulong ret) + { + ret = default; + var readOnlySpan = column.Buffers[0].ReadOnlySpan; + long minRange = 0; + long maxRange = ReadOnlyDataFrameBuffer.MaxCapacity; + long maxCapacity = maxRange; + IEnumerator enumerator = rows.GetEnumerator(); + while (enumerator.MoveNext()) + { + long row = enumerator.Current; + if (row < minRange || row >= maxRange) + { + int bufferIndex = (int)(row / maxCapacity); + readOnlySpan = column.Buffers[bufferIndex].ReadOnlySpan; + minRange = checked(bufferIndex * maxCapacity); + maxRange = checked((bufferIndex + 1) * maxCapacity); + } + row -= minRange; + ret = checked((ulong)(readOnlySpan[(int)row] + ret)); + } + } + + public void Round(PrimitiveColumnContainer column) + { + for (int b = 0; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + var mutableSpan = mutableBuffer.Span; + for (int i = 0; i < mutableSpan.Length; i++) + { + mutableSpan[i] = (ulong)(Math.Round((decimal)mutableSpan[i])); + } + column.Buffers[b] = mutableBuffer; + } + } + + } + internal class UShortComputation : IPrimitiveColumnComputation + { + public void Abs(PrimitiveColumnContainer column) + { + for (int b = 0; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + var mutableSpan = mutableBuffer.Span; + for (int i = 0; i < mutableSpan.Length; i++) + { + mutableSpan[i] = (ushort)(Math.Abs((decimal)mutableSpan[i])); + } + column.Buffers[b] = mutableBuffer; + } + } + + public void All(PrimitiveColumnContainer column, out bool ret) + { + throw new NotSupportedException(); + } + + public void Any(PrimitiveColumnContainer column, out bool ret) + { + throw new NotSupportedException(); + } + + public void CumulativeMax(PrimitiveColumnContainer column) + { + var ret = column.Buffers[0].ReadOnlySpan[0]; + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + var mutableSpan = mutableBuffer.Span; + var readOnlySpan = buffer.ReadOnlySpan; + for (int i = 0; i < readOnlySpan.Length; i++) + { + ret = (ushort)(Math.Max(readOnlySpan[i], ret)); + mutableSpan[i] = ret; + } + column.Buffers[b] = mutableBuffer; + } + } + + public void CumulativeMax(PrimitiveColumnContainer column, IEnumerable rows) + { + var ret = default(ushort); + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(column.Buffers[0]); + var span = mutableBuffer.Span; + long minRange = 0; + long maxRange = ReadOnlyDataFrameBuffer.MaxCapacity; + long maxCapacity = maxRange; + IEnumerator enumerator = rows.GetEnumerator(); + if (enumerator.MoveNext()) + { + long row = enumerator.Current; + if (row < minRange || row >= maxRange) + { + int bufferIndex = (int)(row / maxCapacity); + mutableBuffer = DataFrameBuffer.GetMutableBuffer(column.Buffers[bufferIndex]); + span = mutableBuffer.Span; + minRange = checked(bufferIndex * maxCapacity); + maxRange = checked((bufferIndex + 1) * maxCapacity); + } + row -= minRange; + ret = span[(int)row]; + } + + while (enumerator.MoveNext()) + { + long row = enumerator.Current; + if (row < minRange || row >= maxRange) + { + int bufferIndex = (int)(row / maxCapacity); + mutableBuffer = DataFrameBuffer.GetMutableBuffer(column.Buffers[bufferIndex]); + span = mutableBuffer.Span; + minRange = checked(bufferIndex * maxCapacity); + maxRange = checked((bufferIndex + 1) * maxCapacity); + } + row -= minRange; + ret = (ushort)Math.Max(span[(int)row], ret); + span[(int)row] = ret; + } + } + + public void CumulativeMin(PrimitiveColumnContainer column) + { + var ret = column.Buffers[0].ReadOnlySpan[0]; + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + var mutableSpan = mutableBuffer.Span; + var readOnlySpan = buffer.ReadOnlySpan; + for (int i = 0; i < readOnlySpan.Length; i++) + { + ret = (ushort)(Math.Min(readOnlySpan[i], ret)); + mutableSpan[i] = ret; + } + column.Buffers[b] = mutableBuffer; + } + } + + public void CumulativeMin(PrimitiveColumnContainer column, IEnumerable rows) + { + var ret = default(ushort); + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(column.Buffers[0]); + var span = mutableBuffer.Span; + long minRange = 0; + long maxRange = ReadOnlyDataFrameBuffer.MaxCapacity; + long maxCapacity = maxRange; + IEnumerator enumerator = rows.GetEnumerator(); + if (enumerator.MoveNext()) + { + long row = enumerator.Current; + if (row < minRange || row >= maxRange) + { + int bufferIndex = (int)(row / maxCapacity); + mutableBuffer = DataFrameBuffer.GetMutableBuffer(column.Buffers[bufferIndex]); + span = mutableBuffer.Span; + minRange = checked(bufferIndex * maxCapacity); + maxRange = checked((bufferIndex + 1) * maxCapacity); + } + row -= minRange; + ret = span[(int)row]; + } + + while (enumerator.MoveNext()) + { + long row = enumerator.Current; + if (row < minRange || row >= maxRange) + { + int bufferIndex = (int)(row / maxCapacity); + mutableBuffer = DataFrameBuffer.GetMutableBuffer(column.Buffers[bufferIndex]); + span = mutableBuffer.Span; + minRange = checked(bufferIndex * maxCapacity); + maxRange = checked((bufferIndex + 1) * maxCapacity); + } + row -= minRange; + ret = (ushort)Math.Min(span[(int)row], ret); + span[(int)row] = ret; + } + } + + public void CumulativeProduct(PrimitiveColumnContainer column) + { + var ret = (ushort)1; + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + var mutableSpan = mutableBuffer.Span; + var readOnlySpan = buffer.ReadOnlySpan; + for (int i = 0; i < readOnlySpan.Length; i++) + { + ret = (ushort)(readOnlySpan[i] * ret); + mutableSpan[i] = ret; + } + column.Buffers[b] = mutableBuffer; + } + } + + public void CumulativeProduct(PrimitiveColumnContainer column, IEnumerable rows) + { + var ret = default(ushort); + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(column.Buffers[0]); + var span = mutableBuffer.Span; + long minRange = 0; + long maxRange = ReadOnlyDataFrameBuffer.MaxCapacity; + long maxCapacity = maxRange; + IEnumerator enumerator = rows.GetEnumerator(); + if (enumerator.MoveNext()) + { + long row = enumerator.Current; + if (row < minRange || row >= maxRange) + { + int bufferIndex = (int)(row / maxCapacity); + mutableBuffer = DataFrameBuffer.GetMutableBuffer(column.Buffers[bufferIndex]); + span = mutableBuffer.Span; + minRange = checked(bufferIndex * maxCapacity); + maxRange = checked((bufferIndex + 1) * maxCapacity); + } + row -= minRange; + ret = span[(int)row]; + } + + while (enumerator.MoveNext()) + { + long row = enumerator.Current; + if (row < minRange || row >= maxRange) + { + int bufferIndex = (int)(row / maxCapacity); + mutableBuffer = DataFrameBuffer.GetMutableBuffer(column.Buffers[bufferIndex]); + span = mutableBuffer.Span; + minRange = checked(bufferIndex * maxCapacity); + maxRange = checked((bufferIndex + 1) * maxCapacity); + } + row -= minRange; + ret = checked((ushort)((span[(int)row]) * ret)); + span[(int)row] = ret; + } + } + + public void CumulativeSum(PrimitiveColumnContainer column) + { + var ret = (ushort)0; + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + var mutableSpan = mutableBuffer.Span; + var readOnlySpan = buffer.ReadOnlySpan; + for (int i = 0; i < readOnlySpan.Length; i++) + { + ret = (ushort)(readOnlySpan[i] + ret); + mutableSpan[i] = ret; + } + column.Buffers[b] = mutableBuffer; + } + } + + public void CumulativeSum(PrimitiveColumnContainer column, IEnumerable rows) + { + var ret = default(ushort); + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(column.Buffers[0]); + var span = mutableBuffer.Span; + long minRange = 0; + long maxRange = ReadOnlyDataFrameBuffer.MaxCapacity; + long maxCapacity = maxRange; + IEnumerator enumerator = rows.GetEnumerator(); + if (enumerator.MoveNext()) + { + long row = enumerator.Current; + if (row < minRange || row >= maxRange) + { + int bufferIndex = (int)(row / maxCapacity); + mutableBuffer = DataFrameBuffer.GetMutableBuffer(column.Buffers[bufferIndex]); + span = mutableBuffer.Span; + minRange = checked(bufferIndex * maxCapacity); + maxRange = checked((bufferIndex + 1) * maxCapacity); + } + row -= minRange; + ret = span[(int)row]; + } + + while (enumerator.MoveNext()) + { + long row = enumerator.Current; + if (row < minRange || row >= maxRange) + { + int bufferIndex = (int)(row / maxCapacity); + mutableBuffer = DataFrameBuffer.GetMutableBuffer(column.Buffers[bufferIndex]); + span = mutableBuffer.Span; + minRange = checked(bufferIndex * maxCapacity); + maxRange = checked((bufferIndex + 1) * maxCapacity); + } + row -= minRange; + ret = checked((ushort)((span[(int)row]) + ret)); + span[(int)row] = ret; + } + } + + public void Max(PrimitiveColumnContainer column, out ushort ret) + { + ret = column.Buffers[0].ReadOnlySpan[0]; + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var readOnlySpan = buffer.ReadOnlySpan; + for (int i = 0; i < readOnlySpan.Length; i++) + { + ret = (ushort)(Math.Max(readOnlySpan[i], ret)); + } + } + } + + public void Max(PrimitiveColumnContainer column, IEnumerable rows, out ushort ret) + { + ret = default; + var readOnlySpan = column.Buffers[0].ReadOnlySpan; + long minRange = 0; + long maxRange = ReadOnlyDataFrameBuffer.MaxCapacity; + long maxCapacity = maxRange; + IEnumerator enumerator = rows.GetEnumerator(); + while (enumerator.MoveNext()) + { + long row = enumerator.Current; + if (row < minRange || row >= maxRange) + { + int bufferIndex = (int)(row / maxCapacity); + readOnlySpan = column.Buffers[bufferIndex].ReadOnlySpan; + minRange = checked(bufferIndex * maxCapacity); + maxRange = checked((bufferIndex + 1) * maxCapacity); + } + row -= minRange; + ret = (ushort)(Math.Max(readOnlySpan[(int)row], ret)); + } + } + + public void Min(PrimitiveColumnContainer column, out ushort ret) + { + ret = column.Buffers[0].ReadOnlySpan[0]; + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var readOnlySpan = buffer.ReadOnlySpan; + for (int i = 0; i < readOnlySpan.Length; i++) + { + ret = (ushort)(Math.Min(readOnlySpan[i], ret)); + } + } + } + + public void Min(PrimitiveColumnContainer column, IEnumerable rows, out ushort ret) + { + ret = default; + var readOnlySpan = column.Buffers[0].ReadOnlySpan; + long minRange = 0; + long maxRange = ReadOnlyDataFrameBuffer.MaxCapacity; + long maxCapacity = maxRange; + IEnumerator enumerator = rows.GetEnumerator(); + while (enumerator.MoveNext()) + { + long row = enumerator.Current; + if (row < minRange || row >= maxRange) + { + int bufferIndex = (int)(row / maxCapacity); + readOnlySpan = column.Buffers[bufferIndex].ReadOnlySpan; + minRange = checked(bufferIndex * maxCapacity); + maxRange = checked((bufferIndex + 1) * maxCapacity); + } + row -= minRange; + ret = (ushort)(Math.Min(readOnlySpan[(int)row], ret)); + } + } + + public void Product(PrimitiveColumnContainer column, out ushort ret) + { + ret = (ushort)1; + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var readOnlySpan = buffer.ReadOnlySpan; + for (int i = 0; i < readOnlySpan.Length; i++) + { + ret = (ushort)(readOnlySpan[i] * ret); + } + } + } + + public void Product(PrimitiveColumnContainer column, IEnumerable rows, out ushort ret) + { + ret = default; + var readOnlySpan = column.Buffers[0].ReadOnlySpan; + long minRange = 0; + long maxRange = ReadOnlyDataFrameBuffer.MaxCapacity; + long maxCapacity = maxRange; + IEnumerator enumerator = rows.GetEnumerator(); + while (enumerator.MoveNext()) + { + long row = enumerator.Current; + if (row < minRange || row >= maxRange) + { + int bufferIndex = (int)(row / maxCapacity); + readOnlySpan = column.Buffers[bufferIndex].ReadOnlySpan; + minRange = checked(bufferIndex * maxCapacity); + maxRange = checked((bufferIndex + 1) * maxCapacity); + } + row -= minRange; + ret = checked((ushort)(readOnlySpan[(int)row] * ret)); + } + } + + public void Sum(PrimitiveColumnContainer column, out ushort ret) + { + ret = (ushort)0; + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var readOnlySpan = buffer.ReadOnlySpan; + for (int i = 0; i < readOnlySpan.Length; i++) + { + ret = (ushort)(readOnlySpan[i] + ret); + } + } + } + + public void Sum(PrimitiveColumnContainer column, IEnumerable rows, out ushort ret) + { + ret = default; + var readOnlySpan = column.Buffers[0].ReadOnlySpan; + long minRange = 0; + long maxRange = ReadOnlyDataFrameBuffer.MaxCapacity; + long maxCapacity = maxRange; + IEnumerator enumerator = rows.GetEnumerator(); + while (enumerator.MoveNext()) + { + long row = enumerator.Current; + if (row < minRange || row >= maxRange) + { + int bufferIndex = (int)(row / maxCapacity); + readOnlySpan = column.Buffers[bufferIndex].ReadOnlySpan; + minRange = checked(bufferIndex * maxCapacity); + maxRange = checked((bufferIndex + 1) * maxCapacity); + } + row -= minRange; + ret = checked((ushort)(readOnlySpan[(int)row] + ret)); + } + } + + public void Round(PrimitiveColumnContainer column) + { + for (int b = 0; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); + var mutableSpan = mutableBuffer.Span; + for (int i = 0; i < mutableSpan.Length; i++) + { + mutableSpan[i] = (ushort)(Math.Round((decimal)mutableSpan[i])); + } + column.Buffers[b] = mutableBuffer; + } + } + + } +} diff --git a/src/Microsoft.Data.Analysis/PrimitiveDataFrameColumnComputations.tt b/src/Microsoft.Data.Analysis/PrimitiveDataFrameColumnComputations.tt new file mode 100644 index 0000000000..a2f82a8c2f --- /dev/null +++ b/src/Microsoft.Data.Analysis/PrimitiveDataFrameColumnComputations.tt @@ -0,0 +1,268 @@ +<#@ template debug="false" hostspecific="false" language="C#" #> +<#@ assembly name="System" #> +<#@ assembly name="System.Core" #> +<#@ import namespace="System.Linq" #> +<#@ import namespace="System.Text" #> +<#@ import namespace="System.Collections.Generic" #> +<#@ output extension=".cs" #> +<#@ include file="ColumnArithmeticTemplate.ttinclude" #> + +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +// Generated from PrimitiveColumnComputations.tt. Do not modify directly + +using System; +using System.Collections.Generic; + +namespace Microsoft.Data.Analysis +{ + internal interface IPrimitiveColumnComputation + where T : struct + { +<# foreach (MethodConfiguration compMethod in computationMethodConfiguration) { #> +<# if (compMethod.MethodType == MethodType.ElementwiseComputation && compMethod.HasReturnValue == false && compMethod.SupportsRowSubsets == true) {#> + void <#=compMethod.MethodName#>(PrimitiveColumnContainer column, IEnumerable rows); +<# } else if (compMethod.MethodType == MethodType.ElementwiseComputation && compMethod.HasReturnValue == false) {#> + void <#=compMethod.MethodName#>(PrimitiveColumnContainer column); +<# } else if (compMethod.MethodType == MethodType.ElementwiseComputation && compMethod.HasReturnValue == true) {#> + void <#=compMethod.MethodName#>(PrimitiveColumnContainer column, out T ret); +<# } else if (compMethod.MethodType == MethodType.Reduction && compMethod.IsNumeric == true && compMethod.SupportsRowSubsets == true) { #> + void <#=compMethod.MethodName#>(PrimitiveColumnContainer column, IEnumerable rows, out T ret); +<# } else if (compMethod.MethodType == MethodType.Reduction && compMethod.IsNumeric == true) { #> + void <#=compMethod.MethodName#>(PrimitiveColumnContainer column, out T ret); +<# } else { #> + void <#=compMethod.MethodName#>(PrimitiveColumnContainer column, out bool ret); +<# } #> +<# } #> + } + + internal static class PrimitiveColumnComputation + where T : struct + { + public static IPrimitiveColumnComputation Instance { get; } = PrimitiveColumnComputation.GetComputation(); + } + + internal static class PrimitiveColumnComputation + { + public static IPrimitiveColumnComputation GetComputation() + where T : struct + { +<# foreach (TypeConfiguration type in typeConfiguration) { #> + <#=GenerateIfStatementHeader(type)#> + { + return (IPrimitiveColumnComputation)new <#=type.ClassPrefix#>Computation(); + } +<# } #> + throw new NotSupportedException(); + } + } + +<# foreach (TypeConfiguration type in typeConfiguration) { #> + internal class <#=type.ClassPrefix#>Computation : IPrimitiveColumnComputation<<#=type.TypeName#>> + { +<# foreach (MethodConfiguration method in computationMethodConfiguration) { #> +<# if (method.MethodType == MethodType.ElementwiseComputation && method.HasReturnValue == false && method.SupportsRowSubsets == true) {#> + public void <#=method.MethodName#>(PrimitiveColumnContainer<<#=type.TypeName#>> column, IEnumerable rows) +<# } else if (method.MethodType == MethodType.ElementwiseComputation && method.HasReturnValue == false) {#> + public void <#=method.MethodName#>(PrimitiveColumnContainer<<#=type.TypeName#>> column) +<# } else if (method.MethodType == MethodType.ElementwiseComputation && method.HasReturnValue == true) {#> + public void <#=method.MethodName#>(PrimitiveColumnContainer<<#=type.TypeName#>> column, out <#=type.TypeName#> ret) +<# } else if (method.MethodType == MethodType.Reduction && method.IsNumeric == true && method.SupportsRowSubsets == true) { #> + public void <#=method.MethodName#>(PrimitiveColumnContainer<<#=type.TypeName#>> column, IEnumerable rows, out <#=type.TypeName#> ret) +<# } else if (method.MethodType == MethodType.Reduction && method.IsNumeric == true) { #> + public void <#=method.MethodName#>(PrimitiveColumnContainer<<#=type.TypeName#>> column, out <#=type.TypeName#> ret) +<# } else { #> + public void <#=method.MethodName#>(PrimitiveColumnContainer<<#=type.TypeName#>> column, out bool ret) +<# } #> + { +<# if ((method.IsNumeric && !type.SupportsNumeric) || (method.IsBitwise && !type.SupportsBitwise) || (type.UnsupportedMethods.Contains(method.MethodName))) { #> + throw new NotSupportedException(); +<# } else { #> +<# if ((method.MethodName == "Max" || method.MethodName == "Min" || method.MethodName == "Product" || method.MethodName == "Sum") && method.SupportsRowSubsets == true) { #> + ret = default; + var readOnlySpan = column.Buffers[0].ReadOnlySpan; + long minRange = 0; + long maxRange = ReadOnlyDataFrameBuffer<<#=type.TypeName#>>.MaxCapacity; + long maxCapacity = maxRange; + IEnumerator enumerator = rows.GetEnumerator(); + while (enumerator.MoveNext()) + { + long row = enumerator.Current; + if (row < minRange || row >= maxRange) + { + int bufferIndex = (int)(row / maxCapacity); + readOnlySpan = column.Buffers[bufferIndex].ReadOnlySpan; + minRange = checked(bufferIndex * maxCapacity); + maxRange = checked((bufferIndex + 1) * maxCapacity); + } + row -= minRange; +<# if (method.MethodName == "Max") { #> + ret = (<#=type.TypeName#>)(Math.Max(readOnlySpan[(int)row], ret)); +<# } #> +<# if (method.MethodName == "Min") { #> + ret = (<#=type.TypeName#>)(Math.Min(readOnlySpan[(int)row], ret)); +<# } #> +<# if (method.MethodName == "Product") { #> + ret = checked((<#=type.TypeName#>)(readOnlySpan[(int)row] * ret)); +<# } #> +<# if (method.MethodName == "Sum") { #> + ret = checked((<#=type.TypeName#>)(readOnlySpan[(int)row] + ret)); +<# } #> + } +<# } else if ((method.MethodName == "CumulativeMax" || method.MethodName == "CumulativeMin" || method.MethodName == "CumulativeProduct" || method.MethodName == "CumulativeSum") && method.SupportsRowSubsets == true) { #> + var ret = default(<#=type.TypeName#>); + var mutableBuffer = DataFrameBuffer<<#=type.TypeName#>>.GetMutableBuffer(column.Buffers[0]); + var span = mutableBuffer.Span; + long minRange = 0; + long maxRange = ReadOnlyDataFrameBuffer<<#=type.TypeName#>>.MaxCapacity; + long maxCapacity = maxRange; + IEnumerator enumerator = rows.GetEnumerator(); + if (enumerator.MoveNext()) + { + long row = enumerator.Current; + if (row < minRange || row >= maxRange) + { + int bufferIndex = (int)(row / maxCapacity); + mutableBuffer = DataFrameBuffer<<#=type.TypeName#>>.GetMutableBuffer(column.Buffers[bufferIndex]); + span = mutableBuffer.Span; + minRange = checked(bufferIndex * maxCapacity); + maxRange = checked((bufferIndex + 1) * maxCapacity); + } + row -= minRange; + ret = span[(int)row]; + } + + while (enumerator.MoveNext()) + { + long row = enumerator.Current; + if (row < minRange || row >= maxRange) + { + int bufferIndex = (int)(row / maxCapacity); + mutableBuffer = DataFrameBuffer<<#=type.TypeName#>>.GetMutableBuffer(column.Buffers[bufferIndex]); + span = mutableBuffer.Span; + minRange = checked(bufferIndex * maxCapacity); + maxRange = checked((bufferIndex + 1) * maxCapacity); + } + row -= minRange; +<# if (method.MethodName == "CumulativeMax") { #> + ret = (<#=type.TypeName#>)Math.Max(span[(int)row], ret); + span[(int)row] = ret; +<# } else if (method.MethodName == "CumulativeMin") { #> + ret = (<#=type.TypeName#>)Math.Min(span[(int)row], ret); + span[(int)row] = ret; +<# } else if (method.MethodName == "CumulativeProduct") { #> + ret = checked((<#=type.TypeName#>)((span[(int)row]) * ret)); + span[(int)row] = ret; +<# } else if (method.MethodName =="CumulativeSum") { #> + ret = checked((<#=type.TypeName#>)((span[(int)row]) + ret)); + span[(int)row] = ret; +<# } #> + } +<# } else if (method.MethodName == "CumulativeMax" || method.MethodName == "CumulativeMin" || method.MethodName == "CumulativeProduct" || method.MethodName == "CumulativeSum" || method.MethodName == "Max" || method.MethodName == "Min" || method.MethodName == "Product" || method.MethodName == "Sum") { #> +<# if (method.MethodName == "CumulativeMax" || method.MethodName == "CumulativeMin") { #> + var ret = column.Buffers[0].ReadOnlySpan[0]; +<# } else if ((method.MethodName == "Max" || method.MethodName == "Min") && method.SupportsRowSubsets == false) { #> + ret = column.Buffers[0].ReadOnlySpan[0]; +<# } else if (method.MethodName == "CumulativeProduct") { #> + var ret = (<#=type.TypeName#>)1; +<# } else if (method.MethodName =="Product" && method.SupportsRowSubsets == false) { #> + ret = (<#=type.TypeName#>)1; +<# } else if (method.MethodName =="CumulativeSum") { #> + var ret = (<#=type.TypeName#>)0; +<# } else if (method.SupportsRowSubsets == false) { #> + ret = (<#=type.TypeName#>)0; +<# } #> + for (int b = 0 ; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; +<# if (method.MethodName == "CumulativeMax" || method.MethodName == "CumulativeMin" || method.MethodName == "CumulativeProduct" || method.MethodName == "CumulativeSum") { #> + var mutableBuffer = DataFrameBuffer<<#=type.TypeName#>>.GetMutableBuffer(buffer); + var mutableSpan = mutableBuffer.Span; +<# } #> + var readOnlySpan = buffer.ReadOnlySpan; + for (int i = 0; i < readOnlySpan.Length; i++) + { +<# if (method.MethodName == "CumulativeMax") { #> + ret = (<#=type.TypeName#>)(Math.Max(readOnlySpan[i], ret)); + mutableSpan[i] = ret; +<# } #> +<# if (method.MethodName == "CumulativeMin") { #> + ret = (<#=type.TypeName#>)(Math.Min(readOnlySpan[i], ret)); + mutableSpan[i] = ret; +<# } #> +<# if (method.MethodName == "CumulativeProduct") { #> + ret = (<#=type.TypeName#>)(readOnlySpan[i] * ret); + mutableSpan[i] = ret; +<# } #> +<# if (method.MethodName == "CumulativeSum") { #> + ret = (<#=type.TypeName#>)(readOnlySpan[i] + ret); + mutableSpan[i] = ret; +<# } #> +<# if (method.MethodName == "Max") { #> + ret = (<#=type.TypeName#>)(Math.Max(readOnlySpan[i], ret)); +<# } #> +<# if (method.MethodName == "Min") { #> + ret = (<#=type.TypeName#>)(Math.Min(readOnlySpan[i], ret)); +<# } #> +<# if (method.MethodName == "Product") { #> + ret = (<#=type.TypeName#>)(readOnlySpan[i] * ret); +<# } #> +<# if (method.MethodName == "Sum") { #> + ret = (<#=type.TypeName#>)(readOnlySpan[i] + ret); +<# } #> + } +<# if (method.MethodName == "CumulativeMax" || method.MethodName == "CumulativeMin" || method.MethodName == "CumulativeProduct" || method.MethodName == "CumulativeSum") { #> + column.Buffers[b] = mutableBuffer; +<# } #> + } +<# } else if (method.MethodType == MethodType.ElementwiseComputation && method.Operator != null) { #> + for (int b = 0; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var mutableBuffer = DataFrameBuffer<<#=type.TypeName#>>.GetMutableBuffer(buffer); + var mutableSpan = mutableBuffer.Span; + for (int i = 0; i < mutableSpan.Length; i++) + { + mutableSpan[i] = (<#=type.TypeName#>)(<#=method.Operator#>((decimal)mutableSpan[i])); + } + column.Buffers[b] = mutableBuffer; + } +<# } else if (method.MethodType == MethodType.Reduction) { #> +<# if (method.MethodName == "All") { #> + ret = true; +<# } else if (method.MethodName == "Any") { #> + ret = false; +<# } #> + for (int b = 0; b < column.Buffers.Count; b++) + { + var buffer = column.Buffers[b]; + var span = buffer.ReadOnlySpan; + for (int i = 0; i < span.Length; i++) + { +<# if (method.MethodName == "All") { #> + if (span[i] == false) + { + ret = false; + return; + } +<# } else if (method.MethodName == "Any") { #> + if (span[i] == true) + { + ret = true; + return; + } +<# } #> + } + } +<# } else { #> + throw new NotImplementedException(); +<# } #> +<# } #> + } + +<# } #> + } +<# } #> +} diff --git a/src/Microsoft.Data.Analysis/ReadOnlyDataFrameBuffer.cs b/src/Microsoft.Data.Analysis/ReadOnlyDataFrameBuffer.cs new file mode 100644 index 0000000000..59394eed8e --- /dev/null +++ b/src/Microsoft.Data.Analysis/ReadOnlyDataFrameBuffer.cs @@ -0,0 +1,88 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System; +using System.Collections.Generic; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using System.Text; + +namespace Microsoft.Data.Analysis +{ + /// + /// A basic immutable store to hold values in a DataFrame column. Supports wrapping with an ArrowBuffer + /// + /// + internal class ReadOnlyDataFrameBuffer + where T : struct + { + private readonly ReadOnlyMemory _readOnlyBuffer; + + public virtual ReadOnlyMemory ReadOnlyBuffer => _readOnlyBuffer; + + public ReadOnlyMemory ReadOnlyMemory => RawReadOnlyMemory.Slice(0, Length); + + public ReadOnlyMemory RawReadOnlyMemory + { + get + { + ReadOnlyMemory memory = ReadOnlyBuffer; + return Unsafe.As, ReadOnlyMemory>(ref memory); + } + } + + protected static int Size = Unsafe.SizeOf(); + + protected int Capacity => ReadOnlyBuffer.Length / Size; + + + public static int MaxCapacity => Int32.MaxValue / Size; + + public ReadOnlySpan ReadOnlySpan + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get => (MemoryMarshal.Cast(ReadOnlyBuffer.Span)).Slice(0, Length); + } + + public int Length { get; internal set; } + + public ReadOnlyDataFrameBuffer(int numberOfValues = 8) + { + if ((long)numberOfValues * Size > MaxCapacity) + { + throw new ArgumentException($"{numberOfValues} exceeds buffer capacity", nameof(numberOfValues)); + } + _readOnlyBuffer = new byte[numberOfValues * Size]; + } + + public ReadOnlyDataFrameBuffer(ReadOnlyMemory buffer, int length) + { + _readOnlyBuffer = buffer; + Length = length; + } + + internal virtual T this[int index] + { + get + { + if (index > Length) + throw new ArgumentOutOfRangeException(nameof(index)); + return ReadOnlySpan[index]; + } + set => throw new NotSupportedException(); + } + + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + ReadOnlySpan span = ReadOnlySpan; + for (int i = 0; i < Length; i++) + { + sb.Append(span[i]).Append(" "); + } + return sb.ToString(); + } + + } +} diff --git a/src/Microsoft.Data.Analysis/SByteDataFrameColumn.cs b/src/Microsoft.Data.Analysis/SByteDataFrameColumn.cs new file mode 100644 index 0000000000..731614da72 --- /dev/null +++ b/src/Microsoft.Data.Analysis/SByteDataFrameColumn.cs @@ -0,0 +1,23 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System; +using System.Collections.Generic; +using System.Text; + +namespace Microsoft.Data.Analysis +{ + public partial class SByteDataFrameColumn : PrimitiveDataFrameColumn + { + public SByteDataFrameColumn(string name, IEnumerable values) : base(name, values) { } + + public SByteDataFrameColumn(string name, IEnumerable values) : base(name, values) { } + + public SByteDataFrameColumn(string name, long length = 0) : base(name, length) { } + + public SByteDataFrameColumn(string name, ReadOnlyMemory buffer, ReadOnlyMemory nullBitMap, int length = 0, int nullCount = 0) : base(name, buffer, nullBitMap, length, nullCount) { } + + internal SByteDataFrameColumn(string name, PrimitiveColumnContainer values) : base(name, values) { } + } +} diff --git a/src/Microsoft.Data.Analysis/SingleDataFrameColumn.cs b/src/Microsoft.Data.Analysis/SingleDataFrameColumn.cs new file mode 100644 index 0000000000..e6be6255d0 --- /dev/null +++ b/src/Microsoft.Data.Analysis/SingleDataFrameColumn.cs @@ -0,0 +1,23 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System; +using System.Collections.Generic; +using System.Text; + +namespace Microsoft.Data.Analysis +{ + public partial class SingleDataFrameColumn : PrimitiveDataFrameColumn + { + public SingleDataFrameColumn(string name, IEnumerable values) : base(name, values) { } + + public SingleDataFrameColumn(string name, IEnumerable values) : base(name, values) { } + + public SingleDataFrameColumn(string name, long length = 0) : base(name, length) { } + + public SingleDataFrameColumn(string name, ReadOnlyMemory buffer, ReadOnlyMemory nullBitMap, int length = 0, int nullCount = 0) : base(name, buffer, nullBitMap, length, nullCount) { } + + internal SingleDataFrameColumn(string name, PrimitiveColumnContainer values) : base(name, values) { } + } +} diff --git a/src/Microsoft.Data.Analysis/StringDataFrameColumn.BinaryOperations.cs b/src/Microsoft.Data.Analysis/StringDataFrameColumn.BinaryOperations.cs new file mode 100644 index 0000000000..f4faa20ad0 --- /dev/null +++ b/src/Microsoft.Data.Analysis/StringDataFrameColumn.BinaryOperations.cs @@ -0,0 +1,157 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Linq; +using System.Text; + +namespace Microsoft.Data.Analysis +{ + public partial class StringDataFrameColumn : DataFrameColumn + { + /// + public override DataFrameColumn Add(DataFrameColumn column, bool inPlace = false) + { + if (Length != column.Length) + { + throw new ArgumentException(Strings.MismatchedColumnLengths, nameof(column)); + } + StringDataFrameColumn ret = inPlace ? this : Clone(); + for (long i = 0; i < Length; i++) + { + ret[i] += column[i].ToString(); + } + return ret; + } + + public static StringDataFrameColumn operator+(StringDataFrameColumn column, string value) + { + return column.Add(value); + } + + public static StringDataFrameColumn operator+(string value, StringDataFrameColumn column) + { + return Add(value, column); + } + + public static StringDataFrameColumn Add(string value, StringDataFrameColumn right) + { + StringDataFrameColumn ret = right.Clone(); + for (int i = 0; i < ret._stringBuffers.Count; i++) + { + IList buffer = ret._stringBuffers[i]; + int bufferLen = buffer.Count; + for (int j = 0; j < bufferLen; j++) + { + buffer[j] = value + buffer[j]; + } + } + return ret; + } + + public StringDataFrameColumn Add(string value, bool inPlace = false) + { + StringDataFrameColumn ret = inPlace ? this : Clone(); + for (int i = 0; i < ret._stringBuffers.Count; i++) + { + IList buffer = ret._stringBuffers[i]; + int bufferLen = buffer.Count; + for (int j = 0; j < bufferLen; j++) + { + buffer[j] += value; + } + } + return ret; + } + + /// + public override DataFrameColumn Add(T value, bool inPlace = false) + { + return Add(value.ToString(), inPlace); + } + + internal static PrimitiveDataFrameColumn ElementwiseEqualsImplementation(DataFrameColumn left, DataFrameColumn right) + { + if (left.Length != right.Length) + { + throw new ArgumentException(Strings.MismatchedColumnLengths, nameof(right)); + } + PrimitiveDataFrameColumn ret = new PrimitiveDataFrameColumn(left.Name, left.Length); + for (long i = 0; i < left.Length; i++) + { + ret[i] = (string)left[i] == right[i]?.ToString(); + } + return ret; + + } + + /// + public override PrimitiveDataFrameColumn ElementwiseEquals(DataFrameColumn column) + { + return ElementwiseEqualsImplementation(this, column); + } + + public PrimitiveDataFrameColumn ElementwiseEquals(string value) + { + PrimitiveDataFrameColumn ret = new PrimitiveDataFrameColumn(Name, Length); + for (long i = 0; i < Length; i++) + { + ret[i] = this[i] == value; + } + return ret; + } + + /// + public override PrimitiveDataFrameColumn ElementwiseEquals(T value) + { + if (value is DataFrameColumn column) + { + return ElementwiseEquals(column); + } + return ElementwiseEquals(value.ToString()); + } + + internal static PrimitiveDataFrameColumn ElementwiseNotEqualsImplementation(DataFrameColumn left, DataFrameColumn column) + { + if (left.Length != column.Length) + { + throw new ArgumentException(Strings.MismatchedColumnLengths, nameof(column)); + } + PrimitiveDataFrameColumn ret = new PrimitiveDataFrameColumn(left.Name, left.Length); + for (long i = 0; i < left.Length; i++) + { + ret[i] = (string)left[i] != column[i].ToString(); + } + return ret; + } + + public PrimitiveDataFrameColumn ElementwiseNotEquals(string value) + { + PrimitiveDataFrameColumn ret = new PrimitiveDataFrameColumn(Name, Length); + for (long i = 0; i < Length; i++) + { + ret[i] = this[i] != value; + } + return ret; + } + + /// + public override PrimitiveDataFrameColumn ElementwiseNotEquals(DataFrameColumn column) + { + return ElementwiseNotEqualsImplementation(this, column); + } + + /// + public override PrimitiveDataFrameColumn ElementwiseNotEquals(T value) + { + if (value is DataFrameColumn column) + { + return ElementwiseNotEquals(column); + } + return ElementwiseNotEquals(value.ToString()); + } + } +} diff --git a/src/Microsoft.Data.Analysis/StringDataFrameColumn.cs b/src/Microsoft.Data.Analysis/StringDataFrameColumn.cs new file mode 100644 index 0000000000..7ada30e10c --- /dev/null +++ b/src/Microsoft.Data.Analysis/StringDataFrameColumn.cs @@ -0,0 +1,498 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Diagnostics; +using Microsoft.ML; +using Microsoft.ML.Data; + +namespace Microsoft.Data.Analysis +{ + /// + /// A mutable column to hold strings + /// + /// Is NOT Arrow compatible + public partial class StringDataFrameColumn : DataFrameColumn, IEnumerable + { + private List> _stringBuffers = new List>(); // To store more than intMax number of strings + + public StringDataFrameColumn(string name, long length = 0) : base(name, length, typeof(string)) + { + int numberOfBuffersRequired = Math.Max((int)(length / int.MaxValue), 1); + for (int i = 0; i < numberOfBuffersRequired; i++) + { + long bufferLen = length - _stringBuffers.Count * int.MaxValue; + List buffer = new List((int)Math.Min(int.MaxValue, bufferLen)); + _stringBuffers.Add(buffer); + for (int j = 0; j < bufferLen; j++) + { + buffer.Add(default); + } + } + } + + public StringDataFrameColumn(string name, IEnumerable values) : base(name, 0, typeof(string)) + { + values = values ?? throw new ArgumentNullException(nameof(values)); + if (_stringBuffers.Count == 0) + { + _stringBuffers.Add(new List()); + } + foreach (var value in values) + { + Append(value); + } + } + + private long _nullCount; + public override long NullCount => _nullCount; + + protected internal override void Resize(long length) + { + if (length < Length) + throw new ArgumentException(Strings.CannotResizeDown, nameof(length)); + + for (long i = Length; i < length; i++) + { + Append(null); + } + } + + public void Append(string value) + { + List lastBuffer = _stringBuffers[_stringBuffers.Count - 1]; + if (lastBuffer.Count == int.MaxValue) + { + lastBuffer = new List(); + _stringBuffers.Add(lastBuffer); + } + lastBuffer.Add(value); + if (value == null) + _nullCount++; + Length++; + } + + private int GetBufferIndexContainingRowIndex(ref long rowIndex) + { + if (rowIndex > Length) + { + throw new ArgumentOutOfRangeException(Strings.ColumnIndexOutOfRange, nameof(rowIndex)); + } + return (int)(rowIndex / int.MaxValue); + } + + protected override object GetValue(long rowIndex) + { + int bufferIndex = GetBufferIndexContainingRowIndex(ref rowIndex); + return _stringBuffers[bufferIndex][(int)rowIndex]; + } + + protected override IReadOnlyList GetValues(long startIndex, int length) + { + var ret = new List(); + int bufferIndex = GetBufferIndexContainingRowIndex(ref startIndex); + while (ret.Count < length && bufferIndex < _stringBuffers.Count) + { + for (int i = (int)startIndex; ret.Count < length && i < _stringBuffers[bufferIndex].Count; i++) + { + ret.Add(_stringBuffers[bufferIndex][i]); + } + bufferIndex++; + startIndex = 0; + } + return ret; + } + + protected override void SetValue(long rowIndex, object value) + { + if (value == null || value is string) + { + int bufferIndex = GetBufferIndexContainingRowIndex(ref rowIndex); + var oldValue = this[rowIndex]; + _stringBuffers[bufferIndex][(int)rowIndex] = (string)value; + if (oldValue != (string)value) + { + if (value == null) + _nullCount++; + if (oldValue == null && _nullCount > 0) + _nullCount--; + } + } + else + { + throw new ArgumentException(string.Format(Strings.MismatchedValueType, typeof(string)), nameof(value)); + } + } + + public new string this[long rowIndex] + { + get => (string)GetValue(rowIndex); + set => SetValue(rowIndex, value); + } + + public new List this[long startIndex, int length] + { + get + { + var ret = new List(); + int bufferIndex = GetBufferIndexContainingRowIndex(ref startIndex); + while (ret.Count < length && bufferIndex < _stringBuffers.Count) + { + for (int i = (int)startIndex; ret.Count < length && i < _stringBuffers[bufferIndex].Count; i++) + { + ret.Add(_stringBuffers[bufferIndex][i]); + } + bufferIndex++; + startIndex = 0; + } + return ret; + } + } + + public IEnumerator GetEnumerator() + { + foreach (List buffer in _stringBuffers) + { + foreach (string value in buffer) + { + yield return value; + } + } + } + + protected override IEnumerator GetEnumeratorCore() => GetEnumerator(); + + public override DataFrameColumn Clamp(U min, U max, bool inPlace = false) => throw new NotSupportedException(); + + public override DataFrameColumn Filter(U min, U max) => throw new NotSupportedException(); + + public new StringDataFrameColumn Sort(bool ascending = true) + { + PrimitiveDataFrameColumn columnSortIndices = GetAscendingSortIndices(); + return Clone(columnSortIndices, !ascending, NullCount); + } + + internal override PrimitiveDataFrameColumn GetAscendingSortIndices() + { + GetSortIndices(Comparer.Default, out PrimitiveDataFrameColumn columnSortIndices); + return columnSortIndices; + } + + private void GetSortIndices(Comparer comparer, out PrimitiveDataFrameColumn columnSortIndices) + { + List bufferSortIndices = new List(_stringBuffers.Count); + foreach (List buffer in _stringBuffers) + { + var sortIndices = new int[buffer.Count]; + for (int i = 0; i < buffer.Count; i++) + { + sortIndices[i] = i; + } + // TODO: Refactor the sort routine to also work with IList? + string[] array = buffer.ToArray(); + IntrospectiveSort(array, array.Length, sortIndices, comparer); + bufferSortIndices.Add(sortIndices); + } + // Simple merge sort to build the full column's sort indices + ValueTuple GetFirstNonNullValueStartingAtIndex(int stringBufferIndex, int startIndex) + { + string value = _stringBuffers[stringBufferIndex][bufferSortIndices[stringBufferIndex][startIndex]]; + while (value == null && ++startIndex < bufferSortIndices[stringBufferIndex].Length) + { + value = _stringBuffers[stringBufferIndex][bufferSortIndices[stringBufferIndex][startIndex]]; + } + return (value, startIndex); + } + + SortedDictionary>> heapOfValueAndListOfTupleOfSortAndBufferIndex = new SortedDictionary>>(comparer); + List> buffers = _stringBuffers; + for (int i = 0; i < buffers.Count; i++) + { + List buffer = buffers[i]; + ValueTuple valueAndBufferSortIndex = GetFirstNonNullValueStartingAtIndex(i, 0); + if (valueAndBufferSortIndex.Item1 == null) + { + // All nulls + continue; + } + if (heapOfValueAndListOfTupleOfSortAndBufferIndex.ContainsKey(valueAndBufferSortIndex.Item1)) + { + heapOfValueAndListOfTupleOfSortAndBufferIndex[valueAndBufferSortIndex.Item1].Add((valueAndBufferSortIndex.Item2, i)); + } + else + { + heapOfValueAndListOfTupleOfSortAndBufferIndex.Add(valueAndBufferSortIndex.Item1, new List>() { (valueAndBufferSortIndex.Item2, i) }); + } + } + columnSortIndices = new PrimitiveDataFrameColumn("SortIndices"); + GetBufferSortIndex getBufferSortIndex = new GetBufferSortIndex((int bufferIndex, int sortIndex) => (bufferSortIndices[bufferIndex][sortIndex]) + bufferIndex * bufferSortIndices[0].Length); + GetValueAndBufferSortIndexAtBuffer getValueAtBuffer = new GetValueAndBufferSortIndexAtBuffer((int bufferIndex, int sortIndex) => GetFirstNonNullValueStartingAtIndex(bufferIndex, sortIndex)); + GetBufferLengthAtIndex getBufferLengthAtIndex = new GetBufferLengthAtIndex((int bufferIndex) => bufferSortIndices[bufferIndex].Length); + PopulateColumnSortIndicesWithHeap(heapOfValueAndListOfTupleOfSortAndBufferIndex, columnSortIndices, getBufferSortIndex, getValueAtBuffer, getBufferLengthAtIndex); + } + + public new StringDataFrameColumn Clone(DataFrameColumn mapIndices, bool invertMapIndices, long numberOfNullsToAppend) + { + StringDataFrameColumn clone; + if (!(mapIndices is null)) + { + Type dataType = mapIndices.DataType; + if (dataType != typeof(long) && dataType != typeof(int) && dataType != typeof(bool)) + throw new ArgumentException(String.Format(Strings.MultipleMismatchedValueType, typeof(long), typeof(int), typeof(bool)), nameof(mapIndices)); + if (mapIndices.DataType == typeof(long)) + clone = Clone(mapIndices as PrimitiveDataFrameColumn, invertMapIndices); + else if (dataType == typeof(int)) + clone = Clone(mapIndices as PrimitiveDataFrameColumn, invertMapIndices); + else + clone = Clone(mapIndices as PrimitiveDataFrameColumn); + } + else + { + clone = Clone(); + } + for (long i = 0; i < numberOfNullsToAppend; i++) + { + clone.Append(null); + } + return clone; + } + + protected override DataFrameColumn CloneImplementation(DataFrameColumn mapIndices = null, bool invertMapIndices = false, long numberOfNullsToAppend = 0) + { + return Clone(mapIndices, invertMapIndices, numberOfNullsToAppend); + } + + private StringDataFrameColumn Clone(PrimitiveDataFrameColumn boolColumn) + { + if (boolColumn.Length > Length) + throw new ArgumentException(Strings.MapIndicesExceedsColumnLenth, nameof(boolColumn)); + StringDataFrameColumn ret = new StringDataFrameColumn(Name, 0); + for (long i = 0; i < boolColumn.Length; i++) + { + bool? value = boolColumn[i]; + if (value.HasValue && value.Value == true) + ret.Append(this[i]); + } + return ret; + } + + private StringDataFrameColumn CloneImplementation(PrimitiveDataFrameColumn mapIndices, bool invertMapIndices = false) + where U : unmanaged + { + mapIndices = mapIndices ?? throw new ArgumentNullException(nameof(mapIndices)); + StringDataFrameColumn ret = new StringDataFrameColumn(Name, mapIndices.Length); + + List setBuffer = ret._stringBuffers[0]; + long setBufferMinRange = 0; + long setBufferMaxRange = int.MaxValue; + List getBuffer = _stringBuffers[0]; + long getBufferMinRange = 0; + long getBufferMaxRange = int.MaxValue; + long maxCapacity = int.MaxValue; + if (mapIndices.DataType == typeof(long)) + { + PrimitiveDataFrameColumn longMapIndices = mapIndices as PrimitiveDataFrameColumn; + longMapIndices.ApplyElementwise((long? mapIndex, long rowIndex) => + { + long index = rowIndex; + if (invertMapIndices) + index = longMapIndices.Length - 1 - index; + if (index < setBufferMinRange || index >= setBufferMaxRange) + { + int bufferIndex = (int)(index / maxCapacity); + setBuffer = ret._stringBuffers[bufferIndex]; + setBufferMinRange = bufferIndex * maxCapacity; + setBufferMaxRange = (bufferIndex + 1) * maxCapacity; + } + index -= setBufferMinRange; + if (mapIndex == null) + { + setBuffer[(int)index] = null; + ret._nullCount++; + return mapIndex; + } + + if (mapIndex.Value < getBufferMinRange || mapIndex.Value >= getBufferMaxRange) + { + int bufferIndex = (int)(mapIndex.Value / maxCapacity); + getBuffer = _stringBuffers[bufferIndex]; + getBufferMinRange = bufferIndex * maxCapacity; + getBufferMaxRange = (bufferIndex + 1) * maxCapacity; + } + int bufferLocalMapIndex = (int)(mapIndex - getBufferMinRange); + string value = getBuffer[bufferLocalMapIndex]; + setBuffer[(int)index] = value; + if (value == null) + ret._nullCount++; + + return mapIndex; + }); + } + else if (mapIndices.DataType == typeof(int)) + { + PrimitiveDataFrameColumn intMapIndices = mapIndices as PrimitiveDataFrameColumn; + intMapIndices.ApplyElementwise((int? mapIndex, long rowIndex) => + { + long index = rowIndex; + if (invertMapIndices) + index = intMapIndices.Length - 1 - index; + + if (mapIndex == null) + { + setBuffer[(int)index] = null; + ret._nullCount++; + return mapIndex; + } + string value = getBuffer[mapIndex.Value]; + setBuffer[(int)index] = value; + if (value == null) + ret._nullCount++; + + return mapIndex; + }); + } + else + { + Debug.Assert(false, nameof(mapIndices.DataType)); + } + + return ret; + } + + private StringDataFrameColumn Clone(PrimitiveDataFrameColumn mapIndices = null, bool invertMapIndex = false) + { + if (mapIndices is null) + { + StringDataFrameColumn ret = new StringDataFrameColumn(Name, mapIndices is null ? Length : mapIndices.Length); + for (long i = 0; i < Length; i++) + { + ret[i] = this[i]; + } + return ret; + } + else + { + return CloneImplementation(mapIndices, invertMapIndex); + } + } + + private StringDataFrameColumn Clone(PrimitiveDataFrameColumn mapIndices, bool invertMapIndex = false) + { + return CloneImplementation(mapIndices, invertMapIndex); + } + + internal static DataFrame ValueCountsImplementation(Dictionary> groupedValues) + { + StringDataFrameColumn keys = new StringDataFrameColumn("Values", 0); + PrimitiveDataFrameColumn counts = new PrimitiveDataFrameColumn("Counts"); + foreach (KeyValuePair> keyValuePair in groupedValues) + { + keys.Append(keyValuePair.Key); + counts.Append(keyValuePair.Value.Count); + } + return new DataFrame(new List { keys, counts }); + } + + public override DataFrame ValueCounts() + { + Dictionary> groupedValues = GroupColumnValues(); + return ValueCountsImplementation(groupedValues); + } + + public override GroupBy GroupBy(int columnIndex, DataFrame parent) + { + Dictionary> dictionary = GroupColumnValues(); + return new GroupBy(parent, columnIndex, dictionary); + } + + public override Dictionary> GroupColumnValues() + { + if (typeof(TKey) == typeof(string)) + { + Dictionary> multimap = new Dictionary>(EqualityComparer.Default); + for (long i = 0; i < Length; i++) + { + bool containsKey = multimap.TryGetValue(this[i] ?? default, out ICollection values); + if (containsKey) + { + values.Add(i); + } + else + { + multimap.Add(this[i] ?? default, new List() { i }); + } + } + return multimap as Dictionary>; + } + else + { + throw new NotImplementedException(nameof(TKey)); + } + } + + public StringDataFrameColumn FillNulls(string value, bool inPlace = false) + { + if (value == null) + throw new ArgumentNullException(nameof(value)); + StringDataFrameColumn column = inPlace ? this : Clone(); + + for (long i = 0; i < column.Length; i++) + { + if (column[i] == null) + column[i] = value; + } + return column; + } + + protected override DataFrameColumn FillNullsImplementation(object value, bool inPlace) + { + if (value is string valueString) + return FillNulls(valueString, inPlace); + else + throw new ArgumentException(String.Format(Strings.MismatchedValueType, typeof(string)), nameof(value)); + } + + protected internal override void AddDataViewColumn(DataViewSchema.Builder builder) + { + builder.AddColumn(Name, TextDataViewType.Instance); + } + + protected internal override Delegate GetDataViewGetter(DataViewRowCursor cursor) + { + return CreateValueGetterDelegate(cursor); + } + + private ValueGetter> CreateValueGetterDelegate(DataViewRowCursor cursor) => + (ref ReadOnlyMemory value) => value = this[cursor.Position].AsMemory(); + + protected internal override void AddValueUsingCursor(DataViewRowCursor cursor, Delegate getter) + { + long row = cursor.Position; + ReadOnlyMemory value = default; + Debug.Assert(getter != null, "Excepted getter to be valid"); + + (getter as ValueGetter>)(ref value); + + if (Length > row) + { + this[row] = value.ToString(); + } + else if (Length == row) + { + Append(value.ToString()); + } + else + { + throw new IndexOutOfRangeException(nameof(row)); + } + } + + protected internal override Delegate GetValueGetterUsingCursor(DataViewRowCursor cursor, DataViewSchema.Column schemaColumn) + { + return cursor.GetGetter>(schemaColumn); + } + } +} diff --git a/src/Microsoft.Data.Analysis/Strings.Designer.cs b/src/Microsoft.Data.Analysis/Strings.Designer.cs new file mode 100644 index 0000000000..ff3cd6cadd --- /dev/null +++ b/src/Microsoft.Data.Analysis/Strings.Designer.cs @@ -0,0 +1,423 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace Microsoft.Data { + using System; + + + /// + /// A strongly-typed resource class, for looking up localized strings, etc. + /// + // This class was auto-generated by the StronglyTypedResourceBuilder + // class via a tool like ResGen or Visual Studio. + // To add or remove a member, edit your .ResX file then rerun ResGen + // with the /str option, or rebuild your VS project. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class Strings { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Strings() { + } + + /// + /// Returns the cached ResourceManager instance used by this class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Microsoft.Data.Analysis.Strings", typeof(Strings).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + + /// + /// Looks up a localized string similar to Cannot cast column holding {0} values to type {1}. + /// + internal static string BadColumnCast { + get { + return ResourceManager.GetString("BadColumnCast", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Line {0} cannot be parsed with the current Delimiters.. + /// + internal static string CannotParseWithDelimiters { + get { + return ResourceManager.GetString("CannotParseWithDelimiters", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Line {0} cannot be parsed with the current FieldWidths.. + /// + internal static string CannotParseWithFieldWidths { + get { + return ResourceManager.GetString("CannotParseWithFieldWidths", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cannot resize down. + /// + internal static string CannotResizeDown { + get { + return ResourceManager.GetString("CannotResizeDown", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Index cannot be greater than the Column's Length. + /// + internal static string ColumnIndexOutOfRange { + get { + return ResourceManager.GetString("ColumnIndexOutOfRange", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Comment token cannot contain whitespace. + /// + internal static string CommentTokenCannotContainWhitespace { + get { + return ResourceManager.GetString("CommentTokenCannotContainWhitespace", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to DataType. + /// + internal static string DataType { + get { + return ResourceManager.GetString("DataType", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Delimiter cannot be new line characters. + /// + internal static string DelimiterCannotBeNewlineChar { + get { + return ResourceManager.GetString("DelimiterCannotBeNewlineChar", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Length (excluding null values). + /// + internal static string DescriptionMethodLength { + get { + return ResourceManager.GetString("DescriptionMethodLength", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to DataFrame already contains a column called {0}. + /// + internal static string DuplicateColumnName { + get { + return ResourceManager.GetString("DuplicateColumnName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Delimiters is empty.. + /// + internal static string EmptyDelimiters { + get { + return ResourceManager.GetString("EmptyDelimiters", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to FieldWidths is empty.. + /// + internal static string EmptyFieldWidths { + get { + return ResourceManager.GetString("EmptyFieldWidths", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Empty file. + /// + internal static string EmptyFile { + get { + return ResourceManager.GetString("EmptyFile", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Exceeded maximum buffer size.. + /// + internal static string ExceededMaxBufferSize { + get { + return ResourceManager.GetString("ExceededMaxBufferSize", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Parameter.Count exceeds the number of columns({0}) in the DataFrame . + /// + internal static string ExceedsNumberOfColumns { + get { + return ResourceManager.GetString("ExceedsNumberOfColumns", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Parameter.Count exceeds the number of rows({0}) in the DataFrame . + /// + internal static string ExceedsNumberOfRows { + get { + return ResourceManager.GetString("ExceedsNumberOfRows", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Expected either {0} or {1} to be provided. + /// + internal static string ExpectedEitherGuessRowsOrDataTypes { + get { + return ResourceManager.GetString("ExpectedEitherGuessRowsOrDataTypes", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {0} not found.. + /// + internal static string FileNotFound { + get { + return ResourceManager.GetString("FileNotFound", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A double quote is not a legal delimiter when HasFieldsEnclosedInQuotes is set to True.. + /// + internal static string IllegalQuoteDelimiter { + get { + return ResourceManager.GetString("IllegalQuoteDelimiter", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Column is immutable. + /// + internal static string ImmutableColumn { + get { + return ResourceManager.GetString("ImmutableColumn", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Inconsistent null bitmap and data buffer lengths. + /// + internal static string InconsistentNullBitMapAndLength { + get { + return ResourceManager.GetString("InconsistentNullBitMapAndLength", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Inconsistent null bitmaps and NullCounts. + /// + internal static string InconsistentNullBitMapAndNullCount { + get { + return ResourceManager.GetString("InconsistentNullBitMapAndNullCount", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Column does not exist. + /// + internal static string InvalidColumnName { + get { + return ResourceManager.GetString("InvalidColumnName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to All field widths, except the last element, must be greater than zero. A field width less than or equal to zero in the last element indicates the last field is of variable length.. + /// + internal static string InvalidFieldWidths { + get { + return ResourceManager.GetString("InvalidFieldWidths", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Line {0} has less columns than expected. + /// + internal static string LessColumnsThatExpected { + get { + return ResourceManager.GetString("LessColumnsThatExpected", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Line {0} cannot be read because it exceeds the max line size.. + /// + internal static string LineExceedsMaxLineSize { + get { + return ResourceManager.GetString("LineExceedsMaxLineSize", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to MapIndices exceeds column length. + /// + internal static string MapIndicesExceedsColumnLenth { + get { + return ResourceManager.GetString("MapIndicesExceedsColumnLenth", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Column lengths are mismatched. + /// + internal static string MismatchedColumnLengths { + get { + return ResourceManager.GetString("MismatchedColumnLengths", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Expected column to hold values of type {0}. + /// + internal static string MismatchedColumnValueType { + get { + return ResourceManager.GetString("MismatchedColumnValueType", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to rowCount differs from Column length for Column . + /// + internal static string MismatchedRowCount { + get { + return ResourceManager.GetString("MismatchedRowCount", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Expected value to be of type {0}. + /// + internal static string MismatchedValueType { + get { + return ResourceManager.GetString("MismatchedValueType", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Expected value to be of type {0}, {1} or {2}. + /// + internal static string MultipleMismatchedValueType { + get { + return ResourceManager.GetString("MultipleMismatchedValueType", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Expected a seekable stream. + /// + internal static string NonSeekableStream { + get { + return ResourceManager.GetString("NonSeekableStream", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {0} is not a supported column type.. + /// + internal static string NotSupportedColumnType { + get { + return ResourceManager.GetString("NotSupportedColumnType", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Delimiters is null.. + /// + internal static string NullDelimiters { + get { + return ResourceManager.GetString("NullDelimiters", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to FieldWidths is null.. + /// + internal static string NullFieldWidths { + get { + return ResourceManager.GetString("NullFieldWidths", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to numeric column. + /// + internal static string NumericColumnType { + get { + return ResourceManager.GetString("NumericColumnType", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {0} must be greater than 0. + /// + internal static string PositiveNumberOfCharacters { + get { + return ResourceManager.GetString("PositiveNumberOfCharacters", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cannot span multiple buffers. + /// + internal static string SpansMultipleBuffers { + get { + return ResourceManager.GetString("SpansMultipleBuffers", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Stream doesn't support reading. + /// + internal static string StreamDoesntSupportReading { + get { + return ResourceManager.GetString("StreamDoesntSupportReading", resourceCulture); + } + } + } +} diff --git a/src/Microsoft.Data.Analysis/Strings.resx b/src/Microsoft.Data.Analysis/Strings.resx new file mode 100644 index 0000000000..de91078cec --- /dev/null +++ b/src/Microsoft.Data.Analysis/Strings.resx @@ -0,0 +1,240 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Cannot cast column holding {0} values to type {1} + + + Line {0} cannot be parsed with the current Delimiters. + + + Line {0} cannot be parsed with the current FieldWidths. + + + Cannot resize down + + + Index cannot be greater than the Column's Length + + + Comment token cannot contain whitespace + + + DataType + + + Delimiter cannot be new line characters + + + Length (excluding null values) + + + DataFrame already contains a column called {0} + + + Delimiters is empty. + + + FieldWidths is empty. + + + Empty file + + + Exceeded maximum buffer size. + + + Parameter.Count exceeds the number of columns({0}) in the DataFrame + + + Parameter.Count exceeds the number of rows({0}) in the DataFrame + + + Expected either {0} or {1} to be provided + + + {0} not found. + + + A double quote is not a legal delimiter when HasFieldsEnclosedInQuotes is set to True. + + + Column is immutable + + + Inconsistent null bitmap and data buffer lengths + + + Inconsistent null bitmaps and NullCounts + + + Column does not exist + + + All field widths, except the last element, must be greater than zero. A field width less than or equal to zero in the last element indicates the last field is of variable length. + + + Line {0} has less columns than expected + + + Line {0} cannot be read because it exceeds the max line size. + + + MapIndices exceeds column length + + + Column lengths are mismatched + + + Expected column to hold values of type {0} + + + rowCount differs from Column length for Column + + + Expected value to be of type {0} + + + Expected value to be of type {0}, {1} or {2} + + + Expected a seekable stream + + + {0} is not a supported column type. + + + Delimiters is null. + + + FieldWidths is null. + + + numeric column + + + {0} must be greater than 0 + + + Cannot span multiple buffers + + + Stream doesn't support reading + + \ No newline at end of file diff --git a/src/Microsoft.Data.Analysis/TextFieldParser.cs b/src/Microsoft.Data.Analysis/TextFieldParser.cs new file mode 100644 index 0000000000..e5c279db1d --- /dev/null +++ b/src/Microsoft.Data.Analysis/TextFieldParser.cs @@ -0,0 +1,1154 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Diagnostics; +using System.Globalization; +using System.IO; +using System.Runtime.CompilerServices; +using System.Text; +using System.Text.RegularExpressions; + +namespace Microsoft.Data.Analysis +{ + internal enum FieldType + { + Delimited, + FixedWidth + } + + internal class QuoteDelimitedFieldBuilder + { + private StringBuilder _field; + private bool _fieldFinished; + private int _index; + private int _delimiterLength; + private Regex _delimiterRegex; + private string _spaceChars; + private bool _malformedLine; + + public QuoteDelimitedFieldBuilder(Regex delimiterRegex, string spaceChars) + { + _delimiterRegex = delimiterRegex; + _spaceChars = spaceChars; + _field = new StringBuilder(); + } + + public bool FieldFinished => _fieldFinished; + + public string Field => _field.ToString(); + + public int Index => _index; + + public int DelimiterLength => _delimiterLength; + + public bool MalformedLine => _malformedLine; + + public void BuildField(string line, int startAt) + { + _index = startAt; + int length = line.Length; + + while (_index < length) + { + if (line[_index] == '"') + { + // Are we at the end of a file? + if (_index + 1 == length) + { + // We've found the end of the field + _fieldFinished = true; + _delimiterLength = 1; + + // Move index past end of line + _index++; + return; + } + // Check to see if this is an escaped quote + if (_index + 1 < line.Length && line[_index + 1] == '"') + { + _field.Append('"'); + _index += 2; + continue; + } + + // Find the next delimiter and make sure everything between the quote and delimiter is ignorable + int Limit; + Match delimiterMatch = _delimiterRegex.Match(line, _index + 1); + if (!delimiterMatch.Success) + { + Limit = length - 1; + } + else + { + Limit = delimiterMatch.Index - 1; + } + + for (int i = _index + 1; i < Limit; i++) + { + if (_spaceChars.IndexOf(line[i]) < 0) + { + _malformedLine = true; + return; + } + } + + // The length of the delimiter is the length of the closing quote (1) + any spaces + the length of the delimiter we matched if any + _delimiterLength = 1 + Limit - _index; + if (delimiterMatch.Success) + { + _delimiterLength += delimiterMatch.Length; + } + + _fieldFinished = true; + return; + } + else + { + _field.Append(line[_index]); + _index += 1; + } + } + } + } + + + internal class TextFieldParser : IDisposable + { + private delegate int ChangeBufferFunction(); + + private bool _disposed; + + private TextReader _reader; + + private string[] _commentTokens = null; + + private long _lineNumber = 1; + + private bool _endOfData; + + private string _errorLine = ""; + + private long _errorLineNumber = -1; + + private FieldType _textFieldType = FieldType.Delimited; + + private int[] _fieldWidths; + + private int[] _fieldWidthsCopy; + + private string[] _delimiters; + + private string[] _delimitersCopy; + + private Regex _delimiterRegex; + + private Regex _delimiterWithEndCharsRegex; + + private int[] _whitespaceCodes = new int[] { '\u0009', '\u000B', '\u000C', '\u0020', '\u0085', '\u00A0', '\u1680', '\u2000', '\u2001', '\u2002', '\u2003', '\u2004', '\u2005', '\u2006', '\u2007', '\u2008', '\u2009', '\u200A', '\u200B', '\u2028', '\u2029', '\u3000', '\uFEFF' }; + + private Regex _beginQuotesRegex; + + private bool _trimWhiteSpace = true; + + private int _position; + + private int _peekPosition; + + private int _charsRead; + + private bool _needPropertyCheck = true; + + private const int DEFAULT_BUFFER_LENGTH = 4096; + + private char[] _buffer = new char[DEFAULT_BUFFER_LENGTH]; + + private bool _hasFieldsEnclosedInQuotes = true; + + private int _lineLength; + + private string _spaceChars; + + private int _maxLineSize = 10000000; + + private int _maxBufferSize = 10000000; + + private bool _leaveOpen; + + private char[] newLineChars = Environment.NewLine.ToCharArray(); + + public string[] CommentTokens + { + get => _commentTokens; + set + { + CheckCommentTokensForWhitespace(value); + _commentTokens = value; + _needPropertyCheck = true; + } + } + + public bool EndOfData + { + get + { + if (_endOfData) + { + return _endOfData; + } + if ((_reader == null) | (_buffer == null)) + { + _endOfData = true; + return true; + } + if (PeekNextDataLine() != null) + { + return false; + } + _endOfData = true; + return true; + } + } + + public long LineNumber + { + get + { + if (_lineNumber != -1 && ((_reader.Peek() == -1) & (_position == _charsRead))) + { + // Side effect of a property. Not great. Just leaving it in for now. + CloseReader(); + } + return _lineNumber; + } + } + + public string ErrorLine => _errorLine; + + public long ErrorLineNumber => _errorLineNumber; + + public FieldType TextFieldType + { + get => _textFieldType; + set + { + ValidateFieldTypeEnumValue(value, "value"); + _textFieldType = value; + _needPropertyCheck = true; + } + } + + public int[] FieldWidths + { + get => _fieldWidths; + private set + { + if (value != null) + { + ValidateFieldWidthsOnInput(value); + _fieldWidthsCopy = (int[])value.Clone(); + } + else + { + _fieldWidthsCopy = null; + } + _fieldWidths = value; + _needPropertyCheck = true; + } + } + + public string[] Delimiters + { + get => _delimiters; + private set + { + if (value != null) + { + ValidateDelimiters(value); + _delimitersCopy = (string[])value.Clone(); + } + else + { + _delimitersCopy = null; + } + _delimiters = value; + _needPropertyCheck = true; + _beginQuotesRegex = null; + } + } + + public bool TrimWhiteSpace + { + get => _trimWhiteSpace; + set + { + _trimWhiteSpace = value; + } + } + + public bool HasFieldsEnclosedInQuotes + { + get => _hasFieldsEnclosedInQuotes; + set + { + _hasFieldsEnclosedInQuotes = value; + } + } + + private Regex BeginQuotesRegex + { + get + { + if (_beginQuotesRegex == null) + { + string pattern = string.Format(CultureInfo.InvariantCulture, "\\G[{0}]*\"", WhitespacePattern); + _beginQuotesRegex = new Regex(pattern, RegexOptions.CultureInvariant); + } + return _beginQuotesRegex; + } + } + + private string EndQuotePattern => string.Format(CultureInfo.InvariantCulture, "\"[{0}]*", WhitespacePattern); + + private string WhitespaceCharacters + { + get + { + StringBuilder builder = new StringBuilder(); + int[] whitespaceCodes = _whitespaceCodes; + foreach (int code in whitespaceCodes) + { + char spaceChar = (char)code; + if (!CharacterIsInDelimiter(spaceChar)) + { + builder.Append(spaceChar); + } + } + return builder.ToString(); + } + } + + private string WhitespacePattern + { + get + { + StringBuilder builder = new StringBuilder(); + int[] whitespaceCodes = _whitespaceCodes; + for (int i = 0; i < whitespaceCodes.Length; i++) + { + int code = whitespaceCodes[i]; + char spaceChar = (char)code; + if (!CharacterIsInDelimiter(spaceChar)) + { + builder.Append("\\u" + code.ToString("X4", CultureInfo.InvariantCulture)); + } + } + return builder.ToString(); + } + } + + public TextFieldParser(string path) + { + InitializeFromPath(path, Encoding.ASCII, detectEncoding: true); + } + + public TextFieldParser(string path, Encoding defaultEncoding) + { + InitializeFromPath(path, defaultEncoding, detectEncoding: true); + } + + public TextFieldParser(string path, Encoding defaultEncoding, bool detectEncoding) + { + InitializeFromPath(path, defaultEncoding, detectEncoding); + } + + public TextFieldParser(Stream stream) + { + InitializeFromStream(stream, Encoding.ASCII, detectEncoding: true); + } + + public TextFieldParser(Stream stream, Encoding defaultEncoding) + { + InitializeFromStream(stream, defaultEncoding, detectEncoding: true); + } + + public TextFieldParser(Stream stream, Encoding defaultEncoding, bool detectEncoding) + { + InitializeFromStream(stream, defaultEncoding, detectEncoding); + } + + public TextFieldParser(Stream stream, Encoding defaultEncoding, bool detectEncoding, bool leaveOpen) + { + _leaveOpen = leaveOpen; + InitializeFromStream(stream, defaultEncoding, detectEncoding); + } + + public TextFieldParser(TextReader reader) + { + _reader = reader ?? throw new ArgumentNullException(nameof(reader)); + ReadToBuffer(); + } + + public void SetDelimiters(params string[] delimiters) + { + Delimiters = delimiters; + } + + public void SetFieldWidths(params int[] fieldWidths) + { + FieldWidths = fieldWidths; + } + + + public string ReadLine() + { + if ((_reader == null) | (_buffer == null)) + { + return null; + } + + ChangeBufferFunction BufferFunction = ReadToBuffer; + string line = ReadNextLine(ref _position, BufferFunction); + if (line == null) + { + FinishReading(); + return null; + } + + _lineNumber++; + return line.TrimEnd(newLineChars); + } + + public string[] ReadFields() + { + if ((_reader == null) | (_buffer == null)) + { + return null; + } + ValidateReadyToRead(); + switch (_textFieldType) + { + case FieldType.FixedWidth: + return ParseFixedWidthLine(); + case FieldType.Delimited: + return ParseDelimitedLine(); + default: + Debug.Fail("The TextFieldType is not supported"); + return null; + } + } + + /// + /// Peek at characters of the next data line without reading the line + /// + ///The number of characters to look at in the next data line. + ///A string consisting of the first characters of the next line. >If numberOfChars is greater than the next line, only the next line is returned + public string PeekChars(int numberOfChars) + { + if (numberOfChars <= 0) + { + throw new ArgumentException(string.Format(Strings.PositiveNumberOfCharacters, nameof(numberOfChars))); + } + + if ((_reader == null) | (_buffer == null)) + { + return null; + } + + if (_endOfData) + { + return null; + } + + string line = PeekNextDataLine(); + if (line == null) + { + _endOfData = true; + return null; + } + + line = line.TrimEnd(newLineChars); + if (line.Length < numberOfChars) + { + return line; + } + + return line.Substring(0, numberOfChars); + } + + + public string ReadToEnd() + { + if ((_reader == null) | (_buffer == null)) + { + return null; + } + StringBuilder builder = new StringBuilder(_buffer.Length); + builder.Append(_buffer, _position, _charsRead - _position); + builder.Append(_reader.ReadToEnd()); + FinishReading(); + return builder.ToString(); + } + + public void Close() + { + CloseReader(); + } + + public void Dispose() + { + Dispose(disposing: true); + GC.SuppressFinalize(this); + } + + protected virtual void Dispose(bool disposing) + { + if (disposing) + { + if (!_disposed) + { + Close(); + } + _disposed = true; + } + } + + private void ValidateFieldTypeEnumValue(FieldType value, string paramName) + { + if (value < FieldType.Delimited || value > FieldType.FixedWidth) + { + throw new InvalidEnumArgumentException(paramName, (int)value, typeof(FieldType)); + } + } + + private void CloseReader() + { + FinishReading(); + if (_reader != null) + { + if (!_leaveOpen) + { + _reader.Close(); + } + _reader = null; + } + } + + private void FinishReading() + { + _lineNumber = -1L; + _endOfData = true; + _buffer = null; + _delimiterRegex = null; + _beginQuotesRegex = null; + } + + private void InitializeFromPath(string path, Encoding defaultEncoding, bool detectEncoding) + { + if (path == null) + { + throw new ArgumentNullException(nameof(path)); + } + if (defaultEncoding == null) + { + throw new ArgumentNullException(nameof(defaultEncoding)); + } + string fullPath = ValidatePath(path); + FileStream fileStreamTemp = new FileStream(fullPath, (FileMode.Open), (FileAccess.Read), (FileShare.ReadWrite)); + _reader = new StreamReader(fileStreamTemp, defaultEncoding, detectEncoding); + ReadToBuffer(); + } + + private void InitializeFromStream(Stream stream, Encoding defaultEncoding, bool detectEncoding) + { + if (stream == null) + { + throw new ArgumentNullException(nameof(stream)); + } + if (!stream.CanRead) + { + throw new ArgumentException(Strings.StreamDoesntSupportReading); + } + if (defaultEncoding == null) + { + throw new ArgumentNullException(nameof(defaultEncoding)); + } + _reader = new StreamReader(stream, defaultEncoding, detectEncoding); + ReadToBuffer(); + } + + private string ValidatePath(string path) + { + if (!File.Exists(path)) + { + throw new FileNotFoundException(Strings.FileNotFound); + } + return path; + } + + private bool IgnoreLine(string line) + { + if (line == null) + { + return false; + } + string trimmedLine = line.Trim(); + if (trimmedLine.Length == 0) + { + return true; + } + if (_commentTokens != null) + { + string[] commentTokens = _commentTokens; + foreach (string Token in commentTokens) + { + if (Token == string.Empty) + { + continue; + } + if (trimmedLine.StartsWith(Token, StringComparison.Ordinal)) + { + return true; + } + if (line.StartsWith(Token, StringComparison.Ordinal)) + { + return true; + } + } + } + return false; + } + + private int ReadToBuffer() + { + Debug.Assert(_buffer != null, "There's no buffer"); + Debug.Assert(_reader != null, "There's no StreamReader"); + _position = 0; + int BufferLength = _buffer.Length; + Debug.Assert(BufferLength >= DEFAULT_BUFFER_LENGTH, "Buffer shrunk to below default"); + if (BufferLength > DEFAULT_BUFFER_LENGTH) + { + BufferLength = DEFAULT_BUFFER_LENGTH; + _buffer = new char[BufferLength]; + } + _charsRead = _reader.Read(_buffer, 0, BufferLength); + return _charsRead; + } + + private int SlideCursorToStartOfBuffer() + { + Debug.Assert(_buffer != null, "There's no buffer"); + Debug.Assert(_reader != null, "There's no StreamReader"); + Debug.Assert((_position >= 0) & (_position <= _buffer.Length), "The cursor is out of range"); + if (_position > 0) + { + int bufferLength = _buffer.Length; + char[] tempArray = new char[bufferLength]; + Array.Copy(_buffer, _position, tempArray, 0, bufferLength - _position); + int charsRead = _reader.Read(tempArray, bufferLength - _position, _position); + _charsRead = _charsRead - _position + charsRead; + _position = 0; + _buffer = tempArray; + return charsRead; + } + return 0; + } + + private int IncreaseBufferSize() + { + Debug.Assert(_buffer != null, "There's no buffer"); + Debug.Assert(_reader != null, "There's no StreamReader"); + _peekPosition = _charsRead; + int bufferSize = _buffer.Length + DEFAULT_BUFFER_LENGTH; + if (bufferSize > _maxBufferSize) + { + throw new Exception(Strings.ExceededMaxBufferSize); + } + char[] tempArray = new char[bufferSize]; + Array.Copy(_buffer, tempArray, _buffer.Length); + int charsRead = _reader.Read(tempArray, _buffer.Length, DEFAULT_BUFFER_LENGTH); + _buffer = tempArray; + _charsRead += charsRead; + Debug.Assert(_charsRead <= bufferSize, "We've read more chars than we have space for"); + return charsRead; + } + + private string ReadNextDataLine() + { + ChangeBufferFunction BufferFunction = ReadToBuffer; + string line; + do + { + line = ReadNextLine(ref _position, BufferFunction); + _lineNumber++; + } + while (IgnoreLine(line)); + if (line == null) + { + CloseReader(); + } + return line; + } + + private string PeekNextDataLine() + { + ChangeBufferFunction BufferFunction = IncreaseBufferSize; + SlideCursorToStartOfBuffer(); + _peekPosition = 0; + string line; + do + { + line = ReadNextLine(ref _peekPosition, BufferFunction); + } + while (IgnoreLine(line)); + return line; + } + + private string ReadNextLine(ref int cursor, ChangeBufferFunction changeBuffer) + { + Debug.Assert(_buffer != null, "There's no buffer"); + Debug.Assert((cursor >= 0) & (cursor <= _charsRead), "The cursor is out of range"); + if (cursor == _charsRead && changeBuffer() == 0) + { + return null; + } + StringBuilder Builder = null; + // Consider replacing this do-while with a string search to take advantage of vectorization + do + { + for (int i = cursor; i <= _charsRead - 1; i++) + { + char Character = _buffer[i]; + if (!(Character.Equals('\r') | Character.Equals('\n'))) + { + continue; + } + if (Builder != null) + { + Builder.Append(_buffer, cursor, i - cursor + 1); + } + else + { + Builder = new StringBuilder(i + 1); + Builder.Append(_buffer, cursor, i - cursor + 1); + } + cursor = i + 1; + if (Character.Equals('\r')) + { + if (cursor < _charsRead) + { + if (_buffer[cursor].Equals('\n')) + { + cursor++; + Builder.Append("\n"); + } + } + else if (changeBuffer() > 0 && _buffer[cursor].Equals('\n')) + { + cursor++; + Builder.Append("\n"); + } + } + return Builder.ToString(); + } + + // Searched the whole buffer and haven't found an end of line. Save what we have and read more to the buffer + int Size = _charsRead - cursor; + if (Builder == null) + { + Builder = new StringBuilder(Size + 10); + } + Builder.Append(_buffer, cursor, Size); + } + while (changeBuffer() > 0); + + return Builder.ToString(); + } + + private string[] ParseDelimitedLine() + { + string line = ReadNextDataLine(); + if (line == null) + { + return null; + } + long currentLineNumber = _lineNumber - 1; + int index = 0; + List Fields = new List(); + int lineEndIndex = GetEndOfLineIndex(line); + while (index <= lineEndIndex) + { + Match matchResult = null; + bool quoteDelimited = false; + if (HasFieldsEnclosedInQuotes) + { + matchResult = BeginQuotesRegex.Match(line, index); + quoteDelimited = matchResult.Success; + } + string field; + if (quoteDelimited) + { + // Move the Index beyond quote + index = matchResult.Index + matchResult.Length; + + // Looking for the closing quote + QuoteDelimitedFieldBuilder endHelper = new QuoteDelimitedFieldBuilder(_delimiterWithEndCharsRegex, _spaceChars); + endHelper.BuildField(line, index); + if (endHelper.MalformedLine) + { + _errorLine = line.TrimEnd(newLineChars); + _errorLineNumber = currentLineNumber; + throw new Exception(string.Format(Strings.CannotParseWithDelimiters, currentLineNumber)); + } + if (endHelper.FieldFinished) + { + field = endHelper.Field; + index = endHelper.Index + endHelper.DelimiterLength; + } + else + { + // We may have an embedded line end character, so grab next line + do + { + int endOfLine = line.Length; + string newLine = ReadNextDataLine(); + if (newLine == null) + { + _errorLine = line.TrimEnd(newLineChars); + _errorLineNumber = currentLineNumber; + throw new Exception(string.Format(Strings.CannotParseWithDelimiters, currentLineNumber)); + } + if (line.Length + newLine.Length > _maxLineSize) + { + _errorLine = line.TrimEnd(newLineChars); + _errorLineNumber = currentLineNumber; + throw new Exception(string.Format(Strings.LineExceedsMaxLineSize, currentLineNumber)); + } + line += newLine; + lineEndIndex = GetEndOfLineIndex(line); + endHelper.BuildField(line, endOfLine); + if (endHelper.MalformedLine) + { + _errorLine = line.TrimEnd(newLineChars); + _errorLineNumber = currentLineNumber; + throw new Exception(string.Format(Strings.CannotParseWithDelimiters, currentLineNumber)); + } + } + while (!endHelper.FieldFinished); + field = endHelper.Field; + index = endHelper.Index + endHelper.DelimiterLength; + } + if (_trimWhiteSpace) + { + field = field.Trim(); + } + Fields.Add(field); + continue; + } + + // Find the next delimiter + Match delimiterMatch = _delimiterRegex.Match(line, index); + if (delimiterMatch.Success) + { + field = line.Substring(index, delimiterMatch.Index - index); + if (_trimWhiteSpace) + { + field = field.Trim(); + } + Fields.Add(field); + index = delimiterMatch.Index + delimiterMatch.Length; + continue; + } + field = line.Substring(index).TrimEnd(newLineChars); + if (_trimWhiteSpace) + { + field = field.Trim(); + } + Fields.Add(field); + break; + } + return Fields.ToArray(); + } + + private string[] ParseFixedWidthLine() + { + Debug.Assert(_fieldWidths != null, "No field widths"); + string line = ReadNextDataLine(); + if (line == null) + { + return null; + } + line = line.TrimEnd(newLineChars); + StringInfo lineInfo = new StringInfo(line); + ValidateFixedWidthLine(lineInfo, _lineNumber - 1); + int index = 0; + int length = _fieldWidths.Length; + string[] Fields = new string[length]; + for (int i = 0; i < length; i++) + { + Fields[i] = GetFixedWidthField(lineInfo, index, _fieldWidths[i]); + index += _fieldWidths[i]; + } + return Fields; + } + + private string GetFixedWidthField(StringInfo line, int index, int fieldLength) + { + string field = (fieldLength > 0) ? line.SubstringByTextElements(index, fieldLength) : ((index < line.LengthInTextElements) ? line.SubstringByTextElements(index).TrimEnd(newLineChars) : string.Empty); + if (_trimWhiteSpace) + { + return field.Trim(); + } + return field; + } + + private int GetEndOfLineIndex(string line) + { + Debug.Assert(line != null, "We are parsing null"); + int length = line.Length; + Debug.Assert(length > 0, "A blank line shouldn't be parsed"); + if (length == 1) + { + Debug.Assert(!line[0].Equals('\r') & !line[0].Equals('\n'), "A blank line shouldn't be parsed"); + return length; + } + checked + { + if (line[length - 2].Equals('\r') | line[length - 2].Equals('\n')) + { + return length - 2; + } + if (line[length - 1].Equals('\r') | line[length - 1].Equals('\n')) + { + return length - 1; + } + return length; + } + } + + private void ValidateFixedWidthLine(StringInfo line, long lineNumber) + { + Debug.Assert(line != null, "No Line sent"); + if (line.LengthInTextElements < _lineLength) + { + _errorLine = line.String; + _errorLineNumber = checked(_lineNumber - 1); + throw new Exception(string.Format(Strings.CannotParseWithFieldWidths, lineNumber)); + } + } + + private void ValidateFieldWidths() + { + if (_fieldWidths == null) + { + throw new InvalidOperationException(Strings.NullFieldWidths); + } + if (_fieldWidths.Length == 0) + { + throw new InvalidOperationException(Strings.EmptyFieldWidths); + } + checked + { + int widthBound = _fieldWidths.Length - 1; + _lineLength = 0; + int num = widthBound - 1; + for (int i = 0; i <= num; i++) + { + Debug.Assert(_fieldWidths[i] > 0, "Bad field width, this should have been caught on input"); + _lineLength += _fieldWidths[i]; + } + if (_fieldWidths[widthBound] > 0) + { + _lineLength += _fieldWidths[widthBound]; + } + } + } + + private void ValidateFieldWidthsOnInput(int[] widths) + { + Debug.Assert(widths != null, "There are no field widths"); + int bound = widths.Length - 1; + for (int i = 0; i <= bound - 1; i++) + { + if (widths[i] < 1) + { + throw new ArgumentException(Strings.InvalidFieldWidths); + } + } + } + + private void ValidateAndEscapeDelimiters() + { + if (_delimiters == null) + { + throw new Exception(Strings.NullDelimiters); + } + if (_delimiters.Length == 0) + { + throw new Exception(Strings.EmptyDelimiters); + } + int length = _delimiters.Length; + StringBuilder builder = new StringBuilder(); + StringBuilder quoteBuilder = new StringBuilder(); + quoteBuilder.Append(EndQuotePattern + "("); + for (int i = 0; i <= length - 1; i++) + { + if (_delimiters[i] != null) + { + if (_hasFieldsEnclosedInQuotes && _delimiters[i].IndexOf('"') > -1) + { + throw new Exception(Strings.IllegalQuoteDelimiter); + } + string escapedDelimiter = Regex.Escape(_delimiters[i]); + builder.Append(escapedDelimiter + "|"); + quoteBuilder.Append(escapedDelimiter + "|"); + } + else + { + Debug.Fail("Delimiter element is empty. This should have been caught on input"); + } + } + _spaceChars = WhitespaceCharacters; + _delimiterRegex = new Regex(builder.ToString(0, builder.Length - 1), (RegexOptions)512); + builder.Append("\r|\n"); + _delimiterWithEndCharsRegex = new Regex(builder.ToString(), (RegexOptions)512); + quoteBuilder.Append("\r|\n)|\"$"); + } + + private void ValidateReadyToRead() + { + if (!(_needPropertyCheck | ArrayHasChanged())) + { + return; + } + switch (_textFieldType) + { + case FieldType.Delimited: + ValidateAndEscapeDelimiters(); + break; + case FieldType.FixedWidth: + ValidateFieldWidths(); + break; + default: + Debug.Fail("Unknown TextFieldType"); + break; + } + if (_commentTokens != null) + { + string[] commentTokens = _commentTokens; + foreach (string token in commentTokens) + { + if (token != string.Empty && (_hasFieldsEnclosedInQuotes & (_textFieldType == FieldType.Delimited)) && string.Compare(token.Trim(), "\"", StringComparison.Ordinal) == 0) + { + throw new Exception(Strings.IllegalQuoteDelimiter); + } + } + } + _needPropertyCheck = false; + } + + private void ValidateDelimiters(string[] delimiterArray) + { + if (delimiterArray == null) + { + return; + } + foreach (string delimiter in delimiterArray) + { + if (delimiter == string.Empty) + { + throw new Exception(Strings.EmptyDelimiters); + } + if (delimiter.IndexOfAny(newLineChars) > -1) + { + throw new Exception(Strings.DelimiterCannotBeNewlineChar); + } + } + } + + private bool ArrayHasChanged() + { + int lowerBound = 0; + int upperBound = 0; + switch (_textFieldType) + { + case FieldType.Delimited: + { + Debug.Assert(((_delimitersCopy == null) & (_delimiters == null)) | ((_delimitersCopy != null) & (_delimiters != null)), "Delimiters and copy are not both Nothing or both not Nothing"); + if (_delimiters == null) + { + return false; + } + lowerBound = _delimitersCopy.GetLowerBound(0); + upperBound = _delimitersCopy.GetUpperBound(0); + int num3 = lowerBound; + int num4 = upperBound; + for (int i = num3; i <= num4; i++) + { + if (_delimiters[i] != _delimitersCopy[i]) + { + return true; + } + } + break; + } + case FieldType.FixedWidth: + { + Debug.Assert(((_fieldWidthsCopy == null) & (_fieldWidths == null)) | ((_fieldWidthsCopy != null) & (_fieldWidths != null)), "FieldWidths and copy are not both Nothing or both not Nothing"); + if (_fieldWidths == null) + { + return false; + } + lowerBound = _fieldWidthsCopy.GetLowerBound(0); + upperBound = _fieldWidthsCopy.GetUpperBound(0); + int num = lowerBound; + int num2 = upperBound; + for (int j = num; j <= num2; j++) + { + if (_fieldWidths[j] != _fieldWidthsCopy[j]) + { + return true; + } + } + break; + } + default: + Debug.Fail("Unknown TextFieldType"); + break; + } + return false; + } + + private void CheckCommentTokensForWhitespace(string[] tokens) + { + if (tokens == null) + { + return; + } + foreach (string token in tokens) + { + if (token.Length == 1 && char.IsWhiteSpace(token[0])) + { + throw new Exception(Strings.CommentTokenCannotContainWhitespace); + } + } + } + + private bool CharacterIsInDelimiter(char testCharacter) + { + Debug.Assert(_delimiters != null, "No delimiters set!"); + string[] delimiters = _delimiters; + foreach (string delimiter in delimiters) + { + if (delimiter.IndexOf(testCharacter) > -1) + { + return true; + } + } + return false; + } + } +} diff --git a/src/Microsoft.Data.Analysis/UInt16DataFrameColumn.cs b/src/Microsoft.Data.Analysis/UInt16DataFrameColumn.cs new file mode 100644 index 0000000000..e56cdca7f3 --- /dev/null +++ b/src/Microsoft.Data.Analysis/UInt16DataFrameColumn.cs @@ -0,0 +1,23 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System; +using System.Collections.Generic; +using System.Text; + +namespace Microsoft.Data.Analysis +{ + public partial class UInt16DataFrameColumn : PrimitiveDataFrameColumn + { + public UInt16DataFrameColumn(string name, IEnumerable values) : base(name, values) { } + + public UInt16DataFrameColumn(string name, IEnumerable values) : base(name, values) { } + + public UInt16DataFrameColumn(string name, long length = 0) : base(name, length) { } + + public UInt16DataFrameColumn(string name, ReadOnlyMemory buffer, ReadOnlyMemory nullBitMap, int length = 0, int nullCount = 0) : base(name, buffer, nullBitMap, length, nullCount) { } + + internal UInt16DataFrameColumn(string name, PrimitiveColumnContainer values) : base(name, values) { } + } +} diff --git a/src/Microsoft.Data.Analysis/UInt32DataFrameColumn.cs b/src/Microsoft.Data.Analysis/UInt32DataFrameColumn.cs new file mode 100644 index 0000000000..af114ff41e --- /dev/null +++ b/src/Microsoft.Data.Analysis/UInt32DataFrameColumn.cs @@ -0,0 +1,23 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System; +using System.Collections.Generic; +using System.Text; + +namespace Microsoft.Data.Analysis +{ + public partial class UInt32DataFrameColumn : PrimitiveDataFrameColumn + { + public UInt32DataFrameColumn(string name, IEnumerable values) : base(name, values) { } + + public UInt32DataFrameColumn(string name, IEnumerable values) : base(name, values) { } + + public UInt32DataFrameColumn(string name, long length = 0) : base(name, length) { } + + public UInt32DataFrameColumn(string name, ReadOnlyMemory buffer, ReadOnlyMemory nullBitMap, int length = 0, int nullCount = 0) : base(name, buffer, nullBitMap, length, nullCount) { } + + internal UInt32DataFrameColumn(string name, PrimitiveColumnContainer values) : base(name, values) { } + } +} diff --git a/src/Microsoft.Data.Analysis/UInt64DataFrameColumn.cs b/src/Microsoft.Data.Analysis/UInt64DataFrameColumn.cs new file mode 100644 index 0000000000..cb74704319 --- /dev/null +++ b/src/Microsoft.Data.Analysis/UInt64DataFrameColumn.cs @@ -0,0 +1,23 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System; +using System.Collections.Generic; +using System.Text; + +namespace Microsoft.Data.Analysis +{ + public partial class UInt64DataFrameColumn : PrimitiveDataFrameColumn + { + public UInt64DataFrameColumn(string name, IEnumerable values) : base(name, values) { } + + public UInt64DataFrameColumn(string name, IEnumerable values) : base(name, values) { } + + public UInt64DataFrameColumn(string name, long length = 0) : base(name, length) { } + + public UInt64DataFrameColumn(string name, ReadOnlyMemory buffer, ReadOnlyMemory nullBitMap, int length = 0, int nullCount = 0) : base(name, buffer, nullBitMap, length, nullCount) { } + + internal UInt64DataFrameColumn(string name, PrimitiveColumnContainer values) : base(name, values) { } + } +} diff --git a/src/Microsoft.Extensions.ML/Microsoft.Extensions.ML.csproj b/src/Microsoft.Extensions.ML/Microsoft.Extensions.ML.csproj index a27aed8386..3fefadbeb4 100644 --- a/src/Microsoft.Extensions.ML/Microsoft.Extensions.ML.csproj +++ b/src/Microsoft.Extensions.ML/Microsoft.Extensions.ML.csproj @@ -1,8 +1,10 @@  + netstandard2.0 Microsoft.Extensions.ML + An integration package for ML.NET models on scalable web apps and services. @@ -10,8 +12,16 @@ - - + + + all + + + + all + + + diff --git a/src/Microsoft.Extensions.ML/Properties/AssemblyInfo.cs b/src/Microsoft.Extensions.ML/Properties/AssemblyInfo.cs index 85612a0522..03ef4bd89d 100644 --- a/src/Microsoft.Extensions.ML/Properties/AssemblyInfo.cs +++ b/src/Microsoft.Extensions.ML/Properties/AssemblyInfo.cs @@ -1,3 +1,3 @@ using System.Runtime.CompilerServices; -[assembly: InternalsVisibleTo("Microsoft.Extensions.ML.Tests, PublicKey=002400000480000094000000060200000024000052534131000400000100010015c01ae1f50e8cc09ba9eac9147cf8fd9fce2cfe9f8dce4f7301c4132ca9fb50ce8cbf1df4dc18dd4d210e4345c744ecb3365ed327efdbc52603faa5e21daa11234c8c4a73e51f03bf192544581ebe107adee3a34928e39d04e524a9ce729d5090bfd7dad9d10c722c0def9ccc08ff0a03790e48bcd1f9b6c476063e1966a1c4")] +[assembly: InternalsVisibleTo("Microsoft.Extensions.ML.Tests, PublicKey=00240000048000009400000006020000002400005253413100040000010001004b86c4cb78549b34bab61a3b1800e23bfeb5b3ec390074041536a7e3cbd97f5f04cf0f857155a8928eaa29ebfd11cfbbad3ba70efea7bda3226c6a8d370a4cd303f714486b6ebc225985a638471e6ef571cc92a4613c00b8fa65d61ccee0cbe5f36330c9a01f4183559f1bef24cc2917c6d913e3a541333a1d05d9bed22b38cb")] diff --git a/src/Microsoft.ML.AutoML/API/ColumnInference.cs b/src/Microsoft.ML.AutoML/API/ColumnInference.cs index ab2539b948..a2d697da98 100644 --- a/src/Microsoft.ML.AutoML/API/ColumnInference.cs +++ b/src/Microsoft.ML.AutoML/API/ColumnInference.cs @@ -5,6 +5,7 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using Microsoft.ML.Data; +using Newtonsoft.Json; namespace Microsoft.ML.AutoML { @@ -20,6 +21,7 @@ public sealed class ColumnInferenceResults /// Can be used to instantiate a new to load /// data into an . /// + [JsonProperty(DefaultValueHandling = DefaultValueHandling.Include)] public TextLoader.Options TextLoaderOptions { get; internal set; } /// @@ -31,6 +33,7 @@ public sealed class ColumnInferenceResults /// See /// for example. /// + [JsonProperty(DefaultValueHandling = DefaultValueHandling.Include)] public ColumnInformation ColumnInformation { get; internal set; } } @@ -90,31 +93,36 @@ public sealed class ColumnInformation /// /// Categorical data columns should generally be columns that contain a small number of unique values. /// - public ICollection CategoricalColumnNames { get; } + [JsonProperty] + public ICollection CategoricalColumnNames { get; private set; } /// /// The dataset columns that are numeric. /// /// The default value is a new, empty . - public ICollection NumericColumnNames { get; } + [JsonProperty] + public ICollection NumericColumnNames { get; private set; } /// /// The dataset columns that are text. /// /// The default value is a new, empty . - public ICollection TextColumnNames { get; } + [JsonProperty] + public ICollection TextColumnNames { get; private set; } /// /// The dataset columns that AutoML should ignore. /// /// The default value is a new, empty . - public ICollection IgnoredColumnNames { get; } + [JsonProperty] + public ICollection IgnoredColumnNames { get; private set; } /// /// The dataset columns that are image paths. /// /// The default value is a new, empty . - public ICollection ImagePathColumnNames { get; } + [JsonProperty] + public ICollection ImagePathColumnNames { get; private set; } public ColumnInformation() { diff --git a/src/Microsoft.ML.AutoML/API/RankingExperiment.cs b/src/Microsoft.ML.AutoML/API/RankingExperiment.cs index ea0ba735c4..f6e039c3be 100644 --- a/src/Microsoft.ML.AutoML/API/RankingExperiment.cs +++ b/src/Microsoft.ML.AutoML/API/RankingExperiment.cs @@ -26,10 +26,20 @@ public sealed class RankingExperimentSettings : ExperimentSettings /// The default value is a collection auto-populated with all possible trainers (all values of ). /// public ICollection Trainers { get; } + + /// + /// Maximum truncation level for computing (N)DCG + /// + /// + /// The default value is 10. + /// + public uint OptimizationMetricTruncationLevel { get; set; } + public RankingExperimentSettings() { OptimizingMetric = RankingMetric.Ndcg; Trainers = Enum.GetValues(typeof(RankingTrainer)).OfType().ToList(); + OptimizationMetricTruncationLevel = 10; } } public enum RankingMetric @@ -68,10 +78,11 @@ public static class RankingExperimentResultExtensions /// /// Enumeration of AutoML experiment run results. /// Metric to consider when selecting the best run. + /// Maximum truncation level for computing (N)DCG. Defaults to 10. /// The best experiment run. - public static RunDetail Best(this IEnumerable> results, RankingMetric metric = RankingMetric.Ndcg) + public static RunDetail Best(this IEnumerable> results, RankingMetric metric = RankingMetric.Ndcg, uint optimizationMetricTruncationLevel = 10) { - var metricsAgent = new RankingMetricsAgent(null, metric); + var metricsAgent = new RankingMetricsAgent(null, metric, optimizationMetricTruncationLevel); var isMetricMaximizing = new OptimizingMetricInfo(metric).IsMaximizing; return BestResultUtil.GetBestRun(results, metricsAgent, isMetricMaximizing); } @@ -81,10 +92,11 @@ public static RunDetail Best(this IEnumerable /// Enumeration of AutoML experiment cross validation run results. /// Metric to consider when selecting the best run. + /// Maximum truncation level for computing (N)DCG. Defaults to 10. /// The best experiment run. - public static CrossValidationRunDetail Best(this IEnumerable> results, RankingMetric metric = RankingMetric.Ndcg) + public static CrossValidationRunDetail Best(this IEnumerable> results, RankingMetric metric = RankingMetric.Ndcg, uint optimizationMetricTruncationLevel = 10) { - var metricsAgent = new RankingMetricsAgent(null, metric); + var metricsAgent = new RankingMetricsAgent(null, metric, optimizationMetricTruncationLevel); var isMetricMaximizing = new OptimizingMetricInfo(metric).IsMaximizing; return BestResultUtil.GetBestRun(results, metricsAgent, isMetricMaximizing); } @@ -103,7 +115,7 @@ public sealed class RankingExperiment : ExperimentBase where TRunDetail : RunDetail private readonly IList _history; private readonly IChannel _logger; + private readonly string _operationCancelledMessage = "OperationCanceledException has been caught after maximum experiment time" + + "was reached, and the running MLContext was stopped. Details: {0}"; + + private Timer _maxExperimentTimeTimer; + private Timer _mainContextCanceledTimer; + private bool _experimentTimerExpired; + private MLContext _currentModelMLContext; + private Random _newContextSeedGenerator; + public Experiment(MLContext context, TaskKind task, OptimizingMetricInfo metricInfo, @@ -49,60 +60,163 @@ public Experiment(MLContext context, _datasetColumnInfo = datasetColumnInfo; _runner = runner; _logger = logger; + _experimentTimerExpired = false; + } + + private void MaxExperimentTimeExpiredEvent(object state) + { + // If at least one model was run, end experiment immediately. + // Else, wait for first model to run before experiment is concluded. + _experimentTimerExpired = true; + if (_history.Any(r => r.RunSucceeded)) + { + _logger.Warning("Allocated time for Experiment of {0} seconds has elapsed with {1} models run. Ending experiment...", + _experimentSettings.MaxExperimentTimeInSeconds, _history.Count()); + _currentModelMLContext.CancelExecution(); + } + } + + private void MainContextCanceledEvent(object state) + { + // If the main MLContext is canceled, cancel the ongoing model training and MLContext. + if ((_context.Model.GetEnvironment() as ICancelable).IsCanceled) + { + _logger.Warning("Main MLContext has been canceled. Ending experiment..."); + // Stop timer to prevent restarting and prevent continuous calls to + // MainContextCanceledEvent + _mainContextCanceledTimer.Change(Timeout.Infinite, Timeout.Infinite); + _currentModelMLContext.CancelExecution(); + } + } + + private void RelayCurrentContextLogsToLogger(object sender, LoggingEventArgs e) + { + // Relay logs that are generated by the current MLContext to the Experiment class's + // _logger. + switch (e.Kind) + { + case ChannelMessageKind.Trace: + _logger.Trace(e.Message); + break; + case ChannelMessageKind.Info: + _logger.Info(e.Message); + break; + case ChannelMessageKind.Warning: + _logger.Warning(e.Message); + break; + case ChannelMessageKind.Error: + _logger.Error(e.Message); + break; + default: + throw new NotImplementedException($"{nameof(ChannelMessageKind)}.{e.Kind} is not yet implemented."); + } } public IList Execute() { - var stopwatch = Stopwatch.StartNew(); var iterationResults = new List(); + // Create a timer for the max duration of experiment. When given time has + // elapsed, MaxExperimentTimeExpiredEvent is called to interrupt training + // of current model. Timer is not used if no experiment time is given, or + // is not a positive number. + if (_experimentSettings.MaxExperimentTimeInSeconds > 0) + { + _maxExperimentTimeTimer = new Timer( + new TimerCallback(MaxExperimentTimeExpiredEvent), null, + _experimentSettings.MaxExperimentTimeInSeconds * 1000, Timeout.Infinite + ); + } + // If given max duration of experiment is 0, only 1 model will be trained. + // _experimentSettings.MaxExperimentTimeInSeconds is of type uint, it is + // either 0 or >0. + else + _experimentTimerExpired = true; + + // Add second timer to check for the cancelation signal from the main MLContext + // to the active child MLContext. This timer will propagate the cancelation + // signal from the main to the child MLContexs if the main MLContext is + // canceled. + _mainContextCanceledTimer = new Timer(new TimerCallback(MainContextCanceledEvent), null, 1000, 1000); + + // Pseudo random number generator to result in deterministic runs with the provided main MLContext's seed and to + // maintain variability between training iterations. + int? mainContextSeed = ((ISeededEnvironment)_context.Model.GetEnvironment()).Seed; + _newContextSeedGenerator = (mainContextSeed.HasValue) ? RandomUtils.Create(mainContextSeed.Value) : null; do { - var iterationStopwatch = Stopwatch.StartNew(); + try + { + var iterationStopwatch = Stopwatch.StartNew(); - // get next pipeline - var getPipelineStopwatch = Stopwatch.StartNew(); - var pipeline = PipelineSuggester.GetNextInferredPipeline(_context, _history, _datasetColumnInfo, _task, - _optimizingMetricInfo.IsMaximizing, _experimentSettings.CacheBeforeTrainer, _trainerAllowList); + // get next pipeline + var getPipelineStopwatch = Stopwatch.StartNew(); - var pipelineInferenceTimeInSeconds = getPipelineStopwatch.Elapsed.TotalSeconds; + // A new MLContext is needed per model run. When max experiment time is reached, each used + // context is canceled to stop further model training. The cancellation of the main MLContext + // a user has instantiated is not desirable, thus additional MLContexts are used. + _currentModelMLContext = _newContextSeedGenerator == null ? new MLContext() : new MLContext(_newContextSeedGenerator.Next()); + _currentModelMLContext.Log += RelayCurrentContextLogsToLogger; + var pipeline = PipelineSuggester.GetNextInferredPipeline(_currentModelMLContext, _history, _datasetColumnInfo, _task, + _optimizingMetricInfo.IsMaximizing, _experimentSettings.CacheBeforeTrainer, _logger, _trainerAllowList); + // break if no candidates returned, means no valid pipeline available + if (pipeline == null) + { + break; + } - // break if no candidates returned, means no valid pipeline available - if (pipeline == null) - { - break; - } + // evaluate pipeline + _logger.Trace($"Evaluating pipeline {pipeline.ToString()}"); + (SuggestedPipelineRunDetail suggestedPipelineRunDetail, TRunDetail runDetail) + = _runner.Run(pipeline, _modelDirectory, _history.Count + 1); - // evaluate pipeline - _logger.Trace($"Evaluating pipeline {pipeline.ToString()}"); - (SuggestedPipelineRunDetail suggestedPipelineRunDetail, TRunDetail runDetail) - = _runner.Run(pipeline, _modelDirectory, _history.Count + 1); + _history.Add(suggestedPipelineRunDetail); + WriteIterationLog(pipeline, suggestedPipelineRunDetail, iterationStopwatch); - _history.Add(suggestedPipelineRunDetail); - WriteIterationLog(pipeline, suggestedPipelineRunDetail, iterationStopwatch); + runDetail.RuntimeInSeconds = iterationStopwatch.Elapsed.TotalSeconds; + runDetail.PipelineInferenceTimeInSeconds = getPipelineStopwatch.Elapsed.TotalSeconds; - runDetail.RuntimeInSeconds = iterationStopwatch.Elapsed.TotalSeconds; - runDetail.PipelineInferenceTimeInSeconds = getPipelineStopwatch.Elapsed.TotalSeconds; + ReportProgress(runDetail); + iterationResults.Add(runDetail); - ReportProgress(runDetail); - iterationResults.Add(runDetail); + // if model is perfect, break + if (_metricsAgent.IsModelPerfect(suggestedPipelineRunDetail.Score)) + { + break; + } - // if model is perfect, break - if (_metricsAgent.IsModelPerfect(suggestedPipelineRunDetail.Score)) - { - break; + // If after third run, all runs have failed so far, throw exception + if (_history.Count() == 3 && _history.All(r => !r.RunSucceeded)) + { + throw new InvalidOperationException($"Training failed with the exception: {_history.Last().Exception}"); + } } - - // If after third run, all runs have failed so far, throw exception - if (_history.Count() == 3 && _history.All(r => !r.RunSucceeded)) + catch (OperationCanceledException e) { - throw new InvalidOperationException($"Training failed with the exception: {_history.Last().Exception}"); + // This exception is thrown when the IHost/MLContext of the trainer is canceled due to + // reaching maximum experiment time. Simply catch this exception and return finished + // iteration results. + _logger.Warning(_operationCancelledMessage, e.Message); + return iterationResults; } + catch (AggregateException e) + { + // This exception is thrown when the IHost/MLContext of the trainer is canceled due to + // reaching maximum experiment time. Simply catch this exception and return finished + // iteration results. For some trainers, like FastTree, because training is done in parallel + // in can throw multiple OperationCancelledExceptions. This causes them to be returned as an + // AggregateException and misses the first catch block. This is to handle that case. + if (e.InnerExceptions.All(exception => exception is OperationCanceledException)) + { + _logger.Warning(_operationCancelledMessage, e.Message); + return iterationResults; + } + throw; + } } while (_history.Count < _experimentSettings.MaxModels && !_experimentSettings.CancellationToken.IsCancellationRequested && - stopwatch.Elapsed.TotalSeconds < _experimentSettings.MaxExperimentTimeInSeconds); - + !_experimentTimerExpired); return iterationResults; } diff --git a/src/Microsoft.ML.AutoML/Experiment/MetricsAgents/RankingMetricsAgent.cs b/src/Microsoft.ML.AutoML/Experiment/MetricsAgents/RankingMetricsAgent.cs index 0544a6b638..4abb8d57fb 100644 --- a/src/Microsoft.ML.AutoML/Experiment/MetricsAgents/RankingMetricsAgent.cs +++ b/src/Microsoft.ML.AutoML/Experiment/MetricsAgents/RankingMetricsAgent.cs @@ -2,7 +2,9 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +using System; using Microsoft.ML.Data; +using Microsoft.ML.Runtime; namespace Microsoft.ML.AutoML { @@ -10,11 +12,20 @@ internal class RankingMetricsAgent : IMetricsAgent { private readonly MLContext _mlContext; private readonly RankingMetric _optimizingMetric; + private readonly uint _dcgTruncationLevel; - public RankingMetricsAgent(MLContext mlContext, RankingMetric optimizingMetric) + public RankingMetricsAgent(MLContext mlContext, RankingMetric metric, uint optimizationMetricTruncationLevel) { _mlContext = mlContext; - _optimizingMetric = optimizingMetric; + _optimizingMetric = metric; + + if (optimizationMetricTruncationLevel <= 0) + throw _mlContext.ExceptUserArg(nameof(optimizationMetricTruncationLevel), "DCG Truncation Level must be greater than 0"); + + // We want to make sure we always report metrics for at least 10 results (e.g. NDCG@10) to the user. + // Producing extra results adds no measurable performance impact, so we report at least 2x of the + // user's requested optimization truncation level. + _dcgTruncationLevel = optimizationMetricTruncationLevel; } // Optimizing metric used: NDCG@10 and DCG@10 @@ -28,11 +39,9 @@ public double GetScore(RankingMetrics metrics) switch (_optimizingMetric) { case RankingMetric.Ndcg: - return (metrics.NormalizedDiscountedCumulativeGains.Count >= 10) ? metrics.NormalizedDiscountedCumulativeGains[9] : - metrics.NormalizedDiscountedCumulativeGains[metrics.NormalizedDiscountedCumulativeGains.Count - 1]; + return metrics.NormalizedDiscountedCumulativeGains[Math.Min(metrics.NormalizedDiscountedCumulativeGains.Count, (int)_dcgTruncationLevel) - 1]; case RankingMetric.Dcg: - return (metrics.DiscountedCumulativeGains.Count >= 10) ? metrics.DiscountedCumulativeGains[9] : - metrics.DiscountedCumulativeGains[metrics.DiscountedCumulativeGains.Count-1]; + return metrics.DiscountedCumulativeGains[Math.Min(metrics.DiscountedCumulativeGains.Count, (int)_dcgTruncationLevel) - 1]; default: throw MetricsAgentUtil.BuildMetricNotSupportedException(_optimizingMetric); } @@ -59,7 +68,12 @@ public bool IsModelPerfect(double score) public RankingMetrics EvaluateMetrics(IDataView data, string labelColumn, string groupIdColumn) { - return _mlContext.Ranking.Evaluate(data, labelColumn, groupIdColumn); + var rankingEvalOptions = new RankingEvaluatorOptions + { + DcgTruncationLevel = Math.Max(10, 2 * (int)_dcgTruncationLevel) + }; + + return _mlContext.Ranking.Evaluate(data, rankingEvalOptions, labelColumn, groupIdColumn); } } } diff --git a/src/Microsoft.ML.AutoML/Experiment/Runners/CrossValSummaryRunner.cs b/src/Microsoft.ML.AutoML/Experiment/Runners/CrossValSummaryRunner.cs index 3697268936..9c382468a6 100644 --- a/src/Microsoft.ML.AutoML/Experiment/Runners/CrossValSummaryRunner.cs +++ b/src/Microsoft.ML.AutoML/Experiment/Runners/CrossValSummaryRunner.cs @@ -58,7 +58,7 @@ public CrossValSummaryRunner(MLContext context, for (var i = 0; i < _trainDatasets.Length; i++) { var modelFileInfo = RunnerUtil.GetModelFileInfo(modelDirectory, iterationNum, i + 1); - var trainResult = RunnerUtil.TrainAndScorePipeline(_context, pipeline, _trainDatasets[i], _validDatasets[i], + var trainResult = RunnerUtil.TrainAndScorePipeline(pipeline.GetContext(), pipeline, _trainDatasets[i], _validDatasets[i], _groupIdColumn, _labelColumn, _metricsAgent, _preprocessorTransforms?.ElementAt(i), modelFileInfo, _modelInputSchema, _logger); trainResults.Add(trainResult); @@ -123,8 +123,7 @@ private static TMetrics GetAverageMetrics(IEnumerable metrics, TMetric logLoss: GetAverageOfNonNaNScores(newMetrics.Select(x => x.LogLoss)), logLossReduction: GetAverageOfNonNaNScores(newMetrics.Select(x => x.LogLossReduction)), topKPredictionCount: newMetrics.ElementAt(0).TopKPredictionCount, - topKAccuracy: GetAverageOfNonNaNScores(newMetrics.Select(x => x.TopKAccuracy)), - // Return PerClassLogLoss and ConfusionMatrix from the fold closest to average score + topKAccuracies: GetAverageOfNonNaNScoresInNestedEnumerable(newMetrics.Select(x => x.TopKAccuracyForAllK)), perClassLogLoss: (metricsClosestToAvg as MulticlassClassificationMetrics).PerClassLogLoss.ToArray(), confusionMatrix: (metricsClosestToAvg as MulticlassClassificationMetrics).ConfusionMatrix); return result as TMetrics; @@ -160,10 +159,22 @@ private static TMetrics GetAverageMetrics(IEnumerable metrics, TMetric private static double[] GetAverageOfNonNaNScoresInNestedEnumerable(IEnumerable> results) { + if (results.All(result => result == null)) + { + // If all nested enumerables are null, we say the average is a null enumerable as well. + // This is expected to happen on Multiclass metrics where the TopKAccuracyForAllK + // array can be null if the topKPredictionCount isn't a valid number. + // In that case all of the "results" enumerables will be null anyway, and so + // returning null is the expected solution. + return null; + } + + // In case there are only some null elements, we'll ignore them: + results = results.Where(result => result != null); + double[] arr = new double[results.ElementAt(0).Count()]; for (int i = 0; i < arr.Length; i++) { - Contracts.Assert(arr.Length == results.ElementAt(i).Count()); arr[i] = GetAverageOfNonNaNScores(results.Select(x => x.ElementAt(i))); } return arr; diff --git a/src/Microsoft.ML.AutoML/Experiment/SuggestedPipeline.cs b/src/Microsoft.ML.AutoML/Experiment/SuggestedPipeline.cs index ff97bd9cee..aeaa72a4de 100644 --- a/src/Microsoft.ML.AutoML/Experiment/SuggestedPipeline.cs +++ b/src/Microsoft.ML.AutoML/Experiment/SuggestedPipeline.cs @@ -52,6 +52,11 @@ public override int GetHashCode() return ToString().GetHashCode(); } + public MLContext GetContext() + { + return _context; + } + public Pipeline ToPipeline() { var pipelineElements = new List(); diff --git a/src/Microsoft.ML.AutoML/Microsoft.ML.AutoML.csproj b/src/Microsoft.ML.AutoML/Microsoft.ML.AutoML.csproj index a098ab44a0..83d749800c 100644 --- a/src/Microsoft.ML.AutoML/Microsoft.ML.AutoML.csproj +++ b/src/Microsoft.ML.AutoML/Microsoft.ML.AutoML.csproj @@ -1,19 +1,29 @@  + + netstandard2.0 Microsoft.ML.AutoML + ML.NET AutoML: Optimizes an ML pipeline for your dataset, by automatically locating the best feature engineering, model, and hyperparameters - - + + all + - + + all + + + all + + diff --git a/src/Microsoft.ML.AutoML/PipelineSuggesters/PipelineSuggester.cs b/src/Microsoft.ML.AutoML/PipelineSuggesters/PipelineSuggester.cs index 8a420cbb5d..711c7bd3ef 100644 --- a/src/Microsoft.ML.AutoML/PipelineSuggesters/PipelineSuggester.cs +++ b/src/Microsoft.ML.AutoML/PipelineSuggesters/PipelineSuggester.cs @@ -6,6 +6,8 @@ using System.Collections.Generic; using System.Linq; using Microsoft.ML.Data; +using Microsoft.ML.Internal.Utilities; +using Microsoft.ML.Runtime; namespace Microsoft.ML.AutoML { @@ -17,10 +19,11 @@ public static Pipeline GetNextPipeline(MLContext context, IEnumerable history, DatasetColumnInfo[] columns, TaskKind task, + IChannel logger, bool isMaximizingMetric = true) { var inferredHistory = history.Select(r => SuggestedPipelineRunDetail.FromPipelineRunResult(context, r)); - var nextInferredPipeline = GetNextInferredPipeline(context, inferredHistory, columns, task, isMaximizingMetric, CacheBeforeTrainer.Auto); + var nextInferredPipeline = GetNextInferredPipeline(context, inferredHistory, columns, task, isMaximizingMetric, CacheBeforeTrainer.Auto, logger); return nextInferredPipeline?.ToPipeline(); } @@ -30,6 +33,7 @@ public static SuggestedPipeline GetNextInferredPipeline(MLContext context, TaskKind task, bool isMaximizingMetric, CacheBeforeTrainer cacheBeforeTrainer, + IChannel logger, IEnumerable trainerAllowList = null) { var availableTrainers = RecipeInference.AllowedTrainers(context, task, @@ -64,7 +68,7 @@ public static SuggestedPipeline GetNextInferredPipeline(MLContext context, do { // sample new hyperparameters for the learner - if (!SampleHyperparameters(context, newTrainer, history, isMaximizingMetric)) + if (!SampleHyperparameters(context, newTrainer, history, isMaximizingMetric, logger)) { // if unable to sample new hyperparameters for the learner // (ie SMAC returned 0 suggestions), break @@ -188,30 +192,42 @@ private static IValueGenerator[] ConvertToValueGenerators(IEnumerable - private static bool SampleHyperparameters(MLContext context, SuggestedTrainer trainer, IEnumerable history, bool isMaximizingMetric) + private static bool SampleHyperparameters(MLContext context, SuggestedTrainer trainer, + IEnumerable history, bool isMaximizingMetric, IChannel logger) { - var sps = ConvertToValueGenerators(trainer.SweepParams); - var sweeper = new SmacSweeper(context, - new SmacSweeper.Arguments + try + { + var sps = ConvertToValueGenerators(trainer.SweepParams); + var sweeper = new SmacSweeper(context, + new SmacSweeper.Arguments + { + SweptParameters = sps + }); + + IEnumerable historyToUse = history + .Where(r => r.RunSucceeded && r.Pipeline.Trainer.TrainerName == trainer.TrainerName && + r.Pipeline.Trainer.HyperParamSet != null && + r.Pipeline.Trainer.HyperParamSet.Any() && + FloatUtils.IsFinite(r.Score)); + + // get new set of hyperparameter values + var proposedParamSet = sweeper.ProposeSweeps(1, historyToUse.Select(h => h.ToRunResult(isMaximizingMetric))).FirstOrDefault(); + if (!proposedParamSet.Any()) { - SweptParameters = sps - }); + return false; + } - IEnumerable historyToUse = history - .Where(r => r.RunSucceeded && r.Pipeline.Trainer.TrainerName == trainer.TrainerName && r.Pipeline.Trainer.HyperParamSet != null && r.Pipeline.Trainer.HyperParamSet.Any()); + // associate proposed parameter set with trainer, so that smart hyperparameter + // sweepers (like KDO) can map them back. + trainer.SetHyperparamValues(proposedParamSet); - // get new set of hyperparameter values - var proposedParamSet = sweeper.ProposeSweeps(1, historyToUse.Select(h => h.ToRunResult(isMaximizingMetric))).First(); - if (!proposedParamSet.Any()) + return true; + } + catch (Exception ex) { - return false; + logger.Error($"SampleHyperparameters failed with exception: {ex}"); + throw; } - - // associate proposed parameter set with trainer, so that smart hyperparameter - // sweepers (like KDO) can map them back. - trainer.SetHyperparamValues(proposedParamSet); - - return true; } } } \ No newline at end of file diff --git a/src/Microsoft.ML.AutoML/Sweepers/Parameters.cs b/src/Microsoft.ML.AutoML/Sweepers/Parameters.cs index 2bf22db4c1..54765684d0 100644 --- a/src/Microsoft.ML.AutoML/Sweepers/Parameters.cs +++ b/src/Microsoft.ML.AutoML/Sweepers/Parameters.cs @@ -83,7 +83,7 @@ public LongParameterValue(string name, long value) { _name = name; _value = value; - _valueText = _value.ToString("D"); + _valueText = _value.ToString("D", CultureInfo.InvariantCulture); } public bool Equals(IParameterValue other) diff --git a/src/Microsoft.ML.AutoML/Sweepers/SweeperProbabilityUtils.cs b/src/Microsoft.ML.AutoML/Sweepers/SweeperProbabilityUtils.cs index f848a4e27b..89c13c152f 100644 --- a/src/Microsoft.ML.AutoML/Sweepers/SweeperProbabilityUtils.cs +++ b/src/Microsoft.ML.AutoML/Sweepers/SweeperProbabilityUtils.cs @@ -4,6 +4,7 @@ using System; using System.Collections.Generic; +using System.Globalization; using Microsoft.ML.Internal.CpuMath; namespace Microsoft.ML.AutoML @@ -98,13 +99,15 @@ public static float[] ParameterSetAsFloatArray(IValueGenerator[] sweepParams, Pa } else if (sweepParam is LongValueGenerator lvg) { + var longValue = GetIfIParameterValueOfT(pset) ?? long.Parse(pset.ValueText, CultureInfo.InvariantCulture); // Normalizing all numeric parameters to [0,1] range. - result.Add(lvg.NormalizeValue(new LongParameterValue(pset.Name, long.Parse(pset.ValueText)))); + result.Add(lvg.NormalizeValue(new LongParameterValue(pset.Name, longValue))); } else if (sweepParam is FloatValueGenerator fvg) { + var floatValue = GetIfIParameterValueOfT(pset) ?? float.Parse(pset.ValueText, CultureInfo.InvariantCulture); // Normalizing all numeric parameters to [0,1] range. - result.Add(fvg.NormalizeValue(new FloatParameterValue(pset.Name, float.Parse(pset.ValueText)))); + result.Add(fvg.NormalizeValue(new FloatParameterValue(pset.Name, floatValue))); } else { @@ -115,6 +118,10 @@ public static float[] ParameterSetAsFloatArray(IValueGenerator[] sweepParams, Pa return result.ToArray(); } + private static T? GetIfIParameterValueOfT(IParameterValue parameterValue) + where T : struct => + parameterValue is IParameterValue pvt ? pvt.Value : default(T?); + public static ParameterSet FloatArrayAsParameterSet(IValueGenerator[] sweepParams, float[] array, bool expandedCategoricals = true) { Runtime.Contracts.Assert(array.Length == sweepParams.Length); diff --git a/src/Microsoft.ML.AutoML/Utils/BestResultUtil.cs b/src/Microsoft.ML.AutoML/Utils/BestResultUtil.cs index b31aef191a..f1de5c1baf 100644 --- a/src/Microsoft.ML.AutoML/Utils/BestResultUtil.cs +++ b/src/Microsoft.ML.AutoML/Utils/BestResultUtil.cs @@ -35,9 +35,9 @@ public static RunDetail GetBestRun(IEnumerable< } public static RunDetail GetBestRun(IEnumerable> results, - RankingMetric metric) + RankingMetric metric, uint dcgTruncationLevel) { - var metricsAgent = new RankingMetricsAgent(null, metric); + var metricsAgent = new RankingMetricsAgent(null, metric, dcgTruncationLevel); var metricInfo = new OptimizingMetricInfo(metric); return GetBestRun(results, metricsAgent, metricInfo.IsMaximizing); diff --git a/src/Microsoft.ML.AutoML/Utils/StringEditDistance.cs b/src/Microsoft.ML.AutoML/Utils/StringEditDistance.cs new file mode 100644 index 0000000000..63b56e815a --- /dev/null +++ b/src/Microsoft.ML.AutoML/Utils/StringEditDistance.cs @@ -0,0 +1,60 @@ +using System; + +namespace Microsoft.ML.AutoML.Utils +{ + internal static class StringEditDistance + { + public static int GetLevenshteinDistance(string first, string second) + { + if (first is null) + { + throw new ArgumentNullException(nameof(first)); + } + + if (second is null) + { + throw new ArgumentNullException(nameof(second)); + } + + if (first.Length == 0 || second.Length == 0) + { + return first.Length + second.Length; + } + + var currentRow = 0; + var nextRow = 1; + var rows = new int[second.Length + 1, second.Length + 1]; + + for (var j = 0; j <= second.Length; ++j) + { + rows[currentRow, j] = j; + } + + for (var i = 1; i <= first.Length; ++i) + { + rows[nextRow, 0] = i; + for (var j = 1; j <= second.Length; ++j) + { + var deletion = rows[currentRow, j] + 1; + var insertion = rows[nextRow, j - 1] + 1; + var substitution = rows[currentRow, j - 1] + (first[i - 1].Equals(second[j - 1]) ? 0 : 1); + + rows[nextRow, j] = Math.Min(deletion, Math.Min(insertion, substitution)); + } + + if (currentRow == 0) + { + currentRow = 1; + nextRow = 0; + } + else + { + currentRow = 0; + nextRow = 1; + } + } + + return rows[currentRow, second.Length]; + } + } +} diff --git a/src/Microsoft.ML.AutoML/Utils/UserInputValidationUtil.cs b/src/Microsoft.ML.AutoML/Utils/UserInputValidationUtil.cs index cddbead9d4..6255e526ee 100644 --- a/src/Microsoft.ML.AutoML/Utils/UserInputValidationUtil.cs +++ b/src/Microsoft.ML.AutoML/Utils/UserInputValidationUtil.cs @@ -6,6 +6,7 @@ using System.Collections.Generic; using System.IO; using System.Linq; +using Microsoft.ML.AutoML.Utils; using Microsoft.ML.Data; namespace Microsoft.ML.AutoML @@ -248,7 +249,15 @@ private static void ValidateTrainDataColumn(IDataView trainData, string columnNa var nullableColumn = trainData.Schema.GetColumnOrNull(columnName); if (nullableColumn == null) { - throw new ArgumentException($"Provided {columnPurpose} column '{columnName}' not found in training data."); + var closestNamed = ClosestNamed(trainData, columnName, 7); + + var exceptionMessage = $"Provided {columnPurpose} column '{columnName}' not found in training data."; + if (closestNamed != string.Empty) + { + exceptionMessage += $" Did you mean '{closestNamed}'."; + } + + throw new ArgumentException(exceptionMessage); } if(allowedTypes == null) @@ -272,6 +281,23 @@ private static void ValidateTrainDataColumn(IDataView trainData, string columnNa } } + private static string ClosestNamed(IDataView trainData, string columnName, int maxAllowableEditDistance = int.MaxValue) + { + var minEditDistance = int.MaxValue; + var closestNamed = string.Empty; + foreach (var column in trainData.Schema) + { + var editDistance = StringEditDistance.GetLevenshteinDistance(column.Name, columnName); + if (editDistance < minEditDistance) + { + minEditDistance = editDistance; + closestNamed = column.Name; + } + } + + return minEditDistance <= maxAllowableEditDistance ? closestNamed : string.Empty; + } + private static string FindFirstDuplicate(IEnumerable values) { var groups = values.GroupBy(v => v); diff --git a/src/Microsoft.ML.CodeGenerator/Assembly.cs b/src/Microsoft.ML.CodeGenerator/Assembly.cs index 345536f33f..71b6b77d88 100644 --- a/src/Microsoft.ML.CodeGenerator/Assembly.cs +++ b/src/Microsoft.ML.CodeGenerator/Assembly.cs @@ -4,10 +4,10 @@ using System.Runtime.CompilerServices; -[assembly: InternalsVisibleTo("Microsoft.ML.CodeGenerator.Tests, PublicKey=002400000480000094000000060200000024000052534131000400000100010015c01ae1f50e8cc09ba9eac9147cf8fd9fce2cfe9f8dce4f7301c4132ca9fb50ce8cbf1df4dc18dd4d210e4345c744ecb3365ed327efdbc52603faa5e21daa11234c8c4a73e51f03bf192544581ebe107adee3a34928e39d04e524a9ce729d5090bfd7dad9d10c722c0def9ccc08ff0a03790e48bcd1f9b6c476063e1966a1c4")] +[assembly: InternalsVisibleTo("Microsoft.ML.CodeGenerator.Tests, PublicKey=00240000048000009400000006020000002400005253413100040000010001004b86c4cb78549b34bab61a3b1800e23bfeb5b3ec390074041536a7e3cbd97f5f04cf0f857155a8928eaa29ebfd11cfbbad3ba70efea7bda3226c6a8d370a4cd303f714486b6ebc225985a638471e6ef571cc92a4613c00b8fa65d61ccee0cbe5f36330c9a01f4183559f1bef24cc2917c6d913e3a541333a1d05d9bed22b38cb")] [assembly: InternalsVisibleTo("Microsoft.ML.ModelBuilder, PublicKey=002400000480000094000000060200000024000052534131000400000100010007d1fa57c4aed9f0a32e84aa0faefd0de9e8fd6aec8f87fb03766c834c99921eb23be79ad9d5dcc1dd9ad236132102900b723cf980957fc4e177108fc607774f29e8320e92ea05ece4e821c0a5efe8f1645c4c0c93c1ab99285d622caa652c1dfad63d745d6f2de5f17e5eaf0fc4963d261c8a12436518206dc093344d5ad293")] [assembly: InternalsVisibleTo("mlnet, PublicKey=00240000048000009400000006020000002400005253413100040000010001004b86c4cb78549b34bab61a3b1800e23bfeb5b3ec390074041536a7e3cbd97f5f04cf0f857155a8928eaa29ebfd11cfbbad3ba70efea7bda3226c6a8d370a4cd303f714486b6ebc225985a638471e6ef571cc92a4613c00b8fa65d61ccee0cbe5f36330c9a01f4183559f1bef24cc2917c6d913e3a541333a1d05d9bed22b38cb")] -[assembly: InternalsVisibleTo("mlnet.Tests, PublicKey=002400000480000094000000060200000024000052534131000400000100010015c01ae1f50e8cc09ba9eac9147cf8fd9fce2cfe9f8dce4f7301c4132ca9fb50ce8cbf1df4dc18dd4d210e4345c744ecb3365ed327efdbc52603faa5e21daa11234c8c4a73e51f03bf192544581ebe107adee3a34928e39d04e524a9ce729d5090bfd7dad9d10c722c0def9ccc08ff0a03790e48bcd1f9b6c476063e1966a1c4")] +[assembly: InternalsVisibleTo("mlnet.Tests, PublicKey=00240000048000009400000006020000002400005253413100040000010001004b86c4cb78549b34bab61a3b1800e23bfeb5b3ec390074041536a7e3cbd97f5f04cf0f857155a8928eaa29ebfd11cfbbad3ba70efea7bda3226c6a8d370a4cd303f714486b6ebc225985a638471e6ef571cc92a4613c00b8fa65d61ccee0cbe5f36330c9a01f4183559f1bef24cc2917c6d913e3a541333a1d05d9bed22b38cb")] [assembly: InternalsVisibleTo("Microsoft.ML.ModelBuilder.AutoMLService, PublicKey=002400000480000094000000060200000024000052534131000400000100010007d1fa57c4aed9f0a32e84aa0faefd0de9e8fd6aec8f87fb03766c834c99921eb23be79ad9d5dcc1dd9ad236132102900b723cf980957fc4e177108fc607774f29e8320e92ea05ece4e821c0a5efe8f1645c4c0c93c1ab99285d622caa652c1dfad63d745d6f2de5f17e5eaf0fc4963d261c8a12436518206dc093344d5ad293")] [assembly: InternalsVisibleTo("Microsoft.ML.ModelBuilder.AutoMLService.Gpu, PublicKey=002400000480000094000000060200000024000052534131000400000100010007d1fa57c4aed9f0a32e84aa0faefd0de9e8fd6aec8f87fb03766c834c99921eb23be79ad9d5dcc1dd9ad236132102900b723cf980957fc4e177108fc607774f29e8320e92ea05ece4e821c0a5efe8f1645c4c0c93c1ab99285d622caa652c1dfad63d745d6f2de5f17e5eaf0fc4963d261c8a12436518206dc093344d5ad293")] -[assembly: InternalsVisibleTo("Microsoft.ML.ModelBuilder.AutoMLService.Test, PublicKey=002400000480000094000000060200000024000052534131000400000100010007d1fa57c4aed9f0a32e84aa0faefd0de9e8fd6aec8f87fb03766c834c99921eb23be79ad9d5dcc1dd9ad236132102900b723cf980957fc4e177108fc607774f29e8320e92ea05ece4e821c0a5efe8f1645c4c0c93c1ab99285d622caa652c1dfad63d745d6f2de5f17e5eaf0fc4963d261c8a12436518206dc093344d5ad293")] +[assembly: InternalsVisibleTo("Microsoft.ML.ModelBuilder.AutoMLService.Tests, PublicKey=002400000480000094000000060200000024000052534131000400000100010007d1fa57c4aed9f0a32e84aa0faefd0de9e8fd6aec8f87fb03766c834c99921eb23be79ad9d5dcc1dd9ad236132102900b723cf980957fc4e177108fc607774f29e8320e92ea05ece4e821c0a5efe8f1645c4c0c93c1ab99285d622caa652c1dfad63d745d6f2de5f17e5eaf0fc4963d261c8a12436518206dc093344d5ad293")] diff --git a/src/Microsoft.ML.CodeGenerator/Microsoft.ML.CodeGenerator.csproj b/src/Microsoft.ML.CodeGenerator/Microsoft.ML.CodeGenerator.csproj index 9d823595ca..955914a780 100644 --- a/src/Microsoft.ML.CodeGenerator/Microsoft.ML.CodeGenerator.csproj +++ b/src/Microsoft.ML.CodeGenerator/Microsoft.ML.CodeGenerator.csproj @@ -1,8 +1,10 @@  + netstandard2.0 Microsoft.ML.CodeGenerator + ML.NET Code Generator @@ -19,8 +21,16 @@ + + all + + + + all + + - + TextTemplatingFilePreprocessor diff --git a/src/Microsoft.ML.CodeGenerator/Templates/Console/ConsumeModel.cs b/src/Microsoft.ML.CodeGenerator/Templates/Console/ConsumeModel.cs index 6ba08042c9..e71626d937 100644 --- a/src/Microsoft.ML.CodeGenerator/Templates/Console/ConsumeModel.cs +++ b/src/Microsoft.ML.CodeGenerator/Templates/Console/ConsumeModel.cs @@ -41,11 +41,12 @@ public class ConsumeModel { private static Lazy> PredictionEngine = new Lazy>(CreatePredictionEngine); - public static string MLNetModelPath = Path.GetFullPath("""); + public static string MLNetModelPath = Path.Combine(System.AppContext.BaseDirectory, """); this.Write(this.ToStringHelper.ToStringWithCulture(MLNetModelName)); this.Write("\");\r\n"); if(IsAzureImage || IsAzureObjectDetection){ - this.Write(" \r\n public static string OnnxModelPath = Path.GetFullPath(\""); + this.Write(" \r\n public static string OnnxModelPath = Path.Combine(System.AppContext.Ba" + + "seDirectory, \""); this.Write(this.ToStringHelper.ToStringWithCulture(OnnxModelName)); this.Write("\");\r\n"); } diff --git a/src/Microsoft.ML.CodeGenerator/Templates/Console/ConsumeModel.tt b/src/Microsoft.ML.CodeGenerator/Templates/Console/ConsumeModel.tt index 8c3d11568d..7735b15ee9 100644 --- a/src/Microsoft.ML.CodeGenerator/Templates/Console/ConsumeModel.tt +++ b/src/Microsoft.ML.CodeGenerator/Templates/Console/ConsumeModel.tt @@ -23,9 +23,9 @@ namespace <#= Namespace #>.Model { private static Lazy> PredictionEngine = new Lazy>(CreatePredictionEngine); - public static string MLNetModelPath = Path.GetFullPath("<#= MLNetModelName #>"); + public static string MLNetModelPath = Path.Combine(System.AppContext.BaseDirectory, "<#= MLNetModelName #>"); <#if(IsAzureImage || IsAzureObjectDetection){ #> - public static string OnnxModelPath = Path.GetFullPath("<#= OnnxModelName #>"); + public static string OnnxModelPath = Path.Combine(System.AppContext.BaseDirectory, "<#= OnnxModelName #>"); <#} #> // For more info on consuming ML.NET models, visit https://aka.ms/mlnet-consume diff --git a/src/Microsoft.ML.Core/Data/IHostEnvironment.cs b/src/Microsoft.ML.Core/Data/IHostEnvironment.cs index f59a37bef6..e010cf335e 100644 --- a/src/Microsoft.ML.Core/Data/IHostEnvironment.cs +++ b/src/Microsoft.ML.Core/Data/IHostEnvironment.cs @@ -72,7 +72,7 @@ public interface IHostEnvironment : IChannelProvider, IProgressChannelProvider internal interface ICancelable { /// - /// Signal to stop exection in all the hosts. + /// Signal to stop execution in all the hosts. /// void CancelExecution(); diff --git a/src/Microsoft.ML.Core/Properties/AssemblyInfo.cs b/src/Microsoft.ML.Core/Properties/AssemblyInfo.cs index e366c87dbf..32200eeef4 100644 --- a/src/Microsoft.ML.Core/Properties/AssemblyInfo.cs +++ b/src/Microsoft.ML.Core/Properties/AssemblyInfo.cs @@ -5,15 +5,15 @@ using System.Runtime.CompilerServices; using Microsoft.ML; -[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.TestFramework" + PublicKey.TestValue)] +[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.TestFramework" + PublicKey.Value)] [assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.Tests" + PublicKey.TestValue)] [assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.Core.Tests" + PublicKey.TestValue)] -[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.Predictor.Tests" + PublicKey.TestValue)] -[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.Sweeper.Tests" + PublicKey.TestValue)] -[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.InferenceTesting" + PublicKey.TestValue)] -[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.OnnxTransformerTest" + PublicKey.TestValue)] -[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.AutoML.Tests" + PublicKey.TestValue)] -[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.Benchmarks" + PublicKey.TestValue)] +[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.Predictor.Tests" + PublicKey.Value)] +[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.Sweeper.Tests" + PublicKey.Value)] +[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.InferenceTesting" + PublicKey.Value)] +[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.OnnxTransformerTest" + PublicKey.Value)] +[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.AutoML.Tests" + PublicKey.Value)] +[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.PerformanceTests" + PublicKey.Value)] [assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.EntryPoints" + PublicKey.Value)] [assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.Maml" + PublicKey.Value)] @@ -34,7 +34,6 @@ [assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.PipelineInference" + PublicKey.Value)] [assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.Recommender" + PublicKey.Value)] [assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.ImageAnalytics" + PublicKey.Value)] -[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.Scoring" + PublicKey.Value)] [assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.StandardTrainers" + PublicKey.Value)] [assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.Sweeper" + PublicKey.Value)] [assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.TensorFlow" + PublicKey.Value)] diff --git a/src/Microsoft.ML.CpuMath/AssemblyInfo.cs b/src/Microsoft.ML.CpuMath/AssemblyInfo.cs index 183ca61d90..8145826847 100644 --- a/src/Microsoft.ML.CpuMath/AssemblyInfo.cs +++ b/src/Microsoft.ML.CpuMath/AssemblyInfo.cs @@ -5,7 +5,7 @@ using System.Runtime.CompilerServices; using Microsoft.ML.Internal.CpuMath.Core; -[assembly: InternalsVisibleTo("Microsoft.ML.CpuMath.UnitTests" + PublicKey.TestValue)] +[assembly: InternalsVisibleTo("Microsoft.ML.CpuMath.UnitTests" + PublicKey.Value)] [assembly: InternalsVisibleTo("Microsoft.ML.Data" + PublicKey.Value)] [assembly: InternalsVisibleTo("Microsoft.ML.FastTree" + PublicKey.Value)] [assembly: InternalsVisibleTo("Microsoft.ML.Mkl.Components" + PublicKey.Value)] @@ -15,6 +15,6 @@ [assembly: InternalsVisibleTo("Microsoft.ML.Sweeper" + PublicKey.Value)] [assembly: InternalsVisibleTo("Microsoft.ML.TimeSeries" + PublicKey.Value)] [assembly: InternalsVisibleTo("Microsoft.ML.Transforms" + PublicKey.Value)] -[assembly: InternalsVisibleTo("Microsoft.ML.Benchmarks.Tests" + PublicKey.TestValue)] +[assembly: InternalsVisibleTo("Microsoft.ML.PerformanceTests.Tests" + PublicKey.Value)] [assembly: WantsToBeBestFriends] diff --git a/src/Microsoft.ML.CpuMath/Microsoft.ML.CpuMath.csproj b/src/Microsoft.ML.CpuMath/Microsoft.ML.CpuMath.csproj index e8185ed817..a0c141a8da 100644 --- a/src/Microsoft.ML.CpuMath/Microsoft.ML.CpuMath.csproj +++ b/src/Microsoft.ML.CpuMath/Microsoft.ML.CpuMath.csproj @@ -1,34 +1,41 @@  - + netstandard2.0;netcoreapp3.1 Microsoft.ML.CpuMath + Microsoft.ML.CpuMath contains optimized math routines for ML.NET. true $(DefineConstants);CPUMATH_INFRASTRUCTURE + $(TargetsForTfmSpecificBuildOutput);CopyProjectReferencesToPackage - - - - - - - + + + + + + + + + + + + \ No newline at end of file diff --git a/src/Microsoft.ML.CpuMath/Properties/AssemblyInfo.cs b/src/Microsoft.ML.CpuMath/Properties/AssemblyInfo.cs index 7297568e10..94c27a7fbf 100644 --- a/src/Microsoft.ML.CpuMath/Properties/AssemblyInfo.cs +++ b/src/Microsoft.ML.CpuMath/Properties/AssemblyInfo.cs @@ -5,7 +5,7 @@ using System.Runtime.CompilerServices; using Microsoft.ML.Internal.CpuMath.Core; -[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.CpuMath.PerformanceTests" + PublicKey.TestValue)] +[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.CpuMath.PerformanceTests" + PublicKey.Value)] [assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.Internal.CpuMath" + InternalPublicKey.Value)] [assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.Runtime.Internal.MklMath" + InternalPublicKey.Value)] [assembly: InternalsVisibleTo(assemblyName: "LibSvmWrapper" + InternalPublicKey.Value)] diff --git a/pkg/Microsoft.ML.CpuMath/build/netstandard2.0/Microsoft.ML.CpuMath.props b/src/Microsoft.ML.CpuMath/build/netstandard2.0/Microsoft.ML.CpuMath.props similarity index 100% rename from pkg/Microsoft.ML.CpuMath/build/netstandard2.0/Microsoft.ML.CpuMath.props rename to src/Microsoft.ML.CpuMath/build/netstandard2.0/Microsoft.ML.CpuMath.props diff --git a/src/Microsoft.ML.Data/Data/Conversion.cs b/src/Microsoft.ML.Data/Data/Conversion.cs index cf48c3f295..57b27c9184 100644 --- a/src/Microsoft.ML.Data/Data/Conversion.cs +++ b/src/Microsoft.ML.Data/Data/Conversion.cs @@ -950,8 +950,8 @@ public void Convert(in BL src, ref SB dst) public void Convert(in R8 src, ref TX dst) => dst = src.ToString("G17", CultureInfo.InvariantCulture).AsMemory(); public void Convert(in BL src, ref TX dst) => dst = src.ToString().AsMemory(); public void Convert(in TS src, ref TX dst) => dst = string.Format("{0:c}", src).AsMemory(); - public void Convert(in DT src, ref TX dst) => string.Format("{0:o}", src).AsMemory(); - public void Convert(in DZ src, ref TX dst) => string.Format("{0:o}", src).AsMemory(); + public void Convert(in DT src, ref TX dst) => dst = string.Format("{0:o}", src).AsMemory(); + public void Convert(in DZ src, ref TX dst) => dst = string.Format("{0:o}", src).AsMemory(); #endregion ToTX #region ToBL @@ -1733,4 +1733,4 @@ public void Convert(in TX src, ref SB dst) public void Convert(in DT src, ref DT dst) => dst = src; #endregion ToDT } -} \ No newline at end of file +} diff --git a/src/Microsoft.ML.Data/Data/DataViewUtils.cs b/src/Microsoft.ML.Data/Data/DataViewUtils.cs index dd06a4610a..c639186c4e 100644 --- a/src/Microsoft.ML.Data/Data/DataViewUtils.cs +++ b/src/Microsoft.ML.Data/Data/DataViewUtils.cs @@ -942,8 +942,10 @@ public override void Set(BatchColumn batchCol) public override void Unset() { Contracts.Assert(_index <= _count); - if (Values != null) - _pool.Return(Values); + // Remove all the objects from the pool + // to free up references to those objects + while (_pool.Count > 0) + _pool.Get(); Values = null; _count = 0; _index = 0; diff --git a/src/Microsoft.ML.Data/Evaluators/EvaluatorUtils.cs b/src/Microsoft.ML.Data/Evaluators/EvaluatorUtils.cs index 07bec9516e..96ee121400 100644 --- a/src/Microsoft.ML.Data/Evaluators/EvaluatorUtils.cs +++ b/src/Microsoft.ML.Data/Evaluators/EvaluatorUtils.cs @@ -1035,7 +1035,13 @@ private static List GetMetricNames(IChannel ch, DataViewSchema schema, D names = editor.Commit(); } foreach (var name in names.Items(all: true)) - metricNames.Add(string.Format("{0}{1}", metricName, name.Value)); + { + var tryNaming = string.Format(metricName, name.Value); + if (tryNaming == metricName) // metricName wasn't a format string, so just append slotname + tryNaming = (string.Format("{0}{1}", metricName, name.Value)); + + metricNames.Add(tryNaming); + } } } ch.Assert(metricNames.Count == metricCount); diff --git a/src/Microsoft.ML.Data/Evaluators/Metrics/CalibratedBinaryClassificationMetrics.cs b/src/Microsoft.ML.Data/Evaluators/Metrics/CalibratedBinaryClassificationMetrics.cs index e116d94025..0c2b640187 100644 --- a/src/Microsoft.ML.Data/Evaluators/Metrics/CalibratedBinaryClassificationMetrics.cs +++ b/src/Microsoft.ML.Data/Evaluators/Metrics/CalibratedBinaryClassificationMetrics.cs @@ -37,7 +37,7 @@ public sealed class CalibratedBinaryClassificationMetrics : BinaryClassification /// /// /// /// - /// If is positive, this is the relative number of examples where - /// the true label is one of the top-k predicted labels by the predictor. + /// Convenience method for "TopKAccuracyForAllK[TopKPredictionCount - 1]". If is positive, + /// this is the relative number of examples where + /// the true label is one of the top K predicted labels by the predictor. /// - public double TopKAccuracy { get; } + public double TopKAccuracy => TopKAccuracyForAllK?.LastOrDefault() ?? 0; /// - /// If positive, this indicates the K in . + /// If positive, this indicates the K in and . /// public int TopKPredictionCount { get; } + /// + /// Returns the top K accuracy for all K from 1 to the value of TopKPredictionCount. + /// + public IReadOnlyList TopKAccuracyForAllK { get; } + /// /// Gets the log-loss of the classifier for each class. Log-loss measures the performance of a classifier /// with respect to how much the predicted probabilities diverge from the true class label. Lower @@ -115,8 +123,9 @@ internal MulticlassClassificationMetrics(IHost host, DataViewRow overallResult, LogLoss = FetchDouble(MulticlassClassificationEvaluator.LogLoss); LogLossReduction = FetchDouble(MulticlassClassificationEvaluator.LogLossReduction); TopKPredictionCount = topKPredictionCount; + if (topKPredictionCount > 0) - TopKAccuracy = FetchDouble(MulticlassClassificationEvaluator.TopKAccuracy); + TopKAccuracyForAllK = RowCursorUtils.Fetch>(host, overallResult, MulticlassClassificationEvaluator.AllTopKAccuracy).DenseValues().ToImmutableArray(); var perClassLogLoss = RowCursorUtils.Fetch>(host, overallResult, MulticlassClassificationEvaluator.PerClassLogLoss); PerClassLogLoss = perClassLogLoss.DenseValues().ToImmutableArray(); @@ -124,20 +133,20 @@ internal MulticlassClassificationMetrics(IHost host, DataViewRow overallResult, } internal MulticlassClassificationMetrics(double accuracyMicro, double accuracyMacro, double logLoss, double logLossReduction, - int topKPredictionCount, double topKAccuracy, double[] perClassLogLoss) + int topKPredictionCount, double[] topKAccuracies, double[] perClassLogLoss) { MicroAccuracy = accuracyMicro; MacroAccuracy = accuracyMacro; LogLoss = logLoss; LogLossReduction = logLossReduction; TopKPredictionCount = topKPredictionCount; - TopKAccuracy = topKAccuracy; + TopKAccuracyForAllK = topKAccuracies; PerClassLogLoss = perClassLogLoss.ToImmutableArray(); } internal MulticlassClassificationMetrics(double accuracyMicro, double accuracyMacro, double logLoss, double logLossReduction, - int topKPredictionCount, double topKAccuracy, double[] perClassLogLoss, ConfusionMatrix confusionMatrix) - : this(accuracyMicro, accuracyMacro, logLoss, logLossReduction, topKPredictionCount, topKAccuracy, perClassLogLoss) + int topKPredictionCount, double[] topKAccuracies, double[] perClassLogLoss, ConfusionMatrix confusionMatrix) + : this(accuracyMicro, accuracyMacro, logLoss, logLossReduction, topKPredictionCount, topKAccuracies, perClassLogLoss) { ConfusionMatrix = confusionMatrix; } diff --git a/src/Microsoft.ML.Data/Evaluators/MulticlassClassificationEvaluator.cs b/src/Microsoft.ML.Data/Evaluators/MulticlassClassificationEvaluator.cs index e616d19a55..f084867b96 100644 --- a/src/Microsoft.ML.Data/Evaluators/MulticlassClassificationEvaluator.cs +++ b/src/Microsoft.ML.Data/Evaluators/MulticlassClassificationEvaluator.cs @@ -41,6 +41,7 @@ public sealed class Arguments public const string AccuracyMicro = "Accuracy(micro-avg)"; public const string AccuracyMacro = "Accuracy(macro-avg)"; public const string TopKAccuracy = "Top K accuracy"; + public const string AllTopKAccuracy = "Top K accuracies"; public const string PerClassLogLoss = "Per class log-loss"; public const string LogLoss = "Log-loss"; public const string LogLossReduction = "Log-loss reduction"; @@ -147,6 +148,7 @@ private protected override void GetAggregatorConsolidationFuncs(Aggregator aggre var logLoss = new List(); var logLossRed = new List(); var topKAcc = new List(); + var allTopK = new List(); var perClassLogLoss = new List(); var counts = new List(); var weights = new List(); @@ -171,7 +173,10 @@ private protected override void GetAggregatorConsolidationFuncs(Aggregator aggre logLoss.Add(agg.UnweightedCounters.LogLoss); logLossRed.Add(agg.UnweightedCounters.Reduction); if (agg.UnweightedCounters.OutputTopKAcc > 0) + { topKAcc.Add(agg.UnweightedCounters.TopKAccuracy); + allTopK.Add(agg.UnweightedCounters.AllTopKAccuracy); + } perClassLogLoss.Add(agg.UnweightedCounters.PerClassLogLoss); confStratCol.AddRange(agg.UnweightedCounters.ConfusionTable.Select(x => stratColKey)); @@ -188,7 +193,10 @@ private protected override void GetAggregatorConsolidationFuncs(Aggregator aggre logLoss.Add(agg.WeightedCounters.LogLoss); logLossRed.Add(agg.WeightedCounters.Reduction); if (agg.WeightedCounters.OutputTopKAcc > 0) + { topKAcc.Add(agg.WeightedCounters.TopKAccuracy); + allTopK.Add(agg.WeightedCounters.AllTopKAccuracy); + } perClassLogLoss.Add(agg.WeightedCounters.PerClassLogLoss); weights.AddRange(agg.WeightedCounters.ConfusionTable); } @@ -210,7 +218,15 @@ private protected override void GetAggregatorConsolidationFuncs(Aggregator aggre overallDvBldr.AddColumn(LogLoss, NumberDataViewType.Double, logLoss.ToArray()); overallDvBldr.AddColumn(LogLossReduction, NumberDataViewType.Double, logLossRed.ToArray()); if (aggregator.UnweightedCounters.OutputTopKAcc > 0) + { overallDvBldr.AddColumn(TopKAccuracy, NumberDataViewType.Double, topKAcc.ToArray()); + + ValueGetter>> getKSlotNames = + (ref VBuffer> dst) => + dst = new VBuffer>(allTopK.First().Length, Enumerable.Range(1, allTopK.First().Length).Select(i => new ReadOnlyMemory(i.ToString().ToCharArray())).ToArray()); + overallDvBldr.AddColumn(AllTopKAccuracy, getKSlotNames, NumberDataViewType.Double, allTopK.ToArray()); + } + overallDvBldr.AddColumn(PerClassLogLoss, aggregator.GetSlotNames, NumberDataViewType.Double, perClassLogLoss.ToArray()); var confDvBldr = new ArrayDataViewBuilder(Host); @@ -246,9 +262,10 @@ public sealed class Counters private double _totalLogLoss; private double _numInstances; private double _numCorrect; - private double _numCorrectTopK; private readonly double[] _sumWeightsOfClass; private readonly double[] _totalPerClassLogLoss; + private readonly double[] _seenRanks; + public readonly double[][] ConfusionTable; public double MicroAvgAccuracy { get { return _numInstances > 0 ? _numCorrect / _numInstances : 0; } } @@ -291,7 +308,8 @@ public double Reduction } } - public double TopKAccuracy { get { return _numInstances > 0 ? _numCorrectTopK / _numInstances : 0; } } + public double TopKAccuracy => !(OutputTopKAcc is null) ? AllTopKAccuracy[OutputTopKAcc.Value - 1] : 0d; + public double[] AllTopKAccuracy => CumulativeSum(_seenRanks.Take(OutputTopKAcc ?? 0).Select(l => l / _numInstances)).ToArray(); // The per class average log loss is calculated by dividing the weighted sum of the log loss of examples // in each class by the total weight of examples in that class. @@ -316,14 +334,12 @@ public Counters(int numClasses, int? outputTopKAcc) ConfusionTable = new double[numClasses][]; for (int i = 0; i < ConfusionTable.Length; i++) ConfusionTable[i] = new double[numClasses]; + + _seenRanks = new double[numClasses + 1]; } - public void Update(int[] indices, double loglossCurr, int label, float weight) + public void Update(int seenRank, int assigned, double loglossCurr, int label, float weight) { - Contracts.Assert(Utils.Size(indices) == _numClasses); - - int assigned = indices[0]; - _numInstances += weight; if (label < _numClasses) @@ -334,23 +350,30 @@ public void Update(int[] indices, double loglossCurr, int label, float weight) if (label < _numClasses) _totalPerClassLogLoss[label] += loglossCurr * weight; - if (assigned == label) + _seenRanks[seenRank] += weight; + + if (seenRank == 0) // Prediction matched label { _numCorrect += weight; ConfusionTable[label][label] += weight; - _numCorrectTopK += weight; } else if (label < _numClasses) { - if (OutputTopKAcc > 0) - { - int idx = Array.IndexOf(indices, label); - if (0 <= idx && idx < OutputTopKAcc) - _numCorrectTopK += weight; - } ConfusionTable[label][assigned] += weight; } } + + private static IEnumerable CumulativeSum(IEnumerable s) + { + double sum = 0; + + foreach (var x in s) + { + sum += x; + yield return sum; + } + } + } private ValueGetter _labelGetter; @@ -359,7 +382,6 @@ public void Update(int[] indices, double loglossCurr, int label, float weight) private VBuffer _scores; private readonly float[] _scoresArr; - private int[] _indicesArr; private const float Epsilon = (float)1e-15; @@ -380,6 +402,7 @@ public Aggregator(IHostEnvironment env, ReadOnlyMemory[] classNames, int s Host.Assert(Utils.Size(classNames) == scoreVectorSize); _scoresArr = new float[scoreVectorSize]; + UnweightedCounters = new Counters(scoreVectorSize, outputTopKAcc); Weighted = weighted; WeightedCounters = Weighted ? new Counters(scoreVectorSize, outputTopKAcc) : null; @@ -400,6 +423,7 @@ internal override void InitializeNextPass(DataViewRow row, RoleMappedSchema sche if (schema.Weight.HasValue) _weightGetter = row.GetGetter(schema.Weight.Value); + } public override void ProcessRow() @@ -437,16 +461,10 @@ public override void ProcessRow() } } - // Sort classes by prediction strength. - // Use stable OrderBy instead of Sort(), which may give different results on different machines. - if (Utils.Size(_indicesArr) < _scoresArr.Length) - _indicesArr = new int[_scoresArr.Length]; - int j = 0; - foreach (var index in Enumerable.Range(0, _scoresArr.Length).OrderByDescending(i => _scoresArr[i])) - _indicesArr[j++] = index; - var intLabel = (int)label; + var wasKnownLabel = true; + // log-loss double logloss; if (intLabel < _scoresArr.Length) @@ -461,11 +479,37 @@ public override void ProcessRow() // Penalize logloss if the label was not seen during training logloss = -Math.Log(Epsilon); _numUnknownClassInstances++; + wasKnownLabel = false; } - UnweightedCounters.Update(_indicesArr, logloss, intLabel, 1); + // Get the probability that the CORRECT label has: (best case is that it's the highest probability): + var correctProba = !wasKnownLabel ? 0 : _scoresArr[intLabel]; + + // Find the rank of the *correct* label (in _scoresArr[]). If the correct (ground truth) labels gets rank 0, + // it means the model assigned it the highest probability (that's ideal). Rank 1 would mean our model + // gives the real label the 2nd highest probabality, etc. + // The rank will be from 0 to N. (Not N-1). Rank N is used for unrecognized values. + // + // Tie breaking: What if we have probabilities that are equal to the correct prediction (eg, a:0.1, b:0.1, + // c:0.1, d:0.6, e:0.1 where c is the correct label). + // This actually happens a lot with some models. We handle ties by assigning rank in order of first + // appearance. In this example, we assign c the rank of 3, because d has a higher probability and a and b + // are sequentially first. + int rankOfCorrectLabel = 0; + int assigned = 0; + for (int i=0; i < _scoresArr.Length; i++) + { + if (_scoresArr[i] > correctProba || (_scoresArr[i] == correctProba && i < intLabel)) + rankOfCorrectLabel++; + + // This is the assigned "prediction" of the model if it has the highest probability. + if (_scoresArr[assigned] < _scoresArr[i]) + assigned = i; + } + + UnweightedCounters.Update(rankOfCorrectLabel, assigned, logloss, intLabel, 1); if (WeightedCounters != null) - WeightedCounters.Update(_indicesArr, logloss, intLabel, weight); + WeightedCounters.Update(rankOfCorrectLabel, assigned, logloss, intLabel, weight); } protected override List GetWarningsCore() @@ -882,13 +926,16 @@ private protected override void PrintFoldResultsCore(IChannel ch, Dictionary GetOverallMetricColumns() } yield return new MetricColumn("LogLoss", MulticlassClassificationEvaluator.LogLoss, MetricColumn.Objective.Minimize); yield return new MetricColumn("LogLossReduction", MulticlassClassificationEvaluator.LogLossReduction); + yield return new MetricColumn("TopKAccuracyForAllK", MulticlassClassificationEvaluator.AllTopKAccuracy, isVector: true); } private protected override IEnumerable GetPerInstanceColumnsToSave(RoleMappedSchema schema) diff --git a/src/Microsoft.ML.Data/Evaluators/RankingEvaluator.cs b/src/Microsoft.ML.Data/Evaluators/RankingEvaluator.cs index 5d6fa8135d..876c449b34 100644 --- a/src/Microsoft.ML.Data/Evaluators/RankingEvaluator.cs +++ b/src/Microsoft.ML.Data/Evaluators/RankingEvaluator.cs @@ -35,7 +35,7 @@ public sealed class RankingEvaluatorOptions /// Maximum truncation level for computing (N)DCG /// [Argument(ArgumentType.AtMostOnce, HelpText = "Maximum truncation level for computing (N)DCG", ShortName = "t")] - public int DcgTruncationLevel = 3; + public int DcgTruncationLevel = 10; /// /// Label relevance gains @@ -858,7 +858,7 @@ public sealed class Arguments : ArgumentsBase public string GroupIdColumn; [Argument(ArgumentType.AtMostOnce, HelpText = "Maximum truncation level for computing (N)DCG", ShortName = "t")] - public int DcgTruncationLevel = 3; + public int DcgTruncationLevel = 10; [Argument(ArgumentType.AtMostOnce, HelpText = "Label relevance gains", ShortName = "gains")] public string LabelGains = "0,3,7,15,31"; diff --git a/src/Microsoft.ML.Data/Prediction/PredictionEngine.cs b/src/Microsoft.ML.Data/Prediction/PredictionEngine.cs index 43d71555ba..c1639958bd 100644 --- a/src/Microsoft.ML.Data/Prediction/PredictionEngine.cs +++ b/src/Microsoft.ML.Data/Prediction/PredictionEngine.cs @@ -62,6 +62,8 @@ public void Reset() /// /// This class can also be used with trained pipelines that do not end with a predictor: in this case, the /// 'prediction' will be just the outcome of all the transformations. + /// + /// The PredictionEngine is NOT thread safe. Using it in a threaded environment can cause unexpected issues. /// public sealed class PredictionEngine : PredictionEngineBase where TSrc : class diff --git a/src/Microsoft.ML.Data/Properties/AssemblyInfo.cs b/src/Microsoft.ML.Data/Properties/AssemblyInfo.cs index 06791fefde..3dc2df359f 100644 --- a/src/Microsoft.ML.Data/Properties/AssemblyInfo.cs +++ b/src/Microsoft.ML.Data/Properties/AssemblyInfo.cs @@ -5,17 +5,17 @@ using System.Runtime.CompilerServices; using Microsoft.ML; -[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.TestFramework" + PublicKey.TestValue)] +[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.TestFramework" + PublicKey.Value)] [assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.Tests" + PublicKey.TestValue)] [assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.Core.Tests" + PublicKey.TestValue)] -[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.InferenceTesting" + PublicKey.TestValue)] -[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.OnnxTransformerTest" + PublicKey.TestValue)] -[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.Predictor.Tests" + PublicKey.TestValue)] -[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.TimeSeries.Tests" + PublicKey.TestValue)] -[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.Benchmarks" + PublicKey.TestValue)] -[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.AutoML.Tests" + PublicKey.TestValue)] +[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.InferenceTesting" + PublicKey.Value)] +[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.OnnxTransformerTest" + PublicKey.Value)] +[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.Predictor.Tests" + PublicKey.Value)] +[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.TimeSeries.Tests" + PublicKey.Value)] +[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.PerformanceTests" + PublicKey.Value)] +[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.AutoML.Tests" + PublicKey.Value)] -[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.Benchmarks" + PublicKey.TestValue)] +[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.PerformanceTests" + PublicKey.Value)] [assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.EntryPoints" + PublicKey.Value)] [assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.Maml" + PublicKey.Value)] [assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.ResultProcessor" + PublicKey.Value)] @@ -33,7 +33,6 @@ [assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.PipelineInference" + PublicKey.Value)] [assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.Recommender" + PublicKey.Value)] [assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.ImageAnalytics" + PublicKey.Value)] -[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.Scoring" + PublicKey.Value)] [assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.StandardTrainers" + PublicKey.Value)] [assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.Sweeper" + PublicKey.Value)] [assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.TensorFlow" + PublicKey.Value)] diff --git a/src/Microsoft.ML.Data/Transforms/ColumnConcatenatingEstimator.cs b/src/Microsoft.ML.Data/Transforms/ColumnConcatenatingEstimator.cs index ef5508a648..1eaf3be122 100644 --- a/src/Microsoft.ML.Data/Transforms/ColumnConcatenatingEstimator.cs +++ b/src/Microsoft.ML.Data/Transforms/ColumnConcatenatingEstimator.cs @@ -116,8 +116,8 @@ private SchemaShape.Column CheckInputsAndMakeColumn( } if (!col.ItemType.Equals(itemType)) { - throw _host.Except($"Column '{sources[i]}' has values of {col.ItemType}, " + - $"which is not the same as earlier observed type of {itemType}."); + throw _host.Except($"Concatenated columns should have the same type. Column '{sources[i]}' has type of {col.ItemType}, " + + $"but expected column type is {itemType}."); } varVector |= col.Kind == SchemaShape.Column.VectorKind.VariableVector; isNormalized &= col.IsNormalized(); diff --git a/src/Microsoft.ML.Data/Transforms/RowToRowTransformerBase.cs b/src/Microsoft.ML.Data/Transforms/RowToRowTransformerBase.cs index baf3400eaf..5a6b15cf69 100644 --- a/src/Microsoft.ML.Data/Transforms/RowToRowTransformerBase.cs +++ b/src/Microsoft.ML.Data/Transforms/RowToRowTransformerBase.cs @@ -58,7 +58,7 @@ private protected abstract class MapperBase : IRowMapper { protected readonly IHost Host; protected readonly DataViewSchema InputSchema; - private readonly Lazy _outputColumns; + protected readonly Lazy OutputColumns; private readonly RowToRowTransformerBase _parent; protected MapperBase(IHost host, DataViewSchema inputSchema, RowToRowTransformerBase parent) @@ -68,21 +68,21 @@ protected MapperBase(IHost host, DataViewSchema inputSchema, RowToRowTransformer Host = host; InputSchema = inputSchema; _parent = parent; - _outputColumns = new Lazy(GetOutputColumnsCore); + OutputColumns = new Lazy(GetOutputColumnsCore); } protected abstract DataViewSchema.DetachedColumn[] GetOutputColumnsCore(); - DataViewSchema.DetachedColumn[] IRowMapper.GetOutputColumns() => _outputColumns.Value; + DataViewSchema.DetachedColumn[] IRowMapper.GetOutputColumns() => OutputColumns.Value; - Delegate[] IRowMapper.CreateGetters(DataViewRow input, Func activeOutput, out Action disposer) + public virtual Delegate[] CreateGetters(DataViewRow input, Func activeOutput, out Action disposer) { // REVIEW: it used to be that the mapper's input schema in the constructor was required to be reference-equal to the schema // of the input row. // It still has to be the same schema, but because we may make a transition from lazy to eager schema, the reference-equality // is no longer always possible. So, we relax the assert as below. Contracts.Assert(input.Schema == InputSchema); - int n = _outputColumns.Value.Length; + int n = OutputColumns.Value.Length; var result = new Delegate[n]; var disposers = new Action[n]; for (int i = 0; i < n; i++) diff --git a/src/Microsoft.ML.Data/Transforms/ValueMapping.cs b/src/Microsoft.ML.Data/Transforms/ValueMapping.cs index 7a81bee190..47c6ff8836 100644 --- a/src/Microsoft.ML.Data/Transforms/ValueMapping.cs +++ b/src/Microsoft.ML.Data/Transforms/ValueMapping.cs @@ -12,6 +12,7 @@ using Microsoft.ML.Data; using Microsoft.ML.Data.IO; using Microsoft.ML.Internal.Utilities; +using Microsoft.ML.Model.OnnxConverter; using Microsoft.ML.Runtime; using Microsoft.ML.Transforms; @@ -818,6 +819,8 @@ private static ValueMap CreateValueMapInvoke(DataViewSchema.Column public abstract Delegate GetGetter(DataViewRow input, int index); public abstract IDataView GetDataView(IHostEnvironment env); + public abstract TKey[] GetKeys(); + public abstract TValue[] GetValues(); } /// @@ -962,6 +965,16 @@ private static TValue GetVector(TValue value) } private static TValue GetValue(TValue value) => value; + + public override T[] GetKeys() + { + return _mapping.Keys.Cast().ToArray(); + } + public override T[] GetValues() + { + return _mapping.Values.Cast().ToArray(); + } + } /// @@ -1012,12 +1025,13 @@ private protected override IRowMapper MakeRowMapper(DataViewSchema schema) return new Mapper(this, schema, _valueMap, ColumnPairs); } - private sealed class Mapper : OneToOneMapperBase + private sealed class Mapper : OneToOneMapperBase, ISaveAsOnnx { private readonly DataViewSchema _inputSchema; private readonly ValueMap _valueMap; private readonly (string outputColumnName, string inputColumnName)[] _columns; private readonly ValueMappingTransformer _parent; + public bool CanSaveOnnx(OnnxContext ctx) => true; internal Mapper(ValueMappingTransformer transform, DataViewSchema inputSchema, @@ -1040,6 +1054,227 @@ protected override Delegate MakeGetter(DataViewRow input, int iinfo, Func(OnnxContext ctx, out OnnxNode node, string srcVariableName, string opType, string labelEncoderOutput, PrimitiveDataViewType itemType) + { + var srcShape = ctx.RetrieveShapeOrNull(srcVariableName); + var castOutput = ctx.AddIntermediateVariable(new VectorDataViewType(itemType, (int)srcShape[1]), "castOutput"); + var castNode = ctx.CreateNode("Cast", srcVariableName, castOutput, ctx.GetNodeName("Cast"), ""); + castNode.AddAttribute("to", itemType.RawType); + node = ctx.CreateNode(opType, castOutput, labelEncoderOutput, ctx.GetNodeName(opType)); + if (itemType == TextDataViewType.Instance) + node.AddAttribute("keys_strings", Array.ConvertAll(_valueMap.GetKeys(), item => Convert.ToString(item))); + else if (itemType == NumberDataViewType.Single) + node.AddAttribute("keys_floats", Array.ConvertAll(_valueMap.GetKeys(), item => Convert.ToSingle(item))); + else if (itemType == NumberDataViewType.Int64) + node.AddAttribute("keys_int64s", Array.ConvertAll(_valueMap.GetKeys(), item => Convert.ToInt64(item))); + + } + + private bool SaveAsOnnxCore(OnnxContext ctx, string srcVariableName, string dstVariableName) + { + const int minimumOpSetVersion = 9; + ctx.CheckOpSetVersion(minimumOpSetVersion, LoaderSignature); + OnnxNode node; + string opType = "LabelEncoder"; + var labelEncoderInput = srcVariableName; + var srcShape = ctx.RetrieveShapeOrNull(srcVariableName); + var typeValue = _valueMap.ValueColumn.Type; + var typeKey = _valueMap.KeyColumn.Type; + var kind = _valueMap.ValueColumn.Type.GetRawKind(); + + var labelEncoderOutput = (typeValue == NumberDataViewType.Single || typeValue == TextDataViewType.Instance || typeValue == NumberDataViewType.Int64) ? dstVariableName : + (typeValue == NumberDataViewType.Double || typeValue == BooleanDataViewType.Instance) ? ctx.AddIntermediateVariable(new VectorDataViewType(NumberDataViewType.Single, (int)srcShape[1]), "LabelEncoderOutput") : + ctx.AddIntermediateVariable(new VectorDataViewType(NumberDataViewType.Int64, (int) srcShape[1]), "LabelEncoderOutput"); + + // The LabelEncoder operator doesn't support mappings between the same type and only supports mappings between int64s, floats, and strings. + // As a result, we need to cast most inputs and outputs. In order to avoid as many unsupported mappings, we cast keys that are of NumberDataTypeView + // to strings and values of NumberDataViewType to int64s. + // String -> String mappings can't be supported. + if (typeKey == NumberDataViewType.Int64) + { + // To avoid a int64 -> int64 mapping, we cast keys to strings + if (typeValue is NumberDataViewType) + { + CastInputTo(ctx, out node, srcVariableName, opType, labelEncoderOutput, TextDataViewType.Instance); + } + else + { + node = ctx.CreateNode(opType, srcVariableName, labelEncoderOutput, ctx.GetNodeName(opType)); + node.AddAttribute("keys_int64s", _valueMap.GetKeys()); + } + } + else if (typeKey == NumberDataViewType.Int32) + { + // To avoid a string -> string mapping, we cast keys to int64s + if (typeValue is TextDataViewType) + CastInputTo(ctx, out node, srcVariableName, opType, labelEncoderOutput, NumberDataViewType.Int64); + else + CastInputTo(ctx, out node, srcVariableName, opType, labelEncoderOutput, TextDataViewType.Instance); + } + else if (typeKey == NumberDataViewType.Int16) + { + if (typeValue is TextDataViewType) + CastInputTo(ctx, out node, srcVariableName, opType, labelEncoderOutput, NumberDataViewType.Int64); + else + CastInputTo(ctx, out node, srcVariableName, opType, labelEncoderOutput, TextDataViewType.Instance); + } + else if (typeKey == NumberDataViewType.UInt64) + { + if (typeValue is TextDataViewType) + CastInputTo(ctx, out node, srcVariableName, opType, labelEncoderOutput, NumberDataViewType.Int64); + else + CastInputTo(ctx, out node, srcVariableName, opType, labelEncoderOutput, TextDataViewType.Instance); + } + else if (typeKey == NumberDataViewType.UInt32) + { + if (typeValue is TextDataViewType) + CastInputTo(ctx, out node, srcVariableName, opType, labelEncoderOutput, NumberDataViewType.Int64); + else + CastInputTo(ctx, out node, srcVariableName, opType, labelEncoderOutput, TextDataViewType.Instance); + } + else if (typeKey == NumberDataViewType.UInt16) + { + if (typeValue is TextDataViewType) + CastInputTo(ctx, out node, srcVariableName, opType, labelEncoderOutput, NumberDataViewType.Int64); + else + CastInputTo(ctx, out node, srcVariableName, opType, labelEncoderOutput, TextDataViewType.Instance); + } + else if (typeKey == NumberDataViewType.Single) + { + if (typeValue == NumberDataViewType.Single || typeValue == NumberDataViewType.Double || typeValue == BooleanDataViewType.Instance) + { + CastInputTo(ctx, out node, srcVariableName, opType, labelEncoderOutput, TextDataViewType.Instance); + } + else + { + node = ctx.CreateNode(opType, srcVariableName, labelEncoderOutput, ctx.GetNodeName(opType)); + node.AddAttribute("keys_floats", _valueMap.GetKeys()); + } + } + else if (typeKey == NumberDataViewType.Double) + { + if (typeValue == NumberDataViewType.Single || typeValue == NumberDataViewType.Double || typeValue == BooleanDataViewType.Instance) + CastInputTo(ctx, out node, srcVariableName, opType, labelEncoderOutput, TextDataViewType.Instance); + else + CastInputTo(ctx, out node, srcVariableName, opType, labelEncoderOutput, NumberDataViewType.Single); + } + else if (typeKey == TextDataViewType.Instance) + { + if (typeValue == TextDataViewType.Instance) + return false; + node = ctx.CreateNode(opType, srcVariableName, labelEncoderOutput, ctx.GetNodeName(opType)); + node.AddAttribute("keys_strings", _valueMap.GetKeys>()); + } + else if (typeKey == BooleanDataViewType.Instance) + { + if (typeValue == NumberDataViewType.Single || typeValue == NumberDataViewType.Double || typeValue == BooleanDataViewType.Instance) + { + var castOutput = ctx.AddIntermediateVariable(new VectorDataViewType(TextDataViewType.Instance, (int)srcShape[1]), "castOutput"); + var castNode = ctx.CreateNode("Cast", srcVariableName, castOutput, ctx.GetNodeName("Cast"), ""); + var t = InternalDataKindExtensions.ToInternalDataKind(DataKind.String).ToType(); + castNode.AddAttribute("to", t); + node = ctx.CreateNode(opType, castOutput, labelEncoderOutput, ctx.GetNodeName(opType)); + var values = Array.ConvertAll(_valueMap.GetKeys(), item => Convert.ToString(Convert.ToByte(item))); + node.AddAttribute("keys_strings", values); + } + else + CastInputTo(ctx, out node, srcVariableName, opType, labelEncoderOutput, NumberDataViewType.Single); + } + else + return false; + + if (typeValue == NumberDataViewType.Int64) + { + node.AddAttribute("values_int64s", _valueMap.GetValues()); + } + else if (typeValue == NumberDataViewType.Int32) + { + node.AddAttribute("values_int64s", _valueMap.GetValues().Select(item => Convert.ToInt64(item))); + var castNode = ctx.CreateNode("Cast", labelEncoderOutput, dstVariableName, ctx.GetNodeName("Cast"), ""); + castNode.AddAttribute("to", typeValue.RawType); + } + else if (typeValue == NumberDataViewType.Int16) + { + node.AddAttribute("values_int64s", _valueMap.GetValues().Select(item => Convert.ToInt64(item))); + var castNode = ctx.CreateNode("Cast", labelEncoderOutput, dstVariableName, ctx.GetNodeName("Cast"), ""); + castNode.AddAttribute("to", typeValue.RawType); + } + else if (typeValue == NumberDataViewType.UInt64 || kind == InternalDataKind.U8) + { + node.AddAttribute("values_int64s", _valueMap.GetValues().Select(item => Convert.ToInt64(item))); + var castNode = ctx.CreateNode("Cast", labelEncoderOutput, dstVariableName, ctx.GetNodeName("Cast"), ""); + castNode.AddAttribute("to", typeValue.RawType); + } + else if (typeValue == NumberDataViewType.UInt32 || kind == InternalDataKind.U4) + { + node.AddAttribute("values_int64s", _valueMap.GetValues().Select(item => Convert.ToInt64(item))); + var castNode = ctx.CreateNode("Cast", labelEncoderOutput, dstVariableName, ctx.GetNodeName("Cast"), ""); + castNode.AddAttribute("to", typeValue.RawType); + } + else if (typeValue == NumberDataViewType.UInt16) + { + node.AddAttribute("values_int64s", _valueMap.GetValues().Select(item => Convert.ToInt64(item))); + var castNode = ctx.CreateNode("Cast", labelEncoderOutput, dstVariableName, ctx.GetNodeName("Cast"), ""); + castNode.AddAttribute("to", typeValue.RawType); + } + else if (typeValue == NumberDataViewType.Single) + { + node.AddAttribute("values_floats", _valueMap.GetValues()); + } + else if (typeValue == NumberDataViewType.Double) + { + node.AddAttribute("values_floats", _valueMap.GetValues().Select(item => Convert.ToSingle(item))); + var castNode = ctx.CreateNode("Cast", labelEncoderOutput, dstVariableName, ctx.GetNodeName("Cast"), ""); + castNode.AddAttribute("to", typeValue.RawType); + } + else if (typeValue == TextDataViewType.Instance) + { + node.AddAttribute("values_strings", _valueMap.GetValues>()); + } + else if (typeValue == BooleanDataViewType.Instance) + { + node.AddAttribute("values_floats", _valueMap.GetValues().Select(item => Convert.ToSingle(item))); + var castNode = ctx.CreateNode("Cast", labelEncoderOutput, dstVariableName, ctx.GetNodeName("Cast"), ""); + castNode.AddAttribute("to", typeValue.RawType); + } + else + return false; + + //Unknown keys should map to 0 + node.AddAttribute("default_int64", 0); + node.AddAttribute("default_string", ""); + node.AddAttribute("default_float", 0f); + return true; + } + protected override DataViewSchema.DetachedColumn[] GetOutputColumnsCore() { var result = new DataViewSchema.DetachedColumn[_columns.Length]; diff --git a/src/Microsoft.ML.DataView/Microsoft.ML.DataView.csproj b/src/Microsoft.ML.DataView/Microsoft.ML.DataView.csproj index 718deb356e..a81ffdaf17 100644 --- a/src/Microsoft.ML.DataView/Microsoft.ML.DataView.csproj +++ b/src/Microsoft.ML.DataView/Microsoft.ML.DataView.csproj @@ -1,8 +1,10 @@  + netstandard2.0 Microsoft.ML.DataView + Contains the IDataView system which is a set of interfaces and components that provide efficient, compositional processing of schematized data for machine learning and advanced analytics applications. @@ -13,5 +15,5 @@ - + diff --git a/src/Microsoft.ML.DnnAnalyzer/Microsoft.ML.DnnAnalyzer/Microsoft.ML.DnnAnalyzer.csproj b/src/Microsoft.ML.DnnAnalyzer/Microsoft.ML.DnnAnalyzer/Microsoft.ML.DnnAnalyzer.csproj index 07aa31d837..2810104dd4 100644 --- a/src/Microsoft.ML.DnnAnalyzer/Microsoft.ML.DnnAnalyzer/Microsoft.ML.DnnAnalyzer.csproj +++ b/src/Microsoft.ML.DnnAnalyzer/Microsoft.ML.DnnAnalyzer/Microsoft.ML.DnnAnalyzer.csproj @@ -8,6 +8,7 @@ + diff --git a/src/Microsoft.ML.DnnImageFeaturizer.AlexNet/Microsoft.ML.DnnImageFeaturizer.AlexNet.csproj b/src/Microsoft.ML.DnnImageFeaturizer.AlexNet/Microsoft.ML.DnnImageFeaturizer.AlexNet.csproj index 9ea6161799..ec75b23693 100644 --- a/src/Microsoft.ML.DnnImageFeaturizer.AlexNet/Microsoft.ML.DnnImageFeaturizer.AlexNet.csproj +++ b/src/Microsoft.ML.DnnImageFeaturizer.AlexNet/Microsoft.ML.DnnImageFeaturizer.AlexNet.csproj @@ -1,12 +1,25 @@ + netstandard2.0 Microsoft.ML.DnnImageFeaturizer.AlexNet + ML.NET component for pretrained AlexNet image featurization + + + all + + + all + + + + + \ No newline at end of file diff --git a/src/Microsoft.ML.DnnImageFeaturizer.ResNet101/Microsoft.ML.DnnImageFeaturizer.ResNet101.csproj b/src/Microsoft.ML.DnnImageFeaturizer.ResNet101/Microsoft.ML.DnnImageFeaturizer.ResNet101.csproj index 348ca6d4a9..70dfa08966 100644 --- a/src/Microsoft.ML.DnnImageFeaturizer.ResNet101/Microsoft.ML.DnnImageFeaturizer.ResNet101.csproj +++ b/src/Microsoft.ML.DnnImageFeaturizer.ResNet101/Microsoft.ML.DnnImageFeaturizer.ResNet101.csproj @@ -1,12 +1,24 @@ + netstandard2.0 Microsoft.ML.DnnImageFeaturizer.ResNet101 + ML.NET component for pretrained ResNet101 image featurization + + + all + + + all + + + + + - \ No newline at end of file diff --git a/src/Microsoft.ML.DnnImageFeaturizer.ResNet18/Microsoft.ML.DnnImageFeaturizer.ResNet18.csproj b/src/Microsoft.ML.DnnImageFeaturizer.ResNet18/Microsoft.ML.DnnImageFeaturizer.ResNet18.csproj index c415ff06cc..db02568be9 100644 --- a/src/Microsoft.ML.DnnImageFeaturizer.ResNet18/Microsoft.ML.DnnImageFeaturizer.ResNet18.csproj +++ b/src/Microsoft.ML.DnnImageFeaturizer.ResNet18/Microsoft.ML.DnnImageFeaturizer.ResNet18.csproj @@ -1,12 +1,25 @@ + netstandard2.0 Microsoft.ML.DnnImageFeaturizer.ResNet18 + ML.NET component for pretrained ResNet18 image featurization + + + all + + + all + + + + + \ No newline at end of file diff --git a/src/Microsoft.ML.DnnImageFeaturizer.ResNet50/Microsoft.ML.DnnImageFeaturizer.ResNet50.csproj b/src/Microsoft.ML.DnnImageFeaturizer.ResNet50/Microsoft.ML.DnnImageFeaturizer.ResNet50.csproj index fce0a26b21..5c6e91aefd 100644 --- a/src/Microsoft.ML.DnnImageFeaturizer.ResNet50/Microsoft.ML.DnnImageFeaturizer.ResNet50.csproj +++ b/src/Microsoft.ML.DnnImageFeaturizer.ResNet50/Microsoft.ML.DnnImageFeaturizer.ResNet50.csproj @@ -1,12 +1,25 @@ + netstandard2.0 Microsoft.ML.DnnImageFeaturizer.ResNet50 + ML.NET component for pretrained ResNet50 image featurization + + + all + + + all + + + + + \ No newline at end of file diff --git a/src/Microsoft.ML.Ensemble/Microsoft.ML.Ensemble.csproj b/src/Microsoft.ML.Ensemble/Microsoft.ML.Ensemble.csproj index cb69ad7a63..766107cd6b 100644 --- a/src/Microsoft.ML.Ensemble/Microsoft.ML.Ensemble.csproj +++ b/src/Microsoft.ML.Ensemble/Microsoft.ML.Ensemble.csproj @@ -1,15 +1,24 @@  + netstandard2.0 Microsoft.ML.Ensemble + ML.NET component for Ensembles CORECLR - - - + + + all + + + all + + + all + diff --git a/src/Microsoft.ML.Ensemble/Properties/AssemblyInfo.cs b/src/Microsoft.ML.Ensemble/Properties/AssemblyInfo.cs index f349b9ca5e..871602cece 100644 --- a/src/Microsoft.ML.Ensemble/Properties/AssemblyInfo.cs +++ b/src/Microsoft.ML.Ensemble/Properties/AssemblyInfo.cs @@ -5,7 +5,7 @@ using System.Runtime.CompilerServices; using Microsoft.ML; -[assembly: InternalsVisibleTo("Microsoft.ML.TestFramework" + PublicKey.TestValue)] +[assembly: InternalsVisibleTo("Microsoft.ML.TestFramework" + PublicKey.Value)] [assembly: InternalsVisibleTo("Microsoft.ML.Core.Tests" + PublicKey.TestValue)] [assembly: InternalsVisibleTo("RunTests" + InternalPublicKey.Value)] [assembly: InternalsVisibleTo("Microsoft.ML.Runtime.Scope" + InternalPublicKey.Value)] diff --git a/src/Microsoft.ML.EntryPoints/Microsoft.ML.EntryPoints.csproj b/src/Microsoft.ML.EntryPoints/Microsoft.ML.EntryPoints.csproj index 2dd542e4c5..a2b946550c 100644 --- a/src/Microsoft.ML.EntryPoints/Microsoft.ML.EntryPoints.csproj +++ b/src/Microsoft.ML.EntryPoints/Microsoft.ML.EntryPoints.csproj @@ -1,15 +1,27 @@  + netstandard2.0 Microsoft.ML.EntryPoints + Microsoft.ML.EntryPoints contains the ML.NET entry point API catalog. - - - - + + + + all + + + all + + + all + + + all + diff --git a/src/Microsoft.ML.EntryPoints/Properties/AssemblyInfo.cs b/src/Microsoft.ML.EntryPoints/Properties/AssemblyInfo.cs index e042876a78..f9d9ff2bf4 100644 --- a/src/Microsoft.ML.EntryPoints/Properties/AssemblyInfo.cs +++ b/src/Microsoft.ML.EntryPoints/Properties/AssemblyInfo.cs @@ -7,7 +7,7 @@ [assembly: InternalsVisibleTo("Microsoft.ML.Tests" + PublicKey.TestValue)] [assembly: InternalsVisibleTo("Microsoft.ML.Core.Tests" + PublicKey.TestValue)] -[assembly: InternalsVisibleTo("Microsoft.ML.Predictor.Tests" + PublicKey.TestValue)] -[assembly: InternalsVisibleTo("Microsoft.ML.TestFramework" + PublicKey.TestValue)] +[assembly: InternalsVisibleTo("Microsoft.ML.Predictor.Tests" + PublicKey.Value)] +[assembly: InternalsVisibleTo("Microsoft.ML.TestFramework" + PublicKey.Value)] [assembly: InternalsVisibleTo("RunTests" + InternalPublicKey.Value)] [assembly: InternalsVisibleTo("DotNetBridge" + InternalPublicKey.Value)] diff --git a/src/Microsoft.ML.Experimental/Microsoft.ML.Experimental.csproj b/src/Microsoft.ML.Experimental/Microsoft.ML.Experimental.csproj index 4c1b189a5b..1996182a09 100644 --- a/src/Microsoft.ML.Experimental/Microsoft.ML.Experimental.csproj +++ b/src/Microsoft.ML.Experimental/Microsoft.ML.Experimental.csproj @@ -1,12 +1,18 @@  + netstandard2.0 Microsoft.ML.Experimental + Microsoft.ML.Experimental contains experimental work such extension methods to access internal methods. - + + + + all + diff --git a/src/Microsoft.ML.FastTree/Microsoft.ML.FastTree.csproj b/src/Microsoft.ML.FastTree/Microsoft.ML.FastTree.csproj index 9ba56bf8f6..144bee96f6 100644 --- a/src/Microsoft.ML.FastTree/Microsoft.ML.FastTree.csproj +++ b/src/Microsoft.ML.FastTree/Microsoft.ML.FastTree.csproj @@ -1,16 +1,34 @@  - + netstandard2.0 Microsoft.ML.FastTree + ML.NET component for FastTree $(DefineConstants);USE_FASTTREENATIVE;NO_STORE;CORECLR true + $(TargetsForTfmSpecificBuildOutput);CopyProjectReferencesToPackage - - - - + + + all + + + all + + + all + - - + + + + + + + + + + + + \ No newline at end of file diff --git a/src/Microsoft.ML.FastTree/Properties/AssemblyInfo.cs b/src/Microsoft.ML.FastTree/Properties/AssemblyInfo.cs index d74ae8f563..4a1575a5aa 100644 --- a/src/Microsoft.ML.FastTree/Properties/AssemblyInfo.cs +++ b/src/Microsoft.ML.FastTree/Properties/AssemblyInfo.cs @@ -6,7 +6,7 @@ using Microsoft.ML; [assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.Core.Tests" + PublicKey.TestValue)] -[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.Predictor.Tests" + PublicKey.TestValue)] +[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.Predictor.Tests" + PublicKey.Value)] [assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.LightGbm" + PublicKey.Value)] [assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.Sweeper" + PublicKey.Value)] diff --git a/src/Microsoft.ML.Featurizers/Microsoft.ML.Featurizers.csproj b/src/Microsoft.ML.Featurizers/Microsoft.ML.Featurizers.csproj index c40c34682f..c6069a3b51 100644 --- a/src/Microsoft.ML.Featurizers/Microsoft.ML.Featurizers.csproj +++ b/src/Microsoft.ML.Featurizers/Microsoft.ML.Featurizers.csproj @@ -1,9 +1,11 @@  + netstandard2.0;netcoreapp2.1 Microsoft.ML.Featurizers true + ML.NET featurizers with native code implementation @@ -11,8 +13,14 @@ - - + + + + all + + + all + diff --git a/src/Microsoft.ML.ImageAnalytics/ExtensionsCatalog.cs b/src/Microsoft.ML.ImageAnalytics/ExtensionsCatalog.cs index aa67b12187..4ba2aed578 100644 --- a/src/Microsoft.ML.ImageAnalytics/ExtensionsCatalog.cs +++ b/src/Microsoft.ML.ImageAnalytics/ExtensionsCatalog.cs @@ -84,7 +84,7 @@ public static ImageLoadingEstimator LoadImages(this TransformsCatalog catalog, s /// /// /// /// public static ImageLoadingEstimator LoadRawImageBytes(this TransformsCatalog catalog, string outputColumnName, string imageFolder, string inputColumnName = null) diff --git a/src/Microsoft.ML.ImageAnalytics/ImageGrayscale.cs b/src/Microsoft.ML.ImageAnalytics/ImageGrayscale.cs index 5e886c062a..279d611ebd 100644 --- a/src/Microsoft.ML.ImageAnalytics/ImageGrayscale.cs +++ b/src/Microsoft.ML.ImageAnalytics/ImageGrayscale.cs @@ -238,7 +238,7 @@ protected override Delegate MakeGetter(DataViewRow input, int iinfo, Func diff --git a/src/Microsoft.ML.ImageAnalytics/ImageLoader.cs b/src/Microsoft.ML.ImageAnalytics/ImageLoader.cs index c2f2173f1c..1182616233 100644 --- a/src/Microsoft.ML.ImageAnalytics/ImageLoader.cs +++ b/src/Microsoft.ML.ImageAnalytics/ImageLoader.cs @@ -394,7 +394,7 @@ protected override DataViewSchema.DetachedColumn[] GetOutputColumnsCore() /// Loading is the first step of almost every pipeline that does image processing, and further analysis on images. /// The images to load need to be in the formats supported by . /// For end-to-end image processing pipelines, and scenarios in your applications, see the - /// [examples](https://github.com/dotnet/machinelearning-samples/tree/master/samples/csharp/getting-started) in the machinelearning-samples github repository. + /// [examples](https://github.com/dotnet/machinelearning-samples/tree/main/samples/csharp/getting-started) in the machinelearning-samples github repository. /// /// Check the See Also section for links to usage examples. /// ]]> diff --git a/src/Microsoft.ML.ImageAnalytics/ImagePixelExtractor.cs b/src/Microsoft.ML.ImageAnalytics/ImagePixelExtractor.cs index d4b2319c02..3fa71d2983 100644 --- a/src/Microsoft.ML.ImageAnalytics/ImagePixelExtractor.cs +++ b/src/Microsoft.ML.ImageAnalytics/ImagePixelExtractor.cs @@ -498,7 +498,7 @@ private VectorDataViewType[] ConstructTypes() /// The resulting creates a new column, named as specified in the output column name parameters, and /// converts image into vector of known size of floats or bytes. Size and data type depends on specified parameters. /// For end-to-end image processing pipelines, and scenarios in your applications, see the - /// [examples](https://github.com/dotnet/machinelearning-samples/tree/master/samples/csharp/getting-started) in the machinelearning-samples github repository. + /// [examples](https://github.com/dotnet/machinelearning-samples/tree/main/samples/csharp/getting-started) in the machinelearning-samples github repository. /// /// Check the See Also section for links to usage examples. /// ]]> diff --git a/src/Microsoft.ML.ImageAnalytics/ImageResizer.cs b/src/Microsoft.ML.ImageAnalytics/ImageResizer.cs index 00abbf5ad3..21a073aff5 100644 --- a/src/Microsoft.ML.ImageAnalytics/ImageResizer.cs +++ b/src/Microsoft.ML.ImageAnalytics/ImageResizer.cs @@ -439,7 +439,7 @@ protected override Delegate MakeGetter(DataViewRow input, int iinfo, Func diff --git a/src/Microsoft.ML.ImageAnalytics/Microsoft.ML.ImageAnalytics.csproj b/src/Microsoft.ML.ImageAnalytics/Microsoft.ML.ImageAnalytics.csproj index e32f0db25e..95acd84d01 100644 --- a/src/Microsoft.ML.ImageAnalytics/Microsoft.ML.ImageAnalytics.csproj +++ b/src/Microsoft.ML.ImageAnalytics/Microsoft.ML.ImageAnalytics.csproj @@ -1,8 +1,10 @@  + netstandard2.0 Microsoft.ML.ImageAnalytics + ML.NET component for Image support @@ -11,8 +13,14 @@ - - + + + + all + + + all + - + diff --git a/src/Microsoft.ML.LightGbm/Microsoft.ML.LightGbm.csproj b/src/Microsoft.ML.LightGbm/Microsoft.ML.LightGbm.csproj index 46e628fd26..eea6944b85 100644 --- a/src/Microsoft.ML.LightGbm/Microsoft.ML.LightGbm.csproj +++ b/src/Microsoft.ML.LightGbm/Microsoft.ML.LightGbm.csproj @@ -1,16 +1,26 @@  + netstandard2.0 Microsoft.ML.LightGbm true + ML.NET component for LightGBM - + - - + - + + + all + + + all + + + all + diff --git a/src/Microsoft.ML.LightGbm/Properties/AssemblyInfo.cs b/src/Microsoft.ML.LightGbm/Properties/AssemblyInfo.cs index 0d0c69995d..ab220d7d14 100644 --- a/src/Microsoft.ML.LightGbm/Properties/AssemblyInfo.cs +++ b/src/Microsoft.ML.LightGbm/Properties/AssemblyInfo.cs @@ -6,7 +6,7 @@ using Microsoft.ML; [assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.Tests" + PublicKey.TestValue)] -[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.Predictor.Tests" + PublicKey.TestValue)] +[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.Predictor.Tests" + PublicKey.Value)] [assembly: InternalsVisibleTo(assemblyName: "RunTests" + InternalPublicKey.Value)] diff --git a/src/Microsoft.ML.Maml/Properties/AssemblyInfo.cs b/src/Microsoft.ML.Maml/Properties/AssemblyInfo.cs index 470342f47b..bb1e6f1fdc 100644 --- a/src/Microsoft.ML.Maml/Properties/AssemblyInfo.cs +++ b/src/Microsoft.ML.Maml/Properties/AssemblyInfo.cs @@ -5,8 +5,8 @@ using System.Runtime.CompilerServices; using Microsoft.ML; -[assembly: InternalsVisibleTo("Microsoft.ML.TestFramework" + PublicKey.TestValue)] -[assembly: InternalsVisibleTo("Microsoft.ML.Benchmarks" + PublicKey.TestValue)] +[assembly: InternalsVisibleTo("Microsoft.ML.TestFramework" + PublicKey.Value)] +[assembly: InternalsVisibleTo("Microsoft.ML.PerformanceTests" + PublicKey.Value)] [assembly: InternalsVisibleTo("Microsoft.ML.ResultProcessor" + PublicKey.Value)] [assembly: InternalsVisibleTo("RunTests" + InternalPublicKey.Value)] diff --git a/src/Microsoft.ML.Mkl.Components/Microsoft.ML.Mkl.Components.csproj b/src/Microsoft.ML.Mkl.Components/Microsoft.ML.Mkl.Components.csproj index 907b75e11f..8f19609e97 100644 --- a/src/Microsoft.ML.Mkl.Components/Microsoft.ML.Mkl.Components.csproj +++ b/src/Microsoft.ML.Mkl.Components/Microsoft.ML.Mkl.Components.csproj @@ -1,22 +1,42 @@  - + netstandard2.0 Microsoft.ML.Mkl.Components true + ML.NET additional learners making use of Intel Mkl. + $(TargetsForTfmSpecificBuildOutput);CopyProjectReferencesToPackage - - - - + + + + all + + + all + + + all + + + + - - + + all + - - + + + + + + + + + \ No newline at end of file diff --git a/src/Microsoft.ML.Mkl.Redist/Microsoft.ML.Mkl.Redist.csproj b/src/Microsoft.ML.Mkl.Redist/Microsoft.ML.Mkl.Redist.csproj new file mode 100644 index 0000000000..6d932ff89a --- /dev/null +++ b/src/Microsoft.ML.Mkl.Redist/Microsoft.ML.Mkl.Redist.csproj @@ -0,0 +1,28 @@ + + + + Intel + true + true + netstandard2.0 + LICENSE.txt + $(MSBuildProjectName) contains the MKL library redistributed as a NuGet package. + $(PackageTags) MLNET MKL + $(TargetsForTfmSpecificBuildOutput);CopyProjectReferencesToPackage + + + false + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/Microsoft.ML.OnnxConverter/Microsoft.ML.OnnxConverter.csproj b/src/Microsoft.ML.OnnxConverter/Microsoft.ML.OnnxConverter.csproj index b1f49811f7..58c0ead6d5 100644 --- a/src/Microsoft.ML.OnnxConverter/Microsoft.ML.OnnxConverter.csproj +++ b/src/Microsoft.ML.OnnxConverter/Microsoft.ML.OnnxConverter.csproj @@ -1,9 +1,11 @@ + netstandard2.0 Microsoft.ML.OnnxConverter Microsoft.ML.Model.Onnx + ML.NET component for exporting ONNX Models @@ -11,7 +13,11 @@ - + + + + all + diff --git a/src/Microsoft.ML.OnnxConverter/OnnxExportExtensions.cs b/src/Microsoft.ML.OnnxConverter/OnnxExportExtensions.cs index 659829abe4..a151dd4ff3 100644 --- a/src/Microsoft.ML.OnnxConverter/OnnxExportExtensions.cs +++ b/src/Microsoft.ML.OnnxConverter/OnnxExportExtensions.cs @@ -4,6 +4,7 @@ using System.Collections.Generic; using System.IO; +using System.Linq; using Google.Protobuf; using Microsoft.ML.Data; using Microsoft.ML.Model.OnnxConverter; @@ -14,30 +15,43 @@ namespace Microsoft.ML { public static class OnnxExportExtensions { - private static ModelProto ConvertToOnnxProtobufCore(IHostEnvironment env, OnnxContextImpl ctx, ITransformer transform, IDataView inputData) + private static ModelProto ConvertToOnnxProtobufCore(IHostEnvironment env, OnnxContextImpl ctx, ITransformer transform, IDataView inputData, string[] outputColumnNamesToKeep = null) { var outputData = transform.Transform(inputData); LinkedList transforms = null; using (var ch = env.Start("ONNX conversion")) { SaveOnnxCommand.GetPipe(ctx, ch, outputData, out IDataView root, out IDataView sink, out transforms); - return SaveOnnxCommand.ConvertTransformListToOnnxModel(ctx, ch, root, sink, transforms, null, null); + // We pass in the output names to keep, but this next call expects a list of ones to drop. Invert the list. + var outputColumnNamesToDrop = new HashSet(); + if (outputColumnNamesToKeep != null) + { + for (int i = 0; i < sink.Schema.Count; ++i) + { + if (!outputColumnNamesToKeep.Contains(sink.Schema[i].Name)) + { + outputColumnNamesToDrop.Add(sink.Schema[i].Name); + } + } + } + return SaveOnnxCommand.ConvertTransformListToOnnxModel(ctx, ch, root, sink, transforms, null, outputColumnNamesToDrop); } } /// /// Convert the specified to ONNX format. Note that ONNX uses Google's Protobuf so the returned value is a Protobuf object. /// - /// The class that attached to. + /// The class that attached to. /// The that will be converted into ONNX format. /// The input of the specified transform. + /// List of output columns we want to keep. /// An ONNX model equivalent to the converted ML.NET model. [BestFriend] - internal static ModelProto ConvertToOnnxProtobuf(this ModelOperationsCatalog catalog, ITransformer transform, IDataView inputData) + internal static ModelProto ConvertToOnnxProtobuf(this ModelOperationsCatalog catalog, ITransformer transform, IDataView inputData, string[] outputColumns=null) { var env = catalog.GetEnvironment(); var ctx = new OnnxContextImpl(env, "model", "ML.NET", "0", 0, "machinelearning.dotnet", OnnxVersion.Stable); - return ConvertToOnnxProtobufCore(env, ctx, transform, inputData); + return ConvertToOnnxProtobufCore(env, ctx, transform, inputData, outputColumns); } /// @@ -78,5 +92,17 @@ public static void ConvertToOnnx(this ModelOperationsCatalog catalog, ITransform /// An ONNX model equivalent to the converted ML.NET model. public static void ConvertToOnnx(this ModelOperationsCatalog catalog, ITransformer transform, IDataView inputData, int opSetVersion, Stream stream) => ConvertToOnnxProtobuf(catalog, transform, inputData, opSetVersion).WriteTo(stream); + + /// + /// Convert the specified to ONNX format and writes to a stream. + /// + /// The class that attached to. + /// The that will be converted into ONNX format. + /// The input of the specified transform. + /// The stream to write the protobuf model to. + /// List of output columns we want to keep. + /// An ONNX model equivalent to the converted ML.NET model. + public static void ConvertToOnnx(this ModelOperationsCatalog catalog, ITransformer transform, IDataView inputData, Stream stream, params string[] outputColumns) => + ConvertToOnnxProtobuf(catalog, transform, inputData, outputColumns).WriteTo(stream); } } diff --git a/src/Microsoft.ML.OnnxConverter/OnnxMl.md b/src/Microsoft.ML.OnnxConverter/OnnxMl.md index 2865daf601..82de12fabc 100644 --- a/src/Microsoft.ML.OnnxConverter/OnnxMl.md +++ b/src/Microsoft.ML.OnnxConverter/OnnxMl.md @@ -1,5 +1,7 @@ # Generate C# code from ONNX proto file +The `machinelearning\src\Microsoft.ML.OnnxConverter\OnnxMl.cs` file needs to be updated anytime the IR version is updated in OnnxRuntime, using the steps below: + 1. Download `onnx-ml.proto3` from https://github.com/onnx/onnx/blob/master/onnx/onnx-ml.proto3 2. Download protobuf C# compiler version 3.0 or greater from https://github.com/google/protobuf/tree/master/csharp @@ -12,4 +14,13 @@ ``` 5. Find-Replace `public` with `internal` in `OnnxMl.cs`, wrap the root class in OnnxMl.cs with `internal class OnnxCSharpToProtoWrapper and append '.OnnxCSharpToProtoWrapper` to `Microsoft.ML.Model.OnnxConverter` namespace prefix whereever there is an error`. -## The proto3 file is current as of 06/01/2018 and generated from onnx-ml.proto3 based on the following commit https://github.com/onnx/onnx/commit/33e9cd4182fe468675241fba4ae8a16c2f0bd82f \ No newline at end of file +## Last time Updated: November 5, 2019 + +The last time the `OnnxMl.cs` file was updated in ML.NET was **November 5, 2019** on PR #4416: +https://github.com/dotnet/machinelearning/pull/4416 + +It used the `onnx-ml.proto3` version of **September 16, 2019**, updated on this PR which used IR version 6: + +https://github.com/onnx/onnx/commit/2fa08b0f0808423293a001768c9436004a90ca86#diff-fd73e60aa058574ba59274f757d42c4e9037414ab99358f3f096a37bd764270c + +As of today, December 11, 2020, the IR is still on version 6, and version 7 hasn't been released yet. \ No newline at end of file diff --git a/src/Microsoft.ML.OnnxTransformer/Microsoft.ML.OnnxTransformer.csproj b/src/Microsoft.ML.OnnxTransformer/Microsoft.ML.OnnxTransformer.csproj index 7612f974ea..f6751e7bee 100644 --- a/src/Microsoft.ML.OnnxTransformer/Microsoft.ML.OnnxTransformer.csproj +++ b/src/Microsoft.ML.OnnxTransformer/Microsoft.ML.OnnxTransformer.csproj @@ -1,14 +1,22 @@  + netstandard2.0 Microsoft.ML.OnnxTransformer true + ML.NET component for Microsoft.ML.OnnxRuntime.Managed library - - + + + + all + + + all + diff --git a/src/Microsoft.ML.OnnxTransformer/OnnxTransform.cs b/src/Microsoft.ML.OnnxTransformer/OnnxTransform.cs index 76ceb81ef1..df94857931 100644 --- a/src/Microsoft.ML.OnnxTransformer/OnnxTransform.cs +++ b/src/Microsoft.ML.OnnxTransformer/OnnxTransform.cs @@ -484,8 +484,10 @@ private protected override Func GetDependenciesCore(Func a private protected override void SaveModel(ModelSaveContext ctx) => _parent.SaveModel(ctx); protected override Delegate MakeGetter(DataViewRow input, int iinfo, Func activeOutput, out Action disposer) + => throw new NotImplementedException("This should never be called!"); + + private Delegate CreateGetter(DataViewRow input, int iinfo, Func activeOutput, OnnxRuntimeOutputCacher outputCacher) { - disposer = null; Host.AssertValue(input); var activeOutputColNames = _parent.Outputs.Where((x, i) => activeOutput(i)).ToArray(); @@ -495,30 +497,63 @@ protected override Delegate MakeGetter(DataViewRow input, int iinfo, Func, elemRawType, input, iinfo, srcNamedValueGetters, activeOutputColNames); + return Utils.MarshalInvoke(MakeTensorGetter, elemRawType, input, iinfo, srcNamedValueGetters, activeOutputColNames, outputCacher); } else { var type = _parent.Model.ModelInfo.OutputsInfo[_parent.MapDataViewColumnToOnnxOutputTensor(iinfo)].DataViewType.RawType; var srcNamedValueGetters = GetNamedOnnxValueGetters(input, _inputColIndices, _inputOnnxTypes, _inputTensorShapes); - return Utils.MarshalInvoke(MakeObjectGetter, type, input, iinfo, srcNamedValueGetters, activeOutputColNames); + return Utils.MarshalInvoke(MakeObjectGetter, type, input, iinfo, srcNamedValueGetters, activeOutputColNames, outputCacher); } } - private class OnnxRuntimeOutputCacher + public override Delegate[] CreateGetters(DataViewRow input, Func activeOutput, out Action disposer) + { + Contracts.Assert(input.Schema == InputSchema); + + OnnxRuntimeOutputCacher outputCacher = new OnnxRuntimeOutputCacher(); + + int n = OutputColumns.Value.Length; + var result = new Delegate[n]; + for (int i = 0; i < n; i++) + { + if (!activeOutput(i)) + continue; + result[i] = CreateGetter(input, i, activeOutput, outputCacher); + } + disposer = () => + { + outputCacher.Dispose(); + }; + return result; + } + + private sealed class OnnxRuntimeOutputCacher : IDisposable { public long Position; - public Dictionary Outputs; + public Dictionary Outputs; + public IDisposableReadOnlyCollection OutputOnnxValues; + public OnnxRuntimeOutputCacher() { Position = -1; - Outputs = new Dictionary(); + Outputs = new Dictionary(); + } + + private bool _isDisposed; + + public void Dispose() + { + if (_isDisposed) + return; + OutputOnnxValues?.Dispose(); + _isDisposed = true; } } - private void UpdateCacheIfNeeded(long position, INamedOnnxValueGetter[] srcNamedOnnxValueGetters, string[] activeOutputColNames, OnnxRuntimeOutputCacher outputCache) + private void UpdateCacheIfNeeded(long position, INamedOnnxValueGetter[] srcNamedOnnxValueGetters, List activeOutputColNames, OnnxRuntimeOutputCacher outputCache) { if (outputCache.Position != position) { @@ -529,10 +564,11 @@ private void UpdateCacheIfNeeded(long position, INamedOnnxValueGetter[] srcNamed inputNameOnnxValues.Add(srcNamedOnnxValueGetters[i].GetNamedOnnxValue()); } - var outputNamedOnnxValues = _parent.Model.Run(inputNameOnnxValues); - Contracts.Assert(outputNamedOnnxValues.Count > 0); + outputCache.OutputOnnxValues?.Dispose(); + outputCache.OutputOnnxValues = _parent.Model.Run(inputNameOnnxValues, activeOutputColNames); + Contracts.Assert(outputCache.OutputOnnxValues.Count > 0); - foreach (var outputNameOnnxValue in outputNamedOnnxValues) + foreach (var outputNameOnnxValue in outputCache.OutputOnnxValues) { outputCache.Outputs[outputNameOnnxValue.Name] = outputNameOnnxValue; } @@ -540,13 +576,14 @@ private void UpdateCacheIfNeeded(long position, INamedOnnxValueGetter[] srcNamed } } - private Delegate MakeTensorGetter(DataViewRow input, int iinfo, INamedOnnxValueGetter[] srcNamedValueGetters, string[] activeOutputColNames) + private Delegate MakeTensorGetter(DataViewRow input, int iinfo, INamedOnnxValueGetter[] srcNamedValueGetters, + string[] activeOutputColNames, OnnxRuntimeOutputCacher outputCacher) { Host.AssertValue(input); - var outputCacher = new OnnxRuntimeOutputCacher(); + var listActiveOutputColumns = activeOutputColNames.ToList(); ValueGetter> valueGetter = (ref VBuffer dst) => { - UpdateCacheIfNeeded(input.Position, srcNamedValueGetters, activeOutputColNames, outputCacher); + UpdateCacheIfNeeded(input.Position, srcNamedValueGetters, listActiveOutputColumns, outputCacher); var namedOnnxValue = outputCacher.Outputs[_parent.Outputs[iinfo]]; var tensor = namedOnnxValue.AsTensor() as Microsoft.ML.OnnxRuntime.Tensors.DenseTensor; if (tensor == null) @@ -558,13 +595,15 @@ private Delegate MakeTensorGetter(DataViewRow input, int iinfo, INamedOnnxVal return valueGetter; } - private Delegate MakeStringTensorGetter(DataViewRow input, int iinfo, INamedOnnxValueGetter[] srcNamedValueGetters, string[] activeOutputColNames) + private Delegate MakeStringTensorGetter(DataViewRow input, int iinfo, INamedOnnxValueGetter[] srcNamedValueGetters, + string[] activeOutputColNames, OnnxRuntimeOutputCacher outputCacher) { Host.AssertValue(input); - var outputCacher = new OnnxRuntimeOutputCacher(); + var listActiveOutputColumns = activeOutputColNames.ToList(); + ValueGetter>> valueGetter = (ref VBuffer> dst) => { - UpdateCacheIfNeeded(input.Position, srcNamedValueGetters, activeOutputColNames, outputCacher); + UpdateCacheIfNeeded(input.Position, srcNamedValueGetters, listActiveOutputColumns, outputCacher); var namedOnnxValue = outputCacher.Outputs[_parent.Outputs[iinfo]]; var tensor = namedOnnxValue.AsTensor() as Microsoft.ML.OnnxRuntime.Tensors.DenseTensor; if (tensor == null) @@ -580,14 +619,16 @@ private Delegate MakeStringTensorGetter(DataViewRow input, int iinfo, INamedOnnx return valueGetter; } - private Delegate MakeObjectGetter(DataViewRow input, int iinfo, INamedOnnxValueGetter[] srcNamedValueGetters, string[] activeOutputColNames) + private Delegate MakeObjectGetter(DataViewRow input, int iinfo, INamedOnnxValueGetter[] srcNamedValueGetters, + string[] activeOutputColNames, OnnxRuntimeOutputCacher outputCacher) { Host.AssertValue(input); - var outputCache = new OnnxRuntimeOutputCacher(); + var listActiveOutputColumns = activeOutputColNames.ToList(); + ValueGetter valueGetter = (ref T dst) => { - UpdateCacheIfNeeded(input.Position, srcNamedValueGetters, activeOutputColNames, outputCache); - var namedOnnxValue = outputCache.Outputs[_parent.Outputs[iinfo]]; + UpdateCacheIfNeeded(input.Position, srcNamedValueGetters, listActiveOutputColumns, outputCacher); + var namedOnnxValue = outputCacher.Outputs[_parent.Outputs[iinfo]]; var trueValue = namedOnnxValue.AsEnumerable().Select(value => value.AsDictionary()); var caster = _parent.Model.ModelInfo.OutputsInfo[_parent.MapDataViewColumnToOnnxOutputTensor(iinfo)].Caster; dst = (T)caster(namedOnnxValue); @@ -727,7 +768,7 @@ public NamedOnnxValue GetNamedOnnxValue() /// | Does this estimator need to look at the data to train its parameters? | No | /// | Input column data type | Known-sized vector of or types | /// | Output column data type | As specified by the ONNX model | - /// | Required NuGet in addition to Microsoft.ML | Microsoft.ML.OnnxTransformer (always), either Microsoft.ML.OnnxRuntime 1.3.0 (for CPU processing) or Microsoft.ML.OnnxRuntime.Gpu 1.3.0 (for GPU processing if GPU is available) | + /// | Required NuGet in addition to Microsoft.ML | Microsoft.ML.OnnxTransformer (always), either Microsoft.ML.OnnxRuntime 1.6.0 (for CPU processing) or Microsoft.ML.OnnxRuntime.Gpu 1.6.0 (for GPU processing if GPU is available) | /// | Exportable to ONNX | No | /// /// To create this estimator use the following APIs: @@ -739,7 +780,7 @@ public NamedOnnxValue GetNamedOnnxValue() /// /// To run on a GPU, use the /// NuGet package [Microsoft.ML.OnnxRuntime.Gpu](https://www.nuget.org/packages/Microsoft.ML.OnnxRuntime.Gpu/) instead of the Microsoft.ML.OnnxRuntime nuget (which is for CPU processing). Microsoft.ML.OnnxRuntime.Gpu - /// requires a [CUDA supported GPU](https://developer.nvidia.com/cuda-gpus#compute), the [CUDA 10.1 Toolkit](https://developer.nvidia.com/cuda-downloads), and [cuDNN 7.6.5](https://developer.nvidia.com/cudnn) (as indicated on [Onnxruntime's documentation](https://github.com/Microsoft/onnxruntime#default-gpu-cuda)). + /// requires a [CUDA supported GPU](https://developer.nvidia.com/cuda-gpus#compute), the [CUDA 10.2 Toolkit](https://developer.nvidia.com/cuda-downloads), and [cuDNN 8.0.3](https://developer.nvidia.com/cudnn) (as indicated on [Onnxruntime's documentation](https://github.com/Microsoft/onnxruntime#system-requirements)). /// When creating the estimator through [ApplyOnnxModel](xref:Microsoft.ML.OnnxCatalog.ApplyOnnxModel*), set the parameter 'gpuDeviceId' to a valid non-negative integer. Typical device ID values are 0 or 1. If the GPU device isn't found but 'fallbackToCpu = true' then the estimator will run on the CPU. If the GPU device isn't found but 'fallbackToCpu = false' then the estimator will throw an exception /// /// The inputs and outputs of the ONNX models must be Tensor type. Sequence and Maps are not yet supported. diff --git a/src/Microsoft.ML.OnnxTransformer/OnnxTypeParser.cs b/src/Microsoft.ML.OnnxTransformer/OnnxTypeParser.cs index f2b4a943d1..1a2b1420e4 100644 --- a/src/Microsoft.ML.OnnxTransformer/OnnxTypeParser.cs +++ b/src/Microsoft.ML.OnnxTransformer/OnnxTypeParser.cs @@ -267,7 +267,13 @@ private class CastHelper public static IEnumerable CastOnnxSequenceToIEnumerable(IEnumerable o, Func caster) { - return o.Select(v => (TDst)caster(v)); + // Since now we're disposing the NamedOnnxValue objects + // after running inference on each output, we need + // to copy (enumerate) the output through ".ToList()" + // else, if our users try the keep the past sequence + // outputs of their OnnxTransformer, they would + // end up with empty sequences. + return o.Select(v => (TDst)caster(v)).ToList(); } } diff --git a/src/Microsoft.ML.OnnxTransformer/OnnxUtils.cs b/src/Microsoft.ML.OnnxTransformer/OnnxUtils.cs index 02c24b1ad9..cdba65a4b1 100644 --- a/src/Microsoft.ML.OnnxTransformer/OnnxUtils.cs +++ b/src/Microsoft.ML.OnnxTransformer/OnnxUtils.cs @@ -198,40 +198,49 @@ public OnnxModel(string modelFile, int? gpuDeviceId = null, bool fallbackToCpu = _session = new InferenceSession(modelFile); } - // Load ONNX model file and parse its input and output schema. The reason of doing so is that ONNXRuntime - // doesn't expose full type information via its C# APIs. - ModelFile = modelFile; - var model = new OnnxCSharpToProtoWrapper.ModelProto(); - using (var modelStream = File.OpenRead(modelFile)) - using (var codedStream = Google.Protobuf.CodedInputStream.CreateWithLimits(modelStream, Int32.MaxValue, 10)) - model = OnnxCSharpToProtoWrapper.ModelProto.Parser.ParseFrom(codedStream); - - // Parse actual input and output types stored in the loaded ONNX model to get their DataViewType's. - var inputTypePool = new Dictionary(); - foreach (var valueInfo in model.Graph.Input) - inputTypePool[valueInfo.Name] = OnnxTypeParser.GetDataViewType(valueInfo.Type); - - var initializerTypePool = new Dictionary(); - foreach (var valueInfo in model.Graph.Initializer) - initializerTypePool[valueInfo.Name] = OnnxTypeParser.GetScalarDataViewType(valueInfo.DataType); - - var outputTypePool = new Dictionary(); - // Build casters which maps NamedOnnxValue to .NET objects. - var casterPool = new Dictionary>(); - foreach (var valueInfo in model.Graph.Output) + try { - outputTypePool[valueInfo.Name] = OnnxTypeParser.GetDataViewType(valueInfo.Type); - casterPool[valueInfo.Name] = OnnxTypeParser.GetDataViewValueCasterAndResultedType(valueInfo.Type, out Type actualType); - } + // Load ONNX model file and parse its input and output schema. The reason of doing so is that ONNXRuntime + // doesn't expose full type information via its C# APIs. + ModelFile = modelFile; + var model = new OnnxCSharpToProtoWrapper.ModelProto(); + using (var modelStream = File.OpenRead(modelFile)) + using (var codedStream = Google.Protobuf.CodedInputStream.CreateWithLimits(modelStream, Int32.MaxValue, 10)) + model = OnnxCSharpToProtoWrapper.ModelProto.Parser.ParseFrom(codedStream); + + // Parse actual input and output types stored in the loaded ONNX model to get their DataViewType's. + var inputTypePool = new Dictionary(); + foreach (var valueInfo in model.Graph.Input) + inputTypePool[valueInfo.Name] = OnnxTypeParser.GetDataViewType(valueInfo.Type); + + var initializerTypePool = new Dictionary(); + foreach (var valueInfo in model.Graph.Initializer) + initializerTypePool[valueInfo.Name] = OnnxTypeParser.GetScalarDataViewType(valueInfo.DataType); + + var outputTypePool = new Dictionary(); + // Build casters which maps NamedOnnxValue to .NET objects. + var casterPool = new Dictionary>(); + foreach (var valueInfo in model.Graph.Output) + { + outputTypePool[valueInfo.Name] = OnnxTypeParser.GetDataViewType(valueInfo.Type); + casterPool[valueInfo.Name] = OnnxTypeParser.GetDataViewValueCasterAndResultedType(valueInfo.Type, out Type actualType); + } - var inputInfos = GetOnnxVariablesFromMetadata(_session.InputMetadata, shapeDictionary, inputTypePool, null); - var outputInfos = GetOnnxVariablesFromMetadata(_session.OutputMetadata, shapeDictionary, outputTypePool, casterPool); - var overrideableInitializers = GetOnnxVariablesFromMetadata(_session.OverridableInitializerMetadata, shapeDictionary, inputTypePool, null); + var inputInfos = GetOnnxVariablesFromMetadata(_session.InputMetadata, shapeDictionary, inputTypePool, null); + var outputInfos = GetOnnxVariablesFromMetadata(_session.OutputMetadata, shapeDictionary, outputTypePool, casterPool); + var overrideableInitializers = GetOnnxVariablesFromMetadata(_session.OverridableInitializerMetadata, shapeDictionary, inputTypePool, null); - // Create a view to the used ONNX model from ONNXRuntime's perspective. - ModelInfo = new OnnxModelInfo(inputInfos, outputInfos, overrideableInitializers); + // Create a view to the used ONNX model from ONNXRuntime's perspective. + ModelInfo = new OnnxModelInfo(inputInfos, outputInfos, overrideableInitializers); - Graph = model.Graph; + Graph = model.Graph; + } + catch + { + _session.Dispose(); + _session = null; + throw; + } } private List GetOnnxVariablesFromMetadata(IReadOnlyDictionary nodeMetadata, @@ -349,10 +358,11 @@ public static OnnxModel CreateFromBytes(byte[] modelBytes, int? gpuDeviceId = nu /// Uses an open session to score a list of NamedOnnxValues. /// /// The NamedOnnxValues to score. + /// The active output columns. /// Resulting output NamedOnnxValues list. - public IReadOnlyCollection Run(List inputNamedOnnxValues) + public IDisposableReadOnlyCollection Run(List inputNamedOnnxValues, List outputColumns) { - return _session.Run(inputNamedOnnxValues); + return _session.Run(inputNamedOnnxValues, outputColumns); } /// diff --git a/src/Microsoft.ML.OnnxTransformer/Properties/AssemblyInfo.cs b/src/Microsoft.ML.OnnxTransformer/Properties/AssemblyInfo.cs index 55d9ab82cb..5cc38566d9 100644 --- a/src/Microsoft.ML.OnnxTransformer/Properties/AssemblyInfo.cs +++ b/src/Microsoft.ML.OnnxTransformer/Properties/AssemblyInfo.cs @@ -9,4 +9,4 @@ [assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.DnnImageFeaturizer.ResNet101" + PublicKey.Value)] [assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.DnnImageFeaturizer.ResNet18" + PublicKey.Value)] [assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.DnnImageFeaturizer.ResNet50" + PublicKey.Value)] -[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.OnnxTransformerTest" + PublicKey.TestValue)] +[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.OnnxTransformerTest" + PublicKey.Value)] diff --git a/src/Microsoft.ML.Parquet/Microsoft.ML.Parquet.csproj b/src/Microsoft.ML.Parquet/Microsoft.ML.Parquet.csproj index 9ae9b08662..505e798783 100644 --- a/src/Microsoft.ML.Parquet/Microsoft.ML.Parquet.csproj +++ b/src/Microsoft.ML.Parquet/Microsoft.ML.Parquet.csproj @@ -1,8 +1,10 @@  + netstandard2.0 Microsoft.ML.Parquet + ML.NET components for Apache Parquet support. @@ -10,8 +12,14 @@ - - + + + + all + + + all + diff --git a/src/Microsoft.ML.Parquet/Properties/AssemblyInfo.cs b/src/Microsoft.ML.Parquet/Properties/AssemblyInfo.cs index 4510a9ab97..76adc50fca 100644 --- a/src/Microsoft.ML.Parquet/Properties/AssemblyInfo.cs +++ b/src/Microsoft.ML.Parquet/Properties/AssemblyInfo.cs @@ -5,6 +5,6 @@ using System.Runtime.CompilerServices; using Microsoft.ML; -[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.TestFramework" + PublicKey.TestValue)] +[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.TestFramework" + PublicKey.Value)] [assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.Core.Tests" + PublicKey.TestValue)] [assembly: WantsToBeBestFriends] diff --git a/src/Microsoft.ML.Recommender/Microsoft.ML.Recommender.csproj b/src/Microsoft.ML.Recommender/Microsoft.ML.Recommender.csproj index d78a44e669..92955776e8 100644 --- a/src/Microsoft.ML.Recommender/Microsoft.ML.Recommender.csproj +++ b/src/Microsoft.ML.Recommender/Microsoft.ML.Recommender.csproj @@ -1,14 +1,31 @@ - + netstandard2.0 Microsoft.ML.Recommender true + LIBMF, the core computation library for matrix factorization in ML.NET + $(TargetsForTfmSpecificBuildOutput);CopyProjectReferencesToPackage - - - + + + all + + + all + - - + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/Microsoft.ML.SamplesUtils/Microsoft.ML.SamplesUtils.csproj b/src/Microsoft.ML.SamplesUtils/Microsoft.ML.SamplesUtils.csproj index 3fb71a6442..603557c51d 100644 --- a/src/Microsoft.ML.SamplesUtils/Microsoft.ML.SamplesUtils.csproj +++ b/src/Microsoft.ML.SamplesUtils/Microsoft.ML.SamplesUtils.csproj @@ -1,18 +1,33 @@  + netstandard2.0 Microsoft.ML.SampleUtils + Sample utils for Microsoft.ML.Samples + + + Microsoft.ML.SampleUtils - + - - - + + + + all + + + all + + + all + diff --git a/src/Microsoft.ML.StandardTrainers/Properties/AssemblyInfo.cs b/src/Microsoft.ML.StandardTrainers/Properties/AssemblyInfo.cs index b9b39f3668..30bfc470b2 100644 --- a/src/Microsoft.ML.StandardTrainers/Properties/AssemblyInfo.cs +++ b/src/Microsoft.ML.StandardTrainers/Properties/AssemblyInfo.cs @@ -8,7 +8,7 @@ [assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.Ensemble" + PublicKey.Value)] [assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.Core.Tests" + PublicKey.TestValue)] [assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.Tests" + PublicKey.TestValue)] -[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.Predictor.Tests" + PublicKey.TestValue)] +[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.Predictor.Tests" + PublicKey.Value)] [assembly: InternalsVisibleTo(assemblyName: "RunTests" + InternalPublicKey.Value)] [assembly: InternalsVisibleTo(assemblyName: "RunTestsMore" + InternalPublicKey.Value)] diff --git a/src/Microsoft.ML.StandardTrainers/Standard/Online/AveragedPerceptron.cs b/src/Microsoft.ML.StandardTrainers/Standard/Online/AveragedPerceptron.cs index 3c97714108..80467debd9 100644 --- a/src/Microsoft.ML.StandardTrainers/Standard/Online/AveragedPerceptron.cs +++ b/src/Microsoft.ML.StandardTrainers/Standard/Online/AveragedPerceptron.cs @@ -12,6 +12,7 @@ using Microsoft.ML.Numeric; using Microsoft.ML.Runtime; using Microsoft.ML.Trainers; +using static Microsoft.ML.Trainers.AveragedLinearOptions; [assembly: LoadableClass(AveragedPerceptronTrainer.Summary, typeof(AveragedPerceptronTrainer), typeof(AveragedPerceptronTrainer.Options), new[] { typeof(SignatureBinaryClassifierTrainer), typeof(SignatureTrainer), typeof(SignatureFeatureScorerTrainer) }, @@ -76,6 +77,11 @@ public sealed class AveragedPerceptronTrainer : AveragedLinearTrainer /// Options for the as used in /// . @@ -84,7 +90,7 @@ public sealed class Options : AveragedLinearOptions { public Options() { - NumberOfIterations = 10; + NumberOfIterations = AveragedPerceptronDefault.NumberOfIterations; } /// @@ -166,10 +172,10 @@ internal AveragedPerceptronTrainer(IHostEnvironment env, string labelColumnName = DefaultColumnNames.Label, string featureColumnName = DefaultColumnNames.Features, IClassificationLoss lossFunction = null, - float learningRate = Options.AveragedDefault.LearningRate, - bool decreaseLearningRate = Options.AveragedDefault.DecreaseLearningRate, - float l2Regularization = Options.AveragedDefault.L2Regularization, - int numberOfIterations = Options.AveragedDefault.NumberOfIterations) + float learningRate = AveragedPerceptronDefault.LearningRate, + bool decreaseLearningRate = AveragedPerceptronDefault.DecreaseLearningRate, + float l2Regularization = AveragedPerceptronDefault.L2Regularization, + int numberOfIterations = AveragedPerceptronDefault.NumberOfIterations) : this(env, new Options { LabelColumnName = labelColumnName, diff --git a/src/Microsoft.ML.StandardTrainers/StandardTrainersCatalog.cs b/src/Microsoft.ML.StandardTrainers/StandardTrainersCatalog.cs index 8daedbc285..403de09afe 100644 --- a/src/Microsoft.ML.StandardTrainers/StandardTrainersCatalog.cs +++ b/src/Microsoft.ML.StandardTrainers/StandardTrainersCatalog.cs @@ -9,6 +9,7 @@ namespace Microsoft.ML { + using static Microsoft.ML.Trainers.AveragedPerceptronTrainer; using LROptions = LbfgsLogisticRegressionBinaryTrainer.Options; /// @@ -417,10 +418,10 @@ public static AveragedPerceptronTrainer AveragedPerceptron( string labelColumnName = DefaultColumnNames.Label, string featureColumnName = DefaultColumnNames.Features, IClassificationLoss lossFunction = null, - float learningRate = AveragedLinearOptions.AveragedDefault.LearningRate, - bool decreaseLearningRate = AveragedLinearOptions.AveragedDefault.DecreaseLearningRate, - float l2Regularization = AveragedLinearOptions.AveragedDefault.L2Regularization, - int numberOfIterations = AveragedLinearOptions.AveragedDefault.NumberOfIterations) + float learningRate = AveragedPerceptronDefault.LearningRate, + bool decreaseLearningRate = AveragedPerceptronDefault.DecreaseLearningRate, + float l2Regularization = AveragedPerceptronDefault.L2Regularization, + int numberOfIterations = AveragedPerceptronDefault.NumberOfIterations) { Contracts.CheckValue(catalog, nameof(catalog)); diff --git a/src/Microsoft.ML.TensorFlow/Microsoft.ML.TensorFlow.csproj b/src/Microsoft.ML.TensorFlow/Microsoft.ML.TensorFlow.csproj index 7e018a4c03..13175f7042 100644 --- a/src/Microsoft.ML.TensorFlow/Microsoft.ML.TensorFlow.csproj +++ b/src/Microsoft.ML.TensorFlow/Microsoft.ML.TensorFlow.csproj @@ -1,10 +1,12 @@  + netstandard2.0 Microsoft.ML.TensorFlow CORECLR true + Microsoft.ML.TensorFlow contains ML.NET integration of TensorFlow. @@ -14,9 +16,17 @@ - - - + + + + all + + + all + + + all + diff --git a/src/Microsoft.ML.TensorFlow/TensorFlowModel.cs b/src/Microsoft.ML.TensorFlow/TensorFlowModel.cs index f8fd1b476e..7bff665ba6 100644 --- a/src/Microsoft.ML.TensorFlow/TensorFlowModel.cs +++ b/src/Microsoft.ML.TensorFlow/TensorFlowModel.cs @@ -18,6 +18,7 @@ public sealed class TensorFlowModel : IDisposable { internal Session Session { get; } internal string ModelPath { get; } + internal bool TreatOutputAsBatched { get; } private readonly IHostEnvironment _env; @@ -27,10 +28,12 @@ public sealed class TensorFlowModel : IDisposable /// An object. /// TensorFlow session object. /// Location of the model from where was loaded. - internal TensorFlowModel(IHostEnvironment env, Session session, string modelLocation) + /// If the first dimension of the output is unknown, should it be treated as batched or not. + internal TensorFlowModel(IHostEnvironment env, Session session, string modelLocation, bool treatOutputAsBatched = true) { Session = session; ModelPath = modelLocation; + TreatOutputAsBatched = treatOutputAsBatched; _env = env; _disposed = false; } @@ -40,7 +43,7 @@ internal TensorFlowModel(IHostEnvironment env, Session session, string modelLoca /// public DataViewSchema GetModelSchema() { - return TensorFlowUtils.GetModelSchema(_env, Session.graph); + return TensorFlowUtils.GetModelSchema(_env, Session.graph, TreatOutputAsBatched); } /// @@ -49,7 +52,7 @@ public DataViewSchema GetModelSchema() /// public DataViewSchema GetInputSchema() { - return TensorFlowUtils.GetModelSchema(_env, Session.graph, "Placeholder"); + return TensorFlowUtils.GetModelSchema(_env, Session.graph, TreatOutputAsBatched, "Placeholder"); } /// diff --git a/src/Microsoft.ML.TensorFlow/TensorTypeExtensions.cs b/src/Microsoft.ML.TensorFlow/TensorTypeExtensions.cs index 2004d631d8..2dac7a449d 100644 --- a/src/Microsoft.ML.TensorFlow/TensorTypeExtensions.cs +++ b/src/Microsoft.ML.TensorFlow/TensorTypeExtensions.cs @@ -3,8 +3,10 @@ // See the LICENSE file in the project root for more information. using System; +using System.Text; using Microsoft.ML.Internal.Utilities; using Tensorflow; +using Utils = Microsoft.ML.Internal.Utilities.Utils; namespace Microsoft.ML.TensorFlow { @@ -13,6 +15,16 @@ internal static class TensorTypeExtensions { public static void ToScalar(this Tensor tensor, ref T dst) where T : unmanaged { + //In ML.NET we are using ReadOnlyMemory to store string data but ReadOnlyMemory + //is not valid data type for tensorflow.net and exception will thrown if we call as_dtype method + //so we specially deal with string type here. + //Get string data first then convert to ReadOnlyMemory and assign value to dst. + if (typeof(T) == typeof(ReadOnlyMemory)) + { + dst = (T)(object)tensor.StringData()[0].AsMemory(); + return; + } + if (typeof(T).as_dtype() != tensor.dtype) throw new NotSupportedException(); diff --git a/src/Microsoft.ML.TensorFlow/TensorflowCatalog.cs b/src/Microsoft.ML.TensorFlow/TensorflowCatalog.cs index 2ad63321d4..372d4b1029 100644 --- a/src/Microsoft.ML.TensorFlow/TensorflowCatalog.cs +++ b/src/Microsoft.ML.TensorFlow/TensorflowCatalog.cs @@ -35,5 +35,31 @@ public static class TensorflowCatalog /// public static TensorFlowModel LoadTensorFlowModel(this ModelOperationsCatalog catalog, string modelLocation) => TensorFlowUtils.LoadTensorFlowModel(CatalogUtils.GetEnvironment(catalog), modelLocation); + + /// + /// Load TensorFlow model into memory. This is the convenience method that allows the model to be loaded once and subsequently use it for querying schema and creation of + /// using . + /// usage of this API requires additional NuGet dependencies on TensorFlow redist, see linked document for more information. + /// also holds references to unmanaged resources that need to be freed either with an explicit + /// call to Dispose() or implicitly by declaring the variable with the "using" syntax/> + /// + /// + /// + /// + /// + /// The transform's catalog. + /// Location of the TensorFlow model. + /// If the first dimension of the output is unknown, should it be treated as batched or not. + /// + /// + /// + /// + /// + public static TensorFlowModel LoadTensorFlowModel(this ModelOperationsCatalog catalog, string modelLocation, bool treatOutputAsBatched) + => TensorFlowUtils.LoadTensorFlowModel(CatalogUtils.GetEnvironment(catalog), modelLocation, treatOutputAsBatched); } } diff --git a/src/Microsoft.ML.TensorFlow/TensorflowTransform.cs b/src/Microsoft.ML.TensorFlow/TensorflowTransform.cs index 6c46f59b2d..1537ab10cf 100644 --- a/src/Microsoft.ML.TensorFlow/TensorflowTransform.cs +++ b/src/Microsoft.ML.TensorFlow/TensorflowTransform.cs @@ -20,6 +20,7 @@ using Tensorflow; using static Microsoft.ML.TensorFlow.TensorFlowUtils; using static Tensorflow.Binding; +using Utils = Microsoft.ML.Internal.Utilities.Utils; [assembly: LoadableClass(TensorFlowTransformer.Summary, typeof(IDataTransform), typeof(TensorFlowTransformer), typeof(TensorFlowEstimator.Options), typeof(SignatureDataTransform), TensorFlowTransformer.UserName, TensorFlowTransformer.ShortName)] @@ -44,6 +45,7 @@ public sealed class TensorFlowTransformer : RowToRowTransformerBase, IDisposable private readonly string _savedModelPath; private readonly bool _isTemporarySavedModel; private readonly bool _addBatchDimensionInput; + private readonly bool _treatOutputAsBatched; internal readonly Session Session; internal readonly Runner Runner; internal readonly DataViewType[] OutputTypes; @@ -70,8 +72,9 @@ private static VersionInfo GetVersionInfo() modelSignature: "TENSFLOW", //verWrittenCur: 0x00010001, // Initial //verWrittenCur: 0x00010002, // Added Support for Multiple Outputs and SavedModel. - verWrittenCur: 0x00010003, // Added Support for adding batch dimension in inputs. - verReadableCur: 0x00010003, + //verWrittenCur: 0x00010003, // Added Support for adding batch dimension in inputs. + verWrittenCur: 0x00010004, // Added Support for treating batch as output or not. + verReadableCur: 0x00010004, verWeCanReadBack: 0x00010001, loaderSignature: LoaderSignature, loaderAssemblyName: typeof(TensorFlowTransformer).Assembly.FullName); @@ -81,16 +84,17 @@ private static VersionInfo GetVersionInfo() /// Transform for scoring Tensorflow models. Input data column names/types must exactly match /// all model input names. Only the output columns specified will be generated. /// This convenience method avoids reloading of TensorFlow model. - /// It is useful in a situation where user has already loaded TensorFlow model using for inspecting model schema. + /// It is useful in a situation where user has already loaded TensorFlow model using for inspecting model schema. /// /// The environment to use. - /// object created with . + /// object created with . /// The output columns to generate. Names must match model specifications. Data types are inferred from model. /// The name of the input data columns. Must match model's input names. If set to , the value of the will be used as source. /// Add a batch dimension to the input e.g. input = [224, 224, 3] => [-1, 224, 224, 3]. /// This parameter is used to deal with models that have unknown shape but the internal operators in the model require data to have batch dimension as well. - internal TensorFlowTransformer(IHostEnvironment env, TensorFlowModel tfModelInfo, string outputColumnName, string inputColumnName = null, bool addBatchDimensionInput = false) - : this(env, tfModelInfo.Session, new[] { outputColumnName }, new[] { inputColumnName ?? outputColumnName }, IsSavedModel(env, tfModelInfo.ModelPath) ? tfModelInfo.ModelPath : null, false, addBatchDimensionInput) + /// If the first dimension of the output is unknown, should it be treated as batched or not. + internal TensorFlowTransformer(IHostEnvironment env, TensorFlowModel tfModelInfo, string outputColumnName, string inputColumnName = null, bool addBatchDimensionInput = false, bool treatOutputAsBatched = true) + : this(env, tfModelInfo.Session, new[] { outputColumnName }, new[] { inputColumnName ?? outputColumnName }, IsSavedModel(env, tfModelInfo.ModelPath) ? tfModelInfo.ModelPath : null, false, addBatchDimensionInput, treatOutputAsBatched: treatOutputAsBatched) { } @@ -98,16 +102,17 @@ internal TensorFlowTransformer(IHostEnvironment env, TensorFlowModel tfModelInfo /// Transform for scoring Tensorflow models. Input data column names/types must exactly match /// all model input names. Only the output columns specified will be generated. /// This convenience method avoids reloading of TensorFlow model. - /// It is useful in a situation where user has already loaded TensorFlow model using for inspecting model schema. + /// It is useful in a situation where user has already loaded TensorFlow model using for inspecting model schema. /// /// The environment to use. - /// object created with . + /// object created with . /// The name of the input data columns. Must match model's input names. /// The output columns to generate. Names must match model specifications. Data types are inferred from model. /// Add a batch dimension to the input e.g. input = [224, 224, 3] => [-1, 224, 224, 3]. /// This parameter is used to deal with models that have unknown shape but the internal operators in the model require data to have batch dimension as well. - internal TensorFlowTransformer(IHostEnvironment env, TensorFlowModel tfModelInfo, string[] outputColumnNames, string[] inputColumnNames, bool addBatchDimensionInput = false) - : this(env, tfModelInfo.Session, outputColumnNames, inputColumnNames, IsSavedModel(env, tfModelInfo.ModelPath) ? tfModelInfo.ModelPath : null, false, addBatchDimensionInput) + /// If the first dimension of the output is unknown, should it be treated as batched or not. + internal TensorFlowTransformer(IHostEnvironment env, TensorFlowModel tfModelInfo, string[] outputColumnNames, string[] inputColumnNames, bool addBatchDimensionInput = false, bool treatOutputAsBatched = true) + : this(env, tfModelInfo.Session, outputColumnNames, inputColumnNames, IsSavedModel(env, tfModelInfo.ModelPath) ? tfModelInfo.ModelPath : null, false, addBatchDimensionInput, treatOutputAsBatched: treatOutputAsBatched) { } @@ -121,6 +126,7 @@ private static TensorFlowTransformer Create(IHostEnvironment env, ModelLoadConte // *** Binary format *** // byte: indicator for frozen models // byte: indicator for adding batch dimension in input + // byte: indicator for treating output as batched // stream: tensorFlow model. // int: number of input columns // for each input column @@ -128,13 +134,13 @@ private static TensorFlowTransformer Create(IHostEnvironment env, ModelLoadConte // int: number of output columns // for each output column // int: id of output column name - GetModelInfo(env, ctx, out string[] inputs, out string[] outputs, out bool isFrozen, out bool addBatchDimensionInput); + GetModelInfo(env, ctx, out string[] inputs, out string[] outputs, out bool isFrozen, out bool addBatchDimensionInput, out bool treatOutputAsBatched); if (isFrozen) { byte[] modelBytes = null; if (!ctx.TryLoadBinaryStream("TFModel", r => modelBytes = r.ReadByteArray())) throw env.ExceptDecode(); - return new TensorFlowTransformer(env, LoadTFSession(env, modelBytes), outputs, inputs, null, false, addBatchDimensionInput); + return new TensorFlowTransformer(env, LoadTFSession(env, modelBytes), outputs, inputs, null, false, addBatchDimensionInput, treatOutputAsBatched: treatOutputAsBatched); } var tempDirPath = Path.GetFullPath(Path.Combine(Path.GetTempPath(), nameof(TensorFlowTransformer) + "_" + Guid.NewGuid())); @@ -163,7 +169,7 @@ private static TensorFlowTransformer Create(IHostEnvironment env, ModelLoadConte } }); - return new TensorFlowTransformer(env, GetSession(env, tempDirPath), outputs, inputs, tempDirPath, true, addBatchDimensionInput); + return new TensorFlowTransformer(env, GetSession(env, tempDirPath), outputs, inputs, tempDirPath, true, addBatchDimensionInput, treatOutputAsBatched: treatOutputAsBatched); } catch (Exception) { @@ -235,7 +241,7 @@ private static IDataTransform Create(IHostEnvironment env, ModelLoadContext ctx, private static IRowMapper Create(IHostEnvironment env, ModelLoadContext ctx, DataViewSchema inputSchema) => Create(env, ctx).MakeRowMapper(inputSchema); - private static void GetModelInfo(IHostEnvironment env, ModelLoadContext ctx, out string[] inputs, out string[] outputs, out bool isFrozen, out bool addBatchDimensionInput) + private static void GetModelInfo(IHostEnvironment env, ModelLoadContext ctx, out string[] inputs, out string[] outputs, out bool isFrozen, out bool addBatchDimensionInput, out bool treatOutputAsBatched) { isFrozen = true; bool isNonFrozenModelSupported = ctx.Header.ModelVerReadable >= 0x00010002; @@ -247,6 +253,11 @@ private static void GetModelInfo(IHostEnvironment env, ModelLoadContext ctx, out if (isAddingBatchDimensionSupported) addBatchDimensionInput = ctx.Reader.ReadBoolByte(); + treatOutputAsBatched = true; + bool isTreatingOutputAsBatchedSupported = ctx.Header.ModelVerReadable >= 0x00010004; + if (isTreatingOutputAsBatchedSupported) + treatOutputAsBatched = ctx.Reader.ReadBoolByte(); + var numInputs = ctx.Reader.ReadInt32(); env.CheckDecode(numInputs > 0); inputs = new string[numInputs]; @@ -266,7 +277,7 @@ private static void GetModelInfo(IHostEnvironment env, ModelLoadContext ctx, out internal TensorFlowTransformer(IHostEnvironment env, Session session, string[] outputColumnNames, string[] inputColumnNames, string savedModelPath, bool isTemporarySavedModel, - bool addBatchDimensionInput, int batchSize = 1, TensorFlowEstimator.Options options = null, IDataView input = null) + bool addBatchDimensionInput, int batchSize = 1, TensorFlowEstimator.Options options = null, IDataView input = null, bool treatOutputAsBatched = true) : base(Contracts.CheckRef(env, nameof(env)).Register(nameof(TensorFlowTransformer))) { @@ -278,10 +289,12 @@ internal TensorFlowTransformer(IHostEnvironment env, Session session, string[] o _isTemporarySavedModel = isTemporarySavedModel; Session = session; _addBatchDimensionInput = addBatchDimensionInput; + _treatOutputAsBatched = treatOutputAsBatched; Inputs = inputColumnNames; Outputs = outputColumnNames; + tf.compat.v1.disable_eager_execution(); - (TFOutputTypes, OutputTypes, TFOutputOperations) = GetOutputInfo(Host, Session, Outputs); + (TFOutputTypes, OutputTypes, TFOutputOperations) = GetOutputInfo(Host, Session, Outputs, treatOutputAsBatched); (TFInputTypes, TFInputShapes, TFInputOperations) = GetInputInfo(Host, Session, Inputs, batchSize); TFInputNodes = new TF_Output[Inputs.Length]; @@ -344,7 +357,7 @@ internal static TensorShape GetTensorShape(TF_Output output, Graph graph, Status new ObjectDisposedException(nameof(graph)); var cstatus = status == null ? new Status() : status; - var n = c_api.TF_GraphGetTensorNumDims(graph, output, cstatus); + var n = c_api.TF_GraphGetTensorNumDims(graph, output, cstatus.Handle); cstatus.Check(); @@ -352,12 +365,12 @@ internal static TensorShape GetTensorShape(TF_Output output, Graph graph, Status return new TensorShape(new int[0]); var dims = new long[n]; - c_api.TF_GraphGetTensorShape(graph, output, dims, dims.Length, cstatus); + c_api.TF_GraphGetTensorShape(graph, output, dims, dims.Length, cstatus.Handle); cstatus.Check(); return new TensorShape(dims.Select(x => (int)x).ToArray()); } - internal static (TF_DataType[] tfOutputTypes, DataViewType[] outputTypes, (Operation, int)[]) GetOutputInfo(IHost host, Session session, string[] outputs) + internal static (TF_DataType[] tfOutputTypes, DataViewType[] outputTypes, (Operation, int)[]) GetOutputInfo(IHost host, Session session, string[] outputs, bool treatOutputAsBatched) { var tfOutputTypes = new TF_DataType[outputs.Length]; var outputTypes = new DataViewType[outputs.Length]; @@ -382,12 +395,16 @@ internal static (TF_DataType[] tfOutputTypes, DataViewType[] outputTypes, (Opera // If there are other dimension that are unknown the transformer will return a variable length vector. // This is the work around in absence of reshape transformer. var idims = shape.dims; - int[] dims = shape.ndim > 0 ? idims.Skip(idims[0] == -1 ? 1 : 0).ToArray() : new[] { 0 }; + + int[] dims = idims; + if (treatOutputAsBatched) + { + dims = shape.ndim > 0 ? idims.Skip(idims[0] == -1 ? 1 : 0).ToArray() : new int[0]; + } for (int j = 0; j < dims.Length; j++) dims[j] = dims[j] == -1 ? 0 : dims[j]; if (dims == null || dims.Length == 0) { - dims = new[] { 1 }; outputTypes[i] = Tf2MlNetType(tfOutputType); } else @@ -414,6 +431,7 @@ private protected override void SaveModel(ModelSaveContext ctx) // *** Binary format *** // byte: indicator for frozen models // byte: indicator for adding batch dimension in input + // byte: indicator for treating output as batched // stream: tensorFlow model. // int: number of input columns // for each input column @@ -424,14 +442,17 @@ private protected override void SaveModel(ModelSaveContext ctx) var isFrozen = string.IsNullOrEmpty(_savedModelPath); ctx.Writer.WriteBoolByte(isFrozen); ctx.Writer.WriteBoolByte(_addBatchDimensionInput); + ctx.Writer.WriteBoolByte(_treatOutputAsBatched); if (isFrozen) { - Status status = new Status(); - var buffer = Session.graph.ToGraphDef(status); - ctx.SaveBinaryStream("TFModel", w => + using (var status = new Status()) + using (var buffer = Session.graph.ToGraphDef(status)) { - w.WriteByteArray(buffer.MemoryBlock.ToArray()); - }); + ctx.SaveBinaryStream("TFModel", w => + { + w.WriteByteArray(buffer.DangerousMemoryBlock.ToArray()); + }); + } } Host.AssertNonEmpty(Inputs); @@ -499,20 +520,29 @@ public Mapper(TensorFlowTransformer parent, DataViewSchema inputSchema) : throw Host.Except("Variable length input columns not supported"); _isInputVector[i] = type is VectorDataViewType; - if (!_isInputVector[i]) - throw Host.Except("Non-vector columns are not supported and should be loaded as vector columns of size 1"); - vecType = (VectorDataViewType)type; var expectedType = Tf2MlNetType(_parent.TFInputTypes[i]); if (type.GetItemType() != expectedType) throw Host.ExceptSchemaMismatch(nameof(inputSchema), "input", _parent.Inputs[i], expectedType.ToString(), type.ToString()); var originalShape = _parent.TFInputShapes[i]; var shape = originalShape.dims; - var colTypeDims = vecType.Dimensions.Select(dim => (int)dim).ToArray(); if (shape == null || (shape.Length == 0)) - _fullySpecifiedShapes[i] = new TensorShape(colTypeDims); + { + // for vector type input TensorShape should same to dim + if (_isInputVector[i]) + { + vecType = (VectorDataViewType)type; + var colTypeDims = vecType.Dimensions.Select(dim => (int)dim).ToArray(); + _fullySpecifiedShapes[i] = new TensorShape(colTypeDims); + } + else + // for primitive type use default TensorShape + _fullySpecifiedShapes[i] = new TensorShape(); + } else { + vecType = (VectorDataViewType)type; + var colTypeDims = vecType.Dimensions.Select(dim => (int)dim).ToArray(); // If the column is one dimension we make sure that the total size of the TF shape matches. // Compute the total size of the known dimensions of the shape. int valCount = 1; @@ -557,7 +587,10 @@ public Mapper(TensorFlowTransformer parent, DataViewSchema inputSchema) : if (_parent._addBatchDimensionInput) { - var l = new int[_fullySpecifiedShapes[i].ndim + 1]; + // ndim of default TensorShape is -1, make originDim to 0 in this case. + // after addBatchDimension, input column will be changed: type -> type[] + var originDim = _fullySpecifiedShapes[i].ndim < 0 ? 0 : _fullySpecifiedShapes[i].ndim; + var l = new int[originDim + 1]; l[0] = 1; for (int ishape = 1; ishape < l.Length; ishape++) l[ishape] = _fullySpecifiedShapes[i].dims[ishape - 1]; @@ -725,11 +758,10 @@ public TensorValueGetter(DataViewRow input, int colIndex, TensorShape tfShape) { _srcgetter = input.GetGetter(input.Schema[colIndex]); _tfShape = tfShape; - long size = 0; + long size = 1; _position = 0; - if (tfShape.dims.Length != 0) + if (tfShape.dims != null && tfShape.dims.Length != 0) { - size = 1; foreach (var dim in tfShape.dims) size *= dim; } @@ -740,8 +772,7 @@ public Tensor GetTensor() { var scalar = default(T); _srcgetter(ref scalar); - var tensor = new Tensor(new[] { scalar }); - tensor.set_shape(_tfShape); + var tensor = TensorFlowUtils.CastDataAndReturnAsTensor(scalar); return tensor; } @@ -801,48 +832,10 @@ public Tensor GetTensor() // This is done to reduce memory allocation every time tensor is created. _denseData = new T[_vBuffer.Length]; _vBuffer.CopyTo(_denseData); - var tensor = CastDataAndReturnAsTensor(_denseData); + var tensor = TensorFlowUtils.CastDataAndReturnAsTensor(_denseData, _tfShape); return tensor; } - private Tensor CastDataAndReturnAsTensor(T[] data) - { - if (typeof(T) == typeof(sbyte)) - return new Tensor((sbyte[])(object)data, _dims, TF_DataType.TF_INT8); - else if (typeof(T) == typeof(long)) - return new Tensor((long[])(object)data, _dims, TF_DataType.TF_INT64); - else if (typeof(T) == typeof(Int32)) - return new Tensor((Int32[])(object)data, _dims, TF_DataType.TF_INT32); - else if (typeof(T) == typeof(Int16)) - return new Tensor((Int16[])(object)data, _dims, TF_DataType.TF_INT16); - else if (typeof(T) == typeof(byte)) - return new Tensor((byte[])(object)data, _dims, TF_DataType.TF_UINT8); - else if (typeof(T) == typeof(ulong)) - return new Tensor((ulong[])(object)data, _dims, TF_DataType.TF_UINT64); - else if (typeof(T) == typeof(UInt32)) - return new Tensor((UInt32[])(object)data, _dims, TF_DataType.TF_UINT32); - else if (typeof(T) == typeof(UInt16)) - return new Tensor((UInt16[])(object)data, _dims, TF_DataType.TF_UINT16); - else if (typeof(T) == typeof(bool)) - return new Tensor((bool[])(object)data, _dims, TF_DataType.TF_BOOL); - else if (typeof(T) == typeof(float)) - return new Tensor((float[])(object)data, _dims, TF_DataType.TF_FLOAT); - else if (typeof(T) == typeof(double)) - return new Tensor((double[])(object)data, _dims, TF_DataType.TF_DOUBLE); - else if (typeof(T) == typeof(ReadOnlyMemory)) - { - byte[][] bytes = new byte[_vBuffer.Length][]; - for (int i = 0; i < bytes.Length; i++) - { - bytes[i] = Encoding.UTF8.GetBytes(((ReadOnlyMemory)(object)data[i]).ToArray()); - } - - return new Tensor(bytes, _tfShape.dims.Select(x => (long)x).ToArray()); - } - - return new Tensor(new NDArray(data, _tfShape)); - } - public void BufferTrainingData() { _srcgetter(ref _vBuffer); @@ -853,7 +846,7 @@ public void BufferTrainingData() public Tensor GetBufferedBatchTensor() { _position = 0; - var tensor = CastDataAndReturnAsTensor(_bufferedData); + var tensor = TensorFlowUtils.CastDataAndReturnAsTensor(_denseData, _tfShape); _bufferedData = new T[_bufferedDataSize]; return tensor; @@ -901,6 +894,15 @@ internal sealed class Options : TransformInputBase /// [Argument(ArgumentType.AtMostOnce, HelpText = "Add a batch dimension to the input e.g. input = [224, 224, 3] => [-1, 224, 224, 3].", SortOrder = 16)] public bool AddBatchDimensionInputs = false; + + /// + /// If the first dimension of the output is unknown, should it be treated as batched or not. e.g. output = [-1] will be read as a vector of unknown length when this is false. + /// + /// + /// This parameter is used to deal with models that have unknown output shape and it needs to be interpreted in ML.NET as a vector of unknown length and not as a batch dimension. + /// + [Argument(ArgumentType.AtMostOnce, HelpText = "If the first dimension of the output is unknown, should it be treated as batched or not. e.g. output = [-1] will be read as a vector of unknown length when this is false.", SortOrder = 17)] + public bool TreatOutputAsBatched = true; } private readonly IHost _host; @@ -922,7 +924,7 @@ internal TensorFlowEstimator(IHostEnvironment env, string[] outputColumnNames, s } internal TensorFlowEstimator(IHostEnvironment env, Options options) - : this(env, options, TensorFlowUtils.LoadTensorFlowModel(env, options.ModelLocation)) + : this(env, options, TensorFlowUtils.LoadTensorFlowModel(env, options.ModelLocation, options.TreatOutputAsBatched)) { } @@ -931,20 +933,23 @@ internal TensorFlowEstimator(IHostEnvironment env, Options options, TensorFlowMo _host = Contracts.CheckRef(env, nameof(env)).Register(nameof(TensorFlowEstimator)); _options = options; _tensorFlowModel = tensorFlowModel; + if (!tensorFlowModel.TreatOutputAsBatched) + _options.TreatOutputAsBatched = tensorFlowModel.TreatOutputAsBatched; tensorFlowModel.Session.graph.as_default(); - var inputTuple = TensorFlowTransformer.GetInputInfo(_host, tensorFlowModel.Session, options.InputColumns); + var inputTuple = TensorFlowTransformer.GetInputInfo(_host, tensorFlowModel.Session, _options.InputColumns); _tfInputTypes = inputTuple.tfInputTypes; - var outputTuple = TensorFlowTransformer.GetOutputInfo(_host, tensorFlowModel.Session, options.OutputColumns); + var outputTuple = TensorFlowTransformer.GetOutputInfo(_host, tensorFlowModel.Session, _options.OutputColumns, _options.TreatOutputAsBatched); _outputTypes = outputTuple.outputTypes; } - private static Options CreateArguments(TensorFlowModel tensorFlowModel, string[] outputColumnNames, string[] inputColumnName, bool addBatchDimensionInput) + private static Options CreateArguments(TensorFlowModel tensorFlowModel, string[] outputColumnNames, string[] inputColumnName, bool addBatchDimensionInput, bool treatOutputAsBatched = true) { var options = new Options(); options.ModelLocation = tensorFlowModel.ModelPath; options.InputColumns = inputColumnName; options.OutputColumns = outputColumnNames; options.AddBatchDimensionInputs = addBatchDimensionInput; + options.TreatOutputAsBatched = treatOutputAsBatched; return options; } @@ -962,8 +967,6 @@ public SchemaShape GetOutputSchema(SchemaShape inputSchema) var input = _options.InputColumns[i]; if (!inputSchema.TryFindColumn(input, out var col)) throw _host.ExceptSchemaMismatch(nameof(inputSchema), "input", input); - if (!(col.Kind == SchemaShape.Column.VectorKind.Vector)) - throw _host.ExceptSchemaMismatch(nameof(inputSchema), "input", input, "vector", col.GetTypeString()); var expectedType = Tf2MlNetType(_tfInputTypes[i]); if (col.ItemType != expectedType) throw _host.ExceptSchemaMismatch(nameof(inputSchema), "input", input, expectedType.ToString(), col.ItemType.ToString()); @@ -986,7 +989,7 @@ public TensorFlowTransformer Fit(IDataView input) if (_transformer == null) { _transformer = new TensorFlowTransformer(_host, _tensorFlowModel.Session, _options.OutputColumns, _options.InputColumns, - IsSavedModel(_host, _options.ModelLocation) ? _options.ModelLocation : null, false, _options.AddBatchDimensionInputs); + IsSavedModel(_host, _options.ModelLocation) ? _options.ModelLocation : null, false, _options.AddBatchDimensionInputs, treatOutputAsBatched: _options.TreatOutputAsBatched); } // Validate input schema. _transformer.GetOutputSchema(input.Schema); diff --git a/src/Microsoft.ML.TensorFlow/TensorflowUtils.cs b/src/Microsoft.ML.TensorFlow/TensorflowUtils.cs index b1c8a78a5b..8fbbd772a0 100644 --- a/src/Microsoft.ML.TensorFlow/TensorflowUtils.cs +++ b/src/Microsoft.ML.TensorFlow/TensorflowUtils.cs @@ -12,8 +12,10 @@ using Microsoft.ML.Runtime; using Microsoft.ML.TensorFlow; using Microsoft.ML.Transforms; +using NumSharp; using Tensorflow; using static Tensorflow.Binding; +using Utils = Microsoft.ML.Internal.Utilities.Utils; namespace Microsoft.ML.TensorFlow { @@ -30,7 +32,7 @@ internal static class TensorFlowUtils /// internal const string TensorflowUpstreamOperatorsKind = "TensorflowUpstreamOperators"; - internal static DataViewSchema GetModelSchema(IExceptionContext ectx, Graph graph, string opType = null) + internal static DataViewSchema GetModelSchema(IExceptionContext ectx, Graph graph, bool treatOutputAsBatched, string opType = null) { var schemaBuilder = new DataViewSchema.Builder(); foreach (Operation op in graph) @@ -50,13 +52,6 @@ internal static DataViewSchema GetModelSchema(IExceptionContext ectx, Graph grap if (mlType == null || op.NumOutputs <= 0) continue; - // Construct the final ML.NET type of a Tensorflow variable. - var tensorShape = op.output.TensorShape.dims; - var columnType = new VectorDataViewType(mlType); - if (!(Utils.Size(tensorShape) == 1 && tensorShape[0] <= 0) && - (Utils.Size(tensorShape) > 0 && tensorShape.Skip(1).All(x => x > 0))) - columnType = new VectorDataViewType(mlType, tensorShape[0] > 0 ? tensorShape : tensorShape.Skip(1).ToArray()); - // There can be at most two metadata fields. // 1. The first field always presents. Its value is this operator's type. For example, // if an output is produced by an "Softmax" operator, the value of this field should be "Softmax". @@ -81,7 +76,41 @@ internal static DataViewSchema GetModelSchema(IExceptionContext ectx, Graph grap (ref VBuffer> value) => { upstreamOperatorNames.CopyTo(ref value); }); } - schemaBuilder.AddColumn(op.name, columnType, metadataBuilder.ToAnnotations()); + // Construct the final ML.NET type of a Tensorflow variable. + var tensorShape = op.output.TensorShape.dims; + + if (tensorShape == null) + { + // primitive column type + schemaBuilder.AddColumn(op.name, mlType, metadataBuilder.ToAnnotations()); + } + else + { + // vector column type + DataViewType columnType = new VectorDataViewType(mlType); + if (!(Utils.Size(tensorShape) == 1 && tensorShape[0] <= 0) && + (Utils.Size(tensorShape) > 0 && tensorShape.Skip(1).All(x => x > 0))) + // treatOutputAsBatched == true means that if the first dimension is greater + // than 0 we take the tensor shape as is. If the first value is less then 0, we treat it as the batch input so we can + // ignore it for the shape of the ML.NET vector. I.E. if the input dimensions are [-1, 5], ML.NET will read the -1 as + // batch input, and so the ML.NET data type will be a vector of length 5. + if (treatOutputAsBatched) + { + columnType = new VectorDataViewType(mlType, tensorShape[0] > 0 ? tensorShape : tensorShape.Skip(1).ToArray()); + } + // When treatOutputAsBatched is false, if the first value is less than 0 we want to set it to 0. TensorFlow + // represents an unknown size as -1, but ML.NET represents it as 0 so we need to convert it. + // I.E. if the input dimensions are [-1, 5], ML.NET will read the -1 as a dimension of unknown length, and so the ML.NET + // data type will be a vector of 2 dimensions, where the first dimension is unknown and the second has a length of 5. + else + { + if (tensorShape[0] < 0) + tensorShape[0] = 0; + columnType = new VectorDataViewType(mlType, tensorShape); + } + + schemaBuilder.AddColumn(op.name, columnType, metadataBuilder.ToAnnotations()); + } } return schemaBuilder.ToSchema(); } @@ -96,10 +125,11 @@ internal static DataViewSchema GetModelSchema(IExceptionContext ectx, Graph grap /// /// The environment to use. /// Model to load. - internal static DataViewSchema GetModelSchema(IHostEnvironment env, string modelPath) + /// If the first dimension of the output is unknown, should it be treated as batched or not. + internal static DataViewSchema GetModelSchema(IHostEnvironment env, string modelPath, bool treatOutputAsBatched = true) { - using var model = LoadTensorFlowModel(env, modelPath); - return GetModelSchema(env, model.Session.graph); + using var model = LoadTensorFlowModel(env, modelPath, treatOutputAsBatched); + return GetModelSchema(env, model.Session.graph, treatOutputAsBatched); } /// @@ -107,11 +137,12 @@ internal static DataViewSchema GetModelSchema(IHostEnvironment env, string model /// /// The environment to use. /// The model to load. + /// If the first dimension of the output is unknown, should it be treated as batched or not. /// - internal static TensorFlowModel LoadTensorFlowModel(IHostEnvironment env, string modelPath) + internal static TensorFlowModel LoadTensorFlowModel(IHostEnvironment env, string modelPath, bool treatOutputAsBatched = true) { var session = GetSession(env, modelPath); - return new TensorFlowModel(env, session, modelPath); + return new TensorFlowModel(env, session, modelPath, treatOutputAsBatched: treatOutputAsBatched); } internal static PrimitiveDataViewType Tf2MlNetType(TF_DataType type) @@ -410,6 +441,76 @@ internal static bool IsTypeSupported(TF_DataType tfoutput) } } + internal static Tensor CastDataAndReturnAsTensor(T[] data, TensorShape tfShape) + { + var dims = tfShape.dims.Select(x => (long)x).ToArray(); + + if (typeof(T) == typeof(sbyte)) + return new Tensor((sbyte[])(object)data, dims, TF_DataType.TF_INT8); + else if (typeof(T) == typeof(long)) + return new Tensor((long[])(object)data, dims, TF_DataType.TF_INT64); + else if (typeof(T) == typeof(Int32)) + return new Tensor((Int32[])(object)data, dims, TF_DataType.TF_INT32); + else if (typeof(T) == typeof(Int16)) + return new Tensor((Int16[])(object)data, dims, TF_DataType.TF_INT16); + else if (typeof(T) == typeof(byte)) + return new Tensor((byte[])(object)data, dims, TF_DataType.TF_UINT8); + else if (typeof(T) == typeof(ulong)) + return new Tensor((ulong[])(object)data, dims, TF_DataType.TF_UINT64); + else if (typeof(T) == typeof(UInt32)) + return new Tensor((UInt32[])(object)data, dims, TF_DataType.TF_UINT32); + else if (typeof(T) == typeof(UInt16)) + return new Tensor((UInt16[])(object)data, dims, TF_DataType.TF_UINT16); + else if (typeof(T) == typeof(bool)) + return new Tensor((bool[])(object)data, dims, TF_DataType.TF_BOOL); + else if (typeof(T) == typeof(float)) + return new Tensor((float[])(object)data, dims, TF_DataType.TF_FLOAT); + else if (typeof(T) == typeof(double)) + return new Tensor((double[])(object)data, dims, TF_DataType.TF_DOUBLE); + else if (typeof(T) == typeof(ReadOnlyMemory)) + { + string[] strings = new string[data.Length]; + for (int i = 0; i < strings.Length; i++) + { + strings[i] = data[i].ToString(); + } + + return new Tensor(strings); + } + + return new Tensor(new NDArray(data, tfShape)); + } + + internal static Tensor CastDataAndReturnAsTensor(T data) + { + if (typeof(T) == typeof(sbyte)) + return new Tensor((sbyte)(object)data, TF_DataType.TF_INT8); + else if (typeof(T) == typeof(long)) + return new Tensor((long)(object)data, TF_DataType.TF_INT64); + else if (typeof(T) == typeof(Int32)) + return new Tensor((Int32)(object)data, TF_DataType.TF_INT32); + else if (typeof(T) == typeof(Int16)) + return new Tensor((Int16)(object)data, TF_DataType.TF_INT16); + else if (typeof(T) == typeof(byte)) + return new Tensor((byte)(object)data, TF_DataType.TF_UINT8); + else if (typeof(T) == typeof(ulong)) + return new Tensor((ulong)(object)data, TF_DataType.TF_UINT64); + else if (typeof(T) == typeof(UInt32)) + return new Tensor((UInt32)(object)data, TF_DataType.TF_UINT32); + else if (typeof(T) == typeof(UInt16)) + return new Tensor((UInt16)(object)data, TF_DataType.TF_UINT16); + else if (typeof(T) == typeof(bool)) + return new Tensor((bool)(object)data, TF_DataType.TF_BOOL); + else if (typeof(T) == typeof(float)) + return new Tensor((float)(object)data, TF_DataType.TF_FLOAT); + else if (typeof(T) == typeof(double)) + return new Tensor((double)(object)data, TF_DataType.TF_DOUBLE); + else if (typeof(T) == typeof(ReadOnlyMemory)) + return new Tensor(data.ToString()); + + throw new ArgumentException($"Unsupported data type of {typeof(T)} to convert to Tensor."); + } + /// /// Use the runner class to easily configure inputs, outputs and targets to be passed to the session runner. /// @@ -491,7 +592,7 @@ public Tensor[] Run() { c_api.TF_SessionRun(_session, null, _inputs, _inputValues, _inputs.Length, _outputs, _outputValues, _outputValues.Length, _operations, - _operations.Length, IntPtr.Zero, _status); + _operations.Length, IntPtr.Zero, _status.Handle); } catch (Exception ex) { diff --git a/src/Microsoft.ML.TimeSeries/ExtensionsCatalog.cs b/src/Microsoft.ML.TimeSeries/ExtensionsCatalog.cs index d4b49322dd..c15d300ab5 100644 --- a/src/Microsoft.ML.TimeSeries/ExtensionsCatalog.cs +++ b/src/Microsoft.ML.TimeSeries/ExtensionsCatalog.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +using System; using System.Collections.Generic; using Microsoft.ML.Data; using Microsoft.ML.Runtime; @@ -32,8 +33,33 @@ public static class TimeSeriesCatalog /// ]]> /// /// + [Obsolete("This API method is deprecated, please use the overload with confidence parameter of type double.")] public static IidChangePointEstimator DetectIidChangePoint(this TransformsCatalog catalog, string outputColumnName, string inputColumnName, int confidence, int changeHistoryLength, MartingaleType martingale = MartingaleType.Power, double eps = 0.1) + => DetectIidChangePoint(catalog, outputColumnName, inputColumnName, (double)confidence, changeHistoryLength, martingale, eps); + + /// + /// Create , which predicts change points in an + /// independent identically distributed (i.i.d.) + /// time series based on adaptive kernel density estimations and martingale scores. + /// + /// The transform's catalog. + /// Name of the column resulting from the transformation of . + /// The column data is a vector of . The vector contains 4 elements: alert (non-zero value means a change point), raw score, p-Value and martingale score. + /// Name of column to transform. The column data must be . If set to , the value of the will be used as source. + /// The confidence for change point detection in the range [0, 100]. + /// The length of the sliding window on p-values for computing the martingale score. + /// The martingale used for scoring. + /// The epsilon parameter for the Power martingale. + /// + /// + /// + /// + /// + public static IidChangePointEstimator DetectIidChangePoint(this TransformsCatalog catalog, string outputColumnName, string inputColumnName, + double confidence, int changeHistoryLength, MartingaleType martingale = MartingaleType.Power, double eps = 0.1) => new IidChangePointEstimator(CatalogUtils.GetEnvironment(catalog), outputColumnName, confidence, changeHistoryLength, inputColumnName, martingale, eps); /// @@ -56,8 +82,33 @@ public static IidChangePointEstimator DetectIidChangePoint(this TransformsCatalo /// ]]> /// /// + [Obsolete("This API method is deprecated, please use the overload with confidence parameter of type double.")] public static IidSpikeEstimator DetectIidSpike(this TransformsCatalog catalog, string outputColumnName, string inputColumnName, int confidence, int pvalueHistoryLength, AnomalySide side = AnomalySide.TwoSided) + => DetectIidSpike(catalog, outputColumnName, inputColumnName, (double)confidence, pvalueHistoryLength, side); + + /// + /// Create , which predicts spikes in + /// independent identically distributed (i.i.d.) + /// time series based on adaptive kernel density estimations and martingale scores. + /// + /// The transform's catalog. + /// Name of the column resulting from the transformation of . + /// The column data is a vector of . The vector contains 3 elements: alert (non-zero value means a spike), raw score, and p-value. + /// Name of column to transform. The column data must be . + /// If set to , the value of the will be used as source. + /// The confidence for spike detection in the range [0, 100]. + /// The size of the sliding window for computing the p-value. + /// The argument that determines whether to detect positive or negative anomalies, or both. + /// + /// + /// + /// + /// + public static IidSpikeEstimator DetectIidSpike(this TransformsCatalog catalog, string outputColumnName, string inputColumnName, + double confidence, int pvalueHistoryLength, AnomalySide side = AnomalySide.TwoSided) => new IidSpikeEstimator(CatalogUtils.GetEnvironment(catalog), outputColumnName, confidence, pvalueHistoryLength, inputColumnName, side); /// @@ -83,9 +134,38 @@ public static IidSpikeEstimator DetectIidSpike(this TransformsCatalog catalog, s /// ]]> /// /// + [Obsolete("This API method is deprecated, please use the overload with confidence parameter of type double.")] public static SsaChangePointEstimator DetectChangePointBySsa(this TransformsCatalog catalog, string outputColumnName, string inputColumnName, int confidence, int changeHistoryLength, int trainingWindowSize, int seasonalityWindowSize, ErrorFunction errorFunction = ErrorFunction.SignedDifference, MartingaleType martingale = MartingaleType.Power, double eps = 0.1) + => DetectChangePointBySsa(catalog, outputColumnName, inputColumnName, (double)confidence, changeHistoryLength, trainingWindowSize, seasonalityWindowSize, errorFunction, martingale, eps); + + /// + /// Create , which predicts change points in time series + /// using Singular Spectrum Analysis (SSA). + /// + /// The transform's catalog. + /// Name of the column resulting from the transformation of . + /// The column data is a vector of . The vector contains 4 elements: alert (non-zero value means a change point), raw score, p-Value and martingale score. + /// Name of column to transform. The column data must be . + /// If set to , the value of the will be used as source. + /// The confidence for change point detection in the range [0, 100]. + /// The number of points from the beginning of the sequence used for training. + /// The size of the sliding window for computing the p-value. + /// An upper bound on the largest relevant seasonality in the input time-series. + /// The function used to compute the error between the expected and the observed value. + /// The martingale used for scoring. + /// The epsilon parameter for the Power martingale. + /// + /// + /// + /// + /// + public static SsaChangePointEstimator DetectChangePointBySsa(this TransformsCatalog catalog, string outputColumnName, string inputColumnName, + double confidence, int changeHistoryLength, int trainingWindowSize, int seasonalityWindowSize, ErrorFunction errorFunction = ErrorFunction.SignedDifference, + MartingaleType martingale = MartingaleType.Power, double eps = 0.1) => new SsaChangePointEstimator(CatalogUtils.GetEnvironment(catalog), new SsaChangePointDetector.Options { Name = outputColumnName, @@ -121,7 +201,34 @@ public static SsaChangePointEstimator DetectChangePointBySsa(this TransformsCata /// ]]> /// /// + [Obsolete("This API method is deprecated, please use the overload with confidence parameter of type double.")] public static SsaSpikeEstimator DetectSpikeBySsa(this TransformsCatalog catalog, string outputColumnName, string inputColumnName, int confidence, int pvalueHistoryLength, + int trainingWindowSize, int seasonalityWindowSize, AnomalySide side = AnomalySide.TwoSided, ErrorFunction errorFunction = ErrorFunction.SignedDifference) + => DetectSpikeBySsa(catalog, outputColumnName, inputColumnName, (double)confidence, pvalueHistoryLength, trainingWindowSize, seasonalityWindowSize, side, errorFunction); + + /// + /// Create , which predicts spikes in time series + /// using Singular Spectrum Analysis (SSA). + /// + /// The transform's catalog. + /// Name of the column resulting from the transformation of . + /// The column data is a vector of . The vector contains 3 elements: alert (non-zero value means a spike), raw score, and p-value. + /// Name of column to transform. The column data must be . + /// If set to , the value of the will be used as source. + /// The confidence for spike detection in the range [0, 100]. + /// The size of the sliding window for computing the p-value. + /// The number of points from the beginning of the sequence used for training. + /// An upper bound on the largest relevant seasonality in the input time-series. + /// The argument that determines whether to detect positive or negative anomalies, or both. + /// The function used to compute the error between the expected and the observed value. + /// + /// + /// + /// + /// + public static SsaSpikeEstimator DetectSpikeBySsa(this TransformsCatalog catalog, string outputColumnName, string inputColumnName, double confidence, int pvalueHistoryLength, int trainingWindowSize, int seasonalityWindowSize, AnomalySide side = AnomalySide.TwoSided, ErrorFunction errorFunction = ErrorFunction.SignedDifference) => new SsaSpikeEstimator(CatalogUtils.GetEnvironment(catalog), outputColumnName, confidence, pvalueHistoryLength, trainingWindowSize, seasonalityWindowSize, inputColumnName, side, errorFunction); diff --git a/src/Microsoft.ML.TimeSeries/IidChangePointDetector.cs b/src/Microsoft.ML.TimeSeries/IidChangePointDetector.cs index 3ac2348f74..dbfdc32376 100644 --- a/src/Microsoft.ML.TimeSeries/IidChangePointDetector.cs +++ b/src/Microsoft.ML.TimeSeries/IidChangePointDetector.cs @@ -219,7 +219,7 @@ private static IRowMapper Create(IHostEnvironment env, ModelLoadContext ctx, Dat /// ]]> /// /// - /// + /// public sealed class IidChangePointEstimator : TrivialEstimator { /// @@ -233,7 +233,7 @@ public sealed class IidChangePointEstimator : TrivialEstimatorName of column to transform. If set to , the value of the will be used as source. /// The martingale used for scoring. /// The epsilon parameter for the Power martingale. - internal IidChangePointEstimator(IHostEnvironment env, string outputColumnName, int confidence, + internal IidChangePointEstimator(IHostEnvironment env, string outputColumnName, double confidence, int changeHistoryLength, string inputColumnName, MartingaleType martingale = MartingaleType.Power, double eps = 0.1) : base(Contracts.CheckRef(env, nameof(env)).Register(nameof(IidChangePointEstimator)), new IidChangePointDetector(env, new IidChangePointDetector.Options diff --git a/src/Microsoft.ML.TimeSeries/IidSpikeDetector.cs b/src/Microsoft.ML.TimeSeries/IidSpikeDetector.cs index e878db941a..0708aef2e8 100644 --- a/src/Microsoft.ML.TimeSeries/IidSpikeDetector.cs +++ b/src/Microsoft.ML.TimeSeries/IidSpikeDetector.cs @@ -199,7 +199,7 @@ private static IRowMapper Create(IHostEnvironment env, ModelLoadContext ctx, Dat /// ]]> /// /// - /// + /// public sealed class IidSpikeEstimator : TrivialEstimator { /// @@ -212,7 +212,7 @@ public sealed class IidSpikeEstimator : TrivialEstimator /// The size of the sliding window for computing the p-value. /// Name of column to transform. If set to , the value of the will be used as source. /// The argument that determines whether to detect positive or negative anomalies, or both. - internal IidSpikeEstimator(IHostEnvironment env, string outputColumnName, int confidence, int pvalueHistoryLength, string inputColumnName, AnomalySide side = AnomalySide.TwoSided) + internal IidSpikeEstimator(IHostEnvironment env, string outputColumnName, double confidence, int pvalueHistoryLength, string inputColumnName, AnomalySide side = AnomalySide.TwoSided) : base(Contracts.CheckRef(env, nameof(env)).Register(nameof(IidSpikeDetector)), new IidSpikeDetector(env, new IidSpikeDetector.Options { diff --git a/src/Microsoft.ML.TimeSeries/Microsoft.ML.TimeSeries.csproj b/src/Microsoft.ML.TimeSeries/Microsoft.ML.TimeSeries.csproj index c5b4550c51..b5aa12d56a 100644 --- a/src/Microsoft.ML.TimeSeries/Microsoft.ML.TimeSeries.csproj +++ b/src/Microsoft.ML.TimeSeries/Microsoft.ML.TimeSeries.csproj @@ -1,13 +1,24 @@  + netstandard2.0 Microsoft.ML.TimeSeries + Microsoft.ML.TimeSeries contains ML.NET Time Series prediction algorithms. Uses Intel Mkl. - - - + + + + + all + + + all + + + all + diff --git a/src/Microsoft.ML.TimeSeries/Properties/AssemblyInfo.cs b/src/Microsoft.ML.TimeSeries/Properties/AssemblyInfo.cs index a16f8e17fd..45df58aad8 100644 --- a/src/Microsoft.ML.TimeSeries/Properties/AssemblyInfo.cs +++ b/src/Microsoft.ML.TimeSeries/Properties/AssemblyInfo.cs @@ -5,7 +5,7 @@ using System.Runtime.CompilerServices; using Microsoft.ML; -[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.TimeSeries.Tests" + PublicKey.TestValue)] +[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.TimeSeries.Tests" + PublicKey.Value)] [assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.Core.Tests" + PublicKey.TestValue)] [assembly: WantsToBeBestFriends] diff --git a/src/Microsoft.ML.TimeSeries/SrCnnEntireAnomalyDetector.cs b/src/Microsoft.ML.TimeSeries/SrCnnEntireAnomalyDetector.cs index 7cca7f893a..12a3f8c9ed 100644 --- a/src/Microsoft.ML.TimeSeries/SrCnnEntireAnomalyDetector.cs +++ b/src/Microsoft.ML.TimeSeries/SrCnnEntireAnomalyDetector.cs @@ -84,7 +84,7 @@ internal static class Defaults { public const double Threshold = 0.3; public const int BatchSize = 2000; - public const double Sensitivity = 55; + public const double Sensitivity = 70; public const SrCnnDetectMode DetectMode = SrCnnDetectMode.AnomalyOnly; public const int Period = 0; public const SrCnnDeseasonalityMode DeseasonalityMode = SrCnnDeseasonalityMode.Stl; @@ -309,6 +309,15 @@ public void Process() _previousBatch = _previousBatch.GetRange(_batch.Count, _bLen); _previousBatch.AddRange(_batch); _modeler.Train(_previousBatch.ToArray(), ref _results); + + // move the values to front + for (int i = 0; i < _batch.Count; ++i) + { + for (int j = 0; j < _outputLength; ++j) + { + _results[i][j] = _results[_bLen + i][j]; + } + } } else { @@ -334,7 +343,7 @@ public ValueGetter> CreateGetter(DataViewRowCursor input, string double src = default; srcGetter(ref src); var result = VBufferEditor.Create(ref dst, _outputLength); - _results[input.Position % _batchSize + _bLen].CopyTo(result.Values); + _results[input.Position % _batchSize].CopyTo(result.Values); dst = result.Commit(); }; return getter; @@ -349,36 +358,67 @@ internal sealed class SrCnnEntireModeler private static readonly int _judgementWindowSize = 40; private static readonly double _eps = 1e-8; private static readonly double _deanomalyThreshold = 0.35; - private static readonly double _boundSensitivity = 70.0; - - // A fixed lookup table which returns factor using sensitivity as index. - // Since Margin = BoundaryUnit * factor, this factor is calculated to make sure Margin == Boundary when sensitivity is 50, - // and increases/decreases exponentially as sensitivity increases/decreases. - // The factor array is generated by formula: - // f(x)=1, if x=50; - // f(x)=f(x+1)*(1.25+0.001*x), if 0<=x<50; - // f(x)=f(x+1)/(1.25+0.001*(x-50)), if 50(ref results, values.Length); } + _minimumOriginValue = Double.MaxValue; + _maximumOriginValue = Double.MinValue; + + var sum = 0.0; + var squareSum = 0.0; + Array.Resize(ref _seriesToDetect, values.Length); for (int i = 0; i < values.Length; ++i) { - _seriesToDetect[i] = values[i]; + var value = values[i]; + _seriesToDetect[i] = value; + _minimumOriginValue = Math.Min(_minimumOriginValue, value); + _maximumOriginValue = Math.Max(_maximumOriginValue, value); + sum += value; + squareSum += value * value; } + _mean = sum / values.Length; + _std = Math.Sqrt((squareSum - (sum * sum) / values.Length) / values.Length); + if (_period > 0) { _deseasonalityFunction.Deseasonality(ref values, _period, ref _seriesToDetect); @@ -551,21 +609,39 @@ private void SpectralResidual(double[] values, double[][] results, double thresh { _ifftMagList[i] = Math.Sqrt(_ifftRe[i] * _ifftRe[i] + _ifftIm[i] * _ifftIm[i]); } + AverageFilter(_ifftMagList, Math.Min(_ifftMagList.Length, _judgementWindowSize)); + for (int i = 0; i <= Math.Min(length, _minimumScoreWindowSize); ++i) + { + _cumSumList[i] = _cumSumList[Math.Min(length, _minimumScoreWindowSize) - 1]; + } // Step 7: Calculate raw score and set result for (int i = 0; i < results.GetLength(0); ++i) { var score = CalculateScore(_ifftMagList[i], _cumSumList[i]); score /= 10.0f; - score = Math.Min(score, 1); - score = Math.Max(score, 0); + score = Math.Min(score, _maximumScore); + score = Math.Max(score, _minimumScore); var detres = score > threshold ? 1 : 0; + // Anomalies correction by zscore + if (detres > 0) + { + // Use zscore to filter out those false anomalies that lie within 1.5 sigma region. + var zscore = Math.Abs(values[i] - _mean) / _std; + if (_std < _eps || zscore < _zscoreThreshold) + { + detres = 0; + score = 0.0; + } + } + results[i][0] = detres; results[i][1] = score; results[i][2] = _ifftMagList[i]; + } } @@ -641,7 +717,7 @@ private void GetExpectedValue(double[] values, double[][] results) for (int i = 0; i < results.Length; ++i) { - results[i][3] = _ifftRe[i]; + results[i][3] = AdjustExpectedValueBasedOnOriginalDataRange(_ifftRe[i]); } } @@ -650,7 +726,7 @@ private void GetExpectedValuePeriod(double[] values, double[][] results, IReadOn //Step 8: Calculate Expected Value for (int i = 0; i < values.Length; ++i) { - results[i][3] = values[i] - residual[i]; + results[i][3] = AdjustExpectedValueBasedOnOriginalDataRange(values[i] - residual[i]); } } @@ -762,7 +838,8 @@ private void GetMargin(double[] values, double[][] results, double sensitivity) { //Step 10: Calculate UpperBound and LowerBound var margin = CalculateMargin(_units[i], sensitivity); - results[i][3] = _ifftRe[i]; + results[i][3] = AdjustExpectedValueBasedOnOriginalDataRange(_ifftRe[i]); + results[i][4] = _units[i]; results[i][5] = _ifftRe[i] + margin; results[i][6] = _ifftRe[i] - margin; @@ -783,6 +860,21 @@ private void GetMargin(double[] values, double[][] results, double sensitivity) } } + // Adjust the expected value if original data range is non-negative or non-positive + private double AdjustExpectedValueBasedOnOriginalDataRange(double expectedValue) + { + if (_minimumOriginValue >= 0 && expectedValue < 0) + { + expectedValue = 0; + } + else if (_maximumOriginValue <= 0 && expectedValue > 0) + { + expectedValue = 0; + } + + return expectedValue; + } + // Adjust the expected value so that it is within the bound margin of value private double AdjustExpectedValueBasedOnBound(double value, double expectedValue, double unit) { @@ -880,18 +972,20 @@ private void CalculateExpectedValueByFft(double[] data) FftUtils.ComputeBackwardFft(_fftRe, _fftIm, _ifftRe, _ifftIm, length); } - private void CalculateBoundaryUnit(double[] data, bool[] isAnomalys) + private void CalculateBoundaryUnit(double[] data, bool[] isAnomalies) { int window = Math.Min(data.Length / 3, 512); double trendFraction = 0.5; // mix trend and average of trend double trendSum = 0; int calculationSize = 0; + bool closeToZero = true; MedianFilter(data, window, true); for (int i = 0; i < _trends.Length; ++i) { - if (!isAnomalys[i]) + if (!isAnomalies[i]) { + closeToZero = closeToZero && _trends[i] < _eps; trendSum += Math.Abs(_trends[i]); ++calculationSize; } @@ -910,10 +1004,17 @@ private void CalculateBoundaryUnit(double[] data, bool[] isAnomalys) Array.Resize(ref _units, _trends.Length); for (int i = 0; i < _units.Length; ++i) { - _units[i] = Math.Max(1, averageTrendPart + Math.Abs(_trends[i]) * trendFraction); - if (double.IsInfinity(_units[i])) + if (closeToZero) + { + _units[i] = _unitForZero; + } + else { - throw new ArithmeticException("Not finite unit value"); + _units[i] = averageTrendPart + Math.Abs(_trends[i]) * trendFraction; + if (double.IsInfinity(_units[i])) + { + throw new ArithmeticException("Not finite unit value"); + } } } } @@ -1031,19 +1132,14 @@ private double CalculateAnomalyScore(double value, double exp, double unit, bool return anomalyScore; } - double distance = Math.Abs(exp - value); - List margins = new List(); - for (int i = 100; i >= 0; --i) - { - margins.Add(CalculateMargin(unit, i)); - } + double distanceFactor = Math.Abs(exp - value) / unit; int lb = 0; int ub = 100; while (lb < ub) { int mid = (lb + ub) / 2; - if (margins[mid] < distance) + if (_factors[100 - mid] < distanceFactor) { lb = mid + 1; } @@ -1053,15 +1149,15 @@ private double CalculateAnomalyScore(double value, double exp, double unit, bool } } - if (Math.Abs(margins[lb] - distance) < _eps || lb == 0) + if (_factors[100 - lb] == distanceFactor || lb == 0) { anomalyScore = lb; } else { - double lowerMargin = margins[lb - 1]; - double upperMargin = margins[lb]; - anomalyScore = lb - 1 + (distance - lowerMargin) / (upperMargin - lowerMargin); + double lowerMargin = _factors[101 - lb]; + double upperMargin = _factors[100 - lb]; + anomalyScore = lb - 1 + (distanceFactor - lowerMargin) / (upperMargin - lowerMargin); } return anomalyScore / 100.0f; diff --git a/src/Microsoft.ML.TimeSeries/SsaChangePointDetector.cs b/src/Microsoft.ML.TimeSeries/SsaChangePointDetector.cs index 8d2018daed..1e3969b6a2 100644 --- a/src/Microsoft.ML.TimeSeries/SsaChangePointDetector.cs +++ b/src/Microsoft.ML.TimeSeries/SsaChangePointDetector.cs @@ -226,7 +226,7 @@ private static IRowMapper Create(IHostEnvironment env, ModelLoadContext ctx, Dat /// ]]> /// /// - /// + /// public sealed class SsaChangePointEstimator : IEstimator { private readonly IHost _host; @@ -247,7 +247,7 @@ public sealed class SsaChangePointEstimator : IEstimator /// The martingale used for scoring. /// The epsilon parameter for the Power martingale. internal SsaChangePointEstimator(IHostEnvironment env, string outputColumnName, - int confidence, + double confidence, int changeHistoryLength, int trainingWindowSize, int seasonalityWindowSize, diff --git a/src/Microsoft.ML.TimeSeries/SsaSpikeDetector.cs b/src/Microsoft.ML.TimeSeries/SsaSpikeDetector.cs index e22f80969e..a0e1fca547 100644 --- a/src/Microsoft.ML.TimeSeries/SsaSpikeDetector.cs +++ b/src/Microsoft.ML.TimeSeries/SsaSpikeDetector.cs @@ -207,7 +207,7 @@ private static IRowMapper Create(IHostEnvironment env, ModelLoadContext ctx, Dat /// ]]> /// /// - /// + /// public sealed class SsaSpikeEstimator : IEstimator { private readonly IHost _host; @@ -228,7 +228,7 @@ public sealed class SsaSpikeEstimator : IEstimator /// The function used to compute the error between the expected and the observed value. internal SsaSpikeEstimator(IHostEnvironment env, string outputColumnName, - int confidence, + double confidence, int pvalueHistoryLength, int trainingWindowSize, int seasonalityWindowSize, diff --git a/src/Microsoft.ML.Transforms/PermutationFeatureImportanceExtensions.cs b/src/Microsoft.ML.Transforms/PermutationFeatureImportanceExtensions.cs index 02e8832f0e..8be82d7fde 100644 --- a/src/Microsoft.ML.Transforms/PermutationFeatureImportanceExtensions.cs +++ b/src/Microsoft.ML.Transforms/PermutationFeatureImportanceExtensions.cs @@ -4,6 +4,7 @@ using System.Collections.Generic; using System.Collections.Immutable; +using System.Linq; using Microsoft.ML.Data; using Microsoft.ML.Runtime; using Microsoft.ML.Transforms; @@ -251,7 +252,7 @@ private static MulticlassClassificationMetrics MulticlassClassificationDelta( logLoss: a.LogLoss - b.LogLoss, logLossReduction: a.LogLossReduction - b.LogLossReduction, topKPredictionCount: a.TopKPredictionCount, - topKAccuracy: a.TopKAccuracy - b.TopKAccuracy, + topKAccuracies: a?.TopKAccuracyForAllK?.Zip(b.TopKAccuracyForAllK, (a,b)=>a-b)?.ToArray(), perClassLogLoss: perClassLogLoss ); } diff --git a/src/Microsoft.ML.Transforms/Properties/AssemblyInfo.cs b/src/Microsoft.ML.Transforms/Properties/AssemblyInfo.cs index 2f38ef02fc..dfcde9dbf4 100644 --- a/src/Microsoft.ML.Transforms/Properties/AssemblyInfo.cs +++ b/src/Microsoft.ML.Transforms/Properties/AssemblyInfo.cs @@ -16,7 +16,7 @@ [assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.RServerScoring.TextAnalytics" + InternalPublicKey.Value)] [assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.TimeSeries" + PublicKey.Value)] [assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.Tests" + PublicKey.TestValue)] -[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.TestFramework" + PublicKey.TestValue)] +[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.TestFramework" + PublicKey.Value)] [assembly: InternalsVisibleTo(assemblyName: "TMSNlearnPrediction" + InternalPublicKey.Value)] [assembly: WantsToBeBestFriends] diff --git a/src/Microsoft.ML.Transforms/Text/LdaTransform.cs b/src/Microsoft.ML.Transforms/Text/LdaTransform.cs index 10fced0601..330b57a6a6 100644 --- a/src/Microsoft.ML.Transforms/Text/LdaTransform.cs +++ b/src/Microsoft.ML.Transforms/Text/LdaTransform.cs @@ -44,7 +44,7 @@ namespace Microsoft.ML.Transforms.Text // and open source implementation: // https://github.com/Microsoft/LightLDA // - // See + // See // for an example on how to use LatentDirichletAllocationTransformer. /// /// resulting from fitting a . diff --git a/src/Microsoft.ML.Transforms/Text/StopWordsRemovingTransformer.cs b/src/Microsoft.ML.Transforms/Text/StopWordsRemovingTransformer.cs index 959461a104..6bc00b9a30 100644 --- a/src/Microsoft.ML.Transforms/Text/StopWordsRemovingTransformer.cs +++ b/src/Microsoft.ML.Transforms/Text/StopWordsRemovingTransformer.cs @@ -984,7 +984,7 @@ private CustomStopWordsRemovingTransformer(IHost host, ModelLoadContext ctx) : { const string dir = "Stopwords"; - NormStr.Pool stopwrods = null; + NormStr.Pool stopwords = null; bool res = ctx.TryProcessSubModel(dir, c => { @@ -997,22 +997,22 @@ private CustomStopWordsRemovingTransformer(IHost host, ModelLoadContext ctx) : int cstr = ctx.Reader.ReadInt32(); Host.CheckDecode(cstr > 0); - stopwrods = new NormStr.Pool(); + stopwords = new NormStr.Pool(); for (int istr = 0; istr < cstr; istr++) { - var nstr = stopwrods.Add(ctx.LoadString()); + var nstr = stopwords.Add(ctx.LoadString()); Host.CheckDecode(nstr.Id == istr); } // All stopwords are distinct. - Host.CheckDecode(stopwrods.Count == cstr); + Host.CheckDecode(stopwords.Count == cstr); // The deserialized pool should not have the empty string. - Host.CheckDecode(stopwrods.Get("") == null); + Host.CheckDecode(stopwords.Get("") == null); }); if (!res) throw Host.ExceptDecode(); - _stopWordsMap = stopwrods; + _stopWordsMap = stopwords; } } diff --git a/src/Microsoft.ML.Transforms/Text/TextCatalog.cs b/src/Microsoft.ML.Transforms/Text/TextCatalog.cs index 7b4b554b7c..9ae8888791 100644 --- a/src/Microsoft.ML.Transforms/Text/TextCatalog.cs +++ b/src/Microsoft.ML.Transforms/Text/TextCatalog.cs @@ -334,7 +334,7 @@ public static CustomStopWordsRemovingEstimator RemoveStopWords(this TransformsCa => new CustomStopWordsRemovingEstimator(Contracts.CheckRef(catalog, nameof(catalog)).GetEnvironment(), outputColumnName, inputColumnName, stopwords); /// - /// Create a , which maps the column specified in + /// Create a , which maps the column specified in /// to a vector of n-gram counts in a new column named . /// /// @@ -363,7 +363,7 @@ public static WordBagEstimator ProduceWordBags(this TransformsCatalog.TextTransf outputColumnName, inputColumnName, ngramLength, skipLength, useAllLengths, maximumNgramsCount, weighting); /// - /// Create a , which maps the multiple columns specified in + /// Create a , which maps the multiple columns specified in /// to a vector of n-gram counts in a new column named . /// /// diff --git a/src/Microsoft.ML.Transforms/Text/WordTokenizing.cs b/src/Microsoft.ML.Transforms/Text/WordTokenizing.cs index 1eac17ccaa..3af7a1e471 100644 --- a/src/Microsoft.ML.Transforms/Text/WordTokenizing.cs +++ b/src/Microsoft.ML.Transforms/Text/WordTokenizing.cs @@ -415,10 +415,10 @@ public void SaveAsOnnx(OnnxContext ctx) string[] separators = column.SeparatorsArray.Select(c => c.ToString()).ToArray(); tokenizerNode.AddAttribute("separators", separators); - opType = "Squeeze"; - var squeezeOutput = ctx.AddIntermediateVariable(_type, column.Name); - var squeezeNode = ctx.CreateNode(opType, intermediateVar, squeezeOutput, ctx.GetNodeName(opType), ""); - squeezeNode.AddAttribute("axes", new long[] { 1 }); + opType = "Reshape"; + var shape = ctx.AddInitializer(new long[] { 1, -1 }, new long[] { 2 }, "Shape"); + var reshapeOutput = ctx.AddIntermediateVariable(new VectorDataViewType(TextDataViewType.Instance, 1), column.Name); + var reshapeNode = ctx.CreateNode(opType, new[] { intermediateVar, shape }, new[] { reshapeOutput }, ctx.GetNodeName(opType), ""); } } } diff --git a/src/Microsoft.ML.Vision/DnnRetrainTransform.cs b/src/Microsoft.ML.Vision/DnnRetrainTransform.cs index 2388ba8e19..240b2773f7 100644 --- a/src/Microsoft.ML.Vision/DnnRetrainTransform.cs +++ b/src/Microsoft.ML.Vision/DnnRetrainTransform.cs @@ -19,6 +19,7 @@ using Tensorflow; using static Microsoft.ML.TensorFlow.TensorFlowUtils; using static Tensorflow.Binding; +using Utils = Microsoft.ML.Internal.Utilities.Utils; [assembly: LoadableClass(DnnRetrainTransformer.Summary, typeof(IDataTransform), typeof(DnnRetrainTransformer), typeof(DnnRetrainEstimator.Options), typeof(SignatureDataTransform), DnnRetrainTransformer.UserName, DnnRetrainTransformer.ShortName)] @@ -607,7 +608,7 @@ internal static TensorShape GetTensorShape(TF_Output output, Graph graph, Status new ObjectDisposedException(nameof(graph)); var cstatus = status == null ? new Status() : status; - var n = c_api.TF_GraphGetTensorNumDims(graph, output, cstatus); + var n = c_api.TF_GraphGetTensorNumDims(graph, output, cstatus.Handle); cstatus.Check(); @@ -615,7 +616,7 @@ internal static TensorShape GetTensorShape(TF_Output output, Graph graph, Status return new TensorShape(new int[0]); var dims = new long[n]; - c_api.TF_GraphGetTensorShape(graph, output, dims, dims.Length, cstatus); + c_api.TF_GraphGetTensorShape(graph, output, dims, dims.Length, cstatus.Handle); cstatus.Check(); return new TensorShape(dims.Select(x => (int)x).ToArray()); } @@ -1040,49 +1041,11 @@ public Tensor GetBufferedBatchTensor() } else { - var tensor = CastDataAndReturnAsTensor(_bufferedData); + var tensor = TensorFlowUtils.CastDataAndReturnAsTensor(_bufferedData, _tfShape); _position = 0; return tensor; } } - - private Tensor CastDataAndReturnAsTensor(T[] data) - { - if (typeof(T) == typeof(sbyte)) - return new Tensor((sbyte[])(object)data, _dims, TF_DataType.TF_INT8); - else if (typeof(T) == typeof(long)) - return new Tensor((long[])(object)data, _dims, TF_DataType.TF_INT64); - else if (typeof(T) == typeof(Int32)) - return new Tensor((Int32[])(object)data, _dims, TF_DataType.TF_INT32); - else if (typeof(T) == typeof(Int16)) - return new Tensor((Int16[])(object)data, _dims, TF_DataType.TF_INT16); - else if (typeof(T) == typeof(byte)) - return new Tensor((byte[])(object)data, _dims, TF_DataType.TF_UINT8); - else if (typeof(T) == typeof(ulong)) - return new Tensor((ulong[])(object)data, _dims, TF_DataType.TF_UINT64); - else if (typeof(T) == typeof(UInt32)) - return new Tensor((UInt32[])(object)data, _dims, TF_DataType.TF_UINT32); - else if (typeof(T) == typeof(UInt16)) - return new Tensor((UInt16[])(object)data, _dims, TF_DataType.TF_UINT16); - else if (typeof(T) == typeof(bool)) - return new Tensor((bool[])(object)data, _dims, TF_DataType.TF_BOOL); - else if (typeof(T) == typeof(float)) - return new Tensor((float[])(object)data, _dims, TF_DataType.TF_FLOAT); - else if (typeof(T) == typeof(float)) - return new Tensor((double[])(object)data, _dims, TF_DataType.TF_DOUBLE); - else if (typeof(T) == typeof(ReadOnlyMemory)) - { - byte[][] bytes = new byte[_bufferedData.Length][]; - for (int i = 0; i < bytes.Length; i++) - { - bytes[i] = Encoding.UTF8.GetBytes(((ReadOnlyMemory)(object)data[i]).ToArray()); - } - - return new Tensor(bytes, _tfShape.dims.Select(x => (long)x).ToArray()); - } - - return new Tensor(new NDArray(data, _tfShape)); - } } private class TensorValueGetterVec : ITensorValueGetter @@ -1126,45 +1089,7 @@ public Tensor GetTensor() // This is done to reduce memory allocation every time tensor is created. _denseData = new T[_vBuffer.Length]; _vBuffer.CopyTo(_denseData); - return CastDataAndReturnAsTensor(_denseData); - } - - private Tensor CastDataAndReturnAsTensor(T[] data) - { - if (typeof(T) == typeof(sbyte)) - return new Tensor((sbyte[])(object)data, _dims, TF_DataType.TF_INT8); - else if (typeof(T) == typeof(long)) - return new Tensor((long[])(object)data, _dims, TF_DataType.TF_INT64); - else if (typeof(T) == typeof(Int32)) - return new Tensor((Int32[])(object)data, _dims, TF_DataType.TF_INT32); - else if (typeof(T) == typeof(Int16)) - return new Tensor((Int16[])(object)data, _dims, TF_DataType.TF_INT16); - else if (typeof(T) == typeof(byte)) - return new Tensor((byte[])(object)data, _dims, TF_DataType.TF_UINT8); - else if (typeof(T) == typeof(ulong)) - return new Tensor((ulong[])(object)data, _dims, TF_DataType.TF_UINT64); - else if (typeof(T) == typeof(UInt32)) - return new Tensor((UInt32[])(object)data, _dims, TF_DataType.TF_UINT32); - else if (typeof(T) == typeof(UInt16)) - return new Tensor((UInt16[])(object)data, _dims, TF_DataType.TF_UINT16); - else if (typeof(T) == typeof(bool)) - return new Tensor((bool[])(object)data, _dims, TF_DataType.TF_BOOL); - else if (typeof(T) == typeof(float)) - return new Tensor((float[])(object)data, _dims, TF_DataType.TF_FLOAT); - else if (typeof(T) == typeof(double)) - return new Tensor((double[])(object)data, _dims, TF_DataType.TF_DOUBLE); - else if (typeof(T) == typeof(ReadOnlyMemory)) - { - byte[][] bytes = new byte[_vBuffer.Length][]; - for (int i = 0; i < bytes.Length; i++) - { - bytes[i] = Encoding.UTF8.GetBytes(((ReadOnlyMemory)(object)data[i]).ToArray()); - } - - return new Tensor(bytes, _tfShape.dims.Select(x => (long)x).ToArray()); - } - - return new Tensor(new NDArray(data, _tfShape)); + return TensorFlowUtils.CastDataAndReturnAsTensor(_denseData, _tfShape); } public void BufferTrainingData() @@ -1177,7 +1102,7 @@ public void BufferTrainingData() public Tensor GetBufferedBatchTensor() { _position = 0; - var tensor = CastDataAndReturnAsTensor(_bufferedData); + var tensor = TensorFlowUtils.CastDataAndReturnAsTensor(_bufferedData, _tfShape); _bufferedData = new T[_bufferedDataSize]; return tensor; } diff --git a/src/Microsoft.ML.Vision/ImageClassificationTrainer.cs b/src/Microsoft.ML.Vision/ImageClassificationTrainer.cs index 5f94ff282b..e5fe486ae5 100644 --- a/src/Microsoft.ML.Vision/ImageClassificationTrainer.cs +++ b/src/Microsoft.ML.Vision/ImageClassificationTrainer.cs @@ -530,6 +530,7 @@ internal ImageClassificationTrainer(IHostEnvironment env, Options options) Host.CheckNonEmpty(options.LabelColumnName, nameof(options.LabelColumnName)); Host.CheckNonEmpty(options.ScoreColumnName, nameof(options.ScoreColumnName)); Host.CheckNonEmpty(options.PredictedLabelColumnName, nameof(options.PredictedLabelColumnName)); + tf.compat.v1.disable_eager_execution(); if (string.IsNullOrEmpty(options.WorkspacePath)) { @@ -752,15 +753,15 @@ private void CheckTrainingParameters(Options options) var decodedImage4d = tf.expand_dims(decodedImageAsFloat, 0); var resizeShape = tf.stack(new int[] { inputDim.Item1, inputDim.Item2 }); var resizeShapeAsInt = tf.cast(resizeShape, dtype: tf.int32); - var resizedImage = tf.image.resize_bilinear(decodedImage4d, resizeShapeAsInt, false, "ResizeTensor"); + var resizedImage = tf.image.resize_bilinear(decodedImage4d, resizeShapeAsInt, false, name: "ResizeTensor"); return (jpegData, resizedImage); } private static Tensor EncodeByteAsString(VBuffer buffer) { int length = buffer.Length; - var size = c_api.TF_StringEncodedSize((UIntPtr)length); - var handle = c_api.TF_AllocateTensor(TF_DataType.TF_STRING, IntPtr.Zero, 0, (UIntPtr)((ulong)size + 8)); + var size = c_api.TF_StringEncodedSize((ulong)length); + var handle = c_api.TF_AllocateTensor(TF_DataType.TF_STRING, Array.Empty(), 0, ((ulong)size + 8)); IntPtr tensor = c_api.TF_TensorData(handle); Marshal.WriteInt64(tensor, 0); @@ -769,7 +770,7 @@ private static Tensor EncodeByteAsString(VBuffer buffer) unsafe { fixed (byte* src = buffer.GetValues()) - c_api.TF_StringEncode(src, (UIntPtr)length, (sbyte*)(tensor + sizeof(Int64)), size, status); + c_api.TF_StringEncode(src, (ulong)length, (byte*)(tensor + sizeof(Int64)), size, status.Handle); } status.Check(true); @@ -1213,7 +1214,7 @@ private void UpdateTransferLearningModelOnDisk(int classCount) sess.Dispose(); } - private void VariableSummaries(RefVariable var) + private void VariableSummaries(ResourceVariable var) { tf_with(tf.name_scope("summaries"), delegate { @@ -1256,7 +1257,7 @@ private void VariableSummaries(RefVariable var) Tensor logits = null; tf_with(tf.name_scope(layerName), scope => { - RefVariable layerWeights = null; + ResourceVariable layerWeights = null; tf_with(tf.name_scope("weights"), delegate { var initialValue = tf.truncated_normal(new int[] { bottleneck_tensor_size, classCount }, @@ -1266,7 +1267,7 @@ private void VariableSummaries(RefVariable var) VariableSummaries(layerWeights); }); - RefVariable layerBiases = null; + ResourceVariable layerBiases = null; tf_with(tf.name_scope("biases"), delegate { TensorShape shape = new TensorShape(classCount); @@ -1445,14 +1446,15 @@ private protected override void SaveCore(ModelSaveContext ctx) ctx.Writer.Write(_imagePreprocessorTensorOutput); ctx.Writer.Write(_graphInputTensor); ctx.Writer.Write(_graphOutputTensor); - - Status status = new Status(); - var buffer = _session.graph.ToGraphDef(status); - ctx.SaveBinaryStream("TFModel", w => + using(var status = new Status()) + using(var buffer = _session.graph.ToGraphDef(status)) { - w.WriteByteArray(buffer.MemoryBlock.ToArray()); - }); - status.Check(true); + ctx.SaveBinaryStream("TFModel", w => + { + w.WriteByteArray(buffer.DangerousMemoryBlock.ToArray()); + }); + status.Check(true); + } } private class Classifier diff --git a/src/Microsoft.ML.Vision/Microsoft.ML.Vision.csproj b/src/Microsoft.ML.Vision/Microsoft.ML.Vision.csproj index a1e2ef0068..08a74bc8d1 100644 --- a/src/Microsoft.ML.Vision/Microsoft.ML.Vision.csproj +++ b/src/Microsoft.ML.Vision/Microsoft.ML.Vision.csproj @@ -1,10 +1,12 @@  + netstandard2.0 Microsoft.ML.Vision CORECLR true + Microsoft.ML.Vision contains high level APIs for vision tasks like image classification. @@ -13,9 +15,15 @@ - - - + + all + + + all + + + all + @@ -26,5 +34,5 @@ - + diff --git a/src/Microsoft.ML/Microsoft.ML.csproj b/src/Microsoft.ML/Microsoft.ML.csproj new file mode 100644 index 0000000000..763233927b --- /dev/null +++ b/src/Microsoft.ML/Microsoft.ML.csproj @@ -0,0 +1,69 @@ + + + + netstandard2.0 + + + $(NoWarn);NU5127;NU5128 + ML.NET is a cross-platform open-source machine learning framework which makes machine learning accessible to .NET developers. + $(TargetsForTfmSpecificBuildOutput);CopyProjectReferencesToPackage + + + + + + true + all + + + true + all + + + true + all + + + true + all + + + true + all + + + true + all + + + + + + + + + + + + + + + + $(TargetsForTfmSpecificBuildOutput);CopyProjectReferencesToPackage + + + + + + + + + + + + + + \ No newline at end of file diff --git a/pkg/Microsoft.ML/build/netstandard2.0/Microsoft.ML.targets b/src/Microsoft.ML/build/netstandard2.0/Microsoft.ML.targets similarity index 100% rename from pkg/Microsoft.ML/build/netstandard2.0/Microsoft.ML.targets rename to src/Microsoft.ML/build/netstandard2.0/Microsoft.ML.targets diff --git a/src/Native/CMakeLists.txt b/src/Native/CMakeLists.txt index 8a475029e3..716636c00e 100644 --- a/src/Native/CMakeLists.txt +++ b/src/Native/CMakeLists.txt @@ -5,7 +5,7 @@ set(CMAKE_INSTALL_PREFIX $ENV{__CMakeBinDir}) set(RESOURCES) # Include 'bin/obj' dir since it contains _version.h -include_directories("${CMAKE_BINARY_DIR}/../../") +include_directories("$ENV{__IntermediatesDir}") if(WIN32) # There seems to be a bug in the latest VS2019 @@ -72,7 +72,7 @@ if(WIN32) set(CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO "${CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO} /DEBUG /OPT:REF /OPT:ICF") set(CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO "${CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO} /NODEFAULTLIB:libucrt.lib /DEFAULTLIB:ucrt.lib") set(CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO "${CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO} /NODEFAULTLIB:libucrt.lib /DEFAULTLIB:ucrt.lib") - list(APPEND RESOURCES ${CMAKE_SOURCE_DIR}/../../Tools/NativeVersion.rc) + list(APPEND RESOURCES $ENV{__IntermediatesDir}/NativeVersion.rc) else() add_compile_options(-Wno-unused-local-typedef) add_compile_options(-fPIC) diff --git a/src/Native/build.proj b/src/Native/Native.proj similarity index 78% rename from src/Native/build.proj rename to src/Native/Native.proj index 4d7bcd38c2..46d6006eb2 100644 --- a/src/Native/build.proj +++ b/src/Native/Native.proj @@ -1,4 +1,13 @@ + + + + + true @@ -6,24 +15,24 @@ true True + $(ArtifactsObjDir)$(MSBuildProjectName)\$(TargetArchitecture).$(Configuration)\ - - - $(PkgDir)_._ + $(RepoRoot)eng\pkg\_._ true - $(RootIntermediateOutputPath)version.c + $(IntermediateOutputPath)version.c true + $(IntermediateOutputPath)_version.h @@ -39,14 +48,14 @@ + DependsOnTargets="GenerateNativeVersionFile"> --stripSymbols - --configuration $(Configuration) --arch $(TargetArchitecture) $(StripArgs) --mkllibpath $(PackagesDir)mlnetmkldeps/$(MlNetMklDepsPackageVersion)/runtimes/$(PackageRid)/native --mkllibrpath ../../../../../microsoft.ml.mkl.redist/$(Version)/runtimes/$(PackageRid)/native + --configuration $(Configuration) --arch $(TargetArchitecture) $(StripArgs) --mkllibpath $(NuGetPackageRoot)mlnetmkldeps/$(MlNetMklDepsPackageVersion)/runtimes/$(PackageRid)/native --mkllibrpath ../../../../../microsoft.ml.mkl.redist/$(Version)/runtimes/$(PackageRid)/native @@ -56,10 +65,10 @@ + DependsOnTargets="GenerateNativeVersionFile"> - $(Configuration) $(TargetArchitecture) --mkllibpath $(PackagesDir)mlnetmkldeps\$(MlNetMklDepsPackageVersion)\runtimes\$(PackageRid)\native + $(Configuration) $(TargetArchitecture) --mkllibpath $(NuGetPackageRoot)mlnetmkldeps\$(MlNetMklDepsPackageVersion)\runtimes\$(PackageRid)\native @@ -71,11 +80,12 @@ + - - @@ -114,6 +124,9 @@ - + + + + diff --git a/src/Native/build.cmd b/src/Native/build.cmd index 2626889fbc..529006a03f 100644 --- a/src/Native/build.cmd +++ b/src/Native/build.cmd @@ -6,8 +6,10 @@ set __currentScriptDir=%~dp0 :SetupArgs :: Initialize the args that will be passed to cmake -set __binDir=%__currentScriptDir%..\..\bin set __rootDir=%__currentScriptDir%..\.. +set __artifactsDir=%__rootDir%\artifacts +set __binDir=%__artifactsDir%\bin +set __objDir=%__artifactsDir%\obj set __CMakeBinDir="" set __IntermediatesDir="" set __BuildArch=x64 @@ -58,7 +60,7 @@ if "%VisualStudioVersion%"=="16.0" ( :MissingVersion :: Can't find VS 2015, 2017 or 2019 echo Error: Visual Studio 2015, 2017 or 2019 required -echo Please see https://github.com/dotnet/machinelearning/tree/master/Documentation for build instructions. +echo Please see https://github.com/dotnet/machinelearning/tree/main/Documentation for build instructions. exit /b 1 :VS2019 @@ -96,10 +98,10 @@ echo Commencing native build of dotnet/machinelearning echo. if %__CMakeBinDir% == "" ( - set "__CMakeBinDir=%__binDir%\%__BuildArch%.%CMAKE_BUILD_TYPE%\Native" + set "__CMakeBinDir=%__binDir%\Native\%__BuildArch%.%CMAKE_BUILD_TYPE%" ) if %__IntermediatesDir% == "" ( - set "__IntermediatesDir=%__binDir%\obj\%__BuildArch%.%CMAKE_BUILD_TYPE%\Native" + set "__IntermediatesDir=%__objDir%\Native\%__BuildArch%.%CMAKE_BUILD_TYPE%" ) set "__CMakeBinDir=%__CMakeBinDir:\=/%" set "__IntermediatesDir=%__IntermediatesDir:\=/%" diff --git a/src/Native/build.sh b/src/Native/build.sh index 46a643b30d..cbc7582ce1 100755 --- a/src/Native/build.sh +++ b/src/Native/build.sh @@ -25,8 +25,8 @@ RootRepo="$DIR/../.." __build_arch= __strip_argument= __configuration=Debug -__rootBinPath="$RootRepo/bin" -__baseIntermediateOutputPath="$__rootBinPath/obj" +__rootBinPath="$RootRepo/artifacts/bin" +__baseIntermediateOutputPath="$RootRepo/artifacts/obj" __versionSourceFile="$__baseIntermediateOutputPath/version.c" __mkllibpath="" __mkllibrpath="" @@ -65,12 +65,14 @@ done __cmake_defines="-DCMAKE_BUILD_TYPE=${__configuration} ${__strip_argument} -DMKL_LIB_PATH=${__mkllibpath} -DMKL_LIB_RPATH=${__mkllibrpath}" -__IntermediatesDir="$__baseIntermediateOutputPath/$__build_arch.$__configuration/Native" -__BinDir="$__rootBinPath/$__build_arch.$__configuration/Native" +__IntermediatesDir="$__baseIntermediateOutputPath/Native/$__build_arch.$__configuration" +__BinDir="$__rootBinPath/Native/$__build_arch.$__configuration" mkdir -p "$__BinDir" mkdir -p "$__IntermediatesDir" +export __IntermediatesDir=$__IntermediatesDir + # Set up the environment to be used for building with clang. if command -v "clang-3.5" > /dev/null 2>&1; then export CC="$(command -v clang-3.5)" diff --git a/src/Native/newbuild.proj b/src/Native/newbuild.proj new file mode 100644 index 0000000000..1c4baed69c --- /dev/null +++ b/src/Native/newbuild.proj @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + diff --git a/src/Redist/Microsoft.ML.DnnImageFeaturizer.ModelRedist/Microsoft.ML.DnnImageFeaturizer.ModelRedist.proj b/src/Redist/Microsoft.ML.DnnImageFeaturizer.ModelRedist/Microsoft.ML.DnnImageFeaturizer.ModelRedist.proj index 65e0c5be33..c6360b16e5 100644 --- a/src/Redist/Microsoft.ML.DnnImageFeaturizer.ModelRedist/Microsoft.ML.DnnImageFeaturizer.ModelRedist.proj +++ b/src/Redist/Microsoft.ML.DnnImageFeaturizer.ModelRedist/Microsoft.ML.DnnImageFeaturizer.ModelRedist.proj @@ -1,26 +1,24 @@ - - netstandard2.0 - + - $(ObjDir)DnnImageModels + $(ArtifactsObjDir)DnnImageModels @@ -67,7 +65,7 @@ - + @@ -77,7 +75,7 @@ - + @@ -87,13 +85,13 @@ - + - @@ -118,7 +116,17 @@ UseSymboliclinksIfPossible="$(CreateSymbolicLinksForPublishFilesIfPossible)" --> + + + + + + + + + + \ No newline at end of file diff --git a/src/Redist/build.proj b/src/Redist/build.proj index 6891516cc0..c28c312124 100644 --- a/src/Redist/build.proj +++ b/src/Redist/build.proj @@ -1,6 +1,5 @@ - + - diff --git a/test/BaselineOutput/Common/Command/CommandCrossValidationKeyLabelWithFloatKeyValues-out.txt b/test/BaselineOutput/Common/Command/CommandCrossValidationKeyLabelWithFloatKeyValues-out.txt index 3608e165c9..2a75042d84 100644 --- a/test/BaselineOutput/Common/Command/CommandCrossValidationKeyLabelWithFloatKeyValues-out.txt +++ b/test/BaselineOutput/Common/Command/CommandCrossValidationKeyLabelWithFloatKeyValues-out.txt @@ -4,7 +4,7 @@ Making per-feature arrays Changing data from row-wise to column-wise Processed 40 instances Binning and forming Feature objects -Reserved memory for tree learner: 10764 bytes +Reserved memory for tree learner: %Number% bytes Starting to train ... Not training a calibrator because it is not needed. Not adding a normalizer. @@ -12,30 +12,72 @@ Making per-feature arrays Changing data from row-wise to column-wise Processed 32 instances Binning and forming Feature objects -Reserved memory for tree learner: 6396 bytes +Reserved memory for tree learner: %Number% bytes Starting to train ... Not training a calibrator because it is not needed. NDCG@1: 0.000000 NDCG@2: 0.000000 NDCG@3: 0.000000 +NDCG@4: 0.000000 +NDCG@5: 0.000000 +NDCG@6: 0.000000 +NDCG@7: 0.000000 +NDCG@8: 0.000000 +NDCG@9: 0.000000 +NDCG@10: 0.000000 DCG@1: 0.000000 DCG@2: 0.000000 DCG@3: 0.000000 +DCG@4: 0.000000 +DCG@5: 0.000000 +DCG@6: 0.000000 +DCG@7: 0.000000 +DCG@8: 0.000000 +DCG@9: 0.000000 +DCG@10: 0.000000 NDCG@1: 0.000000 NDCG@2: 0.000000 NDCG@3: 0.000000 +NDCG@4: 0.000000 +NDCG@5: 0.000000 +NDCG@6: 0.000000 +NDCG@7: 0.000000 +NDCG@8: 0.000000 +NDCG@9: 0.000000 +NDCG@10: 0.000000 DCG@1: 0.000000 DCG@2: 0.000000 DCG@3: 0.000000 +DCG@4: 0.000000 +DCG@5: 0.000000 +DCG@6: 0.000000 +DCG@7: 0.000000 +DCG@8: 0.000000 +DCG@9: 0.000000 +DCG@10: 0.000000 OVERALL RESULTS --------------------------------------- NDCG@1: 0.000000 (0.0000) NDCG@2: 0.000000 (0.0000) NDCG@3: 0.000000 (0.0000) +NDCG@4: 0.000000 (0.0000) +NDCG@5: 0.000000 (0.0000) +NDCG@6: 0.000000 (0.0000) +NDCG@7: 0.000000 (0.0000) +NDCG@8: 0.000000 (0.0000) +NDCG@9: 0.000000 (0.0000) +NDCG@10: 0.000000 (0.0000) DCG@1: 0.000000 (0.0000) DCG@2: 0.000000 (0.0000) DCG@3: 0.000000 (0.0000) +DCG@4: 0.000000 (0.0000) +DCG@5: 0.000000 (0.0000) +DCG@6: 0.000000 (0.0000) +DCG@7: 0.000000 (0.0000) +DCG@8: 0.000000 (0.0000) +DCG@9: 0.000000 (0.0000) +DCG@10: 0.000000 (0.0000) --------------------------------------- Physical memory usage(MB): %Number% diff --git a/test/BaselineOutput/Common/Command/CommandTrainRanking-3-metrics.txt b/test/BaselineOutput/Common/Command/CommandTrainRanking-3-metrics.txt index fa50c4435e..225a8ac776 100644 --- a/test/BaselineOutput/Common/Command/CommandTrainRanking-3-metrics.txt +++ b/test/BaselineOutput/Common/Command/CommandTrainRanking-3-metrics.txt @@ -1,501 +1,501 @@ -Instance GroupId Label Score NDCG@1 NDCG@2 NDCG@3 DCG@1 DCG@2 DCG@3 MaxDCG@1 MaxDCG@2 MaxDCG@3 -0 0 0 -3.498793 0 0 0 0 0 0 0 0 0 -1 0 0 0.682792664 0 0 0 0 0 0 0 0 0 -2 1 1 -0.5412219 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 -3 0 1 3.84662747 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 -4 2 0 -3.44287348 0 0 0 0 0 0 0 0 0 -5 0 0 0.8124549 0 0 0 0 0 0 0 0 0 -6 2 0 0.988711 0 0 0 0 0 0 0 0 0 -7 3 1 -2.341114 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 -8 0 0 -3.44828677 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 -9 0 0 -2.86315536 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 -10 0 1 3.84662747 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 -11 4 0 1.11263466 0 0 0 0 0 0 0 0 0 -12 0 0 -3.59119225 0 0 0 0 0 0 0 0 0 -13 2 0 -0.261621028 0 0 0 0 0 0 0 0 0 -14 0 1 -0.21242407 1 1 1 4.3280851226668897 7.0588028025474019 7.0588028025474019 4.3280851226668897 7.0588028025474019 7.0588028025474019 -15 0 1 1.90193081 1 1 1 4.3280851226668897 7.0588028025474019 7.0588028025474019 4.3280851226668897 7.0588028025474019 7.0588028025474019 -16 5 0 -3.5966053 0 0 0 0 0 0 0 0 0 -17 0 0 -1.77760243 0 0.38685280723454163 0.69342640361727081 0 2.7307176798805122 4.894760241213957 4.3280851226668897 7.0588028025474019 7.0588028025474019 -18 0 0 -3.015818 0 0.38685280723454163 0.69342640361727081 0 2.7307176798805122 4.894760241213957 4.3280851226668897 7.0588028025474019 7.0588028025474019 -19 0 1 0.221866757 0 0.38685280723454163 0.69342640361727081 0 2.7307176798805122 4.894760241213957 4.3280851226668897 7.0588028025474019 7.0588028025474019 -20 0 1 0.255944818 0 0.38685280723454163 0.69342640361727081 0 2.7307176798805122 4.894760241213957 4.3280851226668897 7.0588028025474019 7.0588028025474019 -21 0 0 0.821669161 0 0.38685280723454163 0.69342640361727081 0 2.7307176798805122 4.894760241213957 4.3280851226668897 7.0588028025474019 7.0588028025474019 -22 2 0 -2.10148764 0 0 0 0 0 0 0 0 0 -23 0 0 -3.350474 0 0 0 0 0 0 0 0 0 -24 0 0 -3.90653753 0 0 0 0 0 0 0 0 0 -25 3 1 3.84662747 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 -26 0 0 -3.498793 0 0 0 0 0 0 0 0 0 -27 0 0 -3.57888579 0 0 0 0 0 0 0 0 0 -28 0 0 -2.86006522 0 0 0 0 0 0 0 0 0 -29 3 0 0.682792664 0 0 0 0 0 0 0 0 0 -30 5 1 3.84662747 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 -31 3 0 0.629524946 0 0 0 0 0 0 0 0 0 -32 3 0 -3.87705517 0 0 0 0 0 0 0 0 0 -33 1 0 -3.350474 0 0 0 0 0 0 0 0 0 -34 0 0 -3.59119225 0 0 0 0 0 0 0 0 0 -35 2 0 -0.407363772 0 0 0 0 0 0 0 0 0 -36 1 1 1.70428145 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 -37 0 0 -3.498793 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 -38 0 0 -3.498793 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 -39 0 0 -3.498793 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 -40 0 1 2.09496927 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 -41 6 1 -1.0987854 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 -42 0 0 1.6549865 0 0 0 0 0 0 0 0 0 -43 0 0 -2.87437129 0 0 0 0 0 0 0 0 0 -44 5 0 -3.430567 0 0 0 0 0 0 0 0 0 -45 0 1 -0.225667357 0 0 0.5 0 0 2.1640425613334449 4.3280851226668897 4.3280851226668897 4.3280851226668897 -46 0 0 0.8879723 0 0 0.5 0 0 2.1640425613334449 4.3280851226668897 4.3280851226668897 4.3280851226668897 -47 0 0 1.25097883 0 0 0.5 0 0 2.1640425613334449 4.3280851226668897 4.3280851226668897 4.3280851226668897 -48 0 0 -0.710678756 0 0 0.5 0 0 2.1640425613334449 4.3280851226668897 4.3280851226668897 4.3280851226668897 -49 6 0 1.95283723 0 0 0 0 0 0 0 0 0 -50 0 0 -3.59119225 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 -51 0 0 1.6549865 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 -52 0 0 -4.01512575 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 -53 0 1 3.84662747 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 -54 0 0 0.629524946 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 -55 0 0 -3.430567 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 -56 0 0 -0.973613 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 -57 1 1 1.59899592 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 -58 6 1 3.84662747 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 -59 0 0 1.35205162 0 0 0 0 0 0 0 0 0 -60 0 0 1.34387577 0 0 0 0 0 0 0 0 0 -61 0 0 -0.9246641 0 0 0 0 0 0 0 0 0 -62 0 0 -3.44287348 0 0 0 0 0 0 0 0 0 -63 0 0 1.35205162 0 0 0 0 0 0 0 0 0 -64 1 0 -1.1698823 0 0 0 0 0 0 0 0 0 -65 0 0 -2.513206 0 0 0 0 0 0 0 0 0 -66 6 1 3.84662747 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 -67 0 0 -3.59119225 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 -68 0 0 -0.946186066 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 -69 0 0 -0.623896 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 -70 0 1 3.84662747 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 -71 0 0 -1.1698823 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 -72 0 0 0.988711 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 -73 0 0 -3.44828677 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 -74 0 0 -0.163129091 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 -75 2 0 -4.025374 0 0 0 0 0 0 0 0 0 -76 0 0 0.8783977 0 0 0 0 0 0 0 0 0 -77 6 0 -1.36751378 0 0 0 0 0 0 0 0 0 -78 0 0 0.08867669 0 0 0 0 0 0 0 0 0 -79 0 0 -3.44287348 0 0 0 0 0 0 0 0 0 -80 6 0 0.8783977 0 0 0 0 0 0 0 0 0 -81 0 0 -3.86680722 0 0 0 0 0 0 0 0 0 -82 0 0 -3.44287348 0 0 0 0 0 0 0 0 0 -83 6 1 3.84662747 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 -84 3 0 0.682792664 0 0 0 0 0 0 0 0 0 -85 0 0 -0.891273737 0 0 0 0 0 0 0 0 0 -86 4 0 -3.498793 0 0 0 0 0 0 0 0 0 -87 0 1 1.95283723 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 -88 4 0 -3.350474 0 0 0 0 0 0 0 0 0 -89 2 1 3.84662747 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 -90 0 0 -0.261621028 0 0 0 0 0 0 0 0 0 -91 4 0 -2.66755033 0 0 0 0 0 0 0 0 0 -92 0 1 3.84662747 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 -93 4 0 -2.280157 0 0 0 0 0 0 0 0 0 -94 0 0 0.8096998 0 0.63092975357145753 0.63092975357145753 0 2.7307176798805122 2.7307176798805122 4.3280851226668897 4.3280851226668897 4.3280851226668897 -95 0 0 -3.5966053 0 0.63092975357145753 0.63092975357145753 0 2.7307176798805122 2.7307176798805122 4.3280851226668897 4.3280851226668897 4.3280851226668897 -96 0 0 -3.350474 0 0.63092975357145753 0.63092975357145753 0 2.7307176798805122 2.7307176798805122 4.3280851226668897 4.3280851226668897 4.3280851226668897 -97 0 0 -1.56764 0 0.63092975357145753 0.63092975357145753 0 2.7307176798805122 2.7307176798805122 4.3280851226668897 4.3280851226668897 4.3280851226668897 -98 0 1 0.268761456 0 0.63092975357145753 0.63092975357145753 0 2.7307176798805122 2.7307176798805122 4.3280851226668897 4.3280851226668897 4.3280851226668897 -99 0 0 -4.025374 0 0.63092975357145753 0.63092975357145753 0 2.7307176798805122 2.7307176798805122 4.3280851226668897 4.3280851226668897 4.3280851226668897 -100 2 0 -0.4417058 0 0 0 0 0 0 0 0 0 -101 0 0 0.955442548 0 0 0 0 0 0 0 0 0 -102 0 0 -3.86680722 0 0 0 0 0 0 0 0 0 -103 3 0 -0.501388 0 0 0 0 0 0 0 0 0 -104 1 0 -1.6250031 0 0 0 0 0 0 0 0 0 -105 0 0 -2.594535 0 0 0 0 0 0 0 0 0 -106 1 0 -0.711599767 0 0 0 0 0 0 0 0 0 -107 0 0 -2.640733 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 -108 0 0 -3.5966053 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 -109 0 0 -4.01512575 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 -110 0 0 -4.025374 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 -111 0 0 -2.640733 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 -112 0 1 1.58035779 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 -113 2 0 -3.59119225 0 0 0 0 0 0 0 0 0 -114 0 0 -3.1504662 0 0.63092975357145753 0.63092975357145753 0 2.7307176798805122 2.7307176798805122 4.3280851226668897 4.3280851226668897 4.3280851226668897 -115 0 0 -4.0548563 0 0.63092975357145753 0.63092975357145753 0 2.7307176798805122 2.7307176798805122 4.3280851226668897 4.3280851226668897 4.3280851226668897 -116 0 0 -2.799108 0 0.63092975357145753 0.63092975357145753 0 2.7307176798805122 2.7307176798805122 4.3280851226668897 4.3280851226668897 4.3280851226668897 -117 0 0 -4.025374 0 0.63092975357145753 0.63092975357145753 0 2.7307176798805122 2.7307176798805122 4.3280851226668897 4.3280851226668897 4.3280851226668897 -118 0 0 0.126410171 0 0.63092975357145753 0.63092975357145753 0 2.7307176798805122 2.7307176798805122 4.3280851226668897 4.3280851226668897 4.3280851226668897 -119 0 1 0.126410171 0 0.63092975357145753 0.63092975357145753 0 2.7307176798805122 2.7307176798805122 4.3280851226668897 4.3280851226668897 4.3280851226668897 -120 1 0 1.05258691 0 0 0 0 0 0 0 0 0 -121 0 0 -4.01512575 0 0 0 0 0 0 0 0 0 -122 0 0 -3.350474 0 0 0 0 0 0 0 0 0 -123 0 0 -3.032157 0 0 0 0 0 0 0 0 0 -124 0 0 0.300531477 0 0 0 0 0 0 0 0 0 -125 0 0 -0.261621028 0 0 0 0 0 0 0 0 0 -126 4 1 -1.9533453 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 -127 0 0 -2.41302037 0 0 0 0 0 0 0 0 0 -128 3 1 -2.80235744 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 -129 0 1 1.90193081 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 -130 0 0 0.0138204182 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 -131 0 0 -3.498793 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 -132 2 0 -3.5966053 0 0 0 0 0 0 0 0 0 -133 6 1 -0.104944982 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 -134 0 0 0.268761456 1 1 1 4.3280851226668897 7.0588028025474019 7.0588028025474019 4.3280851226668897 7.0588028025474019 7.0588028025474019 -135 0 0 -0.917018831 1 1 1 4.3280851226668897 7.0588028025474019 7.0588028025474019 4.3280851226668897 7.0588028025474019 7.0588028025474019 -136 0 1 2.04650974 1 1 1 4.3280851226668897 7.0588028025474019 7.0588028025474019 4.3280851226668897 7.0588028025474019 7.0588028025474019 -137 0 0 -1.56764 1 1 1 4.3280851226668897 7.0588028025474019 7.0588028025474019 4.3280851226668897 7.0588028025474019 7.0588028025474019 -138 0 0 -2.191549 1 1 1 4.3280851226668897 7.0588028025474019 7.0588028025474019 4.3280851226668897 7.0588028025474019 7.0588028025474019 -139 0 0 -3.5966053 1 1 1 4.3280851226668897 7.0588028025474019 7.0588028025474019 4.3280851226668897 7.0588028025474019 7.0588028025474019 -140 0 0 -1.9533453 1 1 1 4.3280851226668897 7.0588028025474019 7.0588028025474019 4.3280851226668897 7.0588028025474019 7.0588028025474019 -141 0 0 -3.498793 1 1 1 4.3280851226668897 7.0588028025474019 7.0588028025474019 4.3280851226668897 7.0588028025474019 7.0588028025474019 -142 0 1 3.84662747 1 1 1 4.3280851226668897 7.0588028025474019 7.0588028025474019 4.3280851226668897 7.0588028025474019 7.0588028025474019 -143 6 1 -0.711599767 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 -144 0 0 -1.98403728 0 0 0 0 0 0 0 0 0 -145 3 0 -1.84869933 0 0 0 0 0 0 0 0 0 -146 0 0 -3.015818 1 1 1 4.3280851226668897 7.0588028025474019 7.0588028025474019 4.3280851226668897 7.0588028025474019 7.0588028025474019 -147 0 1 1.71081924 1 1 1 4.3280851226668897 7.0588028025474019 7.0588028025474019 4.3280851226668897 7.0588028025474019 7.0588028025474019 -148 0 1 3.84662747 1 1 1 4.3280851226668897 7.0588028025474019 7.0588028025474019 4.3280851226668897 7.0588028025474019 7.0588028025474019 -149 0 0 -3.5966053 1 1 1 4.3280851226668897 7.0588028025474019 7.0588028025474019 4.3280851226668897 7.0588028025474019 7.0588028025474019 -150 0 0 -0.608227134 1 1 1 4.3280851226668897 7.0588028025474019 7.0588028025474019 4.3280851226668897 7.0588028025474019 7.0588028025474019 -151 0 0 -2.77313256 1 1 1 4.3280851226668897 7.0588028025474019 7.0588028025474019 4.3280851226668897 7.0588028025474019 7.0588028025474019 -152 0 0 -2.86315536 1 1 1 4.3280851226668897 7.0588028025474019 7.0588028025474019 4.3280851226668897 7.0588028025474019 7.0588028025474019 -153 0 0 -3.5966053 1 1 1 4.3280851226668897 7.0588028025474019 7.0588028025474019 4.3280851226668897 7.0588028025474019 7.0588028025474019 -154 5 1 0.221866757 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 -155 0 0 -3.430567 0 0 0 0 0 0 0 0 0 -156 1 0 -3.59119225 0 0 0 0 0 0 0 0 0 -157 0 0 -3.5966053 0 0 0 0 0 0 0 0 0 -158 0 0 -3.032157 0 0 0 0 0 0 0 0 0 -159 6 0 -2.38893437 0 0 0 0 0 0 0 0 0 -160 0 0 -2.66755033 0 0 0 0 0 0 0 0 0 -161 0 0 -0.917018831 0 0 0 0 0 0 0 0 0 -162 0 0 -3.5966053 0 0 0 0 0 0 0 0 0 -163 0 0 -0.917018831 0 0 0 0 0 0 0 0 0 -164 5 1 0.5732248 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 -165 0 1 -0.709507167 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 -166 3 1 -1.44491827 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 -167 0 0 -0.600588 0 0 0 0 0 0 0 0 0 -168 0 0 -3.59119225 0 0 0 0 0 0 0 0 0 -169 1 0 -1.65243 0 0 0 0 0 0 0 0 0 -170 0 1 0.08867669 0 0 0.5 0 0 2.1640425613334449 4.3280851226668897 4.3280851226668897 4.3280851226668897 -171 0 0 0.8096998 0 0 0.5 0 0 2.1640425613334449 4.3280851226668897 4.3280851226668897 4.3280851226668897 -172 0 0 -3.350474 0 0 0.5 0 0 2.1640425613334449 4.3280851226668897 4.3280851226668897 4.3280851226668897 -173 0 0 0.149758041 0 0 0.5 0 0 2.1640425613334449 4.3280851226668897 4.3280851226668897 4.3280851226668897 -174 1 0 -1.9533453 0 0 0 0 0 0 0 0 0 -175 0 1 1.83805478 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 -176 0 0 -3.44828677 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 -177 0 0 -3.21142316 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 -178 6 1 1.82088852 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 -179 0 1 1.70428145 0 0.63092975357145753 0.63092975357145753 0 2.7307176798805122 2.7307176798805122 4.3280851226668897 4.3280851226668897 4.3280851226668897 -180 0 0 3.84662747 0 0.63092975357145753 0.63092975357145753 0 2.7307176798805122 2.7307176798805122 4.3280851226668897 4.3280851226668897 4.3280851226668897 -181 6 1 3.84662747 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 -182 2 1 -2.43322134 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 -183 0 0 1.17651057 0 0 0 0 0 0 0 0 0 -184 0 0 -0.03547456 0 0 0 0 0 0 0 0 0 -185 2 0 -0.261621028 0 0 0 0 0 0 0 0 0 -186 0 0 0.249878839 0 0 0 0 0 0 0 0 0 -187 0 0 -3.59119225 0 0 0 0 0 0 0 0 0 -188 5 0 1.40134656 0 0 0 0 0 0 0 0 0 -189 0 0 -4.025374 1 1 1 4.3280851226668897 7.0588028025474019 7.0588028025474019 4.3280851226668897 7.0588028025474019 7.0588028025474019 -190 0 1 0.8096998 1 1 1 4.3280851226668897 7.0588028025474019 7.0588028025474019 4.3280851226668897 7.0588028025474019 7.0588028025474019 -191 0 1 2.37696719 1 1 1 4.3280851226668897 7.0588028025474019 7.0588028025474019 4.3280851226668897 7.0588028025474019 7.0588028025474019 -192 0 0 -0.742806554 1 1 1 4.3280851226668897 7.0588028025474019 7.0588028025474019 4.3280851226668897 7.0588028025474019 7.0588028025474019 -193 2 0 -2.24317718 0 0 0 0 0 0 0 0 0 -194 0 0 -4.0548563 0 0 0 0 0 0 0 0 0 -195 0 0 -2.62804937 0 0 0 0 0 0 0 0 0 -196 0 0 0.0138204182 0 0 0 0 0 0 0 0 0 -197 6 1 1.90193081 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 -198 0 0 -3.5966053 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 -199 0 1 -3.30182219 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 -200 1 1 -0.868781567 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 -201 6 0 -0.192029029 0 0 0 0 0 0 0 0 0 -202 0 0 0.5732248 0 0 0 0 0 0 0 0 0 -203 1 0 -0.207038224 0 0 0 0 0 0 0 0 0 -204 0 1 -0.868781567 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 -205 6 0 1.34387577 0 0 0 0 0 0 0 0 0 -206 0 0 -0.802488744 0 0 0 0 0 0 0 0 0 -207 1 0 -1.65243 0 0 0 0 0 0 0 0 0 -208 0 1 1.59899592 1 1 1 4.3280851226668897 7.0588028025474019 7.0588028025474019 4.3280851226668897 7.0588028025474019 7.0588028025474019 -209 0 1 1.63587511 1 1 1 4.3280851226668897 7.0588028025474019 7.0588028025474019 4.3280851226668897 7.0588028025474019 7.0588028025474019 -210 0 0 -3.59119225 1 1 1 4.3280851226668897 7.0588028025474019 7.0588028025474019 4.3280851226668897 7.0588028025474019 7.0588028025474019 -211 0 0 -3.44287348 1 1 1 4.3280851226668897 7.0588028025474019 7.0588028025474019 4.3280851226668897 7.0588028025474019 7.0588028025474019 -212 4 0 3.84662747 0 0 0 0 0 0 0 0 0 -213 0 0 -2.30470347 0 0 0 0 0 0 0 0 0 -214 0 0 -3.87705517 0 0 0 0 0 0 0 0 0 -215 0 0 -2.2766912 0 0 0 0 0 0 0 0 0 -216 4 0 -2.191549 0 0 0 0 0 0 0 0 0 -217 0 0 -3.5966053 0 0 0 0 0 0 0 0 0 -218 0 0 0.988711 0 0 0 0 0 0 0 0 0 -219 0 0 -3.44287348 0 0 0 0 0 0 0 0 0 -220 0 0 -0.888518333 0 0 0 0 0 0 0 0 0 -221 0 0 -3.59119225 0 0 0 0 0 0 0 0 0 -222 0 0 1.6549865 0 0 0 0 0 0 0 0 0 -223 6 1 0.08867669 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 -224 1 1 3.84662747 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 -225 0 0 0.0138204182 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 -226 0 1 3.84662747 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 -227 1 0 -0.946186066 0 0 0 0 0 0 0 0 0 -228 2 0 -3.498793 0 0 0 0 0 0 0 0 0 -229 2 0 -1.36751378 0 0 0 0 0 0 0 0 0 -230 0 0 -3.59119225 0 0 0.5 0 0 2.1640425613334449 4.3280851226668897 4.3280851226668897 4.3280851226668897 -231 0 0 1.90193081 0 0 0.5 0 0 2.1640425613334449 4.3280851226668897 4.3280851226668897 4.3280851226668897 -232 0 0 2.09496927 0 0 0.5 0 0 2.1640425613334449 4.3280851226668897 4.3280851226668897 4.3280851226668897 -233 0 1 1.48582506 0 0 0.5 0 0 2.1640425613334449 4.3280851226668897 4.3280851226668897 4.3280851226668897 -234 3 0 -0.261621028 0 0 0 0 0 0 0 0 0 -235 0 0 1.96302056 0 0 0 0 0 0 0 0 0 -236 0 0 3.84662747 0 0 0 0 0 0 0 0 0 -237 0 0 -0.565857053 0 0 0 0 0 0 0 0 0 -238 0 0 -3.44828677 0 0 0 0 0 0 0 0 0 -239 0 0 -2.90788555 0 0 0 0 0 0 0 0 0 -240 1 0 -3.498793 0 0 0 0 0 0 0 0 0 -241 3 0 0.682792664 0 0 0 0 0 0 0 0 0 -242 0 0 -3.498793 0 0 0 0 0 0 0 0 0 -243 3 0 -0.261621028 0 0 0 0 0 0 0 0 0 -244 4 0 -3.59119225 0 0 0 0 0 0 0 0 0 -245 2 0 0.682792664 0 0 0 0 0 0 0 0 0 -246 0 0 -1.09603 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 -247 0 0 -3.29349327 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 -248 0 1 0.857429 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 -249 5 0 -1.0987854 0 0 0 0 0 0 0 0 0 -250 0 0 -3.59119225 0 0.63092975357145753 0.63092975357145753 0 2.7307176798805122 2.7307176798805122 4.3280851226668897 4.3280851226668897 4.3280851226668897 -251 0 0 0.873575747 0 0.63092975357145753 0.63092975357145753 0 2.7307176798805122 2.7307176798805122 4.3280851226668897 4.3280851226668897 4.3280851226668897 -252 0 1 -3.44828677 0 0.63092975357145753 0.63092975357145753 0 2.7307176798805122 2.7307176798805122 4.3280851226668897 4.3280851226668897 4.3280851226668897 -253 4 0 0.300531477 0 0 0 0 0 0 0 0 0 -254 0 0 -0.419741482 0 0 0 0 0 0 0 0 0 -255 0 0 -3.350474 0 0 0 0 0 0 0 0 0 -256 4 0 3.84662747 0 0 0 0 0 0 0 0 0 -257 0 0 1.6549865 0 0 0 0 0 0 0 0 0 -258 5 0 1.53106284 0 0 0 0 0 0 0 0 0 -259 3 0 -0.261621028 0 0 0 0 0 0 0 0 0 -260 0 0 0.682792664 0 0 0 0 0 0 0 0 0 -261 1 0 -2.41302037 0 0 0 0 0 0 0 0 0 -262 0 0 -2.90788555 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 -263 0 0 -3.430567 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 -264 0 0 -3.30182219 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 -265 0 1 1.58035779 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 -266 2 0 -0.407363772 0 0 0 0 0 0 0 0 0 -267 0 0 0.6786815 0 0 0 0 0 0 0 0 0 -268 2 0 -3.44287348 0 0 0 0 0 0 0 0 0 -269 0 0 -2.127025 1 0.61314719276545837 0.91972078914818756 4.3280851226668897 4.3280851226668897 6.4921276840003346 4.3280851226668897 7.0588028025474019 7.0588028025474019 -270 0 0 -4.025374 1 0.61314719276545837 0.91972078914818756 4.3280851226668897 4.3280851226668897 6.4921276840003346 4.3280851226668897 7.0588028025474019 7.0588028025474019 -271 0 1 -2.24317718 1 0.61314719276545837 0.91972078914818756 4.3280851226668897 4.3280851226668897 6.4921276840003346 4.3280851226668897 7.0588028025474019 7.0588028025474019 -272 0 1 -0.973613 1 0.61314719276545837 0.91972078914818756 4.3280851226668897 4.3280851226668897 6.4921276840003346 4.3280851226668897 7.0588028025474019 7.0588028025474019 -273 5 0 -1.15369773 0 0 0 0 0 0 0 0 0 -274 2 1 -0.4417058 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 -275 0 0 -3.59119225 0 0 0 0 0 0 0 0 0 -276 0 0 1.03437853 0 0 0 0 0 0 0 0 0 -277 0 0 -3.498793 0 0 0 0 0 0 0 0 0 -278 6 1 3.84662747 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 -279 0 0 -3.44828677 0 0 0 0 0 0 0 0 0 -280 4 1 1.35205162 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 -281 0 1 -0.260910481 0 0 0.30657359638272919 0 0 2.1640425613334449 4.3280851226668897 7.0588028025474019 7.0588028025474019 -282 0 0 -3.64581275 0 0 0.30657359638272919 0 0 2.1640425613334449 4.3280851226668897 7.0588028025474019 7.0588028025474019 -283 0 0 1.58035779 0 0 0.30657359638272919 0 0 2.1640425613334449 4.3280851226668897 7.0588028025474019 7.0588028025474019 -284 0 0 1.59899592 0 0 0.30657359638272919 0 0 2.1640425613334449 4.3280851226668897 7.0588028025474019 7.0588028025474019 -285 0 0 -0.7171524 0 0 0.30657359638272919 0 0 2.1640425613334449 4.3280851226668897 7.0588028025474019 7.0588028025474019 -286 0 0 -4.025374 0 0 0.30657359638272919 0 0 2.1640425613334449 4.3280851226668897 7.0588028025474019 7.0588028025474019 -287 0 1 -0.946186066 0 0 0.30657359638272919 0 0 2.1640425613334449 4.3280851226668897 7.0588028025474019 7.0588028025474019 -288 4 0 0.318056434 0 0 0 0 0 0 0 0 0 -289 0 0 1.53106284 1 0.61314719276545837 0.91972078914818756 4.3280851226668897 4.3280851226668897 6.4921276840003346 4.3280851226668897 7.0588028025474019 7.0588028025474019 -290 0 1 2.23483515 1 0.61314719276545837 0.91972078914818756 4.3280851226668897 4.3280851226668897 6.4921276840003346 4.3280851226668897 7.0588028025474019 7.0588028025474019 -291 0 0 -0.815352559 1 0.61314719276545837 0.91972078914818756 4.3280851226668897 4.3280851226668897 6.4921276840003346 4.3280851226668897 7.0588028025474019 7.0588028025474019 -292 0 0 -3.87705517 1 0.61314719276545837 0.91972078914818756 4.3280851226668897 4.3280851226668897 6.4921276840003346 4.3280851226668897 7.0588028025474019 7.0588028025474019 -293 0 0 -1.11645329 1 0.61314719276545837 0.91972078914818756 4.3280851226668897 4.3280851226668897 6.4921276840003346 4.3280851226668897 7.0588028025474019 7.0588028025474019 -294 0 0 -3.44828677 1 0.61314719276545837 0.91972078914818756 4.3280851226668897 4.3280851226668897 6.4921276840003346 4.3280851226668897 7.0588028025474019 7.0588028025474019 -295 0 0 -3.498793 1 0.61314719276545837 0.91972078914818756 4.3280851226668897 4.3280851226668897 6.4921276840003346 4.3280851226668897 7.0588028025474019 7.0588028025474019 -296 0 1 0.8124549 1 0.61314719276545837 0.91972078914818756 4.3280851226668897 4.3280851226668897 6.4921276840003346 4.3280851226668897 7.0588028025474019 7.0588028025474019 -297 0 0 -3.5966053 1 0.61314719276545837 0.91972078914818756 4.3280851226668897 4.3280851226668897 6.4921276840003346 4.3280851226668897 7.0588028025474019 7.0588028025474019 -298 3 1 3.84662747 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 -299 0 0 1.53106284 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 -300 0 1 1.70428145 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 -301 0 0 -1.49623072 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 -302 1 0 -2.62804937 0 0 0 0 0 0 0 0 0 -303 0 0 -3.59119225 0 0 0 0 0 0 0 0 0 -304 0 0 -3.59119225 0 0 0 0 0 0 0 0 0 -305 1 0 1.70428145 0 0 0 0 0 0 0 0 0 -306 0 0 -1.09603 0 0 0 0 0 0 0 0 0 -307 0 0 -3.350474 0 0 0 0 0 0 0 0 0 -308 6 1 1.17651057 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 -309 3 0 1.77275252 0 0 0 0 0 0 0 0 0 -310 1 1 0.5732248 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 -311 0 0 -3.87705517 0 0 0 0 0 0 0 0 0 -312 3 0 1.58442724 0 0 0 0 0 0 0 0 0 -313 0 1 3.84662747 1 1 1 4.3280851226668897 7.0588028025474019 7.0588028025474019 4.3280851226668897 7.0588028025474019 7.0588028025474019 -314 0 0 -2.191549 1 1 1 4.3280851226668897 7.0588028025474019 7.0588028025474019 4.3280851226668897 7.0588028025474019 7.0588028025474019 -315 0 1 0.249878839 1 1 1 4.3280851226668897 7.0588028025474019 7.0588028025474019 4.3280851226668897 7.0588028025474019 7.0588028025474019 -316 2 0 -3.44828677 0 0 0 0 0 0 0 0 0 -317 0 0 -3.5966053 1 1 1 4.3280851226668897 7.0588028025474019 7.0588028025474019 4.3280851226668897 7.0588028025474019 7.0588028025474019 -318 0 1 -2.38893437 1 1 1 4.3280851226668897 7.0588028025474019 7.0588028025474019 4.3280851226668897 7.0588028025474019 7.0588028025474019 -319 0 1 0.268761456 1 1 1 4.3280851226668897 7.0588028025474019 7.0588028025474019 4.3280851226668897 7.0588028025474019 7.0588028025474019 -320 0 0 -3.44287348 1 1 1 4.3280851226668897 7.0588028025474019 7.0588028025474019 4.3280851226668897 7.0588028025474019 7.0588028025474019 -321 6 0 -0.7661013 0 0 0 0 0 0 0 0 0 -322 0 0 1.6549865 0 0 0 0 0 0 0 0 0 -323 0 0 -2.24317718 0 0 0 0 0 0 0 0 0 -324 0 0 -3.498793 0 0 0 0 0 0 0 0 0 -325 0 0 1.34387577 0 0 0 0 0 0 0 0 0 -326 1 0 0.221866757 0 0 0 0 0 0 0 0 0 -327 0 0 -4.025374 0 0 0 0 0 0 0 0 0 -328 3 1 1.75979877 1 1 1 4.3280851226668897 7.0588028025474019 7.0588028025474019 4.3280851226668897 7.0588028025474019 7.0588028025474019 -329 3 1 3.84662747 1 1 1 4.3280851226668897 7.0588028025474019 7.0588028025474019 4.3280851226668897 7.0588028025474019 7.0588028025474019 -330 0 0 -3.498793 0 0 0 0 0 0 0 0 0 -331 2 0 -3.44828677 0 0 0 0 0 0 0 0 0 -332 0 1 -2.2766912 1 0.61314719276545837 0.61314719276545837 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 7.0588028025474019 7.0588028025474019 -333 0 0 -0.03547456 1 0.61314719276545837 0.61314719276545837 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 7.0588028025474019 7.0588028025474019 -334 0 1 1.34387577 1 0.61314719276545837 0.61314719276545837 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 7.0588028025474019 7.0588028025474019 -335 0 0 -3.5966053 1 0.61314719276545837 0.61314719276545837 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 7.0588028025474019 7.0588028025474019 -336 0 0 0.629524946 1 0.61314719276545837 0.61314719276545837 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 7.0588028025474019 7.0588028025474019 -337 0 0 -0.815352559 1 0.61314719276545837 0.61314719276545837 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 7.0588028025474019 7.0588028025474019 -338 6 0 0.8783977 0 0 0 0 0 0 0 0 0 -339 0 0 -0.163129091 1 1 1 4.3280851226668897 7.0588028025474019 9.2228453638808467 4.3280851226668897 7.0588028025474019 9.2228453638808467 -340 0 1 -2.62804937 1 1 1 4.3280851226668897 7.0588028025474019 9.2228453638808467 4.3280851226668897 7.0588028025474019 9.2228453638808467 -341 0 0 -2.30470347 1 1 1 4.3280851226668897 7.0588028025474019 9.2228453638808467 4.3280851226668897 7.0588028025474019 9.2228453638808467 -342 0 0 1.10310686 1 1 1 4.3280851226668897 7.0588028025474019 9.2228453638808467 4.3280851226668897 7.0588028025474019 9.2228453638808467 -343 0 1 1.70428145 1 1 1 4.3280851226668897 7.0588028025474019 9.2228453638808467 4.3280851226668897 7.0588028025474019 9.2228453638808467 -344 0 1 3.84662747 1 1 1 4.3280851226668897 7.0588028025474019 9.2228453638808467 4.3280851226668897 7.0588028025474019 9.2228453638808467 -345 0 1 -2.6725316 1 1 1 4.3280851226668897 7.0588028025474019 9.2228453638808467 4.3280851226668897 7.0588028025474019 9.2228453638808467 -346 0 1 3.84662747 1 1 1 4.3280851226668897 7.0588028025474019 9.2228453638808467 4.3280851226668897 7.0588028025474019 9.2228453638808467 -347 0 1 3.84662747 1 1 1 4.3280851226668897 7.0588028025474019 9.2228453638808467 4.3280851226668897 7.0588028025474019 9.2228453638808467 -348 0 0 -4.025374 1 1 1 4.3280851226668897 7.0588028025474019 9.2228453638808467 4.3280851226668897 7.0588028025474019 9.2228453638808467 -349 0 0 -2.90788555 1 1 1 4.3280851226668897 7.0588028025474019 9.2228453638808467 4.3280851226668897 7.0588028025474019 9.2228453638808467 -350 2 0 -0.03547456 0 0 0 0 0 0 0 0 0 -351 0 0 -4.025374 0 0 0 0 0 0 0 0 0 -352 1 0 -0.0259750877 0 0 0 0 0 0 0 0 0 -353 0 1 0.955442548 1 1 1 4.3280851226668897 7.0588028025474019 9.2228453638808467 4.3280851226668897 7.0588028025474019 9.2228453638808467 -354 0 1 0.910454869 1 1 1 4.3280851226668897 7.0588028025474019 9.2228453638808467 4.3280851226668897 7.0588028025474019 9.2228453638808467 -355 0 1 2.37696719 1 1 1 4.3280851226668897 7.0588028025474019 9.2228453638808467 4.3280851226668897 7.0588028025474019 9.2228453638808467 -356 0 0 0.137635678 1 1 1 4.3280851226668897 7.0588028025474019 9.2228453638808467 4.3280851226668897 7.0588028025474019 9.2228453638808467 -357 3 1 3.84662747 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 -358 4 0 -0.917018831 0 0 0 0 0 0 0 0 0 -359 0 0 1.40134656 0 0 0 0 0 0 0 0 0 -360 0 0 -1.70374238 0 0 0 0 0 0 0 0 0 -361 0 0 1.75979877 0 0 0 0 0 0 0 0 0 -362 0 0 -2.66446018 0 0 0 0 0 0 0 0 0 -363 1 0 1.58035779 0 0 0 0 0 0 0 0 0 -364 0 1 1.03751373 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 -365 6 1 -0.565857053 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 -366 0 0 0.8783977 0 0 0 0 0 0 0 0 0 -367 3 1 1.75979877 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 -368 3 0 -2.69247222 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 -369 0 0 -4.025374 0 0 0 0 0 0 0 0 0 -370 0 0 -3.350474 0 0 0 0 0 0 0 0 0 -371 0 0 -1.11645329 0 0 0 0 0 0 0 0 0 -372 0 0 -3.498793 0 0 0 0 0 0 0 0 0 -373 3 0 -0.888549268 0 0 0 0 0 0 0 0 0 -374 3 0 0.8096998 0 0 0 0 0 0 0 0 0 -375 0 1 1.72944009 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 -376 0 0 -0.5412219 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 -377 0 0 -4.025374 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 -378 2 0 -2.66446018 0 0 0 0 0 0 0 0 0 -379 0 0 -3.59119225 0 0 0 0 0 0 0 0 0 -380 3 1 -1.0987854 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 -381 0 0 -3.430567 0 0 0 0 0 0 0 0 0 -382 3 1 -2.341114 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 -383 0 0 -0.4417058 0 0.63092975357145753 0.63092975357145753 0 2.7307176798805122 2.7307176798805122 4.3280851226668897 4.3280851226668897 4.3280851226668897 -384 0 1 0.629524946 0 0.63092975357145753 0.63092975357145753 0 2.7307176798805122 2.7307176798805122 4.3280851226668897 4.3280851226668897 4.3280851226668897 -385 0 0 -1.01177955 0 0.63092975357145753 0.63092975357145753 0 2.7307176798805122 2.7307176798805122 4.3280851226668897 4.3280851226668897 4.3280851226668897 -386 0 0 -0.742806554 0 0.63092975357145753 0.63092975357145753 0 2.7307176798805122 2.7307176798805122 4.3280851226668897 4.3280851226668897 4.3280851226668897 -387 0 0 0.7077811 0 0.63092975357145753 0.63092975357145753 0 2.7307176798805122 2.7307176798805122 4.3280851226668897 4.3280851226668897 4.3280851226668897 -388 3 0 0.268761456 0 0 0 0 0 0 0 0 0 -389 0 1 0.8783977 1 0.61314719276545837 0.91972078914818756 4.3280851226668897 4.3280851226668897 6.4921276840003346 4.3280851226668897 7.0588028025474019 7.0588028025474019 -390 0 1 1.91488457 1 0.61314719276545837 0.91972078914818756 4.3280851226668897 4.3280851226668897 6.4921276840003346 4.3280851226668897 7.0588028025474019 7.0588028025474019 -391 0 0 0.988711 1 0.61314719276545837 0.91972078914818756 4.3280851226668897 4.3280851226668897 6.4921276840003346 4.3280851226668897 7.0588028025474019 7.0588028025474019 -392 1 0 0.9995611 0 0 0 0 0 0 0 0 0 -393 0 0 -4.025374 0 0 0 0 0 0 0 0 0 -394 2 0 -0.7171524 0 0 0 0 0 0 0 0 0 -395 0 0 0.8783977 0 0.63092975357145753 0.63092975357145753 0 2.7307176798805122 2.7307176798805122 4.3280851226668897 4.3280851226668897 4.3280851226668897 -396 0 1 0.0138204182 0 0.63092975357145753 0.63092975357145753 0 2.7307176798805122 2.7307176798805122 4.3280851226668897 4.3280851226668897 4.3280851226668897 -397 2 0 -1.44491827 0 0 0 0 0 0 0 0 0 -398 0 0 0.255944818 0 0 0.30657359638272919 0 0 2.1640425613334449 4.3280851226668897 7.0588028025474019 7.0588028025474019 -399 0 0 -2.30470347 0 0 0.30657359638272919 0 0 2.1640425613334449 4.3280851226668897 7.0588028025474019 7.0588028025474019 -400 0 0 -0.9246641 0 0 0.30657359638272919 0 0 2.1640425613334449 4.3280851226668897 7.0588028025474019 7.0588028025474019 -401 0 0 -4.025374 0 0 0.30657359638272919 0 0 2.1640425613334449 4.3280851226668897 7.0588028025474019 7.0588028025474019 -402 0 0 -3.59119225 0 0 0.30657359638272919 0 0 2.1640425613334449 4.3280851226668897 7.0588028025474019 7.0588028025474019 -403 0 0 -3.00471854 0 0 0.30657359638272919 0 0 2.1640425613334449 4.3280851226668897 7.0588028025474019 7.0588028025474019 -404 0 0 0.8783977 0 0 0.30657359638272919 0 0 2.1640425613334449 4.3280851226668897 7.0588028025474019 7.0588028025474019 -405 0 0 1.63256311 0 0 0.30657359638272919 0 0 2.1640425613334449 4.3280851226668897 7.0588028025474019 7.0588028025474019 -406 0 0 1.70428145 0 0 0.30657359638272919 0 0 2.1640425613334449 4.3280851226668897 7.0588028025474019 7.0588028025474019 -407 0 0 -3.498793 0 0 0.30657359638272919 0 0 2.1640425613334449 4.3280851226668897 7.0588028025474019 7.0588028025474019 -408 0 0 -0.608227134 0 0 0.30657359638272919 0 0 2.1640425613334449 4.3280851226668897 7.0588028025474019 7.0588028025474019 -409 0 1 1.124604 0 0 0.30657359638272919 0 0 2.1640425613334449 4.3280851226668897 7.0588028025474019 7.0588028025474019 -410 0 0 -1.04763412 0 0 0.30657359638272919 0 0 2.1640425613334449 4.3280851226668897 7.0588028025474019 7.0588028025474019 -411 0 1 -1.09603 0 0 0.30657359638272919 0 0 2.1640425613334449 4.3280851226668897 7.0588028025474019 7.0588028025474019 -412 0 0 -4.025374 0 0 0.30657359638272919 0 0 2.1640425613334449 4.3280851226668897 7.0588028025474019 7.0588028025474019 -413 2 0 -4.01512575 0 0 0 0 0 0 0 0 0 -414 4 0 -2.594535 0 0 0 0 0 0 0 0 0 -415 0 1 -0.501388 0 0.63092975357145753 0.63092975357145753 0 2.7307176798805122 2.7307176798805122 4.3280851226668897 4.3280851226668897 4.3280851226668897 -416 0 0 1.00068033 0 0.63092975357145753 0.63092975357145753 0 2.7307176798805122 2.7307176798805122 4.3280851226668897 4.3280851226668897 4.3280851226668897 -417 5 0 -2.62804937 0 0 0 0 0 0 0 0 0 -418 6 1 3.84662747 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 -419 6 0 -0.946186066 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 -420 0 0 -2.765594 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 -421 0 0 -1.09603 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 -422 0 0 -3.430567 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 -423 0 0 -3.44828677 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 -424 0 0 -3.90653753 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 -425 0 1 2.12476587 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 -426 0 0 -2.799108 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 -427 0 0 -2.90788555 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 -428 0 0 -1.00117755 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 -429 2 0 -3.87705517 0 0 0 0 0 0 0 0 0 -430 6 0 0.682792664 0 0 0 0 0 0 0 0 0 -431 0 0 -4.025374 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 -432 0 1 1.88983047 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 -433 0 0 -3.5966053 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 -434 2 0 -3.59119225 0 0 0 0 0 0 0 0 0 -435 3 0 -1.9533453 0 0 0 0 0 0 0 0 0 -436 0 1 1.9537065 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 -437 2 0 -2.66755033 0 0 0 0 0 0 0 0 0 -438 3 0 1.14539027 0 0 0 0 0 0 0 0 0 -439 0 1 2.14203167 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 -440 0 0 -2.62804937 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 -441 0 0 -3.44287348 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 -442 0 0 -3.87705517 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 -443 3 0 1.34834313 0 0 0 0 0 0 0 0 0 -444 0 0 -3.59119225 0 0.63092975357145753 0.63092975357145753 0 2.7307176798805122 2.7307176798805122 4.3280851226668897 4.3280851226668897 4.3280851226668897 -445 0 1 2.20284581 0 0.63092975357145753 0.63092975357145753 0 2.7307176798805122 2.7307176798805122 4.3280851226668897 4.3280851226668897 4.3280851226668897 -446 0 0 2.23483515 0 0.63092975357145753 0.63092975357145753 0 2.7307176798805122 2.7307176798805122 4.3280851226668897 4.3280851226668897 4.3280851226668897 -447 0 0 -3.43243766 0 0.63092975357145753 0.63092975357145753 0 2.7307176798805122 2.7307176798805122 4.3280851226668897 4.3280851226668897 4.3280851226668897 -448 0 0 -3.87705517 0 0.63092975357145753 0.63092975357145753 0 2.7307176798805122 2.7307176798805122 4.3280851226668897 4.3280851226668897 4.3280851226668897 -449 0 0 -3.44828677 0 0.63092975357145753 0.63092975357145753 0 2.7307176798805122 2.7307176798805122 4.3280851226668897 4.3280851226668897 4.3280851226668897 -450 5 0 -2.78957629 0 0 0 0 0 0 0 0 0 -451 3 0 0.3196344 0 0 0 0 0 0 0 0 0 -452 4 1 -0.891273737 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 -453 0 0 -0.891273737 0 0 0 0 0 0 0 0 0 -454 5 0 -3.44828677 0 0 0 0 0 0 0 0 0 -455 0 0 -3.90653753 0 0 0 0 0 0 0 0 0 -456 1 0 -3.350474 0 0 0 0 0 0 0 0 0 -457 0 1 1.34387577 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 -458 0 0 -3.57888579 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 -459 0 0 -2.78957629 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 -460 5 0 -0.587448537 0 0 0 0 0 0 0 0 0 -461 0 0 -0.474571764 0 0 0 0 0 0 0 0 0 -462 0 0 1.17651057 0 0 0 0 0 0 0 0 0 -463 3 0 -3.116952 0 0 0 0 0 0 0 0 0 -464 5 0 -0.711599767 0 0 0 0 0 0 0 0 0 -465 5 0 0.8879723 0 0 0 0 0 0 0 0 0 -466 4 1 -0.163129091 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 -467 0 0 -2.2766912 0 0 0 0 0 0 0 0 0 -468 0 0 -2.62804937 0 0 0 0 0 0 0 0 0 -469 0 0 -3.498793 0 0 0 0 0 0 0 0 0 -470 2 0 -3.59119225 0 0 0 0 0 0 0 0 0 -471 5 0 -0.5412219 0 0 0 0 0 0 0 0 0 -472 0 0 -0.561873555 0 0 0 0 0 0 0 0 0 -473 4 1 -0.9246641 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 -474 0 0 -3.430567 0 0 0 0 0 0 0 0 0 -475 3 0 1.95283723 0 0 0 0 0 0 0 0 0 -476 0 0 -3.116952 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 -477 0 0 -3.350474 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 -478 0 0 -2.01253772 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 -479 0 0 -2.86006522 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 -480 0 0 -2.69247222 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 -481 0 0 -0.260910481 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 -482 0 0 -3.5966053 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 -483 0 1 3.84662747 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 -484 0 0 -2.86006522 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 -485 0 0 -0.03547456 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 -486 0 0 -3.498793 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 -487 0 0 -3.00471854 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 -488 0 0 -3.87705517 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 -489 0 0 -3.44828677 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 -490 0 0 1.2236464 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 -491 0 0 -3.29971361 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 -492 0 0 1.02485073 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 -493 0 0 -2.62804937 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 -494 5 0 0.8879723 0 0 0 0 0 0 0 0 0 -495 0 0 -0.261621028 0 0 0 0 0 0 0 0 0 -496 0 0 -3.430567 0 0 0 0 0 0 0 0 0 -497 0 0 0.682792664 0 0 0 0 0 0 0 0 0 -498 0 0 -2.75606227 0 0 0 0 0 0 0 0 0 -499 5 0 -0.261621028 0 0 0 0 0 0 0 0 0 +Instance GroupId Label Score NDCG@1 NDCG@2 NDCG@3 NDCG@4 NDCG@5 NDCG@6 NDCG@7 NDCG@8 NDCG@9 NDCG@10 DCG@1 DCG@2 DCG@3 DCG@4 DCG@5 DCG@6 DCG@7 DCG@8 DCG@9 DCG@10 MaxDCG@1 MaxDCG@2 MaxDCG@3 MaxDCG@4 MaxDCG@5 MaxDCG@6 MaxDCG@7 MaxDCG@8 MaxDCG@9 MaxDCG@10 +0 0 0 -3.498793 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +1 0 0 0.682792664 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +2 1 1 -0.5412219 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +3 0 1 3.84662747 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +4 2 0 -3.44287348 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +5 0 0 0.8124549 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +6 2 0 0.988711 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +7 3 1 -2.341114 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +8 0 0 -3.44828677 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +9 0 0 -2.86315536 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +10 0 1 3.84662747 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +11 4 0 1.11263466 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +12 0 0 -3.59119225 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +13 2 0 -0.261621028 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +14 0 1 -0.21242407 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 4.3280851226668897 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 +15 0 1 1.90193081 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 4.3280851226668897 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 +16 5 0 -3.5966053 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +17 0 0 -1.77760243 0 0.38685280723454163 0.69342640361727081 0.69342640361727081 0.69342640361727081 0.69342640361727081 0.69342640361727081 0.69342640361727081 0.69342640361727081 0.69342640361727081 0 2.7307176798805122 4.894760241213957 4.894760241213957 4.894760241213957 4.894760241213957 4.894760241213957 4.894760241213957 4.894760241213957 4.894760241213957 4.3280851226668897 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 +18 0 0 -3.015818 0 0.38685280723454163 0.69342640361727081 0.69342640361727081 0.69342640361727081 0.69342640361727081 0.69342640361727081 0.69342640361727081 0.69342640361727081 0.69342640361727081 0 2.7307176798805122 4.894760241213957 4.894760241213957 4.894760241213957 4.894760241213957 4.894760241213957 4.894760241213957 4.894760241213957 4.894760241213957 4.3280851226668897 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 +19 0 1 0.221866757 0 0.38685280723454163 0.69342640361727081 0.69342640361727081 0.69342640361727081 0.69342640361727081 0.69342640361727081 0.69342640361727081 0.69342640361727081 0.69342640361727081 0 2.7307176798805122 4.894760241213957 4.894760241213957 4.894760241213957 4.894760241213957 4.894760241213957 4.894760241213957 4.894760241213957 4.894760241213957 4.3280851226668897 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 +20 0 1 0.255944818 0 0.38685280723454163 0.69342640361727081 0.69342640361727081 0.69342640361727081 0.69342640361727081 0.69342640361727081 0.69342640361727081 0.69342640361727081 0.69342640361727081 0 2.7307176798805122 4.894760241213957 4.894760241213957 4.894760241213957 4.894760241213957 4.894760241213957 4.894760241213957 4.894760241213957 4.894760241213957 4.3280851226668897 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 +21 0 0 0.821669161 0 0.38685280723454163 0.69342640361727081 0.69342640361727081 0.69342640361727081 0.69342640361727081 0.69342640361727081 0.69342640361727081 0.69342640361727081 0.69342640361727081 0 2.7307176798805122 4.894760241213957 4.894760241213957 4.894760241213957 4.894760241213957 4.894760241213957 4.894760241213957 4.894760241213957 4.894760241213957 4.3280851226668897 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 +22 2 0 -2.10148764 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +23 0 0 -3.350474 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +24 0 0 -3.90653753 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +25 3 1 3.84662747 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +26 0 0 -3.498793 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +27 0 0 -3.57888579 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +28 0 0 -2.86006522 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +29 3 0 0.682792664 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +30 5 1 3.84662747 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +31 3 0 0.629524946 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +32 3 0 -3.87705517 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +33 1 0 -3.350474 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +34 0 0 -3.59119225 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +35 2 0 -0.407363772 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +36 1 1 1.70428145 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +37 0 0 -3.498793 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +38 0 0 -3.498793 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +39 0 0 -3.498793 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +40 0 1 2.09496927 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +41 6 1 -1.0987854 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +42 0 0 1.6549865 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +43 0 0 -2.87437129 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +44 5 0 -3.430567 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +45 0 1 -0.225667357 0 0 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0 0 2.1640425613334449 2.1640425613334449 2.1640425613334449 2.1640425613334449 2.1640425613334449 2.1640425613334449 2.1640425613334449 2.1640425613334449 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +46 0 0 0.8879723 0 0 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0 0 2.1640425613334449 2.1640425613334449 2.1640425613334449 2.1640425613334449 2.1640425613334449 2.1640425613334449 2.1640425613334449 2.1640425613334449 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +47 0 0 1.25097883 0 0 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0 0 2.1640425613334449 2.1640425613334449 2.1640425613334449 2.1640425613334449 2.1640425613334449 2.1640425613334449 2.1640425613334449 2.1640425613334449 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +48 0 0 -0.710678756 0 0 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0 0 2.1640425613334449 2.1640425613334449 2.1640425613334449 2.1640425613334449 2.1640425613334449 2.1640425613334449 2.1640425613334449 2.1640425613334449 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +49 6 0 1.95283723 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +50 0 0 -3.59119225 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +51 0 0 1.6549865 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +52 0 0 -4.01512575 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +53 0 1 3.84662747 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +54 0 0 0.629524946 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +55 0 0 -3.430567 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +56 0 0 -0.973613 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +57 1 1 1.59899592 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +58 6 1 3.84662747 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +59 0 0 1.35205162 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +60 0 0 1.34387577 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +61 0 0 -0.9246641 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +62 0 0 -3.44287348 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +63 0 0 1.35205162 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +64 1 0 -1.1698823 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +65 0 0 -2.513206 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +66 6 1 3.84662747 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +67 0 0 -3.59119225 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +68 0 0 -0.946186066 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +69 0 0 -0.623896 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +70 0 1 3.84662747 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +71 0 0 -1.1698823 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +72 0 0 0.988711 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +73 0 0 -3.44828677 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +74 0 0 -0.163129091 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +75 2 0 -4.025374 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +76 0 0 0.8783977 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +77 6 0 -1.36751378 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +78 0 0 0.08867669 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +79 0 0 -3.44287348 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +80 6 0 0.8783977 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +81 0 0 -3.86680722 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +82 0 0 -3.44287348 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +83 6 1 3.84662747 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +84 3 0 0.682792664 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +85 0 0 -0.891273737 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +86 4 0 -3.498793 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +87 0 1 1.95283723 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +88 4 0 -3.350474 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +89 2 1 3.84662747 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +90 0 0 -0.261621028 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +91 4 0 -2.66755033 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +92 0 1 3.84662747 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +93 4 0 -2.280157 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +94 0 0 0.8096998 0 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +95 0 0 -3.5966053 0 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +96 0 0 -3.350474 0 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +97 0 0 -1.56764 0 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +98 0 1 0.268761456 0 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +99 0 0 -4.025374 0 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +100 2 0 -0.4417058 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +101 0 0 0.955442548 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +102 0 0 -3.86680722 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +103 3 0 -0.501388 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +104 1 0 -1.6250031 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +105 0 0 -2.594535 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +106 1 0 -0.711599767 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +107 0 0 -2.640733 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +108 0 0 -3.5966053 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +109 0 0 -4.01512575 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +110 0 0 -4.025374 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +111 0 0 -2.640733 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +112 0 1 1.58035779 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +113 2 0 -3.59119225 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +114 0 0 -3.1504662 0 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +115 0 0 -4.0548563 0 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +116 0 0 -2.799108 0 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +117 0 0 -4.025374 0 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +118 0 0 0.126410171 0 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +119 0 1 0.126410171 0 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +120 1 0 1.05258691 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +121 0 0 -4.01512575 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +122 0 0 -3.350474 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +123 0 0 -3.032157 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +124 0 0 0.300531477 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +125 0 0 -0.261621028 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +126 4 1 -1.9533453 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +127 0 0 -2.41302037 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +128 3 1 -2.80235744 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +129 0 1 1.90193081 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +130 0 0 0.0138204182 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +131 0 0 -3.498793 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +132 2 0 -3.5966053 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +133 6 1 -0.104944982 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +134 0 0 0.268761456 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 4.3280851226668897 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 +135 0 0 -0.917018831 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 4.3280851226668897 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 +136 0 1 2.04650974 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 4.3280851226668897 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 +137 0 0 -1.56764 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 4.3280851226668897 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 +138 0 0 -2.191549 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 4.3280851226668897 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 +139 0 0 -3.5966053 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 4.3280851226668897 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 +140 0 0 -1.9533453 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 4.3280851226668897 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 +141 0 0 -3.498793 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 4.3280851226668897 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 +142 0 1 3.84662747 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 4.3280851226668897 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 +143 6 1 -0.711599767 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +144 0 0 -1.98403728 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +145 3 0 -1.84869933 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +146 0 0 -3.015818 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 4.3280851226668897 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 +147 0 1 1.71081924 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 4.3280851226668897 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 +148 0 1 3.84662747 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 4.3280851226668897 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 +149 0 0 -3.5966053 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 4.3280851226668897 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 +150 0 0 -0.608227134 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 4.3280851226668897 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 +151 0 0 -2.77313256 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 4.3280851226668897 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 +152 0 0 -2.86315536 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 4.3280851226668897 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 +153 0 0 -3.5966053 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 4.3280851226668897 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 +154 5 1 0.221866757 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +155 0 0 -3.430567 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +156 1 0 -3.59119225 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +157 0 0 -3.5966053 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +158 0 0 -3.032157 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +159 6 0 -2.38893437 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +160 0 0 -2.66755033 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +161 0 0 -0.917018831 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +162 0 0 -3.5966053 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +163 0 0 -0.917018831 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +164 5 1 0.5732248 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +165 0 1 -0.709507167 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +166 3 1 -1.44491827 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +167 0 0 -0.600588 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +168 0 0 -3.59119225 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +169 1 0 -1.65243 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +170 0 1 0.08867669 0 0 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0 0 2.1640425613334449 2.1640425613334449 2.1640425613334449 2.1640425613334449 2.1640425613334449 2.1640425613334449 2.1640425613334449 2.1640425613334449 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +171 0 0 0.8096998 0 0 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0 0 2.1640425613334449 2.1640425613334449 2.1640425613334449 2.1640425613334449 2.1640425613334449 2.1640425613334449 2.1640425613334449 2.1640425613334449 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +172 0 0 -3.350474 0 0 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0 0 2.1640425613334449 2.1640425613334449 2.1640425613334449 2.1640425613334449 2.1640425613334449 2.1640425613334449 2.1640425613334449 2.1640425613334449 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +173 0 0 0.149758041 0 0 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0 0 2.1640425613334449 2.1640425613334449 2.1640425613334449 2.1640425613334449 2.1640425613334449 2.1640425613334449 2.1640425613334449 2.1640425613334449 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +174 1 0 -1.9533453 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +175 0 1 1.83805478 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +176 0 0 -3.44828677 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +177 0 0 -3.21142316 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +178 6 1 1.82088852 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +179 0 1 1.70428145 0 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +180 0 0 3.84662747 0 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +181 6 1 3.84662747 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +182 2 1 -2.43322134 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +183 0 0 1.17651057 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +184 0 0 -0.03547456 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +185 2 0 -0.261621028 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +186 0 0 0.249878839 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +187 0 0 -3.59119225 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +188 5 0 1.40134656 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +189 0 0 -4.025374 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 4.3280851226668897 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 +190 0 1 0.8096998 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 4.3280851226668897 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 +191 0 1 2.37696719 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 4.3280851226668897 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 +192 0 0 -0.742806554 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 4.3280851226668897 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 +193 2 0 -2.24317718 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +194 0 0 -4.0548563 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +195 0 0 -2.62804937 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +196 0 0 0.0138204182 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +197 6 1 1.90193081 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +198 0 0 -3.5966053 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +199 0 1 -3.30182219 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +200 1 1 -0.868781567 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +201 6 0 -0.192029029 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +202 0 0 0.5732248 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +203 1 0 -0.207038224 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +204 0 1 -0.868781567 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +205 6 0 1.34387577 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +206 0 0 -0.802488744 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +207 1 0 -1.65243 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +208 0 1 1.59899592 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 4.3280851226668897 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 +209 0 1 1.63587511 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 4.3280851226668897 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 +210 0 0 -3.59119225 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 4.3280851226668897 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 +211 0 0 -3.44287348 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 4.3280851226668897 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 +212 4 0 3.84662747 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +213 0 0 -2.30470347 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +214 0 0 -3.87705517 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +215 0 0 -2.2766912 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +216 4 0 -2.191549 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +217 0 0 -3.5966053 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +218 0 0 0.988711 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +219 0 0 -3.44287348 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +220 0 0 -0.888518333 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +221 0 0 -3.59119225 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +222 0 0 1.6549865 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +223 6 1 0.08867669 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +224 1 1 3.84662747 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +225 0 0 0.0138204182 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +226 0 1 3.84662747 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +227 1 0 -0.946186066 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +228 2 0 -3.498793 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +229 2 0 -1.36751378 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +230 0 0 -3.59119225 0 0 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0 0 2.1640425613334449 2.1640425613334449 2.1640425613334449 2.1640425613334449 2.1640425613334449 2.1640425613334449 2.1640425613334449 2.1640425613334449 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +231 0 0 1.90193081 0 0 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0 0 2.1640425613334449 2.1640425613334449 2.1640425613334449 2.1640425613334449 2.1640425613334449 2.1640425613334449 2.1640425613334449 2.1640425613334449 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +232 0 0 2.09496927 0 0 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0 0 2.1640425613334449 2.1640425613334449 2.1640425613334449 2.1640425613334449 2.1640425613334449 2.1640425613334449 2.1640425613334449 2.1640425613334449 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +233 0 1 1.48582506 0 0 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0 0 2.1640425613334449 2.1640425613334449 2.1640425613334449 2.1640425613334449 2.1640425613334449 2.1640425613334449 2.1640425613334449 2.1640425613334449 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +234 3 0 -0.261621028 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +235 0 0 1.96302056 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +236 0 0 3.84662747 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +237 0 0 -0.565857053 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +238 0 0 -3.44828677 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +239 0 0 -2.90788555 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +240 1 0 -3.498793 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +241 3 0 0.682792664 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +242 0 0 -3.498793 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +243 3 0 -0.261621028 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +244 4 0 -3.59119225 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +245 2 0 0.682792664 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +246 0 0 -1.09603 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +247 0 0 -3.29349327 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +248 0 1 0.857429 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +249 5 0 -1.0987854 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +250 0 0 -3.59119225 0 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +251 0 0 0.873575747 0 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +252 0 1 -3.44828677 0 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +253 4 0 0.300531477 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +254 0 0 -0.419741482 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +255 0 0 -3.350474 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +256 4 0 3.84662747 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +257 0 0 1.6549865 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +258 5 0 1.53106284 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +259 3 0 -0.261621028 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +260 0 0 0.682792664 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +261 1 0 -2.41302037 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +262 0 0 -2.90788555 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +263 0 0 -3.430567 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +264 0 0 -3.30182219 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +265 0 1 1.58035779 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +266 2 0 -0.407363772 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +267 0 0 0.6786815 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +268 2 0 -3.44287348 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +269 0 0 -2.127025 1 0.61314719276545837 0.91972078914818756 0.91972078914818756 0.91972078914818756 0.91972078914818756 0.91972078914818756 0.91972078914818756 0.91972078914818756 0.91972078914818756 4.3280851226668897 4.3280851226668897 6.4921276840003346 6.4921276840003346 6.4921276840003346 6.4921276840003346 6.4921276840003346 6.4921276840003346 6.4921276840003346 6.4921276840003346 4.3280851226668897 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 +270 0 0 -4.025374 1 0.61314719276545837 0.91972078914818756 0.91972078914818756 0.91972078914818756 0.91972078914818756 0.91972078914818756 0.91972078914818756 0.91972078914818756 0.91972078914818756 4.3280851226668897 4.3280851226668897 6.4921276840003346 6.4921276840003346 6.4921276840003346 6.4921276840003346 6.4921276840003346 6.4921276840003346 6.4921276840003346 6.4921276840003346 4.3280851226668897 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 +271 0 1 -2.24317718 1 0.61314719276545837 0.91972078914818756 0.91972078914818756 0.91972078914818756 0.91972078914818756 0.91972078914818756 0.91972078914818756 0.91972078914818756 0.91972078914818756 4.3280851226668897 4.3280851226668897 6.4921276840003346 6.4921276840003346 6.4921276840003346 6.4921276840003346 6.4921276840003346 6.4921276840003346 6.4921276840003346 6.4921276840003346 4.3280851226668897 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 +272 0 1 -0.973613 1 0.61314719276545837 0.91972078914818756 0.91972078914818756 0.91972078914818756 0.91972078914818756 0.91972078914818756 0.91972078914818756 0.91972078914818756 0.91972078914818756 4.3280851226668897 4.3280851226668897 6.4921276840003346 6.4921276840003346 6.4921276840003346 6.4921276840003346 6.4921276840003346 6.4921276840003346 6.4921276840003346 6.4921276840003346 4.3280851226668897 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 +273 5 0 -1.15369773 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +274 2 1 -0.4417058 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +275 0 0 -3.59119225 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +276 0 0 1.03437853 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +277 0 0 -3.498793 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +278 6 1 3.84662747 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +279 0 0 -3.44828677 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +280 4 1 1.35205162 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +281 0 1 -0.260910481 0 0 0.30657359638272919 0.30657359638272919 0.54377130915202532 0.54377130915202532 0.54377130915202532 0.54377130915202532 0.54377130915202532 0.54377130915202532 0 0 2.1640425613334449 2.1640425613334449 3.8383744409871863 3.8383744409871863 3.8383744409871863 3.8383744409871863 3.8383744409871863 3.8383744409871863 4.3280851226668897 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 +282 0 0 -3.64581275 0 0 0.30657359638272919 0.30657359638272919 0.54377130915202532 0.54377130915202532 0.54377130915202532 0.54377130915202532 0.54377130915202532 0.54377130915202532 0 0 2.1640425613334449 2.1640425613334449 3.8383744409871863 3.8383744409871863 3.8383744409871863 3.8383744409871863 3.8383744409871863 3.8383744409871863 4.3280851226668897 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 +283 0 0 1.58035779 0 0 0.30657359638272919 0.30657359638272919 0.54377130915202532 0.54377130915202532 0.54377130915202532 0.54377130915202532 0.54377130915202532 0.54377130915202532 0 0 2.1640425613334449 2.1640425613334449 3.8383744409871863 3.8383744409871863 3.8383744409871863 3.8383744409871863 3.8383744409871863 3.8383744409871863 4.3280851226668897 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 +284 0 0 1.59899592 0 0 0.30657359638272919 0.30657359638272919 0.54377130915202532 0.54377130915202532 0.54377130915202532 0.54377130915202532 0.54377130915202532 0.54377130915202532 0 0 2.1640425613334449 2.1640425613334449 3.8383744409871863 3.8383744409871863 3.8383744409871863 3.8383744409871863 3.8383744409871863 3.8383744409871863 4.3280851226668897 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 +285 0 0 -0.7171524 0 0 0.30657359638272919 0.30657359638272919 0.54377130915202532 0.54377130915202532 0.54377130915202532 0.54377130915202532 0.54377130915202532 0.54377130915202532 0 0 2.1640425613334449 2.1640425613334449 3.8383744409871863 3.8383744409871863 3.8383744409871863 3.8383744409871863 3.8383744409871863 3.8383744409871863 4.3280851226668897 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 +286 0 0 -4.025374 0 0 0.30657359638272919 0.30657359638272919 0.54377130915202532 0.54377130915202532 0.54377130915202532 0.54377130915202532 0.54377130915202532 0.54377130915202532 0 0 2.1640425613334449 2.1640425613334449 3.8383744409871863 3.8383744409871863 3.8383744409871863 3.8383744409871863 3.8383744409871863 3.8383744409871863 4.3280851226668897 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 +287 0 1 -0.946186066 0 0 0.30657359638272919 0.30657359638272919 0.54377130915202532 0.54377130915202532 0.54377130915202532 0.54377130915202532 0.54377130915202532 0.54377130915202532 0 0 2.1640425613334449 2.1640425613334449 3.8383744409871863 3.8383744409871863 3.8383744409871863 3.8383744409871863 3.8383744409871863 3.8383744409871863 4.3280851226668897 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 +288 4 0 0.318056434 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +289 0 0 1.53106284 1 0.61314719276545837 0.91972078914818756 0.91972078914818756 0.91972078914818756 0.91972078914818756 0.91972078914818756 0.91972078914818756 0.91972078914818756 0.91972078914818756 4.3280851226668897 4.3280851226668897 6.4921276840003346 6.4921276840003346 6.4921276840003346 6.4921276840003346 6.4921276840003346 6.4921276840003346 6.4921276840003346 6.4921276840003346 4.3280851226668897 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 +290 0 1 2.23483515 1 0.61314719276545837 0.91972078914818756 0.91972078914818756 0.91972078914818756 0.91972078914818756 0.91972078914818756 0.91972078914818756 0.91972078914818756 0.91972078914818756 4.3280851226668897 4.3280851226668897 6.4921276840003346 6.4921276840003346 6.4921276840003346 6.4921276840003346 6.4921276840003346 6.4921276840003346 6.4921276840003346 6.4921276840003346 4.3280851226668897 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 +291 0 0 -0.815352559 1 0.61314719276545837 0.91972078914818756 0.91972078914818756 0.91972078914818756 0.91972078914818756 0.91972078914818756 0.91972078914818756 0.91972078914818756 0.91972078914818756 4.3280851226668897 4.3280851226668897 6.4921276840003346 6.4921276840003346 6.4921276840003346 6.4921276840003346 6.4921276840003346 6.4921276840003346 6.4921276840003346 6.4921276840003346 4.3280851226668897 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 +292 0 0 -3.87705517 1 0.61314719276545837 0.91972078914818756 0.91972078914818756 0.91972078914818756 0.91972078914818756 0.91972078914818756 0.91972078914818756 0.91972078914818756 0.91972078914818756 4.3280851226668897 4.3280851226668897 6.4921276840003346 6.4921276840003346 6.4921276840003346 6.4921276840003346 6.4921276840003346 6.4921276840003346 6.4921276840003346 6.4921276840003346 4.3280851226668897 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 +293 0 0 -1.11645329 1 0.61314719276545837 0.91972078914818756 0.91972078914818756 0.91972078914818756 0.91972078914818756 0.91972078914818756 0.91972078914818756 0.91972078914818756 0.91972078914818756 4.3280851226668897 4.3280851226668897 6.4921276840003346 6.4921276840003346 6.4921276840003346 6.4921276840003346 6.4921276840003346 6.4921276840003346 6.4921276840003346 6.4921276840003346 4.3280851226668897 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 +294 0 0 -3.44828677 1 0.61314719276545837 0.91972078914818756 0.91972078914818756 0.91972078914818756 0.91972078914818756 0.91972078914818756 0.91972078914818756 0.91972078914818756 0.91972078914818756 4.3280851226668897 4.3280851226668897 6.4921276840003346 6.4921276840003346 6.4921276840003346 6.4921276840003346 6.4921276840003346 6.4921276840003346 6.4921276840003346 6.4921276840003346 4.3280851226668897 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 +295 0 0 -3.498793 1 0.61314719276545837 0.91972078914818756 0.91972078914818756 0.91972078914818756 0.91972078914818756 0.91972078914818756 0.91972078914818756 0.91972078914818756 0.91972078914818756 4.3280851226668897 4.3280851226668897 6.4921276840003346 6.4921276840003346 6.4921276840003346 6.4921276840003346 6.4921276840003346 6.4921276840003346 6.4921276840003346 6.4921276840003346 4.3280851226668897 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 +296 0 1 0.8124549 1 0.61314719276545837 0.91972078914818756 0.91972078914818756 0.91972078914818756 0.91972078914818756 0.91972078914818756 0.91972078914818756 0.91972078914818756 0.91972078914818756 4.3280851226668897 4.3280851226668897 6.4921276840003346 6.4921276840003346 6.4921276840003346 6.4921276840003346 6.4921276840003346 6.4921276840003346 6.4921276840003346 6.4921276840003346 4.3280851226668897 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 +297 0 0 -3.5966053 1 0.61314719276545837 0.91972078914818756 0.91972078914818756 0.91972078914818756 0.91972078914818756 0.91972078914818756 0.91972078914818756 0.91972078914818756 0.91972078914818756 4.3280851226668897 4.3280851226668897 6.4921276840003346 6.4921276840003346 6.4921276840003346 6.4921276840003346 6.4921276840003346 6.4921276840003346 6.4921276840003346 6.4921276840003346 4.3280851226668897 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 +298 3 1 3.84662747 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +299 0 0 1.53106284 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +300 0 1 1.70428145 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +301 0 0 -1.49623072 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +302 1 0 -2.62804937 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +303 0 0 -3.59119225 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +304 0 0 -3.59119225 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +305 1 0 1.70428145 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +306 0 0 -1.09603 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +307 0 0 -3.350474 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +308 6 1 1.17651057 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +309 3 0 1.77275252 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +310 1 1 0.5732248 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +311 0 0 -3.87705517 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +312 3 0 1.58442724 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +313 0 1 3.84662747 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 4.3280851226668897 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 +314 0 0 -2.191549 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 4.3280851226668897 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 +315 0 1 0.249878839 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 4.3280851226668897 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 +316 2 0 -3.44828677 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +317 0 0 -3.5966053 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 4.3280851226668897 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 +318 0 1 -2.38893437 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 4.3280851226668897 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 +319 0 1 0.268761456 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 4.3280851226668897 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 +320 0 0 -3.44287348 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 4.3280851226668897 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 +321 6 0 -0.7661013 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +322 0 0 1.6549865 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +323 0 0 -2.24317718 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +324 0 0 -3.498793 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +325 0 0 1.34387577 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +326 1 0 0.221866757 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +327 0 0 -4.025374 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +328 3 1 1.75979877 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 4.3280851226668897 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 +329 3 1 3.84662747 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 4.3280851226668897 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 +330 0 0 -3.498793 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +331 2 0 -3.44828677 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +332 0 1 -2.2766912 1 0.61314719276545837 0.61314719276545837 0.61314719276545837 0.8503449055347545 0.8503449055347545 0.8503449055347545 0.8503449055347545 0.8503449055347545 0.8503449055347545 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 6.0024170023206311 6.0024170023206311 6.0024170023206311 6.0024170023206311 6.0024170023206311 6.0024170023206311 4.3280851226668897 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 +333 0 0 -0.03547456 1 0.61314719276545837 0.61314719276545837 0.61314719276545837 0.8503449055347545 0.8503449055347545 0.8503449055347545 0.8503449055347545 0.8503449055347545 0.8503449055347545 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 6.0024170023206311 6.0024170023206311 6.0024170023206311 6.0024170023206311 6.0024170023206311 6.0024170023206311 4.3280851226668897 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 +334 0 1 1.34387577 1 0.61314719276545837 0.61314719276545837 0.61314719276545837 0.8503449055347545 0.8503449055347545 0.8503449055347545 0.8503449055347545 0.8503449055347545 0.8503449055347545 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 6.0024170023206311 6.0024170023206311 6.0024170023206311 6.0024170023206311 6.0024170023206311 6.0024170023206311 4.3280851226668897 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 +335 0 0 -3.5966053 1 0.61314719276545837 0.61314719276545837 0.61314719276545837 0.8503449055347545 0.8503449055347545 0.8503449055347545 0.8503449055347545 0.8503449055347545 0.8503449055347545 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 6.0024170023206311 6.0024170023206311 6.0024170023206311 6.0024170023206311 6.0024170023206311 6.0024170023206311 4.3280851226668897 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 +336 0 0 0.629524946 1 0.61314719276545837 0.61314719276545837 0.61314719276545837 0.8503449055347545 0.8503449055347545 0.8503449055347545 0.8503449055347545 0.8503449055347545 0.8503449055347545 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 6.0024170023206311 6.0024170023206311 6.0024170023206311 6.0024170023206311 6.0024170023206311 6.0024170023206311 4.3280851226668897 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 +337 0 0 -0.815352559 1 0.61314719276545837 0.61314719276545837 0.61314719276545837 0.8503449055347545 0.8503449055347545 0.8503449055347545 0.8503449055347545 0.8503449055347545 0.8503449055347545 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 6.0024170023206311 6.0024170023206311 6.0024170023206311 6.0024170023206311 6.0024170023206311 6.0024170023206311 4.3280851226668897 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 +338 6 0 0.8783977 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +339 0 0 -0.163129091 1 1 1 1 0.86879492248765822 0.77514825233752549 0.77514825233752549 0.87060868542699277 0.96170108865045079 0.96170108865045079 4.3280851226668897 7.0588028025474019 9.2228453638808467 11.086850167559682 11.086850167559682 11.086850167559682 11.086850167559682 12.452209007499938 13.755092453209693 13.755092453209693 4.3280851226668897 7.0588028025474019 9.2228453638808467 11.086850167559682 12.761182047213424 14.302877074322677 14.302877074322677 14.302877074322677 14.302877074322677 14.302877074322677 +340 0 1 -2.62804937 1 1 1 1 0.86879492248765822 0.77514825233752549 0.77514825233752549 0.87060868542699277 0.96170108865045079 0.96170108865045079 4.3280851226668897 7.0588028025474019 9.2228453638808467 11.086850167559682 11.086850167559682 11.086850167559682 11.086850167559682 12.452209007499938 13.755092453209693 13.755092453209693 4.3280851226668897 7.0588028025474019 9.2228453638808467 11.086850167559682 12.761182047213424 14.302877074322677 14.302877074322677 14.302877074322677 14.302877074322677 14.302877074322677 +341 0 0 -2.30470347 1 1 1 1 0.86879492248765822 0.77514825233752549 0.77514825233752549 0.87060868542699277 0.96170108865045079 0.96170108865045079 4.3280851226668897 7.0588028025474019 9.2228453638808467 11.086850167559682 11.086850167559682 11.086850167559682 11.086850167559682 12.452209007499938 13.755092453209693 13.755092453209693 4.3280851226668897 7.0588028025474019 9.2228453638808467 11.086850167559682 12.761182047213424 14.302877074322677 14.302877074322677 14.302877074322677 14.302877074322677 14.302877074322677 +342 0 0 1.10310686 1 1 1 1 0.86879492248765822 0.77514825233752549 0.77514825233752549 0.87060868542699277 0.96170108865045079 0.96170108865045079 4.3280851226668897 7.0588028025474019 9.2228453638808467 11.086850167559682 11.086850167559682 11.086850167559682 11.086850167559682 12.452209007499938 13.755092453209693 13.755092453209693 4.3280851226668897 7.0588028025474019 9.2228453638808467 11.086850167559682 12.761182047213424 14.302877074322677 14.302877074322677 14.302877074322677 14.302877074322677 14.302877074322677 +343 0 1 1.70428145 1 1 1 1 0.86879492248765822 0.77514825233752549 0.77514825233752549 0.87060868542699277 0.96170108865045079 0.96170108865045079 4.3280851226668897 7.0588028025474019 9.2228453638808467 11.086850167559682 11.086850167559682 11.086850167559682 11.086850167559682 12.452209007499938 13.755092453209693 13.755092453209693 4.3280851226668897 7.0588028025474019 9.2228453638808467 11.086850167559682 12.761182047213424 14.302877074322677 14.302877074322677 14.302877074322677 14.302877074322677 14.302877074322677 +344 0 1 3.84662747 1 1 1 1 0.86879492248765822 0.77514825233752549 0.77514825233752549 0.87060868542699277 0.96170108865045079 0.96170108865045079 4.3280851226668897 7.0588028025474019 9.2228453638808467 11.086850167559682 11.086850167559682 11.086850167559682 11.086850167559682 12.452209007499938 13.755092453209693 13.755092453209693 4.3280851226668897 7.0588028025474019 9.2228453638808467 11.086850167559682 12.761182047213424 14.302877074322677 14.302877074322677 14.302877074322677 14.302877074322677 14.302877074322677 +345 0 1 -2.6725316 1 1 1 1 0.86879492248765822 0.77514825233752549 0.77514825233752549 0.87060868542699277 0.96170108865045079 0.96170108865045079 4.3280851226668897 7.0588028025474019 9.2228453638808467 11.086850167559682 11.086850167559682 11.086850167559682 11.086850167559682 12.452209007499938 13.755092453209693 13.755092453209693 4.3280851226668897 7.0588028025474019 9.2228453638808467 11.086850167559682 12.761182047213424 14.302877074322677 14.302877074322677 14.302877074322677 14.302877074322677 14.302877074322677 +346 0 1 3.84662747 1 1 1 1 0.86879492248765822 0.77514825233752549 0.77514825233752549 0.87060868542699277 0.96170108865045079 0.96170108865045079 4.3280851226668897 7.0588028025474019 9.2228453638808467 11.086850167559682 11.086850167559682 11.086850167559682 11.086850167559682 12.452209007499938 13.755092453209693 13.755092453209693 4.3280851226668897 7.0588028025474019 9.2228453638808467 11.086850167559682 12.761182047213424 14.302877074322677 14.302877074322677 14.302877074322677 14.302877074322677 14.302877074322677 +347 0 1 3.84662747 1 1 1 1 0.86879492248765822 0.77514825233752549 0.77514825233752549 0.87060868542699277 0.96170108865045079 0.96170108865045079 4.3280851226668897 7.0588028025474019 9.2228453638808467 11.086850167559682 11.086850167559682 11.086850167559682 11.086850167559682 12.452209007499938 13.755092453209693 13.755092453209693 4.3280851226668897 7.0588028025474019 9.2228453638808467 11.086850167559682 12.761182047213424 14.302877074322677 14.302877074322677 14.302877074322677 14.302877074322677 14.302877074322677 +348 0 0 -4.025374 1 1 1 1 0.86879492248765822 0.77514825233752549 0.77514825233752549 0.87060868542699277 0.96170108865045079 0.96170108865045079 4.3280851226668897 7.0588028025474019 9.2228453638808467 11.086850167559682 11.086850167559682 11.086850167559682 11.086850167559682 12.452209007499938 13.755092453209693 13.755092453209693 4.3280851226668897 7.0588028025474019 9.2228453638808467 11.086850167559682 12.761182047213424 14.302877074322677 14.302877074322677 14.302877074322677 14.302877074322677 14.302877074322677 +349 0 0 -2.90788555 1 1 1 1 0.86879492248765822 0.77514825233752549 0.77514825233752549 0.87060868542699277 0.96170108865045079 0.96170108865045079 4.3280851226668897 7.0588028025474019 9.2228453638808467 11.086850167559682 11.086850167559682 11.086850167559682 11.086850167559682 12.452209007499938 13.755092453209693 13.755092453209693 4.3280851226668897 7.0588028025474019 9.2228453638808467 11.086850167559682 12.761182047213424 14.302877074322677 14.302877074322677 14.302877074322677 14.302877074322677 14.302877074322677 +350 2 0 -0.03547456 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +351 0 0 -4.025374 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +352 1 0 -0.0259750877 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +353 0 1 0.955442548 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 7.0588028025474019 9.2228453638808467 9.2228453638808467 9.2228453638808467 9.2228453638808467 9.2228453638808467 9.2228453638808467 9.2228453638808467 9.2228453638808467 4.3280851226668897 7.0588028025474019 9.2228453638808467 9.2228453638808467 9.2228453638808467 9.2228453638808467 9.2228453638808467 9.2228453638808467 9.2228453638808467 9.2228453638808467 +354 0 1 0.910454869 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 7.0588028025474019 9.2228453638808467 9.2228453638808467 9.2228453638808467 9.2228453638808467 9.2228453638808467 9.2228453638808467 9.2228453638808467 9.2228453638808467 4.3280851226668897 7.0588028025474019 9.2228453638808467 9.2228453638808467 9.2228453638808467 9.2228453638808467 9.2228453638808467 9.2228453638808467 9.2228453638808467 9.2228453638808467 +355 0 1 2.37696719 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 7.0588028025474019 9.2228453638808467 9.2228453638808467 9.2228453638808467 9.2228453638808467 9.2228453638808467 9.2228453638808467 9.2228453638808467 9.2228453638808467 4.3280851226668897 7.0588028025474019 9.2228453638808467 9.2228453638808467 9.2228453638808467 9.2228453638808467 9.2228453638808467 9.2228453638808467 9.2228453638808467 9.2228453638808467 +356 0 0 0.137635678 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 7.0588028025474019 9.2228453638808467 9.2228453638808467 9.2228453638808467 9.2228453638808467 9.2228453638808467 9.2228453638808467 9.2228453638808467 9.2228453638808467 4.3280851226668897 7.0588028025474019 9.2228453638808467 9.2228453638808467 9.2228453638808467 9.2228453638808467 9.2228453638808467 9.2228453638808467 9.2228453638808467 9.2228453638808467 +357 3 1 3.84662747 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +358 4 0 -0.917018831 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +359 0 0 1.40134656 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +360 0 0 -1.70374238 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +361 0 0 1.75979877 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +362 0 0 -2.66446018 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +363 1 0 1.58035779 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +364 0 1 1.03751373 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +365 6 1 -0.565857053 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +366 0 0 0.8783977 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +367 3 1 1.75979877 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +368 3 0 -2.69247222 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +369 0 0 -4.025374 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +370 0 0 -3.350474 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +371 0 0 -1.11645329 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +372 0 0 -3.498793 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +373 3 0 -0.888549268 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +374 3 0 0.8096998 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +375 0 1 1.72944009 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +376 0 0 -0.5412219 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +377 0 0 -4.025374 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +378 2 0 -2.66446018 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +379 0 0 -3.59119225 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +380 3 1 -1.0987854 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +381 0 0 -3.430567 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +382 3 1 -2.341114 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +383 0 0 -0.4417058 0 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +384 0 1 0.629524946 0 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +385 0 0 -1.01177955 0 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +386 0 0 -0.742806554 0 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +387 0 0 0.7077811 0 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +388 3 0 0.268761456 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +389 0 1 0.8783977 1 0.61314719276545837 0.91972078914818756 0.91972078914818756 0.91972078914818756 0.91972078914818756 0.91972078914818756 0.91972078914818756 0.91972078914818756 0.91972078914818756 4.3280851226668897 4.3280851226668897 6.4921276840003346 6.4921276840003346 6.4921276840003346 6.4921276840003346 6.4921276840003346 6.4921276840003346 6.4921276840003346 6.4921276840003346 4.3280851226668897 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 +390 0 1 1.91488457 1 0.61314719276545837 0.91972078914818756 0.91972078914818756 0.91972078914818756 0.91972078914818756 0.91972078914818756 0.91972078914818756 0.91972078914818756 0.91972078914818756 4.3280851226668897 4.3280851226668897 6.4921276840003346 6.4921276840003346 6.4921276840003346 6.4921276840003346 6.4921276840003346 6.4921276840003346 6.4921276840003346 6.4921276840003346 4.3280851226668897 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 +391 0 0 0.988711 1 0.61314719276545837 0.91972078914818756 0.91972078914818756 0.91972078914818756 0.91972078914818756 0.91972078914818756 0.91972078914818756 0.91972078914818756 0.91972078914818756 4.3280851226668897 4.3280851226668897 6.4921276840003346 6.4921276840003346 6.4921276840003346 6.4921276840003346 6.4921276840003346 6.4921276840003346 6.4921276840003346 6.4921276840003346 4.3280851226668897 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 +392 1 0 0.9995611 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +393 0 0 -4.025374 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +394 2 0 -0.7171524 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +395 0 0 0.8783977 0 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +396 0 1 0.0138204182 0 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +397 2 0 -1.44491827 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +398 0 0 0.255944818 0 0 0.30657359638272919 0.30657359638272919 0.30657359638272919 0.30657359638272919 0.30657359638272919 0.30657359638272919 0.49114929316229738 0.49114929316229738 0 0 2.1640425613334449 2.1640425613334449 2.1640425613334449 2.1640425613334449 2.1640425613334449 2.1640425613334449 3.4669260070432002 3.4669260070432002 4.3280851226668897 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 +399 0 0 -2.30470347 0 0 0.30657359638272919 0.30657359638272919 0.30657359638272919 0.30657359638272919 0.30657359638272919 0.30657359638272919 0.49114929316229738 0.49114929316229738 0 0 2.1640425613334449 2.1640425613334449 2.1640425613334449 2.1640425613334449 2.1640425613334449 2.1640425613334449 3.4669260070432002 3.4669260070432002 4.3280851226668897 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 +400 0 0 -0.9246641 0 0 0.30657359638272919 0.30657359638272919 0.30657359638272919 0.30657359638272919 0.30657359638272919 0.30657359638272919 0.49114929316229738 0.49114929316229738 0 0 2.1640425613334449 2.1640425613334449 2.1640425613334449 2.1640425613334449 2.1640425613334449 2.1640425613334449 3.4669260070432002 3.4669260070432002 4.3280851226668897 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 +401 0 0 -4.025374 0 0 0.30657359638272919 0.30657359638272919 0.30657359638272919 0.30657359638272919 0.30657359638272919 0.30657359638272919 0.49114929316229738 0.49114929316229738 0 0 2.1640425613334449 2.1640425613334449 2.1640425613334449 2.1640425613334449 2.1640425613334449 2.1640425613334449 3.4669260070432002 3.4669260070432002 4.3280851226668897 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 +402 0 0 -3.59119225 0 0 0.30657359638272919 0.30657359638272919 0.30657359638272919 0.30657359638272919 0.30657359638272919 0.30657359638272919 0.49114929316229738 0.49114929316229738 0 0 2.1640425613334449 2.1640425613334449 2.1640425613334449 2.1640425613334449 2.1640425613334449 2.1640425613334449 3.4669260070432002 3.4669260070432002 4.3280851226668897 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 +403 0 0 -3.00471854 0 0 0.30657359638272919 0.30657359638272919 0.30657359638272919 0.30657359638272919 0.30657359638272919 0.30657359638272919 0.49114929316229738 0.49114929316229738 0 0 2.1640425613334449 2.1640425613334449 2.1640425613334449 2.1640425613334449 2.1640425613334449 2.1640425613334449 3.4669260070432002 3.4669260070432002 4.3280851226668897 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 +404 0 0 0.8783977 0 0 0.30657359638272919 0.30657359638272919 0.30657359638272919 0.30657359638272919 0.30657359638272919 0.30657359638272919 0.49114929316229738 0.49114929316229738 0 0 2.1640425613334449 2.1640425613334449 2.1640425613334449 2.1640425613334449 2.1640425613334449 2.1640425613334449 3.4669260070432002 3.4669260070432002 4.3280851226668897 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 +405 0 0 1.63256311 0 0 0.30657359638272919 0.30657359638272919 0.30657359638272919 0.30657359638272919 0.30657359638272919 0.30657359638272919 0.49114929316229738 0.49114929316229738 0 0 2.1640425613334449 2.1640425613334449 2.1640425613334449 2.1640425613334449 2.1640425613334449 2.1640425613334449 3.4669260070432002 3.4669260070432002 4.3280851226668897 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 +406 0 0 1.70428145 0 0 0.30657359638272919 0.30657359638272919 0.30657359638272919 0.30657359638272919 0.30657359638272919 0.30657359638272919 0.49114929316229738 0.49114929316229738 0 0 2.1640425613334449 2.1640425613334449 2.1640425613334449 2.1640425613334449 2.1640425613334449 2.1640425613334449 3.4669260070432002 3.4669260070432002 4.3280851226668897 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 +407 0 0 -3.498793 0 0 0.30657359638272919 0.30657359638272919 0.30657359638272919 0.30657359638272919 0.30657359638272919 0.30657359638272919 0.49114929316229738 0.49114929316229738 0 0 2.1640425613334449 2.1640425613334449 2.1640425613334449 2.1640425613334449 2.1640425613334449 2.1640425613334449 3.4669260070432002 3.4669260070432002 4.3280851226668897 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 +408 0 0 -0.608227134 0 0 0.30657359638272919 0.30657359638272919 0.30657359638272919 0.30657359638272919 0.30657359638272919 0.30657359638272919 0.49114929316229738 0.49114929316229738 0 0 2.1640425613334449 2.1640425613334449 2.1640425613334449 2.1640425613334449 2.1640425613334449 2.1640425613334449 3.4669260070432002 3.4669260070432002 4.3280851226668897 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 +409 0 1 1.124604 0 0 0.30657359638272919 0.30657359638272919 0.30657359638272919 0.30657359638272919 0.30657359638272919 0.30657359638272919 0.49114929316229738 0.49114929316229738 0 0 2.1640425613334449 2.1640425613334449 2.1640425613334449 2.1640425613334449 2.1640425613334449 2.1640425613334449 3.4669260070432002 3.4669260070432002 4.3280851226668897 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 +410 0 0 -1.04763412 0 0 0.30657359638272919 0.30657359638272919 0.30657359638272919 0.30657359638272919 0.30657359638272919 0.30657359638272919 0.49114929316229738 0.49114929316229738 0 0 2.1640425613334449 2.1640425613334449 2.1640425613334449 2.1640425613334449 2.1640425613334449 2.1640425613334449 3.4669260070432002 3.4669260070432002 4.3280851226668897 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 +411 0 1 -1.09603 0 0 0.30657359638272919 0.30657359638272919 0.30657359638272919 0.30657359638272919 0.30657359638272919 0.30657359638272919 0.49114929316229738 0.49114929316229738 0 0 2.1640425613334449 2.1640425613334449 2.1640425613334449 2.1640425613334449 2.1640425613334449 2.1640425613334449 3.4669260070432002 3.4669260070432002 4.3280851226668897 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 +412 0 0 -4.025374 0 0 0.30657359638272919 0.30657359638272919 0.30657359638272919 0.30657359638272919 0.30657359638272919 0.30657359638272919 0.49114929316229738 0.49114929316229738 0 0 2.1640425613334449 2.1640425613334449 2.1640425613334449 2.1640425613334449 2.1640425613334449 2.1640425613334449 3.4669260070432002 3.4669260070432002 4.3280851226668897 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 +413 2 0 -4.01512575 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +414 4 0 -2.594535 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +415 0 1 -0.501388 0 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +416 0 0 1.00068033 0 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +417 5 0 -2.62804937 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +418 6 1 3.84662747 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +419 6 0 -0.946186066 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +420 0 0 -2.765594 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +421 0 0 -1.09603 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +422 0 0 -3.430567 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +423 0 0 -3.44828677 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +424 0 0 -3.90653753 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +425 0 1 2.12476587 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +426 0 0 -2.799108 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +427 0 0 -2.90788555 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +428 0 0 -1.00117755 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +429 2 0 -3.87705517 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +430 6 0 0.682792664 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +431 0 0 -4.025374 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +432 0 1 1.88983047 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +433 0 0 -3.5966053 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +434 2 0 -3.59119225 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +435 3 0 -1.9533453 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +436 0 1 1.9537065 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +437 2 0 -2.66755033 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +438 3 0 1.14539027 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +439 0 1 2.14203167 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +440 0 0 -2.62804937 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +441 0 0 -3.44287348 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +442 0 0 -3.87705517 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +443 3 0 1.34834313 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +444 0 0 -3.59119225 0 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +445 0 1 2.20284581 0 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +446 0 0 2.23483515 0 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +447 0 0 -3.43243766 0 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +448 0 0 -3.87705517 0 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +449 0 0 -3.44828677 0 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +450 5 0 -2.78957629 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +451 3 0 0.3196344 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +452 4 1 -0.891273737 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +453 0 0 -0.891273737 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +454 5 0 -3.44828677 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +455 0 0 -3.90653753 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +456 1 0 -3.350474 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +457 0 1 1.34387577 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +458 0 0 -3.57888579 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +459 0 0 -2.78957629 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +460 5 0 -0.587448537 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +461 0 0 -0.474571764 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +462 0 0 1.17651057 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +463 3 0 -3.116952 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +464 5 0 -0.711599767 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +465 5 0 0.8879723 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +466 4 1 -0.163129091 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +467 0 0 -2.2766912 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +468 0 0 -2.62804937 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +469 0 0 -3.498793 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +470 2 0 -3.59119225 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +471 5 0 -0.5412219 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +472 0 0 -0.561873555 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +473 4 1 -0.9246641 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +474 0 0 -3.430567 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +475 3 0 1.95283723 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +476 0 0 -3.116952 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +477 0 0 -3.350474 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +478 0 0 -2.01253772 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +479 0 0 -2.86006522 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +480 0 0 -2.69247222 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +481 0 0 -0.260910481 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +482 0 0 -3.5966053 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +483 0 1 3.84662747 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +484 0 0 -2.86006522 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +485 0 0 -0.03547456 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +486 0 0 -3.498793 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +487 0 0 -3.00471854 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +488 0 0 -3.87705517 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +489 0 0 -3.44828677 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +490 0 0 1.2236464 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +491 0 0 -3.29971361 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +492 0 0 1.02485073 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +493 0 0 -2.62804937 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +494 5 0 0.8879723 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +495 0 0 -0.261621028 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +496 0 0 -3.430567 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +497 0 0 0.682792664 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +498 0 0 -2.75606227 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +499 5 0 -0.261621028 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 diff --git a/test/BaselineOutput/Common/Command/CommandTrainRanking-3-out.txt b/test/BaselineOutput/Common/Command/CommandTrainRanking-3-out.txt index 8737b21eac..ec32924110 100644 --- a/test/BaselineOutput/Common/Command/CommandTrainRanking-3-out.txt +++ b/test/BaselineOutput/Common/Command/CommandTrainRanking-3-out.txt @@ -1,17 +1,45 @@ NDCG@1: 0.313492 NDCG@2: 0.328916 NDCG@3: 0.342168 +NDCG@4: 0.342168 +NDCG@5: 0.343530 +NDCG@6: 0.343158 +NDCG@7: 0.343158 +NDCG@8: 0.343537 +NDCG@9: 0.344631 +NDCG@10: 0.344631 DCG@1: 1.356820 DCG@2: 1.562708 DCG@3: 1.657170 +DCG@4: 1.664567 +DCG@5: 1.677855 +DCG@6: 1.677855 +DCG@7: 1.677855 +DCG@8: 1.683273 +DCG@9: 1.693614 +DCG@10: 1.693614 OVERALL RESULTS --------------------------------------- NDCG@1: 0.313492 (0.0000) NDCG@2: 0.328916 (0.0000) NDCG@3: 0.342168 (0.0000) +NDCG@4: 0.342168 (0.0000) +NDCG@5: 0.343530 (0.0000) +NDCG@6: 0.343158 (0.0000) +NDCG@7: 0.343158 (0.0000) +NDCG@8: 0.343537 (0.0000) +NDCG@9: 0.344631 (0.0000) +NDCG@10: 0.344631 (0.0000) DCG@1: 1.356820 (0.0000) DCG@2: 1.562708 (0.0000) DCG@3: 1.657170 (0.0000) +DCG@4: 1.664567 (0.0000) +DCG@5: 1.677855 (0.0000) +DCG@6: 1.677855 (0.0000) +DCG@7: 1.677855 (0.0000) +DCG@8: 1.683273 (0.0000) +DCG@9: 1.693614 (0.0000) +DCG@10: 1.693614 (0.0000) --------------------------------------- diff --git a/test/BaselineOutput/Common/Command/CommandTrainRanking-4-out.txt b/test/BaselineOutput/Common/Command/CommandTrainRanking-4-out.txt index 8737b21eac..ec32924110 100644 --- a/test/BaselineOutput/Common/Command/CommandTrainRanking-4-out.txt +++ b/test/BaselineOutput/Common/Command/CommandTrainRanking-4-out.txt @@ -1,17 +1,45 @@ NDCG@1: 0.313492 NDCG@2: 0.328916 NDCG@3: 0.342168 +NDCG@4: 0.342168 +NDCG@5: 0.343530 +NDCG@6: 0.343158 +NDCG@7: 0.343158 +NDCG@8: 0.343537 +NDCG@9: 0.344631 +NDCG@10: 0.344631 DCG@1: 1.356820 DCG@2: 1.562708 DCG@3: 1.657170 +DCG@4: 1.664567 +DCG@5: 1.677855 +DCG@6: 1.677855 +DCG@7: 1.677855 +DCG@8: 1.683273 +DCG@9: 1.693614 +DCG@10: 1.693614 OVERALL RESULTS --------------------------------------- NDCG@1: 0.313492 (0.0000) NDCG@2: 0.328916 (0.0000) NDCG@3: 0.342168 (0.0000) +NDCG@4: 0.342168 (0.0000) +NDCG@5: 0.343530 (0.0000) +NDCG@6: 0.343158 (0.0000) +NDCG@7: 0.343158 (0.0000) +NDCG@8: 0.343537 (0.0000) +NDCG@9: 0.344631 (0.0000) +NDCG@10: 0.344631 (0.0000) DCG@1: 1.356820 (0.0000) DCG@2: 1.562708 (0.0000) DCG@3: 1.657170 (0.0000) +DCG@4: 1.664567 (0.0000) +DCG@5: 1.677855 (0.0000) +DCG@6: 1.677855 (0.0000) +DCG@7: 1.677855 (0.0000) +DCG@8: 1.683273 (0.0000) +DCG@9: 1.693614 (0.0000) +DCG@10: 1.693614 (0.0000) --------------------------------------- diff --git a/test/BaselineOutput/Common/Command/CommandTrainRanking-5-out.txt b/test/BaselineOutput/Common/Command/CommandTrainRanking-5-out.txt index 385bda1fad..85e011737f 100644 --- a/test/BaselineOutput/Common/Command/CommandTrainRanking-5-out.txt +++ b/test/BaselineOutput/Common/Command/CommandTrainRanking-5-out.txt @@ -11,18 +11,46 @@ Not training a calibrator because it is not needed. NDCG@1: 0.313492 NDCG@2: 0.328916 NDCG@3: 0.342168 +NDCG@4: 0.342168 +NDCG@5: 0.343530 +NDCG@6: 0.343158 +NDCG@7: 0.343158 +NDCG@8: 0.343537 +NDCG@9: 0.344631 +NDCG@10: 0.344631 DCG@1: 1.356820 DCG@2: 1.562708 DCG@3: 1.657170 +DCG@4: 1.664567 +DCG@5: 1.677855 +DCG@6: 1.677855 +DCG@7: 1.677855 +DCG@8: 1.683273 +DCG@9: 1.693614 +DCG@10: 1.693614 OVERALL RESULTS --------------------------------------- NDCG@1: 0.313492 (0.0000) NDCG@2: 0.328916 (0.0000) NDCG@3: 0.342168 (0.0000) +NDCG@4: 0.342168 (0.0000) +NDCG@5: 0.343530 (0.0000) +NDCG@6: 0.343158 (0.0000) +NDCG@7: 0.343158 (0.0000) +NDCG@8: 0.343537 (0.0000) +NDCG@9: 0.344631 (0.0000) +NDCG@10: 0.344631 (0.0000) DCG@1: 1.356820 (0.0000) DCG@2: 1.562708 (0.0000) DCG@3: 1.657170 (0.0000) +DCG@4: 1.664567 (0.0000) +DCG@5: 1.677855 (0.0000) +DCG@6: 1.677855 (0.0000) +DCG@7: 1.677855 (0.0000) +DCG@8: 1.683273 (0.0000) +DCG@9: 1.693614 (0.0000) +DCG@10: 1.693614 (0.0000) --------------------------------------- Physical memory usage(MB): %Number% diff --git a/test/BaselineOutput/Common/Command/CommandTrainRanking-gsummary2.txt b/test/BaselineOutput/Common/Command/CommandTrainRanking-gsummary2.txt index 139f4dcd37..0f7a7f26a2 100644 --- a/test/BaselineOutput/Common/Command/CommandTrainRanking-gsummary2.txt +++ b/test/BaselineOutput/Common/Command/CommandTrainRanking-gsummary2.txt @@ -1,253 +1,253 @@ -GroupId NDCG@1 NDCG@2 NDCG@3 DCG@1 DCG@2 DCG@3 MaxDCG@1 MaxDCG@2 MaxDCG@3 -0 0 0 0 0 0 0 0 0 0 -1 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 -0 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 -2 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 -2 0 0 0 0 0 0 0 0 0 -3 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 -0 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 -4 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 -2 0 0 0 0 0 0 0 0 0 -0 1 1 1 4.3280851226668897 7.0588028025474019 7.0588028025474019 4.3280851226668897 7.0588028025474019 7.0588028025474019 -5 0 0 0 0 0 0 0 0 0 -0 0 0.38685280723454163 0.69342640361727081 0 2.7307176798805122 4.894760241213957 4.3280851226668897 7.0588028025474019 7.0588028025474019 -2 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 -3 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 -0 0 0 0 0 0 0 0 0 0 -3 0 0 0 0 0 0 0 0 0 -5 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 -3 0 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 -2 0 0 0 0 0 0 0 0 0 -1 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 -0 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 -6 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 -0 0 0 0 0 0 0 0 0 0 -5 0 0 0 0 0 0 0 0 0 -0 0 0 0.5 0 0 2.1640425613334449 4.3280851226668897 4.3280851226668897 4.3280851226668897 -6 0 0 0 0 0 0 0 0 0 -0 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 -1 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 -6 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 -0 0 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 -6 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 -0 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 -2 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 -6 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 -6 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 -6 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 -3 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 -4 0 0 0 0 0 0 0 0 0 -0 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 -4 0 0 0 0 0 0 0 0 0 -2 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 -0 0 0 0 0 0 0 0 0 0 -4 0 0 0 0 0 0 0 0 0 -0 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 -4 0 0 0 0 0 0 0 0 0 -0 0 0.63092975357145753 0.63092975357145753 0 2.7307176798805122 2.7307176798805122 4.3280851226668897 4.3280851226668897 4.3280851226668897 -2 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 -3 0 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 -0 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 -2 0 0 0 0 0 0 0 0 0 -0 0 0.63092975357145753 0.63092975357145753 0 2.7307176798805122 2.7307176798805122 4.3280851226668897 4.3280851226668897 4.3280851226668897 -1 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 -4 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 -0 0 0 0 0 0 0 0 0 0 -3 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 -0 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 -2 0 0 0 0 0 0 0 0 0 -6 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 -0 1 1 1 4.3280851226668897 7.0588028025474019 7.0588028025474019 4.3280851226668897 7.0588028025474019 7.0588028025474019 -6 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 -0 0 0 0 0 0 0 0 0 0 -3 0 0 0 0 0 0 0 0 0 -0 1 1 1 4.3280851226668897 7.0588028025474019 7.0588028025474019 4.3280851226668897 7.0588028025474019 7.0588028025474019 -5 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 -0 0 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 -6 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 -5 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 -0 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 -3 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 -0 0 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 -0 0 0 0.5 0 0 2.1640425613334449 4.3280851226668897 4.3280851226668897 4.3280851226668897 -1 0 0 0 0 0 0 0 0 0 -0 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 -6 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 -0 0 0.63092975357145753 0.63092975357145753 0 2.7307176798805122 2.7307176798805122 4.3280851226668897 4.3280851226668897 4.3280851226668897 -6 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 -2 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 -0 0 0 0 0 0 0 0 0 0 -2 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 -5 0 0 0 0 0 0 0 0 0 -0 1 1 1 4.3280851226668897 7.0588028025474019 7.0588028025474019 4.3280851226668897 7.0588028025474019 7.0588028025474019 -2 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 -6 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 -0 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 -1 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 -6 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 -0 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 -6 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 -0 1 1 1 4.3280851226668897 7.0588028025474019 7.0588028025474019 4.3280851226668897 7.0588028025474019 7.0588028025474019 -4 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 -4 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 -6 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 -1 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 -0 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 -1 0 0 0 0 0 0 0 0 0 -2 0 0 0 0 0 0 0 0 0 -0 0 0 0.5 0 0 2.1640425613334449 4.3280851226668897 4.3280851226668897 4.3280851226668897 -3 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 -3 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 -3 0 0 0 0 0 0 0 0 0 -4 0 0 0 0 0 0 0 0 0 -2 0 0 0 0 0 0 0 0 0 -0 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 -5 0 0 0 0 0 0 0 0 0 -0 0 0.63092975357145753 0.63092975357145753 0 2.7307176798805122 2.7307176798805122 4.3280851226668897 4.3280851226668897 4.3280851226668897 -4 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 -4 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 -5 0 0 0 0 0 0 0 0 0 -3 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 -0 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 -2 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 -2 0 0 0 0 0 0 0 0 0 -0 1 0.61314719276545837 0.91972078914818756 4.3280851226668897 4.3280851226668897 6.4921276840003346 4.3280851226668897 7.0588028025474019 7.0588028025474019 -5 0 0 0 0 0 0 0 0 0 -2 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 -0 0 0 0 0 0 0 0 0 0 -6 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 -0 0 0 0 0 0 0 0 0 0 -4 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 -0 0 0 0.30657359638272919 0 0 2.1640425613334449 4.3280851226668897 7.0588028025474019 7.0588028025474019 -4 0 0 0 0 0 0 0 0 0 -0 1 0.61314719276545837 0.91972078914818756 4.3280851226668897 4.3280851226668897 6.4921276840003346 4.3280851226668897 7.0588028025474019 7.0588028025474019 -3 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 -0 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 -1 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 -6 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 -3 0 0 0 0 0 0 0 0 0 -1 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 -0 0 0 0 0 0 0 0 0 0 -3 0 0 0 0 0 0 0 0 0 -0 1 1 1 4.3280851226668897 7.0588028025474019 7.0588028025474019 4.3280851226668897 7.0588028025474019 7.0588028025474019 -2 0 0 0 0 0 0 0 0 0 -0 1 1 1 4.3280851226668897 7.0588028025474019 7.0588028025474019 4.3280851226668897 7.0588028025474019 7.0588028025474019 -6 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 -3 1 1 1 4.3280851226668897 7.0588028025474019 7.0588028025474019 4.3280851226668897 7.0588028025474019 7.0588028025474019 -0 0 0 0 0 0 0 0 0 0 -2 0 0 0 0 0 0 0 0 0 -0 1 0.61314719276545837 0.61314719276545837 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 7.0588028025474019 7.0588028025474019 -6 0 0 0 0 0 0 0 0 0 -0 1 1 1 4.3280851226668897 7.0588028025474019 9.2228453638808467 4.3280851226668897 7.0588028025474019 9.2228453638808467 -2 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 -0 1 1 1 4.3280851226668897 7.0588028025474019 9.2228453638808467 4.3280851226668897 7.0588028025474019 9.2228453638808467 -3 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 -4 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 -0 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 -6 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 -0 0 0 0 0 0 0 0 0 0 -3 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 -0 0 0 0 0 0 0 0 0 0 -3 0 0 0 0 0 0 0 0 0 -0 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 -2 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 -3 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 -0 0 0 0 0 0 0 0 0 0 -3 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 -0 0 0.63092975357145753 0.63092975357145753 0 2.7307176798805122 2.7307176798805122 4.3280851226668897 4.3280851226668897 4.3280851226668897 -3 0 0 0 0 0 0 0 0 0 -0 1 0.61314719276545837 0.91972078914818756 4.3280851226668897 4.3280851226668897 6.4921276840003346 4.3280851226668897 7.0588028025474019 7.0588028025474019 -1 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 -2 0 0 0 0 0 0 0 0 0 -0 0 0.63092975357145753 0.63092975357145753 0 2.7307176798805122 2.7307176798805122 4.3280851226668897 4.3280851226668897 4.3280851226668897 -2 0 0 0 0 0 0 0 0 0 -0 0 0 0.30657359638272919 0 0 2.1640425613334449 4.3280851226668897 7.0588028025474019 7.0588028025474019 -2 0 0 0 0 0 0 0 0 0 -4 0 0 0 0 0 0 0 0 0 -0 0 0.63092975357145753 0.63092975357145753 0 2.7307176798805122 2.7307176798805122 4.3280851226668897 4.3280851226668897 4.3280851226668897 -5 0 0 0 0 0 0 0 0 0 -6 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 -0 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 -2 0 0 0 0 0 0 0 0 0 -6 0 0 0 0 0 0 0 0 0 -0 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 -2 0 0 0 0 0 0 0 0 0 -3 0 0 0 0 0 0 0 0 0 -0 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 -2 0 0 0 0 0 0 0 0 0 -3 0 0 0 0 0 0 0 0 0 -0 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 -3 0 0 0 0 0 0 0 0 0 -0 0 0.63092975357145753 0.63092975357145753 0 2.7307176798805122 2.7307176798805122 4.3280851226668897 4.3280851226668897 4.3280851226668897 -5 0 0 0 0 0 0 0 0 0 -3 0 0 0 0 0 0 0 0 0 -4 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 -0 0 0 0 0 0 0 0 0 0 -5 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 -0 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 -5 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 -3 0 0 0 0 0 0 0 0 0 -5 0 0 0 0 0 0 0 0 0 -4 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 -0 0 0 0 0 0 0 0 0 0 -2 0 0 0 0 0 0 0 0 0 -5 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 -4 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 -0 0 0 0 0 0 0 0 0 0 -3 0 0 0 0 0 0 0 0 0 -0 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 -5 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 -5 0 0 0 0 0 0 0 0 0 +GroupId NDCG@1 NDCG@2 NDCG@3 NDCG@4 NDCG@5 NDCG@6 NDCG@7 NDCG@8 NDCG@9 NDCG@10 DCG@1 DCG@2 DCG@3 DCG@4 DCG@5 DCG@6 DCG@7 DCG@8 DCG@9 DCG@10 MaxDCG@1 MaxDCG@2 MaxDCG@3 MaxDCG@4 MaxDCG@5 MaxDCG@6 MaxDCG@7 MaxDCG@8 MaxDCG@9 MaxDCG@10 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +1 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +0 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +3 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +0 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +4 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 4.3280851226668897 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 +5 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0.38685280723454163 0.69342640361727081 0.69342640361727081 0.69342640361727081 0.69342640361727081 0.69342640361727081 0.69342640361727081 0.69342640361727081 0.69342640361727081 0 2.7307176798805122 4.894760241213957 4.894760241213957 4.894760241213957 4.894760241213957 4.894760241213957 4.894760241213957 4.894760241213957 4.894760241213957 4.3280851226668897 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 +2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +3 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +3 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +5 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +3 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +1 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +0 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +6 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +5 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0 0 2.1640425613334449 2.1640425613334449 2.1640425613334449 2.1640425613334449 2.1640425613334449 2.1640425613334449 2.1640425613334449 2.1640425613334449 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +6 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +1 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +6 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +6 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +0 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +6 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +6 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +6 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +3 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +4 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +4 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +2 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +4 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +4 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +3 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +4 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +3 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +0 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +6 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +0 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 4.3280851226668897 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 +6 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +3 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 4.3280851226668897 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 +5 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +6 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +5 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +0 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +3 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0 0 2.1640425613334449 2.1640425613334449 2.1640425613334449 2.1640425613334449 2.1640425613334449 2.1640425613334449 2.1640425613334449 2.1640425613334449 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +6 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +0 0 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +6 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +2 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +5 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 4.3280851226668897 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 +2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +6 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +0 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +1 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +6 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +6 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 4.3280851226668897 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 +4 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +4 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +6 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +1 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +0 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0 0 2.1640425613334449 2.1640425613334449 2.1640425613334449 2.1640425613334449 2.1640425613334449 2.1640425613334449 2.1640425613334449 2.1640425613334449 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +3 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +3 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +3 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +4 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +5 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +4 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +4 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +5 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +3 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 1 0.61314719276545837 0.91972078914818756 0.91972078914818756 0.91972078914818756 0.91972078914818756 0.91972078914818756 0.91972078914818756 0.91972078914818756 0.91972078914818756 4.3280851226668897 4.3280851226668897 6.4921276840003346 6.4921276840003346 6.4921276840003346 6.4921276840003346 6.4921276840003346 6.4921276840003346 6.4921276840003346 6.4921276840003346 4.3280851226668897 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 +5 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +2 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +6 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +4 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +0 0 0 0.30657359638272919 0.30657359638272919 0.54377130915202532 0.54377130915202532 0.54377130915202532 0.54377130915202532 0.54377130915202532 0.54377130915202532 0 0 2.1640425613334449 2.1640425613334449 3.8383744409871863 3.8383744409871863 3.8383744409871863 3.8383744409871863 3.8383744409871863 3.8383744409871863 4.3280851226668897 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 +4 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 1 0.61314719276545837 0.91972078914818756 0.91972078914818756 0.91972078914818756 0.91972078914818756 0.91972078914818756 0.91972078914818756 0.91972078914818756 0.91972078914818756 4.3280851226668897 4.3280851226668897 6.4921276840003346 6.4921276840003346 6.4921276840003346 6.4921276840003346 6.4921276840003346 6.4921276840003346 6.4921276840003346 6.4921276840003346 4.3280851226668897 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 +3 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +0 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +6 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +3 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +1 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +3 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 4.3280851226668897 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 +2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 4.3280851226668897 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 +6 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +3 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 4.3280851226668897 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 1 0.61314719276545837 0.61314719276545837 0.61314719276545837 0.8503449055347545 0.8503449055347545 0.8503449055347545 0.8503449055347545 0.8503449055347545 0.8503449055347545 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 6.0024170023206311 6.0024170023206311 6.0024170023206311 6.0024170023206311 6.0024170023206311 6.0024170023206311 4.3280851226668897 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 +6 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 1 1 1 1 0.86879492248765822 0.77514825233752549 0.77514825233752549 0.87060868542699277 0.96170108865045079 0.96170108865045079 4.3280851226668897 7.0588028025474019 9.2228453638808467 11.086850167559682 11.086850167559682 11.086850167559682 11.086850167559682 12.452209007499938 13.755092453209693 13.755092453209693 4.3280851226668897 7.0588028025474019 9.2228453638808467 11.086850167559682 12.761182047213424 14.302877074322677 14.302877074322677 14.302877074322677 14.302877074322677 14.302877074322677 +2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 7.0588028025474019 9.2228453638808467 9.2228453638808467 9.2228453638808467 9.2228453638808467 9.2228453638808467 9.2228453638808467 9.2228453638808467 9.2228453638808467 4.3280851226668897 7.0588028025474019 9.2228453638808467 9.2228453638808467 9.2228453638808467 9.2228453638808467 9.2228453638808467 9.2228453638808467 9.2228453638808467 9.2228453638808467 +3 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +4 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +6 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +3 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +3 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +3 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +3 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +0 0 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +3 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 1 0.61314719276545837 0.91972078914818756 0.91972078914818756 0.91972078914818756 0.91972078914818756 0.91972078914818756 0.91972078914818756 0.91972078914818756 0.91972078914818756 4.3280851226668897 4.3280851226668897 6.4921276840003346 6.4921276840003346 6.4921276840003346 6.4921276840003346 6.4921276840003346 6.4921276840003346 6.4921276840003346 6.4921276840003346 4.3280851226668897 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 +1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0.30657359638272919 0.30657359638272919 0.30657359638272919 0.30657359638272919 0.30657359638272919 0.30657359638272919 0.49114929316229738 0.49114929316229738 0 0 2.1640425613334449 2.1640425613334449 2.1640425613334449 2.1640425613334449 2.1640425613334449 2.1640425613334449 3.4669260070432002 3.4669260070432002 4.3280851226668897 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 7.0588028025474019 +2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +4 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +5 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +6 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +0 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +6 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +3 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +3 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +3 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0.63092975357145753 0 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 2.7307176798805122 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +5 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +3 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +4 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +5 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +5 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +3 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +5 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +4 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +5 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +4 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +3 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 1 1 1 1 1 1 1 1 1 1 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 4.3280851226668897 +5 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +5 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 diff --git a/test/BaselineOutput/Common/Command/CommandTrainRanking-summary1.txt b/test/BaselineOutput/Common/Command/CommandTrainRanking-summary1.txt index 48231c28cf..7dbf05b85c 100644 --- a/test/BaselineOutput/Common/Command/CommandTrainRanking-summary1.txt +++ b/test/BaselineOutput/Common/Command/CommandTrainRanking-summary1.txt @@ -1,8 +1,8 @@ #@ TextLoader{ #@ header+ #@ sep=tab -#@ col=NDCG:R8:0-2 -#@ col=DCG:R8:3-5 +#@ col=NDCG:R8:0-9 +#@ col=DCG:R8:10-19 #@ } -NDCG@1 NDCG@2 NDCG@3 DCG@1 DCG@2 DCG@3 -0.313492063492063 0.328916188916143 0.34216794121097 1.3568203360741444 1.5627077801921194 1.6571699554884201 +NDCG@1 NDCG@2 NDCG@3 NDCG@4 NDCG@5 NDCG@6 NDCG@7 NDCG@8 NDCG@9 NDCG@10 DCG@1 DCG@2 DCG@3 DCG@4 DCG@5 DCG@6 DCG@7 DCG@8 DCG@9 DCG@10 +0.31349206349206349 0.32891618891614288 0.34216794121096977 0.34216794121096977 0.34352980767139141 0.34315819390095437 0.34315819390095437 0.34353700514337288 0.34463092617513091 0.34463092617513091 1.3568203360741444 1.5627077801921194 1.6571699554884201 1.6645667999474634 1.6778551481986836 1.6778551481986836 1.6778551481986836 1.6832732388333671 1.6936135836405872 1.6936135836405872 diff --git a/test/BaselineOutput/Common/EntryPoints/core_manifest.json b/test/BaselineOutput/Common/EntryPoints/core_manifest.json index ba9cffb88a..7253e4533f 100644 --- a/test/BaselineOutput/Common/EntryPoints/core_manifest.json +++ b/test/BaselineOutput/Common/EntryPoints/core_manifest.json @@ -2783,7 +2783,7 @@ "Required": false, "SortOrder": 150.0, "IsNullable": false, - "Default": 3 + "Default": 10 }, { "Name": "LabelGains", @@ -23613,6 +23613,15 @@ "SortOrder": 16.0, "IsNullable": false, "Default": false + }, + { + "Name": "TreatOutputAsBatched", + "Type": "Bool", + "Desc": "If the first dimension of the output is unknown, should it be treated as batched or not. e.g. output = [-1] will be read as a vector of unknown length when this is false.", + "Required": false, + "SortOrder": 17.0, + "IsNullable": false, + "Default": true } ], "Outputs": [ @@ -30844,4 +30853,4 @@ ] } ] -} +} \ No newline at end of file diff --git a/test/BaselineOutput/Common/FeatureContribution/AveragePerceptronBinary.tsv b/test/BaselineOutput/Common/FeatureContribution/AveragePerceptronBinary.tsv index d8b7fecf47..7d3f4dc918 100644 --- a/test/BaselineOutput/Common/FeatureContribution/AveragePerceptronBinary.tsv +++ b/test/BaselineOutput/Common/FeatureContribution/AveragePerceptronBinary.tsv @@ -12,7 +12,7 @@ #@ col=FeatureContributions:R4:32-37 #@ col=FeatureContributions:R4:38-43 #@ } -950 757 692 720 297 7515 1 1 950 757 692 720 297 7515 0.956696868 0.760804 0.7872582 0.754716933 0.297893673 0.7578661 0 0.1527809 0 0 0 1 -0.6583012 0 -1 -0.517060339 0 0 12 2:-0.13028869 5:1 8:-0.370813 11:2.84608746 -459 961 0 659 274 2147 0 0 459 961 0 659 274 2147 0.462235659 0.965829134 0 0.690775633 0.27482447 0.21651876 0 0.6788808 0 0 0 0.99999994 -0.6720779 0 0 -1 -0.870772958 0 12 3:-0.215823054 5:0.99999994 9:-0.175488681 11:0.8131137 -672 275 0 65 195 9818 1 1 672 275 0 65 195 9818 0.6767372 0.2763819 0 0.06813417 0.195586756 0.990116954 0 0.04248268 0 0 0 1 -1 0 0 -0.100242466 -0.6298147 0 12 0:-0.04643902 5:1 6:-0.172673345 11:3.71828127 -186 301 0 681 526 1456 0 0 186 301 0 681 526 1456 0.187311172 0.302512556 0 0.713836432 0.527582765 0.1468334 0 0.313550383 0 0 0 1 -0.162922 0 0 -0.6181894 -1 0 12 4:-0.5319963 5:1 10:-0.293352127 11:0.5514176 +950 757 692 720 297 7515 1 1 950 757 692 720 297 7515 0.956696868 0.760804 0.7872582 0.754716933 0.297893673 0.7578661 0.094661206 0.00312626758 0 0 0 1 0 0 -0.704976737 -0.99999994 -0.322129458 0 12 3:-0.0539601371 5:1 9:-0.48089987 11:8.912132 +459 961 0 659 274 2147 0 0 459 961 0 659 274 2147 0.462235659 0.965829134 0 0.690775633 0.27482447 0.21651876 0.160087749 0.013891547 0 0 0 1 18 3:-1 4:-0.32469207 9:-0.1728713 11:1 15:-0.440156966 17:2.546154 +672 275 0 65 195 9818 1 1 672 275 0 65 195 9818 0.6767372 0.2763819 0 0.06813417 0.195586756 0.990116954 0.05125352 0.0008692985 0 0 0 1 18 3:-0.426846981 4:-1 10:-0.008735497 11:1 16:-0.10170991 17:11.6432886 +186 301 0 681 526 1456 0 0 186 301 0 681 526 1456 0.187311172 0.302512556 0 0.713836432 0.527582765 0.1468334 0.0956596956 0.006416 0 0 0 1 18 3:-1 4:-0.603177547 9:-0.263423949 11:1 15:-0.454851121 17:1.72668862 diff --git a/test/Cert.props b/test/Cert.props new file mode 100644 index 0000000000..9bf19329ca --- /dev/null +++ b/test/Cert.props @@ -0,0 +1,12 @@ + + + + 002400000480000094000000060200000024000052534131000400000100010015c01ae1f50e8cc09ba9eac9147cf8fd9fce2cfe9f8dce4f7301c4132ca9fb50ce8cbf1df4dc18dd4d210e4345c744ecb3365ed327efdbc52603faa5e21daa11234c8c4a73e51f03bf192544581ebe107adee3a34928e39d04e524a9ce729d5090bfd7dad9d10c722c0def9ccc08ff0a03790e48bcd1f9b6c476063e1966a1c4 + $(RepoRoot)eng/snk/Test.snk + $(TestPublicKey) + 9d77cc7ad39b68eb + false + false + + + \ No newline at end of file diff --git a/test/Directory.Build.props b/test/Directory.Build.props index 14a05ed538..08cd4f3da6 100644 --- a/test/Directory.Build.props +++ b/test/Directory.Build.props @@ -22,29 +22,17 @@ trx $(OutputPath) - $(ToolsDir)Test.snk false - - - - - - - - - - - - - $(AllowedReferenceRelatedFileExtensions);.runtimeconfig.json;.runtimeconfig.dev.json;.deps.json + $(AllowedReferenceRelatedFileExtensions);.runtimeconfig.json;.runtimeconfig.dev.json;.deps.json \ No newline at end of file diff --git a/test/Microsoft.Data.Analysis.Interactive.Tests/DataFrameInteractiveTests.cs b/test/Microsoft.Data.Analysis.Interactive.Tests/DataFrameInteractiveTests.cs new file mode 100644 index 0000000000..033893819b --- /dev/null +++ b/test/Microsoft.Data.Analysis.Interactive.Tests/DataFrameInteractiveTests.cs @@ -0,0 +1,64 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System.Linq; +using Xunit; +using Microsoft.DotNet.Interactive.Formatting; + +namespace Microsoft.Data.Analysis.Interactive.Tests +{ + public class DataFrameInteractiveTests + { + private const string ButtonHtmlPart = "button onclick"; + private const string TableHtmlPart = " x)); + DataFrameColumn dataFrameColumn2 = new Int32DataFrameColumn("Int2", Enumerable.Range(10, length).Select(x => x)); + if (withNulls) + { + dataFrameColumn1[length / 2] = null; + dataFrameColumn2[length / 2] = null; + } + DataFrame dataFrame = new DataFrame(); + dataFrame.Columns.Insert(0, dataFrameColumn1); + dataFrame.Columns.Insert(1, dataFrameColumn2); + return dataFrame; + } + + [Fact] + public void LessThanOnePageDataFrameTest() + { + DataFrame dataFrame = MakeDataFrameWithTwoColumns(length: 5); + DataFrameKernelExtension.RegisterDataFrame(); + var html = dataFrame.ToDisplayString("text/html"); + + Assert.Contains(TableHtmlPart, html); + Assert.DoesNotContain(ButtonHtmlPart, html); + } + + [Fact] + public void MoreThanOnePageDataFrameTest() + { + DataFrame dataFrame = MakeDataFrameWithTwoColumns(length: 26); + DataFrameKernelExtension.RegisterDataFrame(); + var html = dataFrame.ToDisplayString("text/html"); + + Assert.Contains(TableHtmlPart, html); + Assert.Contains(ButtonHtmlPart, html); + } + + [Fact] + public void DataFrameInfoTest() + { + DataFrame dataFrame = MakeDataFrameWithTwoColumns(length: 5); + DataFrameKernelExtension.RegisterDataFrame(); + var html = dataFrame.Info().ToDisplayString("text/html"); + + Assert.Contains(TableHtmlPart, html); + Assert.DoesNotContain(ButtonHtmlPart, html); + } + } +} diff --git a/test/Microsoft.Data.Analysis.Interactive.Tests/Microsoft.Data.Analysis.Interactive.Tests.csproj b/test/Microsoft.Data.Analysis.Interactive.Tests/Microsoft.Data.Analysis.Interactive.Tests.csproj new file mode 100644 index 0000000000..d016c98d58 --- /dev/null +++ b/test/Microsoft.Data.Analysis.Interactive.Tests/Microsoft.Data.Analysis.Interactive.Tests.csproj @@ -0,0 +1,18 @@ + + + netcoreapp3.1 + $(NoWarn);MSML_ExtendBaseTestClass + + + + + + + + + + + + + + diff --git a/test/Microsoft.Data.Analysis.Tests/ArrayComparer.cs b/test/Microsoft.Data.Analysis.Tests/ArrayComparer.cs new file mode 100644 index 0000000000..1a5db939b2 --- /dev/null +++ b/test/Microsoft.Data.Analysis.Tests/ArrayComparer.cs @@ -0,0 +1,200 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System; +using System.Linq; +using Apache.Arrow; +using Xunit; + +namespace Microsoft.Data.Analysis.Tests +{ + public class ArrayComparer : + IArrowArrayVisitor, + IArrowArrayVisitor, + IArrowArrayVisitor, + IArrowArrayVisitor, + IArrowArrayVisitor, + IArrowArrayVisitor, + IArrowArrayVisitor, + IArrowArrayVisitor, + IArrowArrayVisitor, + IArrowArrayVisitor, + IArrowArrayVisitor, + IArrowArrayVisitor, + IArrowArrayVisitor, + IArrowArrayVisitor, + IArrowArrayVisitor, + IArrowArrayVisitor, + IArrowArrayVisitor, + IArrowArrayVisitor + { + private readonly IArrowArray _expectedArray; + + public ArrayComparer(IArrowArray expectedArray) + { + _expectedArray = expectedArray; + } + + public void Visit(Int8Array array) => CompareArrays(array); + public void Visit(Int16Array array) => CompareArrays(array); + public void Visit(Int32Array array) => CompareArrays(array); + public void Visit(Int64Array array) => CompareArrays(array); + public void Visit(UInt8Array array) => CompareArrays(array); + public void Visit(UInt16Array array) => CompareArrays(array); + public void Visit(UInt32Array array) => CompareArrays(array); + public void Visit(UInt64Array array) => CompareArrays(array); + public void Visit(FloatArray array) => CompareArrays(array); + public void Visit(DoubleArray array) => CompareArrays(array); + public void Visit(BooleanArray array) => CompareArrays(array); + public void Visit(TimestampArray array) => CompareArrays(array); + public void Visit(Date32Array array) => CompareArrays(array); + public void Visit(Date64Array array) => CompareArrays(array); + public void Visit(ListArray array) => throw new NotImplementedException(); + public void Visit(StringArray array) => CompareArrays(array); + public void Visit(BinaryArray array) => throw new NotImplementedException(); + public void Visit(IArrowArray array) => throw new NotImplementedException(); + + public void Visit(StructArray array) + { + Assert.IsAssignableFrom(_expectedArray); + StructArray expectedArray = (StructArray)_expectedArray; + + Assert.Equal(expectedArray.Length, array.Length); + Assert.Equal(expectedArray.NullCount, array.NullCount); + Assert.Equal(expectedArray.Offset, array.Offset); + Assert.Equal(expectedArray.Data.Children.Length, array.Data.Children.Length); + Assert.Equal(expectedArray.Fields.Count, array.Fields.Count); + + for (int i = 0; i < array.Fields.Count; i++) + { + array.Fields[i].Accept(new ArrayComparer(expectedArray.Fields[i])); + } + } + + private void CompareArrays(PrimitiveArray actualArray) + where T : struct, IEquatable + { + Assert.IsAssignableFrom>(_expectedArray); + PrimitiveArray expectedArray = (PrimitiveArray)_expectedArray; + + Assert.Equal(expectedArray.Length, actualArray.Length); + Assert.Equal(expectedArray.NullCount, actualArray.NullCount); + Assert.Equal(expectedArray.Offset, actualArray.Offset); + + if (expectedArray.NullCount > 0) + { + Assert.True(expectedArray.NullBitmapBuffer.Span.SequenceEqual(actualArray.NullBitmapBuffer.Span)); + } + else + { + // expectedArray may have passed in a null bitmap. DataFrame might have populated it with Length set bits + Assert.Equal(0, expectedArray.NullCount); + Assert.Equal(0, actualArray.NullCount); + for (int i = 0; i < actualArray.Length; i++) + { + Assert.True(actualArray.IsValid(i)); + } + } + Assert.True(expectedArray.Values.Slice(0, expectedArray.Length).SequenceEqual(actualArray.Values.Slice(0, actualArray.Length))); + } + + private void CompareArrays(BooleanArray actualArray) + { + Assert.IsAssignableFrom(_expectedArray); + BooleanArray expectedArray = (BooleanArray)_expectedArray; + + Assert.Equal(expectedArray.Length, actualArray.Length); + Assert.Equal(expectedArray.NullCount, actualArray.NullCount); + Assert.Equal(expectedArray.Offset, actualArray.Offset); + + Assert.True(expectedArray.NullBitmapBuffer.Span.SequenceEqual(actualArray.NullBitmapBuffer.Span)); + int booleanByteCount = BitUtility.ByteCount(expectedArray.Length); + Assert.True(expectedArray.Values.Slice(0, booleanByteCount).SequenceEqual(actualArray.Values.Slice(0, booleanByteCount))); + } + + private void CompareArrays(StringArray actualArray) + { + Assert.IsAssignableFrom(_expectedArray); + StringArray expectedArray = (StringArray)_expectedArray; + + Assert.Equal(expectedArray.Length, actualArray.Length); + Assert.Equal(expectedArray.NullCount, actualArray.NullCount); + Assert.Equal(expectedArray.Offset, actualArray.Offset); + + Assert.True(expectedArray.NullBitmapBuffer.Span.SequenceEqual(actualArray.NullBitmapBuffer.Span)); + Assert.True(expectedArray.Values.Slice(0, expectedArray.Length).SequenceEqual(actualArray.Values.Slice(0, actualArray.Length))); + } + } + + internal static class FieldComparer + { + public static bool Equals(Field f1, Field f2) + { + if (ReferenceEquals(f1, f2)) + { + return true; + } + if (f2 != null && f1 != null && f1.Name == f2.Name && f1.IsNullable == f2.IsNullable && + f1.DataType.TypeId == f2.DataType.TypeId && f1.HasMetadata == f2.HasMetadata) + { + if (f1.HasMetadata && f2.HasMetadata) + { + return f1.Metadata.Keys.Count() == f2.Metadata.Keys.Count() && + f1.Metadata.Keys.All(k => f2.Metadata.ContainsKey(k) && f1.Metadata[k] == f2.Metadata[k]) && + f2.Metadata.Keys.All(k => f1.Metadata.ContainsKey(k) && f2.Metadata[k] == f1.Metadata[k]); + } + return true; + } + return false; + } + } + + internal static class SchemaComparer + { + public static bool Equals(Schema s1, Schema s2) + { + if (ReferenceEquals(s1, s2)) + { + return true; + } + if (s2 == null || s1 == null || s1.HasMetadata != s2.HasMetadata || s1.Fields.Count != s2.Fields.Count) + { + return false; + } + + if (!s1.Fields.Keys.All(k => s2.Fields.ContainsKey(k) && FieldComparer.Equals(s1.Fields[k], s2.Fields[k])) || + !s2.Fields.Keys.All(k => s1.Fields.ContainsKey(k) && FieldComparer.Equals(s2.Fields[k], s1.Fields[k]))) + { + return false; + } + + if (s1.HasMetadata && s2.HasMetadata) + { + return s1.Metadata.Keys.Count() == s2.Metadata.Keys.Count() && + s1.Metadata.Keys.All(k => s2.Metadata.ContainsKey(k) && s1.Metadata[k] == s2.Metadata[k]) && + s2.Metadata.Keys.All(k => s1.Metadata.ContainsKey(k) && s2.Metadata[k] == s1.Metadata[k]); + } + return true; + } + } + + public static class RecordBatchComparer + { + public static void CompareBatches(RecordBatch expectedBatch, RecordBatch actualBatch) + { + Assert.True(SchemaComparer.Equals(expectedBatch.Schema, actualBatch.Schema)); + Assert.Equal(expectedBatch.Length, actualBatch.Length); + Assert.Equal(expectedBatch.ColumnCount, actualBatch.ColumnCount); + + for (int i = 0; i < expectedBatch.ColumnCount; i++) + { + IArrowArray expectedArray = expectedBatch.Arrays.ElementAt(i); + IArrowArray actualArray = actualBatch.Arrays.ElementAt(i); + + actualArray.Accept(new ArrayComparer(expectedArray)); + } + } + + } +} diff --git a/test/Microsoft.Data.Analysis.Tests/ArrowIntegrationTests.cs b/test/Microsoft.Data.Analysis.Tests/ArrowIntegrationTests.cs new file mode 100644 index 0000000000..dacf43a8db --- /dev/null +++ b/test/Microsoft.Data.Analysis.Tests/ArrowIntegrationTests.cs @@ -0,0 +1,225 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using Apache.Arrow; +using Apache.Arrow.Ipc; +using Apache.Arrow.Types; +using Xunit; + +namespace Microsoft.Data.Analysis.Tests +{ + public class ArrowIntegrationTests + { + [Fact] + public void TestArrowIntegration() + { + RecordBatch originalBatch = new RecordBatch.Builder() + .Append("Column1", false, col => col.Int32(array => array.AppendRange(Enumerable.Range(0, 10)))) + .Append("Column2", true, new Int32Array( + valueBuffer: new ArrowBuffer.Builder().AppendRange(Enumerable.Range(0, 10)).Build(), + nullBitmapBuffer: new ArrowBuffer.Builder().Append(0xfd).Append(0xff).Build(), + length: 10, + nullCount: 1, + offset: 0)) + .Append("Column3", true, new Int32Array( + valueBuffer: new ArrowBuffer.Builder().AppendRange(Enumerable.Range(0, 10)).Build(), + nullBitmapBuffer: new ArrowBuffer.Builder().Append(0x00).Append(0x00).Build(), + length: 10, + nullCount: 10, + offset: 0)) + .Append("NullableBooleanColumn", true, new BooleanArray( + valueBuffer: new ArrowBuffer.Builder().Append(0xfd).Append(0xff).Build(), + nullBitmapBuffer: new ArrowBuffer.Builder().Append(0xed).Append(0xff).Build(), + length: 10, + nullCount: 2, + offset: 0)) + .Append("StringDataFrameColumn", false, new StringArray.Builder().AppendRange(Enumerable.Range(0, 10).Select(x => x.ToString())).Build()) + .Append("DoubleColumn", false, new DoubleArray.Builder().AppendRange(Enumerable.Repeat(1.0, 10)).Build()) + .Append("FloatColumn", false, new FloatArray.Builder().AppendRange(Enumerable.Repeat(1.0f, 10)).Build()) + .Append("ShortColumn", false, new Int16Array.Builder().AppendRange(Enumerable.Repeat((short)1, 10)).Build()) + .Append("LongColumn", false, new Int64Array.Builder().AppendRange(Enumerable.Repeat((long)1, 10)).Build()) + .Append("UIntColumn", false, new UInt32Array.Builder().AppendRange(Enumerable.Repeat((uint)1, 10)).Build()) + .Append("UShortColumn", false, new UInt16Array.Builder().AppendRange(Enumerable.Repeat((ushort)1, 10)).Build()) + .Append("ULongColumn", false, new UInt64Array.Builder().AppendRange(Enumerable.Repeat((ulong)1, 10)).Build()) + .Append("ByteColumn", false, new Int8Array.Builder().AppendRange(Enumerable.Repeat((sbyte)1, 10)).Build()) + .Append("UByteColumn", false, new UInt8Array.Builder().AppendRange(Enumerable.Repeat((byte)1, 10)).Build()) + .Build(); + + DataFrame df = DataFrame.FromArrowRecordBatch(originalBatch); + DataFrameIOTests.VerifyColumnTypes(df, testArrowStringColumn: true); + + IEnumerable recordBatches = df.ToArrowRecordBatches(); + + foreach (RecordBatch batch in recordBatches) + { + RecordBatchComparer.CompareBatches(originalBatch, batch); + } + } + + [Fact] + public void TestRecordBatchWithStructArrays() + { + RecordBatch CreateRecordBatch(string prependColumnNamesWith = "") + { + RecordBatch ret = new RecordBatch.Builder() + .Append(prependColumnNamesWith + "Column1", false, col => col.Int32(array => array.AppendRange(Enumerable.Range(0, 10)))) + .Append(prependColumnNamesWith + "Column2", true, new Int32Array( + valueBuffer: new ArrowBuffer.Builder().AppendRange(Enumerable.Range(0, 10)).Build(), + nullBitmapBuffer: new ArrowBuffer.Builder().Append(0xfd).Append(0xff).Build(), + length: 10, + nullCount: 1, + offset: 0)) + .Append(prependColumnNamesWith + "Column3", true, new Int32Array( + valueBuffer: new ArrowBuffer.Builder().AppendRange(Enumerable.Range(0, 10)).Build(), + nullBitmapBuffer: new ArrowBuffer.Builder().Append(0x00).Append(0x00).Build(), + length: 10, + nullCount: 10, + offset: 0)) + .Append(prependColumnNamesWith + "NullableBooleanColumn", true, new BooleanArray( + valueBuffer: new ArrowBuffer.Builder().Append(0xfd).Append(0xff).Build(), + nullBitmapBuffer: new ArrowBuffer.Builder().Append(0xed).Append(0xff).Build(), + length: 10, + nullCount: 2, + offset: 0)) + .Append(prependColumnNamesWith + "StringDataFrameColumn", false, new StringArray.Builder().AppendRange(Enumerable.Range(0, 10).Select(x => x.ToString())).Build()) + .Append(prependColumnNamesWith + "DoubleColumn", false, new DoubleArray.Builder().AppendRange(Enumerable.Repeat(1.0, 10)).Build()) + .Append(prependColumnNamesWith + "FloatColumn", false, new FloatArray.Builder().AppendRange(Enumerable.Repeat(1.0f, 10)).Build()) + .Append(prependColumnNamesWith + "ShortColumn", false, new Int16Array.Builder().AppendRange(Enumerable.Repeat((short)1, 10)).Build()) + .Append(prependColumnNamesWith + "LongColumn", false, new Int64Array.Builder().AppendRange(Enumerable.Repeat((long)1, 10)).Build()) + .Append(prependColumnNamesWith + "UIntColumn", false, new UInt32Array.Builder().AppendRange(Enumerable.Repeat((uint)1, 10)).Build()) + .Append(prependColumnNamesWith + "UShortColumn", false, new UInt16Array.Builder().AppendRange(Enumerable.Repeat((ushort)1, 10)).Build()) + .Append(prependColumnNamesWith + "ULongColumn", false, new UInt64Array.Builder().AppendRange(Enumerable.Repeat((ulong)1, 10)).Build()) + .Append(prependColumnNamesWith + "ByteColumn", false, new Int8Array.Builder().AppendRange(Enumerable.Repeat((sbyte)1, 10)).Build()) + .Append(prependColumnNamesWith + "UByteColumn", false, new UInt8Array.Builder().AppendRange(Enumerable.Repeat((byte)1, 10)).Build()) + .Build(); + + return ret; + } + + RecordBatch originalBatch = CreateRecordBatch(); + ArrowBuffer.BitmapBuilder validityBitmapBuilder = new ArrowBuffer.BitmapBuilder(); + for (int i = 0; i < originalBatch.Length; i++) + { + validityBitmapBuilder.Append(true); + } + ArrowBuffer validityBitmap = validityBitmapBuilder.Build(); + + StructType structType = new StructType(originalBatch.Schema.Fields.Select((KeyValuePair pair) => pair.Value).ToList()); + StructArray structArray = new StructArray(structType, originalBatch.Length, originalBatch.Arrays.Cast(), validityBitmap); + Schema schema = new Schema.Builder().Field(new Field("Struct", structType, false)).Build(); + RecordBatch recordBatch = new RecordBatch(schema, new[] { structArray }, originalBatch.Length); + + DataFrame df = DataFrame.FromArrowRecordBatch(recordBatch); + DataFrameIOTests.VerifyColumnTypes(df, testArrowStringColumn: true); + + IEnumerable recordBatches = df.ToArrowRecordBatches(); + + RecordBatch expected = CreateRecordBatch("Struct_"); + foreach (RecordBatch batch in recordBatches) + { + RecordBatchComparer.CompareBatches(expected, batch); + } + } + + [Fact] + public void TestEmptyDataFrameRecordBatch() + { + PrimitiveDataFrameColumn ageColumn = new PrimitiveDataFrameColumn("Age"); + PrimitiveDataFrameColumn lengthColumn = new PrimitiveDataFrameColumn("CharCount"); + ArrowStringDataFrameColumn stringColumn = new ArrowStringDataFrameColumn("Empty"); + DataFrame df = new DataFrame(new List() { ageColumn, lengthColumn, stringColumn }); + + IEnumerable recordBatches = df.ToArrowRecordBatches(); + bool foundARecordBatch = false; + foreach (RecordBatch recordBatch in recordBatches) + { + foundARecordBatch = true; + MemoryStream stream = new MemoryStream(); + ArrowStreamWriter writer = new ArrowStreamWriter(stream, recordBatch.Schema); + writer.WriteRecordBatchAsync(recordBatch).GetAwaiter().GetResult(); + + stream.Position = 0; + ArrowStreamReader reader = new ArrowStreamReader(stream); + RecordBatch readRecordBatch = reader.ReadNextRecordBatch(); + while (readRecordBatch != null) + { + RecordBatchComparer.CompareBatches(recordBatch, readRecordBatch); + readRecordBatch = reader.ReadNextRecordBatch(); + } + } + Assert.True(foundARecordBatch); + } + + [Fact] + public void TestMutationOnArrowColumn() + { + RecordBatch originalBatch = new RecordBatch.Builder() + .Append("Column1", false, col => col.Int32(array => array.AppendRange(Enumerable.Range(0, 10)))).Build(); + DataFrame df = DataFrame.FromArrowRecordBatch(originalBatch); + Assert.Equal(1, df.Columns["Column1"][1]); + df.Columns["Column1"][1] = 100; + Assert.Equal(100, df.Columns["Column1"][1]); + Assert.Equal(0, df.Columns["Column1"].NullCount); + } + + [Fact] + public void TestEmptyArrowColumns() + { + // Tests to ensure that we don't crash and the internal NullCounts stay consistent on encountering: + // 1. Data + Empty null bitmaps + // 2. Empty Data + Null bitmaps + // 3. Empty Data + Empty null bitmaps + RecordBatch originalBatch = new RecordBatch.Builder() + .Append("EmptyNullBitMapColumn", false, col => col.Int32(array => array.AppendRange(Enumerable.Range(0, 10)))) + .Append("EmptyDataColumn", true, new Int32Array( + valueBuffer: ArrowBuffer.Empty, + nullBitmapBuffer: new ArrowBuffer.Builder().Append(0x00).Append(0x00).Build(), + length: 10, + nullCount: 10, + offset: 0)).Build(); + DataFrame df = DataFrame.FromArrowRecordBatch(originalBatch); + Assert.Equal(0, df.Columns["EmptyNullBitMapColumn"].NullCount); + Assert.Equal(10, df.Columns["EmptyNullBitMapColumn"].Length); + df.Columns["EmptyNullBitMapColumn"][9] = null; + Assert.Equal(1, df.Columns["EmptyNullBitMapColumn"].NullCount); + Assert.Equal(10, df.Columns["EmptyDataColumn"].NullCount); + Assert.Equal(10, df.Columns["EmptyDataColumn"].Length); + df.Columns["EmptyDataColumn"][9] = 9; + Assert.Equal(9, df.Columns["EmptyDataColumn"].NullCount); + Assert.Equal(10, df.Columns["EmptyDataColumn"].Length); + for (int i = 0; i < 9; i++) + { + Assert.Equal(i, (int)df.Columns["EmptyNullBitMapColumn"][i]); + Assert.Null(df.Columns["EmptyDataColumn"][i]); + } + + RecordBatch batch1 = new RecordBatch.Builder() + .Append("EmptyDataAndNullColumns", false, col => col.Int32(array => array.Clear())).Build(); + DataFrame emptyDataFrame = DataFrame.FromArrowRecordBatch(batch1); + Assert.Equal(0, emptyDataFrame.Rows.Count); + Assert.Equal(0, emptyDataFrame.Columns["EmptyDataAndNullColumns"].Length); + Assert.Equal(0, emptyDataFrame.Columns["EmptyDataAndNullColumns"].NullCount); + } + + [Fact] + public void TestInconsistentNullBitMapLength() + { + // Arrow allocates buffers of length 64 by default. 64 * 8 = 512 bits in the NullBitMapBuffer. Anything lesser than 512 will not trigger a throw + Int32Array int32 = new Int32Array.Builder().AppendRange(Enumerable.Range(0, 520)).Build(); + RecordBatch originalBatch = new RecordBatch.Builder() + .Append("EmptyDataColumn", true, new Int32Array( + valueBuffer: int32.ValueBuffer, + nullBitmapBuffer: new ArrowBuffer.Builder().Append(0x00).Build(), + length: 520, + nullCount: 520, + offset: 0)).Build(); + + Assert.ThrowsAny(() => DataFrame.FromArrowRecordBatch(originalBatch)); + } + } +} diff --git a/test/Microsoft.Data.Analysis.Tests/BufferTests.cs b/test/Microsoft.Data.Analysis.Tests/BufferTests.cs new file mode 100644 index 0000000000..96f568b6a4 --- /dev/null +++ b/test/Microsoft.Data.Analysis.Tests/BufferTests.cs @@ -0,0 +1,281 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using Apache.Arrow; +using Xunit; + +namespace Microsoft.Data.Analysis.Tests +{ + public class BufferTests + { + [Fact] + public void TestNullCounts() + { + PrimitiveDataFrameColumn dataFrameColumn1 = new PrimitiveDataFrameColumn("Int1", Enumerable.Range(0, 10).Select(x => x)); + dataFrameColumn1.Append(null); + Assert.Equal(1, dataFrameColumn1.NullCount); + + PrimitiveDataFrameColumn column2 = new PrimitiveDataFrameColumn("Int2"); + Assert.Equal(0, column2.NullCount); + + PrimitiveDataFrameColumn column3 = new PrimitiveDataFrameColumn("Int3", 10); + Assert.Equal(10, column3.NullCount); + + // Test null counts with assignments on Primitive Columns + column2.Append(null); + column2.Append(1); + Assert.Equal(1, column2.NullCount); + column2[1] = 10; + Assert.Equal(1, column2.NullCount); + column2[1] = null; + Assert.Equal(2, column2.NullCount); + column2[1] = 5; + Assert.Equal(1, column2.NullCount); + column2[0] = null; + Assert.Equal(1, column2.NullCount); + + // Test null counts with assignments on String Columns + StringDataFrameColumn strCol = new StringDataFrameColumn("String", 0); + Assert.Equal(0, strCol.NullCount); + + StringDataFrameColumn strCol1 = new StringDataFrameColumn("String1", 5); + Assert.Equal(0, strCol1.NullCount); + + StringDataFrameColumn strCol2 = new StringDataFrameColumn("String", Enumerable.Range(0, 10).Select(x => x.ToString())); + Assert.Equal(0, strCol2.NullCount); + + StringDataFrameColumn strCol3 = new StringDataFrameColumn("String", Enumerable.Range(0, 10).Select(x => (string)null)); + Assert.Equal(10, strCol3.NullCount); + + strCol.Append(null); + Assert.Equal(1, strCol.NullCount); + strCol.Append("foo"); + Assert.Equal(1, strCol.NullCount); + strCol[1] = "bar"; + Assert.Equal(1, strCol.NullCount); + strCol[1] = null; + Assert.Equal(2, strCol.NullCount); + strCol[1] = "foo"; + Assert.Equal(1, strCol.NullCount); + strCol[0] = null; + Assert.Equal(1, strCol.NullCount); + + PrimitiveDataFrameColumn intColumn = new PrimitiveDataFrameColumn("Int"); + intColumn.Append(0); + intColumn.Append(1); + intColumn.Append(null); + intColumn.Append(2); + intColumn.Append(null); + intColumn.Append(3); + Assert.Equal(0, intColumn[0]); + Assert.Equal(1, intColumn[1]); + Assert.Null(intColumn[2]); + Assert.Equal(2, intColumn[3]); + Assert.Null(intColumn[4]); + Assert.Equal(3, intColumn[5]); + + } + + [Fact] + public void TestNullCountWithIndexers() + { + PrimitiveDataFrameColumn intColumn = new PrimitiveDataFrameColumn("Int", 5); + Assert.Equal(5, intColumn.NullCount); + intColumn[2] = null; + Assert.Equal(5, intColumn.NullCount); + intColumn[2] = 5; + Assert.Equal(4, intColumn.NullCount); + } + + [Fact] + public void TestValidity() + { + PrimitiveDataFrameColumn dataFrameColumn1 = new PrimitiveDataFrameColumn("Int1", Enumerable.Range(0, 10).Select(x => x)); + dataFrameColumn1.Append(null); + Assert.False(dataFrameColumn1.IsValid(10)); + for (long i = 0; i < dataFrameColumn1.Length - 1; i++) + { + Assert.True(dataFrameColumn1.IsValid(i)); + } + } + + [Fact] + public void TestAppendMany() + { + PrimitiveDataFrameColumn intColumn = new PrimitiveDataFrameColumn("Int1"); + intColumn.AppendMany(null, 5); + Assert.Equal(5, intColumn.NullCount); + Assert.Equal(5, intColumn.Length); + for (int i = 0; i < intColumn.Length; i++) + { + Assert.False(intColumn.IsValid(i)); + } + + intColumn.AppendMany(5, 5); + Assert.Equal(5, intColumn.NullCount); + Assert.Equal(10, intColumn.Length); + for (int i = 5; i < intColumn.Length; i++) + { + Assert.True(intColumn.IsValid(i)); + } + + intColumn[2] = 10; + Assert.Equal(4, intColumn.NullCount); + Assert.True(intColumn.IsValid(2)); + + intColumn[7] = null; + Assert.Equal(5, intColumn.NullCount); + Assert.False(intColumn.IsValid(7)); + } + + [Fact] + public void TestBasicArrowStringColumn() + { + StringArray strArray = new StringArray.Builder().Append("foo").Append("bar").Build(); + Memory dataMemory = new byte[] { 102, 111, 111, 98, 97, 114 }; + Memory nullMemory = new byte[] { 0, 0, 0, 0 }; + Memory offsetMemory = new byte[] { 0, 0, 0, 0, 3, 0, 0, 0, 6, 0, 0, 0 }; + + ArrowStringDataFrameColumn stringColumn = new ArrowStringDataFrameColumn("String", dataMemory, offsetMemory, nullMemory, strArray.Length, strArray.NullCount); + Assert.Equal(2, stringColumn.Length); + Assert.Equal("foo", stringColumn[0]); + Assert.Equal("bar", stringColumn[1]); + } + + [Fact] + public void TestArrowStringColumnWithNulls() + { + string data = "joemark"; + byte[] bytes = Encoding.UTF8.GetBytes(data); + Memory dataMemory = new Memory(bytes); + Memory nullMemory = new byte[] { 0b1101 }; + Memory offsetMemory = new byte[] { 0, 0, 0, 0, 3, 0, 0, 0, 3, 0, 0, 0, 7, 0, 0, 0, 7, 0, 0, 0 }; + ArrowStringDataFrameColumn stringColumn = new ArrowStringDataFrameColumn("String", dataMemory, offsetMemory, nullMemory, 4, 1); + + Assert.Equal(4, stringColumn.Length); + Assert.Equal("joe", stringColumn[0]); + Assert.Null(stringColumn[1]); + Assert.Equal("mark", stringColumn[2]); + Assert.Equal("", stringColumn[3]); + + List ret = stringColumn[0, 4]; + Assert.Equal("joe", ret[0]); + Assert.Null(ret[1]); + Assert.Equal("mark", ret[2]); + Assert.Equal("", ret[3]); + } + + [Fact] + public void TestArrowStringColumnClone() + { + StringArray strArray = new StringArray.Builder().Append("foo").Append("bar").Build(); + Memory dataMemory = new byte[] { 102, 111, 111, 98, 97, 114 }; + Memory nullMemory = new byte[] { 0, 0, 0, 0 }; + Memory offsetMemory = new byte[] { 0, 0, 0, 0, 3, 0, 0, 0, 6, 0, 0, 0 }; + + ArrowStringDataFrameColumn stringColumn = new ArrowStringDataFrameColumn("String", dataMemory, offsetMemory, nullMemory, strArray.Length, strArray.NullCount); + + DataFrameColumn clone = stringColumn.Clone(numberOfNullsToAppend: 5); + Assert.Equal(7, clone.Length); + Assert.Equal(stringColumn[0], clone[0]); + Assert.Equal(stringColumn[1], clone[1]); + for (int i = 2; i < 7; i++) + Assert.Null(clone[i]); + } + +//#if !NETFRAMEWORK // https://github.com/dotnet/corefxlab/issues/2796 +// [Fact] +// public void TestPrimitiveColumnGetReadOnlyBuffers() +// { +// RecordBatch recordBatch = new RecordBatch.Builder() +// .Append("Column1", false, col => col.Int32(array => array.AppendRange(Enumerable.Range(0, 10)))).Build(); +// DataFrame df = DataFrame.FromArrowRecordBatch(recordBatch); + +// PrimitiveDataFrameColumn column = df.Columns["Column1"] as PrimitiveDataFrameColumn; + +// IEnumerable> buffers = column.GetReadOnlyDataBuffers(); +// IEnumerable> nullBitMaps = column.GetReadOnlyNullBitMapBuffers(); + +// long i = 0; +// IEnumerator> bufferEnumerator = buffers.GetEnumerator(); +// IEnumerator> nullBitMapsEnumerator = nullBitMaps.GetEnumerator(); +// while (bufferEnumerator.MoveNext() && nullBitMapsEnumerator.MoveNext()) +// { +// ReadOnlyMemory dataBuffer = bufferEnumerator.Current; +// ReadOnlyMemory nullBitMap = nullBitMapsEnumerator.Current; + +// ReadOnlySpan span = dataBuffer.Span; +// for (int j = 0; j < span.Length; j++) +// { +// // Each buffer has a max length of int.MaxValue +// Assert.Equal(span[j], column[j + i * int.MaxValue]); +// } + +// bool GetBit(byte curBitMap, int index) +// { +// return ((curBitMap >> (index & 7)) & 1) != 0; +// } +// ReadOnlySpan bitMapSpan = nullBitMap.Span; +// // No nulls in this column, so each bit must be set +// for (int j = 0; j < bitMapSpan.Length; j++) +// { +// for (int k = 0; k < 8; k++) +// { +// if (j * 8 + k == column.Length) +// break; +// Assert.True(GetBit(bitMapSpan[j], k)); +// } +// } +// i++; +// } +// } + +// [Fact] +// public void TestArrowStringColumnGetReadOnlyBuffers() +// { +// // Test ArrowStringDataFrameColumn. +// StringArray strArray = new StringArray.Builder().Append("foo").Append("bar").Build(); +// Memory dataMemory = new byte[] { 102, 111, 111, 98, 97, 114 }; +// Memory nullMemory = new byte[] { 1 }; +// Memory offsetMemory = new byte[] { 0, 0, 0, 0, 3, 0, 0, 0, 6, 0, 0, 0 }; + +// ArrowStringDataFrameColumn column = new ArrowStringDataFrameColumn("String", dataMemory, offsetMemory, nullMemory, strArray.Length, strArray.NullCount); + +// IEnumerable> dataBuffers = column.GetReadOnlyDataBuffers(); +// IEnumerable> nullBitMaps = column.GetReadOnlyNullBitMapBuffers(); +// IEnumerable> offsetsBuffers = column.GetReadOnlyOffsetsBuffers(); + +// using (IEnumerator> bufferEnumerator = dataBuffers.GetEnumerator()) +// using (IEnumerator> offsetsEnumerator = offsetsBuffers.GetEnumerator()) +// using (IEnumerator> nullBitMapsEnumerator = nullBitMaps.GetEnumerator()) +// { +// while (bufferEnumerator.MoveNext() && nullBitMapsEnumerator.MoveNext() && offsetsEnumerator.MoveNext()) +// { +// ReadOnlyMemory dataBuffer = bufferEnumerator.Current; +// ReadOnlyMemory nullBitMap = nullBitMapsEnumerator.Current; +// ReadOnlyMemory offsets = offsetsEnumerator.Current; + +// ReadOnlySpan dataSpan = dataBuffer.Span; +// ReadOnlySpan offsetsSpan = offsets.Span; +// int dataStart = 0; +// for (int j = 1; j < offsetsSpan.Length; j++) +// { +// int length = offsetsSpan[j] - offsetsSpan[j - 1]; +// ReadOnlySpan str = dataSpan.Slice(dataStart, length); +// ReadOnlySpan columnStr = dataMemory.Span.Slice(dataStart, length); +// Assert.Equal(str.Length, columnStr.Length); +// for (int s = 0; s < str.Length; s++) +// Assert.Equal(str[s], columnStr[s]); +// dataStart = length; +// } +// } +// } +// } +//#endif //!NETFRAMEWORK + } +} diff --git a/test/Microsoft.Data.Analysis.Tests/DataFrame.IOTests.cs b/test/Microsoft.Data.Analysis.Tests/DataFrame.IOTests.cs new file mode 100644 index 0000000000..93bf2dad54 --- /dev/null +++ b/test/Microsoft.Data.Analysis.Tests/DataFrame.IOTests.cs @@ -0,0 +1,898 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System; +using System.Globalization; +using System.IO; +using System.Linq; +using System.Text; +using Xunit; + +namespace Microsoft.Data.Analysis.Tests +{ + public class DataFrameIOTests + { + internal static void VerifyColumnTypes(DataFrame df, bool testArrowStringColumn = false) + { + foreach (DataFrameColumn column in df.Columns) + { + Type dataType = column.DataType; + if (dataType == typeof(bool)) + { + Assert.IsType(column); + + } + else if (dataType == typeof(decimal)) + { + Assert.IsType(column); + + } + else if (dataType == typeof(byte)) + { + Assert.IsType(column); + + } + else if (dataType == typeof(char)) + { + Assert.IsType(column); + + } + else if (dataType == typeof(double)) + { + Assert.IsType(column); + + } + else if (dataType == typeof(float)) + { + Assert.IsType(column); + + } + else if (dataType == typeof(int)) + { + Assert.IsType(column); + + } + else if (dataType == typeof(long)) + { + + Assert.IsType(column); + } + else if (dataType == typeof(sbyte)) + { + Assert.IsType(column); + + } + else if (dataType == typeof(short)) + { + Assert.IsType(column); + + } + else if (dataType == typeof(uint)) + { + Assert.IsType(column); + + } + else if (dataType == typeof(ulong)) + { + + Assert.IsType(column); + } + else if (dataType == typeof(ushort)) + { + Assert.IsType(column); + + } + else if (dataType == typeof(string)) + { + if (!testArrowStringColumn) + { + Assert.IsType(column); + } + else + { + Assert.IsType(column); + } + } + else + { + throw new NotImplementedException("Unit test has to be updated"); + } + } + } + + private static Stream GetStream(string streamData) + { + return new MemoryStream(Encoding.Default.GetBytes(streamData)); + } + + [Theory] + [InlineData(false)] + [InlineData(true)] + public void TestReadCsvWithHeader(bool useQuotes) + { + string CMT = useQuotes ? @"""C,MT""" : "CMT"; + string verifyCMT = useQuotes ? "C,MT" : "CMT"; + string data = @$"vendor_id,rate_code,passenger_count,trip_time_in_secs,trip_distance,payment_type,fare_amount +{CMT},1,1,1271,3.8,CRD,17.5 +{CMT},1,1,474,1.5,CRD,8 +{CMT},1,1,637,1.4,CRD,8.5 +{CMT},1,1,181,0.6,CSH,4.5"; + + void RegularTest(DataFrame df) + { + Assert.Equal(4, df.Rows.Count); + Assert.Equal(7, df.Columns.Count); + Assert.Equal(verifyCMT, df.Columns["vendor_id"][3]); + VerifyColumnTypes(df); + } + DataFrame df = DataFrame.LoadCsv(GetStream(data)); + RegularTest(df); + DataFrame csvDf = DataFrame.LoadCsvFromString(data); + RegularTest(csvDf); + + void ReducedRowsTest(DataFrame reducedRows) + { + Assert.Equal(3, reducedRows.Rows.Count); + Assert.Equal(7, reducedRows.Columns.Count); + Assert.Equal(verifyCMT, reducedRows.Columns["vendor_id"][2]); + VerifyColumnTypes(df); + } + DataFrame reducedRows = DataFrame.LoadCsv(GetStream(data), numberOfRowsToRead: 3); + ReducedRowsTest(reducedRows); + csvDf = DataFrame.LoadCsvFromString(data, numberOfRowsToRead: 3); + ReducedRowsTest(csvDf); + } + + [Fact] + public void TestReadCsvSplitAcrossMultipleLines() + { + string CMT = @"""C +MT"""; + string verifyCMT = @"C +MT"; + string data = @$"{CMT},1,1,1271,3.8,CRD,17.5 +{CMT},1,1,474,1.5,CRD,8 +{CMT},1,1,637,1.4,CRD,8.5 +{CMT},1,1,181,0.6,CSH,4.5"; + + void RegularTest(DataFrame df) + { + Assert.Equal(4, df.Rows.Count); + Assert.Equal(7, df.Columns.Count); + Assert.Equal(verifyCMT, df.Columns["Column0"][3]); + VerifyColumnTypes(df); + } + + DataFrame df = DataFrame.LoadCsv(GetStream(data), header: false); + RegularTest(df); + DataFrame csvDf = DataFrame.LoadCsvFromString(data, header: false); + RegularTest(csvDf); + + void ReducedRowsTest(DataFrame reducedRows) + { + Assert.Equal(3, reducedRows.Rows.Count); + Assert.Equal(7, reducedRows.Columns.Count); + Assert.Equal(verifyCMT, reducedRows.Columns["Column0"][2]); + VerifyColumnTypes(df); + } + + DataFrame reducedRows = DataFrame.LoadCsv(GetStream(data), header: false, numberOfRowsToRead: 3); + ReducedRowsTest(reducedRows); + csvDf = DataFrame.LoadCsvFromString(data, header: false, numberOfRowsToRead: 3); + ReducedRowsTest(csvDf); + } + + [Theory] + [InlineData(false)] + [InlineData(true)] + public void TestReadCsvNoHeader(bool useQuotes) + { + string CMT = useQuotes ? @"""C,MT""" : "CMT"; + string verifyCMT = useQuotes ? "C,MT" : "CMT"; + string data = @$"{CMT},1,1,1271,3.8,CRD,17.5 +{CMT},1,1,474,1.5,CRD,8 +{CMT},1,1,637,1.4,CRD,8.5 +{CMT},1,1,181,0.6,CSH,4.5"; + + void RegularTest(DataFrame df) + { + Assert.Equal(4, df.Rows.Count); + Assert.Equal(7, df.Columns.Count); + Assert.Equal(verifyCMT, df.Columns["Column0"][3]); + VerifyColumnTypes(df); + } + + DataFrame df = DataFrame.LoadCsv(GetStream(data), header: false); + RegularTest(df); + DataFrame csvDf = DataFrame.LoadCsvFromString(data, header: false); + RegularTest(csvDf); + + void ReducedRowsTest(DataFrame reducedRows) + { + Assert.Equal(3, reducedRows.Rows.Count); + Assert.Equal(7, reducedRows.Columns.Count); + Assert.Equal(verifyCMT, reducedRows.Columns["Column0"][2]); + VerifyColumnTypes(df); + } + + DataFrame reducedRows = DataFrame.LoadCsv(GetStream(data), header: false, numberOfRowsToRead: 3); + ReducedRowsTest(reducedRows); + csvDf = DataFrame.LoadCsvFromString(data, header: false, numberOfRowsToRead: 3); + ReducedRowsTest(csvDf); + } + + void VerifyDataFrameWithNamedColumnsAndDataTypes(DataFrame df, bool verifyColumnDataType, bool verifyNames) + { + Assert.Equal(4, df.Rows.Count); + Assert.Equal(7, df.Columns.Count); + + if (verifyColumnDataType) + { + Assert.True(typeof(string) == df.Columns[0].DataType); + Assert.True(typeof(short) == df.Columns[1].DataType); + Assert.True(typeof(int) == df.Columns[2].DataType); + Assert.True(typeof(long) == df.Columns[3].DataType); + Assert.True(typeof(float) == df.Columns[4].DataType); + Assert.True(typeof(string) == df.Columns[5].DataType); + Assert.True(typeof(double) == df.Columns[6].DataType); + } + + if (verifyNames) + { + Assert.Equal("vendor_id", df.Columns[0].Name); + Assert.Equal("rate_code", df.Columns[1].Name); + Assert.Equal("passenger_count", df.Columns[2].Name); + Assert.Equal("trip_time_in_secs", df.Columns[3].Name); + Assert.Equal("trip_distance", df.Columns[4].Name); + Assert.Equal("payment_type", df.Columns[5].Name); + Assert.Equal("fare_amount", df.Columns[6].Name); + } + + VerifyColumnTypes(df); + + foreach (var column in df.Columns) + { + Assert.Equal(0, column.NullCount); + } + } + + [Theory] + [InlineData(true, 0)] + [InlineData(false, 0)] + [InlineData(true, 10)] + [InlineData(false, 10)] + public void TestReadCsvWithTypesAndGuessRows(bool header, int guessRows) + { + /* Tests this matrix + * + header GuessRows DataTypes + True 0 NotNull + False 0 NotNull + True 10 NotNull + False 10 NotNull + True 0 Null -----> Throws an exception + False 0 Null -----> Throws an exception + True 10 Null + False 10 Null + * + */ + string headerLine = @"vendor_id,rate_code,passenger_count,trip_time_in_secs,trip_distance,payment_type,fare_amount +"; + string dataLines = +@"CMT,1,1,1271,3.8,CRD,17.5 +CMT,1,1,474,1.5,CRD,8 +CMT,1,1,637,1.4,CRD,8.5 +CMT,1,1,181,0.6,CSH,4.5"; + + + string data = header ? headerLine + dataLines : dataLines; + DataFrame df = DataFrame.LoadCsv(GetStream(data), + header: header, + guessRows: guessRows, + dataTypes: new Type[] { typeof(string), typeof(short), typeof(int), typeof(long), typeof(float), typeof(string), typeof(double) } + ); + VerifyDataFrameWithNamedColumnsAndDataTypes(df, verifyColumnDataType: true, verifyNames: header); + DataFrame csvDf = DataFrame.LoadCsvFromString(data, + header: header, + guessRows: guessRows, + dataTypes: new Type[] { typeof(string), typeof(short), typeof(int), typeof(long), typeof(float), typeof(string), typeof(double) } + ); + VerifyDataFrameWithNamedColumnsAndDataTypes(csvDf, verifyColumnDataType: true, verifyNames: header); + + if (guessRows == 10) + { + df = DataFrame.LoadCsv(GetStream(data), + header: header, + guessRows: guessRows + ); + VerifyDataFrameWithNamedColumnsAndDataTypes(df, verifyColumnDataType: false, verifyNames: header); + csvDf = DataFrame.LoadCsvFromString(data, + header: header, + guessRows: guessRows); + VerifyDataFrameWithNamedColumnsAndDataTypes(csvDf, verifyColumnDataType: false, verifyNames: header); + } + else + { + Assert.ThrowsAny(() => DataFrame.LoadCsv(GetStream(data), + header: header, + guessRows: guessRows + )); + Assert.ThrowsAny(() => DataFrame.LoadCsvFromString(data, + header: header, + guessRows: guessRows + )); + } + } + + [Fact] + public void TestReadCsvWithTypes() + { + string data = @"vendor_id,rate_code,passenger_count,trip_time_in_secs,trip_distance,payment_type,fare_amount +CMT,1,1,1271,3.8,CRD,17.5 +CMT,1,1,474,1.5,CRD,8 +CMT,1,1,637,1.4,CRD,8.5 +,,,,,, +CMT,1,1,181,0.6,CSH,4.5"; + + void Verify(DataFrame df) + { + Assert.Equal(5, df.Rows.Count); + Assert.Equal(7, df.Columns.Count); + + Assert.True(typeof(string) == df.Columns[0].DataType); + Assert.True(typeof(short) == df.Columns[1].DataType); + Assert.True(typeof(int) == df.Columns[2].DataType); + Assert.True(typeof(long) == df.Columns[3].DataType); + Assert.True(typeof(float) == df.Columns[4].DataType); + Assert.True(typeof(string) == df.Columns[5].DataType); + Assert.True(typeof(double) == df.Columns[6].DataType); + + Assert.Equal("vendor_id", df.Columns[0].Name); + Assert.Equal("rate_code", df.Columns[1].Name); + Assert.Equal("passenger_count", df.Columns[2].Name); + Assert.Equal("trip_time_in_secs", df.Columns[3].Name); + Assert.Equal("trip_distance", df.Columns[4].Name); + Assert.Equal("payment_type", df.Columns[5].Name); + Assert.Equal("fare_amount", df.Columns[6].Name); + VerifyColumnTypes(df); + + foreach (var column in df.Columns) + { + if (column.DataType != typeof(string)) + { + Assert.Equal(1, column.NullCount); + } + else + { + Assert.Equal(0, column.NullCount); + } + } + var nullRow = df.Rows[3]; + Assert.Equal("", nullRow[0]); + Assert.Null(nullRow[1]); + Assert.Null(nullRow[2]); + Assert.Null(nullRow[3]); + Assert.Null(nullRow[4]); + Assert.Equal("", nullRow[5]); + Assert.Null(nullRow[6]); + } + + DataFrame df = DataFrame.LoadCsv(GetStream(data), dataTypes: new Type[] { typeof(string), typeof(short), typeof(int), typeof(long), typeof(float), typeof(string), typeof(double) }); + Verify(df); + df = DataFrame.LoadCsvFromString(data, dataTypes: new Type[] { typeof(string), typeof(short), typeof(int), typeof(long), typeof(float), typeof(string), typeof(double) }); + Verify(df); + } + + [Fact] + public void TestReadCsvWithPipeSeparator() + { + string data = @"vendor_id|rate_code|passenger_count|trip_time_in_secs|trip_distance|payment_type|fare_amount +CMT|1|1|1271|3.8|CRD|17.5 +CMT|1|1|474|1.5|CRD|8 +CMT|1|1|637|1.4|CRD|8.5 +|||||| +CMT|1|1|181|0.6|CSH|4.5"; + + void Verify(DataFrame df) + { + Assert.Equal(5, df.Rows.Count); + Assert.Equal(7, df.Columns.Count); + Assert.Equal("CMT", df.Columns["vendor_id"][4]); + VerifyColumnTypes(df); + + DataFrame reducedRows = DataFrame.LoadCsv(GetStream(data), separator: '|', numberOfRowsToRead: 3); + Assert.Equal(3, reducedRows.Rows.Count); + Assert.Equal(7, reducedRows.Columns.Count); + Assert.Equal("CMT", reducedRows.Columns["vendor_id"][2]); + VerifyColumnTypes(df); + + var nullRow = df.Rows[3]; + Assert.Equal("", nullRow[0]); + Assert.Null(nullRow[1]); + Assert.Null(nullRow[2]); + Assert.Null(nullRow[3]); + Assert.Null(nullRow[4]); + Assert.Equal("", nullRow[5]); + Assert.Null(nullRow[6]); + } + + DataFrame df = DataFrame.LoadCsv(GetStream(data), separator: '|'); + Verify(df); + df = DataFrame.LoadCsvFromString(data, separator: '|'); + Verify(df); + } + + [Fact] + public void TestReadCsvWithSemicolonSeparator() + { + string data = @"vendor_id;rate_code;passenger_count;trip_time_in_secs;trip_distance;payment_type;fare_amount +CMT;1;1;1271;3.8;CRD;17.5 +CMT;1;1;474;1.5;CRD;8 +CMT;1;1;637;1.4;CRD;8.5 +;;;;;; +CMT;1;1;181;0.6;CSH;4.5"; + + void Verify(DataFrame df) + { + Assert.Equal(5, df.Rows.Count); + Assert.Equal(7, df.Columns.Count); + Assert.Equal("CMT", df.Columns["vendor_id"][4]); + VerifyColumnTypes(df); + + DataFrame reducedRows = DataFrame.LoadCsv(GetStream(data), separator: ';', numberOfRowsToRead: 3); + Assert.Equal(3, reducedRows.Rows.Count); + Assert.Equal(7, reducedRows.Columns.Count); + Assert.Equal("CMT", reducedRows.Columns["vendor_id"][2]); + VerifyColumnTypes(df); + + var nullRow = df.Rows[3]; + Assert.Equal("", nullRow[0]); + Assert.Null(nullRow[1]); + Assert.Null(nullRow[2]); + Assert.Null(nullRow[3]); + Assert.Null(nullRow[4]); + Assert.Equal("", nullRow[5]); + Assert.Null(nullRow[6]); + } + + DataFrame df = DataFrame.LoadCsv(GetStream(data), separator: ';'); + Verify(df); + df = DataFrame.LoadCsvFromString(data, separator: ';'); + Verify(df); + } + + [Fact] + public void TestReadCsvWithExtraColumnInHeader() + { + string data = @"vendor_id,rate_code,passenger_count,trip_time_in_secs,trip_distance,payment_type,fare_amount,extra +CMT,1,1,1271,3.8,CRD,17.5 +CMT,1,1,474,1.5,CRD,8 +CMT,1,1,637,1.4,CRD,8.5 +CMT,1,1,181,0.6,CSH,4.5"; + + void Verify(DataFrame df) + { + Assert.Equal(4, df.Rows.Count); + Assert.Equal(7, df.Columns.Count); + Assert.Equal("CMT", df.Columns["vendor_id"][3]); + VerifyColumnTypes(df); + + DataFrame reducedRows = DataFrame.LoadCsv(GetStream(data), numberOfRowsToRead: 3); + Assert.Equal(3, reducedRows.Rows.Count); + Assert.Equal(7, reducedRows.Columns.Count); + Assert.Equal("CMT", reducedRows.Columns["vendor_id"][2]); + VerifyColumnTypes(df); + } + + DataFrame df = DataFrame.LoadCsv(GetStream(data)); + Verify(df); + df = DataFrame.LoadCsvFromString(data); + Verify(df); + } + + [Fact] + public void TestReadCsvWithExtraColumnInRow() + { + string data = @"vendor_id,rate_code,passenger_count,trip_time_in_secs,trip_distance,payment_type,fare_amount +CMT,1,1,1271,3.8,CRD,17.5,0 +CMT,1,1,474,1.5,CRD,8,0 +CMT,1,1,637,1.4,CRD,8.5,0 +CMT,1,1,181,0.6,CSH,4.5,0"; + + Assert.Throws(() => DataFrame.LoadCsv(GetStream(data))); + Assert.Throws(() => DataFrame.LoadCsvFromString(data)); + } + + [Fact] + public void TestReadCsvWithLessColumnsInRow() + { + string data = @"vendor_id,rate_code,passenger_count,trip_time_in_secs,trip_distance,payment_type,fare_amount +CMT,1,1,1271,3.8,CRD +CMT,1,1,474,1.5,CRD +CMT,1,1,637,1.4,CRD +CMT,1,1,181,0.6,CSH"; + + void Verify(DataFrame df) + { + Assert.Equal(4, df.Rows.Count); + Assert.Equal(6, df.Columns.Count); + Assert.Equal("CMT", df.Columns["vendor_id"][3]); + VerifyColumnTypes(df); + + DataFrame reducedRows = DataFrame.LoadCsv(GetStream(data), numberOfRowsToRead: 3); + Assert.Equal(3, reducedRows.Rows.Count); + Assert.Equal(6, reducedRows.Columns.Count); + Assert.Equal("CMT", reducedRows.Columns["vendor_id"][2]); + VerifyColumnTypes(df); + } + + DataFrame df = DataFrame.LoadCsv(GetStream(data)); + Verify(df); + df = DataFrame.LoadCsvFromString(data); + Verify(df); + } + + [Fact] + public void TestReadCsvWithAllNulls() + { + string data = @"vendor_id,rate_code,passenger_count,trip_time_in_secs +null,null,null,null +Null,Null,Null,Null +null,null,null,null +Null,Null,Null,Null +null,null,null,null +null,null,null,null"; + + void Verify(DataFrame df) + { + Assert.Equal(6, df.Rows.Count); + Assert.Equal(4, df.Columns.Count); + + Assert.True(typeof(string) == df.Columns[0].DataType); + Assert.True(typeof(string) == df.Columns[1].DataType); + Assert.True(typeof(string) == df.Columns[2].DataType); + Assert.True(typeof(string) == df.Columns[3].DataType); + + Assert.Equal("vendor_id", df.Columns[0].Name); + Assert.Equal("rate_code", df.Columns[1].Name); + Assert.Equal("passenger_count", df.Columns[2].Name); + Assert.Equal("trip_time_in_secs", df.Columns[3].Name); + VerifyColumnTypes(df); + + foreach (var column in df.Columns) + { + Assert.Equal(6, column.NullCount); + foreach (var value in column) + { + Assert.Null(value); + } + } + } + + DataFrame df = DataFrame.LoadCsv(GetStream(data)); + Verify(df); + df = DataFrame.LoadCsvFromString(data); + Verify(df); + } + + [Fact] + public void TestReadCsvWithNullsAndDataTypes() + { + string data = @"vendor_id,rate_code,passenger_count,trip_time_in_secs +null,1,1,1271 +CMT,Null,1,474 +CMT,1,null,637 +Null,,, +,,, +CMT,1,1,null"; + + void Verify(DataFrame df) + { + Assert.Equal(6, df.Rows.Count); + Assert.Equal(4, df.Columns.Count); + + Assert.True(typeof(string) == df.Columns[0].DataType); + Assert.True(typeof(short) == df.Columns[1].DataType); + Assert.True(typeof(int) == df.Columns[2].DataType); + Assert.True(typeof(long) == df.Columns[3].DataType); + + Assert.Equal("vendor_id", df.Columns[0].Name); + Assert.Equal("rate_code", df.Columns[1].Name); + Assert.Equal("passenger_count", df.Columns[2].Name); + Assert.Equal("trip_time_in_secs", df.Columns[3].Name); + VerifyColumnTypes(df); + + foreach (var column in df.Columns) + { + if (column.DataType != typeof(string)) + { + Assert.Equal(3, column.NullCount); + } + else + { + Assert.Equal(2, column.NullCount); + } + } + var nullRow = df.Rows[3]; + Assert.Null(nullRow[0]); + Assert.Null(nullRow[1]); + Assert.Null(nullRow[2]); + Assert.Null(nullRow[3]); + + nullRow = df.Rows[4]; + Assert.Equal("", nullRow[0]); + Assert.Null(nullRow[1]); + Assert.Null(nullRow[2]); + Assert.Null(nullRow[3]); + + Assert.Null(df[0, 0]); + Assert.Null(df[1, 1]); + Assert.Null(df[2, 2]); + Assert.Null(df[5, 3]); + } + + DataFrame df = DataFrame.LoadCsv(GetStream(data), dataTypes: new Type[] { typeof(string), typeof(short), typeof(int), typeof(long) }); + Verify(df); + df = DataFrame.LoadCsvFromString(data, dataTypes: new Type[] { typeof(string), typeof(short), typeof(int), typeof(long) }); + Verify(df); + } + + [Fact] + public void TestReadCsvWithNulls() + { + string data = @"vendor_id,rate_code,passenger_count,trip_time_in_secs +null,1,1,1271 +CMT,Null,1,474 +CMT,1,null,637 +Null,,, +,,, +CMT,1,1,null"; + + void Verify(DataFrame df) + { + Assert.Equal(6, df.Rows.Count); + Assert.Equal(4, df.Columns.Count); + + Assert.True(typeof(string) == df.Columns[0].DataType); + Assert.True(typeof(float) == df.Columns[1].DataType); + Assert.True(typeof(float) == df.Columns[2].DataType); + Assert.True(typeof(float) == df.Columns[3].DataType); + + Assert.Equal("vendor_id", df.Columns[0].Name); + Assert.Equal("rate_code", df.Columns[1].Name); + Assert.Equal("passenger_count", df.Columns[2].Name); + Assert.Equal("trip_time_in_secs", df.Columns[3].Name); + VerifyColumnTypes(df); + + foreach (var column in df.Columns) + { + if (column.DataType != typeof(string)) + { + Assert.Equal(3, column.NullCount); + } + else + { + Assert.Equal(2, column.NullCount); + } + } + var nullRow = df.Rows[3]; + Assert.Null(nullRow[0]); + Assert.Null(nullRow[1]); + Assert.Null(nullRow[2]); + Assert.Null(nullRow[3]); + + nullRow = df.Rows[4]; + Assert.Equal("", nullRow[0]); + Assert.Null(nullRow[1]); + Assert.Null(nullRow[2]); + Assert.Null(nullRow[3]); + + Assert.Null(df[0, 0]); + Assert.Null(df[1, 1]); + Assert.Null(df[2, 2]); + Assert.Null(df[5, 3]); + } + + DataFrame df = DataFrame.LoadCsv(GetStream(data)); + Verify(df); + df = DataFrame.LoadCsvFromString(data); + Verify(df); + } + + [Fact] + public void TestWriteCsvWithHeader() + { + using MemoryStream csvStream = new MemoryStream(); + DataFrame dataFrame = DataFrameTests.MakeDataFrameWithAllColumnTypes(10, true); + + DataFrame.WriteCsv(dataFrame, csvStream); + + csvStream.Seek(0, SeekOrigin.Begin); + DataFrame readIn = DataFrame.LoadCsv(csvStream); + + Assert.Equal(dataFrame.Rows.Count, readIn.Rows.Count); + Assert.Equal(dataFrame.Columns.Count, readIn.Columns.Count); + Assert.Equal(1F, readIn[1, 0]); + Assert.Equal(1F, readIn[1, 1]); + Assert.Equal(1F, readIn[1, 2]); + Assert.Equal(1F, readIn[1, 3]); + Assert.Equal(1F, readIn[1, 4]); + Assert.Equal(1F, readIn[1, 5]); + Assert.Equal(1F, readIn[1, 6]); + Assert.Equal(1F, readIn[1, 7]); + Assert.Equal(1F, readIn[1, 8]); + Assert.Equal(1F, readIn[1, 9]); + Assert.Equal(1F, readIn[1, 10]); + } + + [Fact] + public void TestWriteCsvWithCultureInfoRomanianAndSemiColon() + { + DataFrame dataFrame = DataFrameTests.MakeDataFrameWithNumericColumns(10, true); + dataFrame[1, 1] = 1.1M; + dataFrame[1, 2] = 1.2D; + dataFrame[1, 3] = 1.3F; + + using MemoryStream csvStream = new MemoryStream(); + var cultureInfo = new CultureInfo("ro-RO"); + var separator = ';'; + DataFrame.WriteCsv(dataFrame, csvStream, separator: separator, cultureInfo: cultureInfo); + + csvStream.Seek(0, SeekOrigin.Begin); + DataFrame readIn = DataFrame.LoadCsv(csvStream, separator: separator); + + Assert.Equal(dataFrame.Rows.Count, readIn.Rows.Count); + Assert.Equal(dataFrame.Columns.Count, readIn.Columns.Count); + Assert.Equal(1F, readIn[1, 0]); + + // LoadCsv does not support culture info, therefore decimal point comma (,) is seen as thousand separator and is ignored when read + Assert.Equal(11F, readIn[1, 1]); + Assert.Equal(12F, readIn[1, 2]); + Assert.Equal(129999992F, readIn[1, 3]); + + Assert.Equal(1F, readIn[1, 4]); + Assert.Equal(1F, readIn[1, 5]); + Assert.Equal(1F, readIn[1, 6]); + Assert.Equal(1F, readIn[1, 7]); + Assert.Equal(1F, readIn[1, 8]); + Assert.Equal(1F, readIn[1, 9]); + Assert.Equal(1F, readIn[1, 10]); + } + + [Fact] + public void TestWriteCsvWithCultureInfo() + { + using MemoryStream csvStream = new MemoryStream(); + DataFrame dataFrame = DataFrameTests.MakeDataFrameWithNumericColumns(10, true); + dataFrame[1, 1] = 1.1M; + dataFrame[1, 2] = 1.2D; + dataFrame[1, 3] = 1.3F; + + var cultureInfo = new CultureInfo("en-US"); + DataFrame.WriteCsv(dataFrame, csvStream, cultureInfo: cultureInfo); + + csvStream.Seek(0, SeekOrigin.Begin); + DataFrame readIn = DataFrame.LoadCsv(csvStream); + + Assert.Equal(dataFrame.Rows.Count, readIn.Rows.Count); + Assert.Equal(dataFrame.Columns.Count, readIn.Columns.Count); + Assert.Equal(1F, readIn[1, 0]); + Assert.Equal(1.1F, readIn[1, 1]); + Assert.Equal(1.2F, readIn[1, 2]); + Assert.Equal(1.3F, readIn[1, 3]); + Assert.Equal(1F, readIn[1, 4]); + Assert.Equal(1F, readIn[1, 5]); + Assert.Equal(1F, readIn[1, 6]); + Assert.Equal(1F, readIn[1, 7]); + Assert.Equal(1F, readIn[1, 8]); + Assert.Equal(1F, readIn[1, 9]); + Assert.Equal(1F, readIn[1, 10]); + } + + [Fact] + public void TestWriteCsvWithCultureInfoRomanianAndComma() + { + using MemoryStream csvStream = new MemoryStream(); + DataFrame dataFrame = DataFrameTests.MakeDataFrameWithNumericColumns(10, true); + + var cultureInfo = new CultureInfo("ro-RO"); + var separator = cultureInfo.NumberFormat.NumberDecimalSeparator.First(); + + Assert.Throws(() => DataFrame.WriteCsv(dataFrame, csvStream, separator: separator, cultureInfo: cultureInfo)); + } + + [Fact] + public void TestWriteCsvWithNoHeader() + { + using MemoryStream csvStream = new MemoryStream(); + DataFrame dataFrame = DataFrameTests.MakeDataFrameWithAllColumnTypes(10, true); + + DataFrame.WriteCsv(dataFrame, csvStream, header: false); + + csvStream.Seek(0, SeekOrigin.Begin); + DataFrame readIn = DataFrame.LoadCsv(csvStream, header: false); + + Assert.Equal(dataFrame.Rows.Count, readIn.Rows.Count); + Assert.Equal(dataFrame.Columns.Count, readIn.Columns.Count); + Assert.Equal(1F, readIn[1, 0]); + Assert.Equal(1F, readIn[1, 1]); + Assert.Equal(1F, readIn[1, 2]); + Assert.Equal(1F, readIn[1, 3]); + Assert.Equal(1F, readIn[1, 4]); + Assert.Equal(1F, readIn[1, 5]); + Assert.Equal(1F, readIn[1, 6]); + Assert.Equal(1F, readIn[1, 7]); + Assert.Equal(1F, readIn[1, 8]); + Assert.Equal(1F, readIn[1, 9]); + Assert.Equal(1F, readIn[1, 10]); + } + + [Fact] + public void TestWriteCsvWithSemicolonSeparator() + { + using MemoryStream csvStream = new MemoryStream(); + DataFrame dataFrame = DataFrameTests.MakeDataFrameWithAllColumnTypes(10, true); + + var separator = ';'; + DataFrame.WriteCsv(dataFrame, csvStream, separator: separator); + + csvStream.Seek(0, SeekOrigin.Begin); + DataFrame readIn = DataFrame.LoadCsv(csvStream, separator: separator); + + Assert.Equal(dataFrame.Rows.Count, readIn.Rows.Count); + Assert.Equal(dataFrame.Columns.Count, readIn.Columns.Count); + Assert.Equal(1F, readIn[1, 0]); + Assert.Equal(1F, readIn[1, 1]); + Assert.Equal(1F, readIn[1, 2]); + Assert.Equal(1F, readIn[1, 3]); + Assert.Equal(1F, readIn[1, 4]); + Assert.Equal(1F, readIn[1, 5]); + Assert.Equal(1F, readIn[1, 6]); + Assert.Equal(1F, readIn[1, 7]); + Assert.Equal(1F, readIn[1, 8]); + Assert.Equal(1F, readIn[1, 9]); + Assert.Equal(1F, readIn[1, 10]); + } + + [Fact] + public void TestMixedDataTypesInCsv() + { + string data = @"vendor_id,empty +null, +1, +true, +Null, +, +CMT,"; + + DataFrame df = DataFrame.LoadCsv(GetStream(data)); + Assert.Equal(6, df.Rows.Count); + Assert.Equal(2, df.Columns.Count); + + Assert.True(typeof(string) == df.Columns[0].DataType); + Assert.True(typeof(string) == df.Columns[1].DataType); + + Assert.Equal("vendor_id", df.Columns[0].Name); + Assert.Equal("empty", df.Columns[1].Name); + VerifyColumnTypes(df); + Assert.Equal(2, df.Columns[0].NullCount); + Assert.Equal(0, df.Columns[1].NullCount); + + var nullRow = df.Rows[3]; + Assert.Null(nullRow[0]); + + nullRow = df.Rows[4]; + Assert.Equal("", nullRow[0]); + + Assert.Null(df[0, 0]); + Assert.Null(df[3, 0]); + + StringDataFrameColumn emptyColumn = (StringDataFrameColumn)df.Columns[1]; + for (long i = 0; i < emptyColumn.Length; i++) + { + Assert.Equal("", emptyColumn[i]); + } + } + } +} diff --git a/test/Microsoft.Data.Analysis.Tests/DataFrameColumn.BinaryOperationTests.cs b/test/Microsoft.Data.Analysis.Tests/DataFrameColumn.BinaryOperationTests.cs new file mode 100644 index 0000000000..03854c7c5e --- /dev/null +++ b/test/Microsoft.Data.Analysis.Tests/DataFrameColumn.BinaryOperationTests.cs @@ -0,0 +1,2648 @@ + + +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +// Generated from DataFrameColumn.BinaryOperationTests.tt. Do not modify directly + +using System; +using System.Collections.Generic; +using System.Linq; +using Xunit; + +namespace Microsoft.Data.Analysis.Tests +{ + public partial class DataFrameColumnTests + { + [Fact] + public void AddByteDataFrameColumnToByteDataFrameColumn() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn column = new ByteDataFrameColumn("Byte", columnEnumerable); + var otherColumnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn otherColumn = new ByteDataFrameColumn("Byte", otherColumnEnumerable); + Int32DataFrameColumn columnResult = column + otherColumn; + var verify = Enumerable.Range(1, 10).Select(x => (int)(2 * x)); + var verifyColumn = new Int32DataFrameColumn("Verify", verify); + Assert.Equal(columnResult.Length, verify.Count()); + Assert.True(columnResult.ElementwiseEquals(verifyColumn).All()); + } + [Fact] + public void AddDecimalDataFrameColumnToByteDataFrameColumn() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn column = new ByteDataFrameColumn("Byte", columnEnumerable); + var otherColumnEnumerable = Enumerable.Range(1, 10).Select(x => (decimal)x); + DecimalDataFrameColumn otherColumn = new DecimalDataFrameColumn("Decimal", otherColumnEnumerable); + DecimalDataFrameColumn columnResult = column + otherColumn; + var verify = Enumerable.Range(1, 10).Select(x => (decimal)(2 * x)); + var verifyColumn = new DecimalDataFrameColumn("Verify", verify); + Assert.Equal(columnResult.Length, verify.Count()); + Assert.True(columnResult.ElementwiseEquals(verifyColumn).All()); + } + [Fact] + public void AddDoubleDataFrameColumnToByteDataFrameColumn() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn column = new ByteDataFrameColumn("Byte", columnEnumerable); + var otherColumnEnumerable = Enumerable.Range(1, 10).Select(x => (double)x); + DoubleDataFrameColumn otherColumn = new DoubleDataFrameColumn("Double", otherColumnEnumerable); + DoubleDataFrameColumn columnResult = column + otherColumn; + var verify = Enumerable.Range(1, 10).Select(x => (double)(2 * x)); + var verifyColumn = new DoubleDataFrameColumn("Verify", verify); + Assert.Equal(columnResult.Length, verify.Count()); + Assert.True(columnResult.ElementwiseEquals(verifyColumn).All()); + } + [Fact] + public void AddSingleDataFrameColumnToByteDataFrameColumn() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn column = new ByteDataFrameColumn("Byte", columnEnumerable); + var otherColumnEnumerable = Enumerable.Range(1, 10).Select(x => (float)x); + SingleDataFrameColumn otherColumn = new SingleDataFrameColumn("Single", otherColumnEnumerable); + SingleDataFrameColumn columnResult = column + otherColumn; + var verify = Enumerable.Range(1, 10).Select(x => (float)(2 * x)); + var verifyColumn = new SingleDataFrameColumn("Verify", verify); + Assert.Equal(columnResult.Length, verify.Count()); + Assert.True(columnResult.ElementwiseEquals(verifyColumn).All()); + } + [Fact] + public void AddInt32DataFrameColumnToByteDataFrameColumn() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn column = new ByteDataFrameColumn("Byte", columnEnumerable); + var otherColumnEnumerable = Enumerable.Range(1, 10).Select(x => (int)x); + Int32DataFrameColumn otherColumn = new Int32DataFrameColumn("Int32", otherColumnEnumerable); + Int32DataFrameColumn columnResult = column + otherColumn; + var verify = Enumerable.Range(1, 10).Select(x => (int)(2 * x)); + var verifyColumn = new Int32DataFrameColumn("Verify", verify); + Assert.Equal(columnResult.Length, verify.Count()); + Assert.True(columnResult.ElementwiseEquals(verifyColumn).All()); + } + [Fact] + public void AddInt64DataFrameColumnToByteDataFrameColumn() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn column = new ByteDataFrameColumn("Byte", columnEnumerable); + var otherColumnEnumerable = Enumerable.Range(1, 10).Select(x => (long)x); + Int64DataFrameColumn otherColumn = new Int64DataFrameColumn("Int64", otherColumnEnumerable); + Int64DataFrameColumn columnResult = column + otherColumn; + var verify = Enumerable.Range(1, 10).Select(x => (long)(2 * x)); + var verifyColumn = new Int64DataFrameColumn("Verify", verify); + Assert.Equal(columnResult.Length, verify.Count()); + Assert.True(columnResult.ElementwiseEquals(verifyColumn).All()); + } + [Fact] + public void AddSByteDataFrameColumnToByteDataFrameColumn() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn column = new ByteDataFrameColumn("Byte", columnEnumerable); + var otherColumnEnumerable = Enumerable.Range(1, 10).Select(x => (sbyte)x); + SByteDataFrameColumn otherColumn = new SByteDataFrameColumn("SByte", otherColumnEnumerable); + Int32DataFrameColumn columnResult = column + otherColumn; + var verify = Enumerable.Range(1, 10).Select(x => (int)(2 * x)); + var verifyColumn = new Int32DataFrameColumn("Verify", verify); + Assert.Equal(columnResult.Length, verify.Count()); + Assert.True(columnResult.ElementwiseEquals(verifyColumn).All()); + } + [Fact] + public void AddInt16DataFrameColumnToByteDataFrameColumn() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn column = new ByteDataFrameColumn("Byte", columnEnumerable); + var otherColumnEnumerable = Enumerable.Range(1, 10).Select(x => (short)x); + Int16DataFrameColumn otherColumn = new Int16DataFrameColumn("Int16", otherColumnEnumerable); + Int32DataFrameColumn columnResult = column + otherColumn; + var verify = Enumerable.Range(1, 10).Select(x => (int)(2 * x)); + var verifyColumn = new Int32DataFrameColumn("Verify", verify); + Assert.Equal(columnResult.Length, verify.Count()); + Assert.True(columnResult.ElementwiseEquals(verifyColumn).All()); + } + [Fact] + public void AddUInt32DataFrameColumnToByteDataFrameColumn() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn column = new ByteDataFrameColumn("Byte", columnEnumerable); + var otherColumnEnumerable = Enumerable.Range(1, 10).Select(x => (uint)x); + UInt32DataFrameColumn otherColumn = new UInt32DataFrameColumn("UInt32", otherColumnEnumerable); + UInt32DataFrameColumn columnResult = column + otherColumn; + var verify = Enumerable.Range(1, 10).Select(x => (uint)(2 * x)); + var verifyColumn = new UInt32DataFrameColumn("Verify", verify); + Assert.Equal(columnResult.Length, verify.Count()); + Assert.True(columnResult.ElementwiseEquals(verifyColumn).All()); + } + [Fact] + public void AddUInt64DataFrameColumnToByteDataFrameColumn() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn column = new ByteDataFrameColumn("Byte", columnEnumerable); + var otherColumnEnumerable = Enumerable.Range(1, 10).Select(x => (ulong)x); + UInt64DataFrameColumn otherColumn = new UInt64DataFrameColumn("UInt64", otherColumnEnumerable); + UInt64DataFrameColumn columnResult = column + otherColumn; + var verify = Enumerable.Range(1, 10).Select(x => (ulong)(2 * x)); + var verifyColumn = new UInt64DataFrameColumn("Verify", verify); + Assert.Equal(columnResult.Length, verify.Count()); + Assert.True(columnResult.ElementwiseEquals(verifyColumn).All()); + } + [Fact] + public void AddUInt16DataFrameColumnToByteDataFrameColumn() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn column = new ByteDataFrameColumn("Byte", columnEnumerable); + var otherColumnEnumerable = Enumerable.Range(1, 10).Select(x => (ushort)x); + UInt16DataFrameColumn otherColumn = new UInt16DataFrameColumn("UInt16", otherColumnEnumerable); + Int32DataFrameColumn columnResult = column + otherColumn; + var verify = Enumerable.Range(1, 10).Select(x => (int)(2 * x)); + var verifyColumn = new Int32DataFrameColumn("Verify", verify); + Assert.Equal(columnResult.Length, verify.Count()); + Assert.True(columnResult.ElementwiseEquals(verifyColumn).All()); + } + [Fact] + public void AddByteToByteDataFrameColumn() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn column = new ByteDataFrameColumn("Byte", columnEnumerable); + byte value = 5; + Int32DataFrameColumn columnResult = column + value; + var verify = Enumerable.Range(1, 10).Select(x => (int)((int)x + (int)value)); + var verifyColumn = new Int32DataFrameColumn("Verify", verify); + Assert.Equal(columnResult.Length, verify.Count()); + Assert.True(columnResult.ElementwiseEquals(verifyColumn).All()); + } + [Fact] + public void AddDecimalToByteDataFrameColumn() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn column = new ByteDataFrameColumn("Byte", columnEnumerable); + decimal value = 5; + DecimalDataFrameColumn columnResult = column + value; + var verify = Enumerable.Range(1, 10).Select(x => (decimal)((decimal)x + (decimal)value)); + var verifyColumn = new DecimalDataFrameColumn("Verify", verify); + Assert.Equal(columnResult.Length, verify.Count()); + Assert.True(columnResult.ElementwiseEquals(verifyColumn).All()); + } + [Fact] + public void AddDoubleToByteDataFrameColumn() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn column = new ByteDataFrameColumn("Byte", columnEnumerable); + double value = 5; + DoubleDataFrameColumn columnResult = column + value; + var verify = Enumerable.Range(1, 10).Select(x => (double)((double)x + (double)value)); + var verifyColumn = new DoubleDataFrameColumn("Verify", verify); + Assert.Equal(columnResult.Length, verify.Count()); + Assert.True(columnResult.ElementwiseEquals(verifyColumn).All()); + } + [Fact] + public void AddSingleToByteDataFrameColumn() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn column = new ByteDataFrameColumn("Byte", columnEnumerable); + float value = 5; + SingleDataFrameColumn columnResult = column + value; + var verify = Enumerable.Range(1, 10).Select(x => (float)((float)x + (float)value)); + var verifyColumn = new SingleDataFrameColumn("Verify", verify); + Assert.Equal(columnResult.Length, verify.Count()); + Assert.True(columnResult.ElementwiseEquals(verifyColumn).All()); + } + [Fact] + public void AddInt32ToByteDataFrameColumn() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn column = new ByteDataFrameColumn("Byte", columnEnumerable); + int value = 5; + Int32DataFrameColumn columnResult = column + value; + var verify = Enumerable.Range(1, 10).Select(x => (int)((int)x + (int)value)); + var verifyColumn = new Int32DataFrameColumn("Verify", verify); + Assert.Equal(columnResult.Length, verify.Count()); + Assert.True(columnResult.ElementwiseEquals(verifyColumn).All()); + } + [Fact] + public void AddInt64ToByteDataFrameColumn() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn column = new ByteDataFrameColumn("Byte", columnEnumerable); + long value = 5; + Int64DataFrameColumn columnResult = column + value; + var verify = Enumerable.Range(1, 10).Select(x => (long)((long)x + (long)value)); + var verifyColumn = new Int64DataFrameColumn("Verify", verify); + Assert.Equal(columnResult.Length, verify.Count()); + Assert.True(columnResult.ElementwiseEquals(verifyColumn).All()); + } + [Fact] + public void AddSByteToByteDataFrameColumn() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn column = new ByteDataFrameColumn("Byte", columnEnumerable); + sbyte value = 5; + Int32DataFrameColumn columnResult = column + value; + var verify = Enumerable.Range(1, 10).Select(x => (int)((int)x + (int)value)); + var verifyColumn = new Int32DataFrameColumn("Verify", verify); + Assert.Equal(columnResult.Length, verify.Count()); + Assert.True(columnResult.ElementwiseEquals(verifyColumn).All()); + } + [Fact] + public void AddInt16ToByteDataFrameColumn() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn column = new ByteDataFrameColumn("Byte", columnEnumerable); + short value = 5; + Int32DataFrameColumn columnResult = column + value; + var verify = Enumerable.Range(1, 10).Select(x => (int)((int)x + (int)value)); + var verifyColumn = new Int32DataFrameColumn("Verify", verify); + Assert.Equal(columnResult.Length, verify.Count()); + Assert.True(columnResult.ElementwiseEquals(verifyColumn).All()); + } + [Fact] + public void AddUInt32ToByteDataFrameColumn() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn column = new ByteDataFrameColumn("Byte", columnEnumerable); + uint value = 5; + UInt32DataFrameColumn columnResult = column + value; + var verify = Enumerable.Range(1, 10).Select(x => (uint)((uint)x + (uint)value)); + var verifyColumn = new UInt32DataFrameColumn("Verify", verify); + Assert.Equal(columnResult.Length, verify.Count()); + Assert.True(columnResult.ElementwiseEquals(verifyColumn).All()); + } + [Fact] + public void AddUInt64ToByteDataFrameColumn() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn column = new ByteDataFrameColumn("Byte", columnEnumerable); + ulong value = 5; + UInt64DataFrameColumn columnResult = column + value; + var verify = Enumerable.Range(1, 10).Select(x => (ulong)((ulong)x + (ulong)value)); + var verifyColumn = new UInt64DataFrameColumn("Verify", verify); + Assert.Equal(columnResult.Length, verify.Count()); + Assert.True(columnResult.ElementwiseEquals(verifyColumn).All()); + } + [Fact] + public void AddUInt16ToByteDataFrameColumn() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn column = new ByteDataFrameColumn("Byte", columnEnumerable); + ushort value = 5; + Int32DataFrameColumn columnResult = column + value; + var verify = Enumerable.Range(1, 10).Select(x => (int)((int)x + (int)value)); + var verifyColumn = new Int32DataFrameColumn("Verify", verify); + Assert.Equal(columnResult.Length, verify.Count()); + Assert.True(columnResult.ElementwiseEquals(verifyColumn).All()); + } + [Fact] + public void ReverseAddByteToByteDataFrameColumn() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn column = new ByteDataFrameColumn("Byte", columnEnumerable); + byte value = 5; + Int32DataFrameColumn columnResult = value + column; + var verify = Enumerable.Range(1, 10).Select(x => (int)((int)x + (int)value)); + var verifyColumn = new Int32DataFrameColumn("Verify", verify); + Assert.Equal(columnResult.Length, verify.Count()); + Assert.True(columnResult.ElementwiseEquals(verifyColumn).All()); + } + [Fact] + public void ReverseAddDecimalToByteDataFrameColumn() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn column = new ByteDataFrameColumn("Byte", columnEnumerable); + decimal value = 5; + DecimalDataFrameColumn columnResult = value + column; + var verify = Enumerable.Range(1, 10).Select(x => (decimal)((decimal)x + (decimal)value)); + var verifyColumn = new DecimalDataFrameColumn("Verify", verify); + Assert.Equal(columnResult.Length, verify.Count()); + Assert.True(columnResult.ElementwiseEquals(verifyColumn).All()); + } + [Fact] + public void ReverseAddDoubleToByteDataFrameColumn() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn column = new ByteDataFrameColumn("Byte", columnEnumerable); + double value = 5; + DoubleDataFrameColumn columnResult = value + column; + var verify = Enumerable.Range(1, 10).Select(x => (double)((double)x + (double)value)); + var verifyColumn = new DoubleDataFrameColumn("Verify", verify); + Assert.Equal(columnResult.Length, verify.Count()); + Assert.True(columnResult.ElementwiseEquals(verifyColumn).All()); + } + [Fact] + public void ReverseAddSingleToByteDataFrameColumn() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn column = new ByteDataFrameColumn("Byte", columnEnumerable); + float value = 5; + SingleDataFrameColumn columnResult = value + column; + var verify = Enumerable.Range(1, 10).Select(x => (float)((float)x + (float)value)); + var verifyColumn = new SingleDataFrameColumn("Verify", verify); + Assert.Equal(columnResult.Length, verify.Count()); + Assert.True(columnResult.ElementwiseEquals(verifyColumn).All()); + } + [Fact] + public void ReverseAddInt32ToByteDataFrameColumn() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn column = new ByteDataFrameColumn("Byte", columnEnumerable); + int value = 5; + Int32DataFrameColumn columnResult = value + column; + var verify = Enumerable.Range(1, 10).Select(x => (int)((int)x + (int)value)); + var verifyColumn = new Int32DataFrameColumn("Verify", verify); + Assert.Equal(columnResult.Length, verify.Count()); + Assert.True(columnResult.ElementwiseEquals(verifyColumn).All()); + } + [Fact] + public void ReverseAddInt64ToByteDataFrameColumn() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn column = new ByteDataFrameColumn("Byte", columnEnumerable); + long value = 5; + Int64DataFrameColumn columnResult = value + column; + var verify = Enumerable.Range(1, 10).Select(x => (long)((long)x + (long)value)); + var verifyColumn = new Int64DataFrameColumn("Verify", verify); + Assert.Equal(columnResult.Length, verify.Count()); + Assert.True(columnResult.ElementwiseEquals(verifyColumn).All()); + } + [Fact] + public void ReverseAddSByteToByteDataFrameColumn() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn column = new ByteDataFrameColumn("Byte", columnEnumerable); + sbyte value = 5; + Int32DataFrameColumn columnResult = value + column; + var verify = Enumerable.Range(1, 10).Select(x => (int)((int)x + (int)value)); + var verifyColumn = new Int32DataFrameColumn("Verify", verify); + Assert.Equal(columnResult.Length, verify.Count()); + Assert.True(columnResult.ElementwiseEquals(verifyColumn).All()); + } + [Fact] + public void ReverseAddInt16ToByteDataFrameColumn() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn column = new ByteDataFrameColumn("Byte", columnEnumerable); + short value = 5; + Int32DataFrameColumn columnResult = value + column; + var verify = Enumerable.Range(1, 10).Select(x => (int)((int)x + (int)value)); + var verifyColumn = new Int32DataFrameColumn("Verify", verify); + Assert.Equal(columnResult.Length, verify.Count()); + Assert.True(columnResult.ElementwiseEquals(verifyColumn).All()); + } + [Fact] + public void ReverseAddUInt32ToByteDataFrameColumn() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn column = new ByteDataFrameColumn("Byte", columnEnumerable); + uint value = 5; + UInt32DataFrameColumn columnResult = value + column; + var verify = Enumerable.Range(1, 10).Select(x => (uint)((uint)x + (uint)value)); + var verifyColumn = new UInt32DataFrameColumn("Verify", verify); + Assert.Equal(columnResult.Length, verify.Count()); + Assert.True(columnResult.ElementwiseEquals(verifyColumn).All()); + } + [Fact] + public void ReverseAddUInt64ToByteDataFrameColumn() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn column = new ByteDataFrameColumn("Byte", columnEnumerable); + ulong value = 5; + UInt64DataFrameColumn columnResult = value + column; + var verify = Enumerable.Range(1, 10).Select(x => (ulong)((ulong)x + (ulong)value)); + var verifyColumn = new UInt64DataFrameColumn("Verify", verify); + Assert.Equal(columnResult.Length, verify.Count()); + Assert.True(columnResult.ElementwiseEquals(verifyColumn).All()); + } + [Fact] + public void ReverseAddUInt16ToByteDataFrameColumn() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn column = new ByteDataFrameColumn("Byte", columnEnumerable); + ushort value = 5; + Int32DataFrameColumn columnResult = value + column; + var verify = Enumerable.Range(1, 10).Select(x => (int)((int)x + (int)value)); + var verifyColumn = new Int32DataFrameColumn("Verify", verify); + Assert.Equal(columnResult.Length, verify.Count()); + Assert.True(columnResult.ElementwiseEquals(verifyColumn).All()); + } + [Fact] + public void SubtractByteDataFrameColumnToByteDataFrameColumn() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn column = new ByteDataFrameColumn("Byte", columnEnumerable); + var otherColumnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn otherColumn = new ByteDataFrameColumn("Byte", otherColumnEnumerable); + Int32DataFrameColumn columnResult = column - otherColumn; + var verify = Enumerable.Range(1, 10).Select(x => (int)0); + var verifyColumn = new Int32DataFrameColumn("Verify", verify); + Assert.Equal(columnResult.Length, verify.Count()); + Assert.True(columnResult.ElementwiseEquals(verifyColumn).All()); + } + [Fact] + public void SubtractDecimalDataFrameColumnToByteDataFrameColumn() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn column = new ByteDataFrameColumn("Byte", columnEnumerable); + var otherColumnEnumerable = Enumerable.Range(1, 10).Select(x => (decimal)x); + DecimalDataFrameColumn otherColumn = new DecimalDataFrameColumn("Decimal", otherColumnEnumerable); + DecimalDataFrameColumn columnResult = column - otherColumn; + var verify = Enumerable.Range(1, 10).Select(x => (decimal)0); + var verifyColumn = new DecimalDataFrameColumn("Verify", verify); + Assert.Equal(columnResult.Length, verify.Count()); + Assert.True(columnResult.ElementwiseEquals(verifyColumn).All()); + } + [Fact] + public void SubtractDoubleDataFrameColumnToByteDataFrameColumn() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn column = new ByteDataFrameColumn("Byte", columnEnumerable); + var otherColumnEnumerable = Enumerable.Range(1, 10).Select(x => (double)x); + DoubleDataFrameColumn otherColumn = new DoubleDataFrameColumn("Double", otherColumnEnumerable); + DoubleDataFrameColumn columnResult = column - otherColumn; + var verify = Enumerable.Range(1, 10).Select(x => (double)0); + var verifyColumn = new DoubleDataFrameColumn("Verify", verify); + Assert.Equal(columnResult.Length, verify.Count()); + Assert.True(columnResult.ElementwiseEquals(verifyColumn).All()); + } + [Fact] + public void SubtractSingleDataFrameColumnToByteDataFrameColumn() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn column = new ByteDataFrameColumn("Byte", columnEnumerable); + var otherColumnEnumerable = Enumerable.Range(1, 10).Select(x => (float)x); + SingleDataFrameColumn otherColumn = new SingleDataFrameColumn("Single", otherColumnEnumerable); + SingleDataFrameColumn columnResult = column - otherColumn; + var verify = Enumerable.Range(1, 10).Select(x => (float)0); + var verifyColumn = new SingleDataFrameColumn("Verify", verify); + Assert.Equal(columnResult.Length, verify.Count()); + Assert.True(columnResult.ElementwiseEquals(verifyColumn).All()); + } + [Fact] + public void SubtractInt32DataFrameColumnToByteDataFrameColumn() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn column = new ByteDataFrameColumn("Byte", columnEnumerable); + var otherColumnEnumerable = Enumerable.Range(1, 10).Select(x => (int)x); + Int32DataFrameColumn otherColumn = new Int32DataFrameColumn("Int32", otherColumnEnumerable); + Int32DataFrameColumn columnResult = column - otherColumn; + var verify = Enumerable.Range(1, 10).Select(x => (int)0); + var verifyColumn = new Int32DataFrameColumn("Verify", verify); + Assert.Equal(columnResult.Length, verify.Count()); + Assert.True(columnResult.ElementwiseEquals(verifyColumn).All()); + } + [Fact] + public void SubtractInt64DataFrameColumnToByteDataFrameColumn() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn column = new ByteDataFrameColumn("Byte", columnEnumerable); + var otherColumnEnumerable = Enumerable.Range(1, 10).Select(x => (long)x); + Int64DataFrameColumn otherColumn = new Int64DataFrameColumn("Int64", otherColumnEnumerable); + Int64DataFrameColumn columnResult = column - otherColumn; + var verify = Enumerable.Range(1, 10).Select(x => (long)0); + var verifyColumn = new Int64DataFrameColumn("Verify", verify); + Assert.Equal(columnResult.Length, verify.Count()); + Assert.True(columnResult.ElementwiseEquals(verifyColumn).All()); + } + [Fact] + public void SubtractSByteDataFrameColumnToByteDataFrameColumn() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn column = new ByteDataFrameColumn("Byte", columnEnumerable); + var otherColumnEnumerable = Enumerable.Range(1, 10).Select(x => (sbyte)x); + SByteDataFrameColumn otherColumn = new SByteDataFrameColumn("SByte", otherColumnEnumerable); + Int32DataFrameColumn columnResult = column - otherColumn; + var verify = Enumerable.Range(1, 10).Select(x => (int)0); + var verifyColumn = new Int32DataFrameColumn("Verify", verify); + Assert.Equal(columnResult.Length, verify.Count()); + Assert.True(columnResult.ElementwiseEquals(verifyColumn).All()); + } + [Fact] + public void SubtractInt16DataFrameColumnToByteDataFrameColumn() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn column = new ByteDataFrameColumn("Byte", columnEnumerable); + var otherColumnEnumerable = Enumerable.Range(1, 10).Select(x => (short)x); + Int16DataFrameColumn otherColumn = new Int16DataFrameColumn("Int16", otherColumnEnumerable); + Int32DataFrameColumn columnResult = column - otherColumn; + var verify = Enumerable.Range(1, 10).Select(x => (int)0); + var verifyColumn = new Int32DataFrameColumn("Verify", verify); + Assert.Equal(columnResult.Length, verify.Count()); + Assert.True(columnResult.ElementwiseEquals(verifyColumn).All()); + } + [Fact] + public void SubtractUInt32DataFrameColumnToByteDataFrameColumn() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn column = new ByteDataFrameColumn("Byte", columnEnumerable); + var otherColumnEnumerable = Enumerable.Range(1, 10).Select(x => (uint)x); + UInt32DataFrameColumn otherColumn = new UInt32DataFrameColumn("UInt32", otherColumnEnumerable); + UInt32DataFrameColumn columnResult = column - otherColumn; + var verify = Enumerable.Range(1, 10).Select(x => (uint)0); + var verifyColumn = new UInt32DataFrameColumn("Verify", verify); + Assert.Equal(columnResult.Length, verify.Count()); + Assert.True(columnResult.ElementwiseEquals(verifyColumn).All()); + } + [Fact] + public void SubtractUInt64DataFrameColumnToByteDataFrameColumn() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn column = new ByteDataFrameColumn("Byte", columnEnumerable); + var otherColumnEnumerable = Enumerable.Range(1, 10).Select(x => (ulong)x); + UInt64DataFrameColumn otherColumn = new UInt64DataFrameColumn("UInt64", otherColumnEnumerable); + UInt64DataFrameColumn columnResult = column - otherColumn; + var verify = Enumerable.Range(1, 10).Select(x => (ulong)0); + var verifyColumn = new UInt64DataFrameColumn("Verify", verify); + Assert.Equal(columnResult.Length, verify.Count()); + Assert.True(columnResult.ElementwiseEquals(verifyColumn).All()); + } + [Fact] + public void SubtractUInt16DataFrameColumnToByteDataFrameColumn() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn column = new ByteDataFrameColumn("Byte", columnEnumerable); + var otherColumnEnumerable = Enumerable.Range(1, 10).Select(x => (ushort)x); + UInt16DataFrameColumn otherColumn = new UInt16DataFrameColumn("UInt16", otherColumnEnumerable); + Int32DataFrameColumn columnResult = column - otherColumn; + var verify = Enumerable.Range(1, 10).Select(x => (int)0); + var verifyColumn = new Int32DataFrameColumn("Verify", verify); + Assert.Equal(columnResult.Length, verify.Count()); + Assert.True(columnResult.ElementwiseEquals(verifyColumn).All()); + } + [Fact] + public void SubtractByteToByteDataFrameColumn() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn column = new ByteDataFrameColumn("Byte", columnEnumerable); + byte value = 5; + Int32DataFrameColumn columnResult = column - value; + var verify = Enumerable.Range(1, 10).Select(x => (int)((int)x - (int)value)); + var verifyColumn = new Int32DataFrameColumn("Verify", verify); + Assert.Equal(columnResult.Length, verify.Count()); + Assert.True(columnResult.ElementwiseEquals(verifyColumn).All()); + } + [Fact] + public void SubtractDecimalToByteDataFrameColumn() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn column = new ByteDataFrameColumn("Byte", columnEnumerable); + decimal value = 5; + DecimalDataFrameColumn columnResult = column - value; + var verify = Enumerable.Range(1, 10).Select(x => (decimal)((decimal)x - (decimal)value)); + var verifyColumn = new DecimalDataFrameColumn("Verify", verify); + Assert.Equal(columnResult.Length, verify.Count()); + Assert.True(columnResult.ElementwiseEquals(verifyColumn).All()); + } + [Fact] + public void SubtractDoubleToByteDataFrameColumn() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn column = new ByteDataFrameColumn("Byte", columnEnumerable); + double value = 5; + DoubleDataFrameColumn columnResult = column - value; + var verify = Enumerable.Range(1, 10).Select(x => (double)((double)x - (double)value)); + var verifyColumn = new DoubleDataFrameColumn("Verify", verify); + Assert.Equal(columnResult.Length, verify.Count()); + Assert.True(columnResult.ElementwiseEquals(verifyColumn).All()); + } + [Fact] + public void SubtractSingleToByteDataFrameColumn() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn column = new ByteDataFrameColumn("Byte", columnEnumerable); + float value = 5; + SingleDataFrameColumn columnResult = column - value; + var verify = Enumerable.Range(1, 10).Select(x => (float)((float)x - (float)value)); + var verifyColumn = new SingleDataFrameColumn("Verify", verify); + Assert.Equal(columnResult.Length, verify.Count()); + Assert.True(columnResult.ElementwiseEquals(verifyColumn).All()); + } + [Fact] + public void SubtractInt32ToByteDataFrameColumn() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn column = new ByteDataFrameColumn("Byte", columnEnumerable); + int value = 5; + Int32DataFrameColumn columnResult = column - value; + var verify = Enumerable.Range(1, 10).Select(x => (int)((int)x - (int)value)); + var verifyColumn = new Int32DataFrameColumn("Verify", verify); + Assert.Equal(columnResult.Length, verify.Count()); + Assert.True(columnResult.ElementwiseEquals(verifyColumn).All()); + } + [Fact] + public void SubtractInt64ToByteDataFrameColumn() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn column = new ByteDataFrameColumn("Byte", columnEnumerable); + long value = 5; + Int64DataFrameColumn columnResult = column - value; + var verify = Enumerable.Range(1, 10).Select(x => (long)((long)x - (long)value)); + var verifyColumn = new Int64DataFrameColumn("Verify", verify); + Assert.Equal(columnResult.Length, verify.Count()); + Assert.True(columnResult.ElementwiseEquals(verifyColumn).All()); + } + [Fact] + public void SubtractSByteToByteDataFrameColumn() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn column = new ByteDataFrameColumn("Byte", columnEnumerable); + sbyte value = 5; + Int32DataFrameColumn columnResult = column - value; + var verify = Enumerable.Range(1, 10).Select(x => (int)((int)x - (int)value)); + var verifyColumn = new Int32DataFrameColumn("Verify", verify); + Assert.Equal(columnResult.Length, verify.Count()); + Assert.True(columnResult.ElementwiseEquals(verifyColumn).All()); + } + [Fact] + public void SubtractInt16ToByteDataFrameColumn() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn column = new ByteDataFrameColumn("Byte", columnEnumerable); + short value = 5; + Int32DataFrameColumn columnResult = column - value; + var verify = Enumerable.Range(1, 10).Select(x => (int)((int)x - (int)value)); + var verifyColumn = new Int32DataFrameColumn("Verify", verify); + Assert.Equal(columnResult.Length, verify.Count()); + Assert.True(columnResult.ElementwiseEquals(verifyColumn).All()); + } + [Fact] + public void SubtractUInt32ToByteDataFrameColumn() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn column = new ByteDataFrameColumn("Byte", columnEnumerable); + uint value = 5; + UInt32DataFrameColumn columnResult = column - value; + var verify = Enumerable.Range(1, 10).Select(x => (uint)((uint)x - (uint)value)); + var verifyColumn = new UInt32DataFrameColumn("Verify", verify); + Assert.Equal(columnResult.Length, verify.Count()); + Assert.True(columnResult.ElementwiseEquals(verifyColumn).All()); + } + [Fact] + public void SubtractUInt64ToByteDataFrameColumn() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn column = new ByteDataFrameColumn("Byte", columnEnumerable); + ulong value = 5; + UInt64DataFrameColumn columnResult = column - value; + var verify = Enumerable.Range(1, 10).Select(x => (ulong)((ulong)x - (ulong)value)); + var verifyColumn = new UInt64DataFrameColumn("Verify", verify); + Assert.Equal(columnResult.Length, verify.Count()); + Assert.True(columnResult.ElementwiseEquals(verifyColumn).All()); + } + [Fact] + public void SubtractUInt16ToByteDataFrameColumn() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn column = new ByteDataFrameColumn("Byte", columnEnumerable); + ushort value = 5; + Int32DataFrameColumn columnResult = column - value; + var verify = Enumerable.Range(1, 10).Select(x => (int)((int)x - (int)value)); + var verifyColumn = new Int32DataFrameColumn("Verify", verify); + Assert.Equal(columnResult.Length, verify.Count()); + Assert.True(columnResult.ElementwiseEquals(verifyColumn).All()); + } + [Fact] + public void ReverseSubtractByteToByteDataFrameColumn() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn column = new ByteDataFrameColumn("Byte", columnEnumerable); + byte value = 5; + Int32DataFrameColumn columnResult = value - column; + var verify = Enumerable.Range(1, 10).Select(x => (int)((int)value - (int)x)); + var verifyColumn = new Int32DataFrameColumn("Verify", verify); + Assert.Equal(columnResult.Length, verify.Count()); + Assert.True(columnResult.ElementwiseEquals(verifyColumn).All()); + } + [Fact] + public void ReverseSubtractDecimalToByteDataFrameColumn() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn column = new ByteDataFrameColumn("Byte", columnEnumerable); + decimal value = 5; + DecimalDataFrameColumn columnResult = value - column; + var verify = Enumerable.Range(1, 10).Select(x => (decimal)((decimal)value - (decimal)x)); + var verifyColumn = new DecimalDataFrameColumn("Verify", verify); + Assert.Equal(columnResult.Length, verify.Count()); + Assert.True(columnResult.ElementwiseEquals(verifyColumn).All()); + } + [Fact] + public void ReverseSubtractDoubleToByteDataFrameColumn() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn column = new ByteDataFrameColumn("Byte", columnEnumerable); + double value = 5; + DoubleDataFrameColumn columnResult = value - column; + var verify = Enumerable.Range(1, 10).Select(x => (double)((double)value - (double)x)); + var verifyColumn = new DoubleDataFrameColumn("Verify", verify); + Assert.Equal(columnResult.Length, verify.Count()); + Assert.True(columnResult.ElementwiseEquals(verifyColumn).All()); + } + [Fact] + public void ReverseSubtractSingleToByteDataFrameColumn() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn column = new ByteDataFrameColumn("Byte", columnEnumerable); + float value = 5; + SingleDataFrameColumn columnResult = value - column; + var verify = Enumerable.Range(1, 10).Select(x => (float)((float)value - (float)x)); + var verifyColumn = new SingleDataFrameColumn("Verify", verify); + Assert.Equal(columnResult.Length, verify.Count()); + Assert.True(columnResult.ElementwiseEquals(verifyColumn).All()); + } + [Fact] + public void ReverseSubtractInt32ToByteDataFrameColumn() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn column = new ByteDataFrameColumn("Byte", columnEnumerable); + int value = 5; + Int32DataFrameColumn columnResult = value - column; + var verify = Enumerable.Range(1, 10).Select(x => (int)((int)value - (int)x)); + var verifyColumn = new Int32DataFrameColumn("Verify", verify); + Assert.Equal(columnResult.Length, verify.Count()); + Assert.True(columnResult.ElementwiseEquals(verifyColumn).All()); + } + [Fact] + public void ReverseSubtractInt64ToByteDataFrameColumn() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn column = new ByteDataFrameColumn("Byte", columnEnumerable); + long value = 5; + Int64DataFrameColumn columnResult = value - column; + var verify = Enumerable.Range(1, 10).Select(x => (long)((long)value - (long)x)); + var verifyColumn = new Int64DataFrameColumn("Verify", verify); + Assert.Equal(columnResult.Length, verify.Count()); + Assert.True(columnResult.ElementwiseEquals(verifyColumn).All()); + } + [Fact] + public void ReverseSubtractSByteToByteDataFrameColumn() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn column = new ByteDataFrameColumn("Byte", columnEnumerable); + sbyte value = 5; + Int32DataFrameColumn columnResult = value - column; + var verify = Enumerable.Range(1, 10).Select(x => (int)((int)value - (int)x)); + var verifyColumn = new Int32DataFrameColumn("Verify", verify); + Assert.Equal(columnResult.Length, verify.Count()); + Assert.True(columnResult.ElementwiseEquals(verifyColumn).All()); + } + [Fact] + public void ReverseSubtractInt16ToByteDataFrameColumn() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn column = new ByteDataFrameColumn("Byte", columnEnumerable); + short value = 5; + Int32DataFrameColumn columnResult = value - column; + var verify = Enumerable.Range(1, 10).Select(x => (int)((int)value - (int)x)); + var verifyColumn = new Int32DataFrameColumn("Verify", verify); + Assert.Equal(columnResult.Length, verify.Count()); + Assert.True(columnResult.ElementwiseEquals(verifyColumn).All()); + } + [Fact] + public void ReverseSubtractUInt32ToByteDataFrameColumn() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn column = new ByteDataFrameColumn("Byte", columnEnumerable); + uint value = 5; + UInt32DataFrameColumn columnResult = value - column; + var verify = Enumerable.Range(1, 10).Select(x => (uint)((uint)value - (uint)x)); + var verifyColumn = new UInt32DataFrameColumn("Verify", verify); + Assert.Equal(columnResult.Length, verify.Count()); + Assert.True(columnResult.ElementwiseEquals(verifyColumn).All()); + } + [Fact] + public void ReverseSubtractUInt64ToByteDataFrameColumn() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn column = new ByteDataFrameColumn("Byte", columnEnumerable); + ulong value = 5; + UInt64DataFrameColumn columnResult = value - column; + var verify = Enumerable.Range(1, 10).Select(x => (ulong)((ulong)value - (ulong)x)); + var verifyColumn = new UInt64DataFrameColumn("Verify", verify); + Assert.Equal(columnResult.Length, verify.Count()); + Assert.True(columnResult.ElementwiseEquals(verifyColumn).All()); + } + [Fact] + public void ReverseSubtractUInt16ToByteDataFrameColumn() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn column = new ByteDataFrameColumn("Byte", columnEnumerable); + ushort value = 5; + Int32DataFrameColumn columnResult = value - column; + var verify = Enumerable.Range(1, 10).Select(x => (int)((int)value - (int)x)); + var verifyColumn = new Int32DataFrameColumn("Verify", verify); + Assert.Equal(columnResult.Length, verify.Count()); + Assert.True(columnResult.ElementwiseEquals(verifyColumn).All()); + } + [Fact] + public void MultiplyByteDataFrameColumnToByteDataFrameColumn() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn column = new ByteDataFrameColumn("Byte", columnEnumerable); + var otherColumnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn otherColumn = new ByteDataFrameColumn("Byte", otherColumnEnumerable); + Int32DataFrameColumn columnResult = column * otherColumn; + var verify = Enumerable.Range(1, 10).Select(x => (int)(x * x)); + var verifyColumn = new Int32DataFrameColumn("Verify", verify); + Assert.Equal(columnResult.Length, verify.Count()); + Assert.True(columnResult.ElementwiseEquals(verifyColumn).All()); + } + [Fact] + public void MultiplyDecimalDataFrameColumnToByteDataFrameColumn() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn column = new ByteDataFrameColumn("Byte", columnEnumerable); + var otherColumnEnumerable = Enumerable.Range(1, 10).Select(x => (decimal)x); + DecimalDataFrameColumn otherColumn = new DecimalDataFrameColumn("Decimal", otherColumnEnumerable); + DecimalDataFrameColumn columnResult = column * otherColumn; + var verify = Enumerable.Range(1, 10).Select(x => (decimal)(x * x)); + var verifyColumn = new DecimalDataFrameColumn("Verify", verify); + Assert.Equal(columnResult.Length, verify.Count()); + Assert.True(columnResult.ElementwiseEquals(verifyColumn).All()); + } + [Fact] + public void MultiplyDoubleDataFrameColumnToByteDataFrameColumn() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn column = new ByteDataFrameColumn("Byte", columnEnumerable); + var otherColumnEnumerable = Enumerable.Range(1, 10).Select(x => (double)x); + DoubleDataFrameColumn otherColumn = new DoubleDataFrameColumn("Double", otherColumnEnumerable); + DoubleDataFrameColumn columnResult = column * otherColumn; + var verify = Enumerable.Range(1, 10).Select(x => (double)(x * x)); + var verifyColumn = new DoubleDataFrameColumn("Verify", verify); + Assert.Equal(columnResult.Length, verify.Count()); + Assert.True(columnResult.ElementwiseEquals(verifyColumn).All()); + } + [Fact] + public void MultiplySingleDataFrameColumnToByteDataFrameColumn() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn column = new ByteDataFrameColumn("Byte", columnEnumerable); + var otherColumnEnumerable = Enumerable.Range(1, 10).Select(x => (float)x); + SingleDataFrameColumn otherColumn = new SingleDataFrameColumn("Single", otherColumnEnumerable); + SingleDataFrameColumn columnResult = column * otherColumn; + var verify = Enumerable.Range(1, 10).Select(x => (float)(x * x)); + var verifyColumn = new SingleDataFrameColumn("Verify", verify); + Assert.Equal(columnResult.Length, verify.Count()); + Assert.True(columnResult.ElementwiseEquals(verifyColumn).All()); + } + [Fact] + public void MultiplyInt32DataFrameColumnToByteDataFrameColumn() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn column = new ByteDataFrameColumn("Byte", columnEnumerable); + var otherColumnEnumerable = Enumerable.Range(1, 10).Select(x => (int)x); + Int32DataFrameColumn otherColumn = new Int32DataFrameColumn("Int32", otherColumnEnumerable); + Int32DataFrameColumn columnResult = column * otherColumn; + var verify = Enumerable.Range(1, 10).Select(x => (int)(x * x)); + var verifyColumn = new Int32DataFrameColumn("Verify", verify); + Assert.Equal(columnResult.Length, verify.Count()); + Assert.True(columnResult.ElementwiseEquals(verifyColumn).All()); + } + [Fact] + public void MultiplyInt64DataFrameColumnToByteDataFrameColumn() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn column = new ByteDataFrameColumn("Byte", columnEnumerable); + var otherColumnEnumerable = Enumerable.Range(1, 10).Select(x => (long)x); + Int64DataFrameColumn otherColumn = new Int64DataFrameColumn("Int64", otherColumnEnumerable); + Int64DataFrameColumn columnResult = column * otherColumn; + var verify = Enumerable.Range(1, 10).Select(x => (long)(x * x)); + var verifyColumn = new Int64DataFrameColumn("Verify", verify); + Assert.Equal(columnResult.Length, verify.Count()); + Assert.True(columnResult.ElementwiseEquals(verifyColumn).All()); + } + [Fact] + public void MultiplySByteDataFrameColumnToByteDataFrameColumn() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn column = new ByteDataFrameColumn("Byte", columnEnumerable); + var otherColumnEnumerable = Enumerable.Range(1, 10).Select(x => (sbyte)x); + SByteDataFrameColumn otherColumn = new SByteDataFrameColumn("SByte", otherColumnEnumerable); + Int32DataFrameColumn columnResult = column * otherColumn; + var verify = Enumerable.Range(1, 10).Select(x => (int)(x * x)); + var verifyColumn = new Int32DataFrameColumn("Verify", verify); + Assert.Equal(columnResult.Length, verify.Count()); + Assert.True(columnResult.ElementwiseEquals(verifyColumn).All()); + } + [Fact] + public void MultiplyInt16DataFrameColumnToByteDataFrameColumn() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn column = new ByteDataFrameColumn("Byte", columnEnumerable); + var otherColumnEnumerable = Enumerable.Range(1, 10).Select(x => (short)x); + Int16DataFrameColumn otherColumn = new Int16DataFrameColumn("Int16", otherColumnEnumerable); + Int32DataFrameColumn columnResult = column * otherColumn; + var verify = Enumerable.Range(1, 10).Select(x => (int)(x * x)); + var verifyColumn = new Int32DataFrameColumn("Verify", verify); + Assert.Equal(columnResult.Length, verify.Count()); + Assert.True(columnResult.ElementwiseEquals(verifyColumn).All()); + } + [Fact] + public void MultiplyUInt32DataFrameColumnToByteDataFrameColumn() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn column = new ByteDataFrameColumn("Byte", columnEnumerable); + var otherColumnEnumerable = Enumerable.Range(1, 10).Select(x => (uint)x); + UInt32DataFrameColumn otherColumn = new UInt32DataFrameColumn("UInt32", otherColumnEnumerable); + UInt32DataFrameColumn columnResult = column * otherColumn; + var verify = Enumerable.Range(1, 10).Select(x => (uint)(x * x)); + var verifyColumn = new UInt32DataFrameColumn("Verify", verify); + Assert.Equal(columnResult.Length, verify.Count()); + Assert.True(columnResult.ElementwiseEquals(verifyColumn).All()); + } + [Fact] + public void MultiplyUInt64DataFrameColumnToByteDataFrameColumn() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn column = new ByteDataFrameColumn("Byte", columnEnumerable); + var otherColumnEnumerable = Enumerable.Range(1, 10).Select(x => (ulong)x); + UInt64DataFrameColumn otherColumn = new UInt64DataFrameColumn("UInt64", otherColumnEnumerable); + UInt64DataFrameColumn columnResult = column * otherColumn; + var verify = Enumerable.Range(1, 10).Select(x => (ulong)(x * x)); + var verifyColumn = new UInt64DataFrameColumn("Verify", verify); + Assert.Equal(columnResult.Length, verify.Count()); + Assert.True(columnResult.ElementwiseEquals(verifyColumn).All()); + } + [Fact] + public void MultiplyUInt16DataFrameColumnToByteDataFrameColumn() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn column = new ByteDataFrameColumn("Byte", columnEnumerable); + var otherColumnEnumerable = Enumerable.Range(1, 10).Select(x => (ushort)x); + UInt16DataFrameColumn otherColumn = new UInt16DataFrameColumn("UInt16", otherColumnEnumerable); + Int32DataFrameColumn columnResult = column * otherColumn; + var verify = Enumerable.Range(1, 10).Select(x => (int)(x * x)); + var verifyColumn = new Int32DataFrameColumn("Verify", verify); + Assert.Equal(columnResult.Length, verify.Count()); + Assert.True(columnResult.ElementwiseEquals(verifyColumn).All()); + } + [Fact] + public void MultiplyByteToByteDataFrameColumn() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn column = new ByteDataFrameColumn("Byte", columnEnumerable); + byte value = 5; + Int32DataFrameColumn columnResult = column * value; + var verify = Enumerable.Range(1, 10).Select(x => (int)((int)x * (int)value)); + var verifyColumn = new Int32DataFrameColumn("Verify", verify); + Assert.Equal(columnResult.Length, verify.Count()); + Assert.True(columnResult.ElementwiseEquals(verifyColumn).All()); + } + [Fact] + public void MultiplyDecimalToByteDataFrameColumn() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn column = new ByteDataFrameColumn("Byte", columnEnumerable); + decimal value = 5; + DecimalDataFrameColumn columnResult = column * value; + var verify = Enumerable.Range(1, 10).Select(x => (decimal)((decimal)x * (decimal)value)); + var verifyColumn = new DecimalDataFrameColumn("Verify", verify); + Assert.Equal(columnResult.Length, verify.Count()); + Assert.True(columnResult.ElementwiseEquals(verifyColumn).All()); + } + [Fact] + public void MultiplyDoubleToByteDataFrameColumn() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn column = new ByteDataFrameColumn("Byte", columnEnumerable); + double value = 5; + DoubleDataFrameColumn columnResult = column * value; + var verify = Enumerable.Range(1, 10).Select(x => (double)((double)x * (double)value)); + var verifyColumn = new DoubleDataFrameColumn("Verify", verify); + Assert.Equal(columnResult.Length, verify.Count()); + Assert.True(columnResult.ElementwiseEquals(verifyColumn).All()); + } + [Fact] + public void MultiplySingleToByteDataFrameColumn() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn column = new ByteDataFrameColumn("Byte", columnEnumerable); + float value = 5; + SingleDataFrameColumn columnResult = column * value; + var verify = Enumerable.Range(1, 10).Select(x => (float)((float)x * (float)value)); + var verifyColumn = new SingleDataFrameColumn("Verify", verify); + Assert.Equal(columnResult.Length, verify.Count()); + Assert.True(columnResult.ElementwiseEquals(verifyColumn).All()); + } + [Fact] + public void MultiplyInt32ToByteDataFrameColumn() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn column = new ByteDataFrameColumn("Byte", columnEnumerable); + int value = 5; + Int32DataFrameColumn columnResult = column * value; + var verify = Enumerable.Range(1, 10).Select(x => (int)((int)x * (int)value)); + var verifyColumn = new Int32DataFrameColumn("Verify", verify); + Assert.Equal(columnResult.Length, verify.Count()); + Assert.True(columnResult.ElementwiseEquals(verifyColumn).All()); + } + [Fact] + public void MultiplyInt64ToByteDataFrameColumn() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn column = new ByteDataFrameColumn("Byte", columnEnumerable); + long value = 5; + Int64DataFrameColumn columnResult = column * value; + var verify = Enumerable.Range(1, 10).Select(x => (long)((long)x * (long)value)); + var verifyColumn = new Int64DataFrameColumn("Verify", verify); + Assert.Equal(columnResult.Length, verify.Count()); + Assert.True(columnResult.ElementwiseEquals(verifyColumn).All()); + } + [Fact] + public void MultiplySByteToByteDataFrameColumn() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn column = new ByteDataFrameColumn("Byte", columnEnumerable); + sbyte value = 5; + Int32DataFrameColumn columnResult = column * value; + var verify = Enumerable.Range(1, 10).Select(x => (int)((int)x * (int)value)); + var verifyColumn = new Int32DataFrameColumn("Verify", verify); + Assert.Equal(columnResult.Length, verify.Count()); + Assert.True(columnResult.ElementwiseEquals(verifyColumn).All()); + } + [Fact] + public void MultiplyInt16ToByteDataFrameColumn() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn column = new ByteDataFrameColumn("Byte", columnEnumerable); + short value = 5; + Int32DataFrameColumn columnResult = column * value; + var verify = Enumerable.Range(1, 10).Select(x => (int)((int)x * (int)value)); + var verifyColumn = new Int32DataFrameColumn("Verify", verify); + Assert.Equal(columnResult.Length, verify.Count()); + Assert.True(columnResult.ElementwiseEquals(verifyColumn).All()); + } + [Fact] + public void MultiplyUInt32ToByteDataFrameColumn() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn column = new ByteDataFrameColumn("Byte", columnEnumerable); + uint value = 5; + UInt32DataFrameColumn columnResult = column * value; + var verify = Enumerable.Range(1, 10).Select(x => (uint)((uint)x * (uint)value)); + var verifyColumn = new UInt32DataFrameColumn("Verify", verify); + Assert.Equal(columnResult.Length, verify.Count()); + Assert.True(columnResult.ElementwiseEquals(verifyColumn).All()); + } + [Fact] + public void MultiplyUInt64ToByteDataFrameColumn() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn column = new ByteDataFrameColumn("Byte", columnEnumerable); + ulong value = 5; + UInt64DataFrameColumn columnResult = column * value; + var verify = Enumerable.Range(1, 10).Select(x => (ulong)((ulong)x * (ulong)value)); + var verifyColumn = new UInt64DataFrameColumn("Verify", verify); + Assert.Equal(columnResult.Length, verify.Count()); + Assert.True(columnResult.ElementwiseEquals(verifyColumn).All()); + } + [Fact] + public void MultiplyUInt16ToByteDataFrameColumn() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn column = new ByteDataFrameColumn("Byte", columnEnumerable); + ushort value = 5; + Int32DataFrameColumn columnResult = column * value; + var verify = Enumerable.Range(1, 10).Select(x => (int)((int)x * (int)value)); + var verifyColumn = new Int32DataFrameColumn("Verify", verify); + Assert.Equal(columnResult.Length, verify.Count()); + Assert.True(columnResult.ElementwiseEquals(verifyColumn).All()); + } + [Fact] + public void ReverseMultiplyByteToByteDataFrameColumn() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn column = new ByteDataFrameColumn("Byte", columnEnumerable); + byte value = 5; + Int32DataFrameColumn columnResult = value * column; + var verify = Enumerable.Range(1, 10).Select(x => (int)((int)x * (int)value)); + var verifyColumn = new Int32DataFrameColumn("Verify", verify); + Assert.Equal(columnResult.Length, verify.Count()); + Assert.True(columnResult.ElementwiseEquals(verifyColumn).All()); + } + [Fact] + public void ReverseMultiplyDecimalToByteDataFrameColumn() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn column = new ByteDataFrameColumn("Byte", columnEnumerable); + decimal value = 5; + DecimalDataFrameColumn columnResult = value * column; + var verify = Enumerable.Range(1, 10).Select(x => (decimal)((decimal)x * (decimal)value)); + var verifyColumn = new DecimalDataFrameColumn("Verify", verify); + Assert.Equal(columnResult.Length, verify.Count()); + Assert.True(columnResult.ElementwiseEquals(verifyColumn).All()); + } + [Fact] + public void ReverseMultiplyDoubleToByteDataFrameColumn() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn column = new ByteDataFrameColumn("Byte", columnEnumerable); + double value = 5; + DoubleDataFrameColumn columnResult = value * column; + var verify = Enumerable.Range(1, 10).Select(x => (double)((double)x * (double)value)); + var verifyColumn = new DoubleDataFrameColumn("Verify", verify); + Assert.Equal(columnResult.Length, verify.Count()); + Assert.True(columnResult.ElementwiseEquals(verifyColumn).All()); + } + [Fact] + public void ReverseMultiplySingleToByteDataFrameColumn() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn column = new ByteDataFrameColumn("Byte", columnEnumerable); + float value = 5; + SingleDataFrameColumn columnResult = value * column; + var verify = Enumerable.Range(1, 10).Select(x => (float)((float)x * (float)value)); + var verifyColumn = new SingleDataFrameColumn("Verify", verify); + Assert.Equal(columnResult.Length, verify.Count()); + Assert.True(columnResult.ElementwiseEquals(verifyColumn).All()); + } + [Fact] + public void ReverseMultiplyInt32ToByteDataFrameColumn() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn column = new ByteDataFrameColumn("Byte", columnEnumerable); + int value = 5; + Int32DataFrameColumn columnResult = value * column; + var verify = Enumerable.Range(1, 10).Select(x => (int)((int)x * (int)value)); + var verifyColumn = new Int32DataFrameColumn("Verify", verify); + Assert.Equal(columnResult.Length, verify.Count()); + Assert.True(columnResult.ElementwiseEquals(verifyColumn).All()); + } + [Fact] + public void ReverseMultiplyInt64ToByteDataFrameColumn() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn column = new ByteDataFrameColumn("Byte", columnEnumerable); + long value = 5; + Int64DataFrameColumn columnResult = value * column; + var verify = Enumerable.Range(1, 10).Select(x => (long)((long)x * (long)value)); + var verifyColumn = new Int64DataFrameColumn("Verify", verify); + Assert.Equal(columnResult.Length, verify.Count()); + Assert.True(columnResult.ElementwiseEquals(verifyColumn).All()); + } + [Fact] + public void ReverseMultiplySByteToByteDataFrameColumn() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn column = new ByteDataFrameColumn("Byte", columnEnumerable); + sbyte value = 5; + Int32DataFrameColumn columnResult = value * column; + var verify = Enumerable.Range(1, 10).Select(x => (int)((int)x * (int)value)); + var verifyColumn = new Int32DataFrameColumn("Verify", verify); + Assert.Equal(columnResult.Length, verify.Count()); + Assert.True(columnResult.ElementwiseEquals(verifyColumn).All()); + } + [Fact] + public void ReverseMultiplyInt16ToByteDataFrameColumn() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn column = new ByteDataFrameColumn("Byte", columnEnumerable); + short value = 5; + Int32DataFrameColumn columnResult = value * column; + var verify = Enumerable.Range(1, 10).Select(x => (int)((int)x * (int)value)); + var verifyColumn = new Int32DataFrameColumn("Verify", verify); + Assert.Equal(columnResult.Length, verify.Count()); + Assert.True(columnResult.ElementwiseEquals(verifyColumn).All()); + } + [Fact] + public void ReverseMultiplyUInt32ToByteDataFrameColumn() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn column = new ByteDataFrameColumn("Byte", columnEnumerable); + uint value = 5; + UInt32DataFrameColumn columnResult = value * column; + var verify = Enumerable.Range(1, 10).Select(x => (uint)((uint)x * (uint)value)); + var verifyColumn = new UInt32DataFrameColumn("Verify", verify); + Assert.Equal(columnResult.Length, verify.Count()); + Assert.True(columnResult.ElementwiseEquals(verifyColumn).All()); + } + [Fact] + public void ReverseMultiplyUInt64ToByteDataFrameColumn() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn column = new ByteDataFrameColumn("Byte", columnEnumerable); + ulong value = 5; + UInt64DataFrameColumn columnResult = value * column; + var verify = Enumerable.Range(1, 10).Select(x => (ulong)((ulong)x * (ulong)value)); + var verifyColumn = new UInt64DataFrameColumn("Verify", verify); + Assert.Equal(columnResult.Length, verify.Count()); + Assert.True(columnResult.ElementwiseEquals(verifyColumn).All()); + } + [Fact] + public void ReverseMultiplyUInt16ToByteDataFrameColumn() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn column = new ByteDataFrameColumn("Byte", columnEnumerable); + ushort value = 5; + Int32DataFrameColumn columnResult = value * column; + var verify = Enumerable.Range(1, 10).Select(x => (int)((int)x * (int)value)); + var verifyColumn = new Int32DataFrameColumn("Verify", verify); + Assert.Equal(columnResult.Length, verify.Count()); + Assert.True(columnResult.ElementwiseEquals(verifyColumn).All()); + } + [Fact] + public void DivideByteDataFrameColumnToByteDataFrameColumn() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn column = new ByteDataFrameColumn("Byte", columnEnumerable); + var otherColumnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn otherColumn = new ByteDataFrameColumn("Byte", otherColumnEnumerable); + Int32DataFrameColumn columnResult = column / otherColumn; + var verify = Enumerable.Range(1, 10).Select(x => (int)(1)); + var verifyColumn = new Int32DataFrameColumn("Verify", verify); + Assert.Equal(columnResult.Length, verify.Count()); + Assert.True(columnResult.ElementwiseEquals(verifyColumn).All()); + } + [Fact] + public void DivideDecimalDataFrameColumnToByteDataFrameColumn() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn column = new ByteDataFrameColumn("Byte", columnEnumerable); + var otherColumnEnumerable = Enumerable.Range(1, 10).Select(x => (decimal)x); + DecimalDataFrameColumn otherColumn = new DecimalDataFrameColumn("Decimal", otherColumnEnumerable); + DecimalDataFrameColumn columnResult = column / otherColumn; + var verify = Enumerable.Range(1, 10).Select(x => (decimal)(1)); + var verifyColumn = new DecimalDataFrameColumn("Verify", verify); + Assert.Equal(columnResult.Length, verify.Count()); + Assert.True(columnResult.ElementwiseEquals(verifyColumn).All()); + } + [Fact] + public void DivideDoubleDataFrameColumnToByteDataFrameColumn() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn column = new ByteDataFrameColumn("Byte", columnEnumerable); + var otherColumnEnumerable = Enumerable.Range(1, 10).Select(x => (double)x); + DoubleDataFrameColumn otherColumn = new DoubleDataFrameColumn("Double", otherColumnEnumerable); + DoubleDataFrameColumn columnResult = column / otherColumn; + var verify = Enumerable.Range(1, 10).Select(x => (double)(1)); + var verifyColumn = new DoubleDataFrameColumn("Verify", verify); + Assert.Equal(columnResult.Length, verify.Count()); + Assert.True(columnResult.ElementwiseEquals(verifyColumn).All()); + } + [Fact] + public void DivideSingleDataFrameColumnToByteDataFrameColumn() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn column = new ByteDataFrameColumn("Byte", columnEnumerable); + var otherColumnEnumerable = Enumerable.Range(1, 10).Select(x => (float)x); + SingleDataFrameColumn otherColumn = new SingleDataFrameColumn("Single", otherColumnEnumerable); + SingleDataFrameColumn columnResult = column / otherColumn; + var verify = Enumerable.Range(1, 10).Select(x => (float)(1)); + var verifyColumn = new SingleDataFrameColumn("Verify", verify); + Assert.Equal(columnResult.Length, verify.Count()); + Assert.True(columnResult.ElementwiseEquals(verifyColumn).All()); + } + [Fact] + public void DivideInt32DataFrameColumnToByteDataFrameColumn() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn column = new ByteDataFrameColumn("Byte", columnEnumerable); + var otherColumnEnumerable = Enumerable.Range(1, 10).Select(x => (int)x); + Int32DataFrameColumn otherColumn = new Int32DataFrameColumn("Int32", otherColumnEnumerable); + Int32DataFrameColumn columnResult = column / otherColumn; + var verify = Enumerable.Range(1, 10).Select(x => (int)(1)); + var verifyColumn = new Int32DataFrameColumn("Verify", verify); + Assert.Equal(columnResult.Length, verify.Count()); + Assert.True(columnResult.ElementwiseEquals(verifyColumn).All()); + } + [Fact] + public void DivideInt64DataFrameColumnToByteDataFrameColumn() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn column = new ByteDataFrameColumn("Byte", columnEnumerable); + var otherColumnEnumerable = Enumerable.Range(1, 10).Select(x => (long)x); + Int64DataFrameColumn otherColumn = new Int64DataFrameColumn("Int64", otherColumnEnumerable); + Int64DataFrameColumn columnResult = column / otherColumn; + var verify = Enumerable.Range(1, 10).Select(x => (long)(1)); + var verifyColumn = new Int64DataFrameColumn("Verify", verify); + Assert.Equal(columnResult.Length, verify.Count()); + Assert.True(columnResult.ElementwiseEquals(verifyColumn).All()); + } + [Fact] + public void DivideSByteDataFrameColumnToByteDataFrameColumn() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn column = new ByteDataFrameColumn("Byte", columnEnumerable); + var otherColumnEnumerable = Enumerable.Range(1, 10).Select(x => (sbyte)x); + SByteDataFrameColumn otherColumn = new SByteDataFrameColumn("SByte", otherColumnEnumerable); + Int32DataFrameColumn columnResult = column / otherColumn; + var verify = Enumerable.Range(1, 10).Select(x => (int)(1)); + var verifyColumn = new Int32DataFrameColumn("Verify", verify); + Assert.Equal(columnResult.Length, verify.Count()); + Assert.True(columnResult.ElementwiseEquals(verifyColumn).All()); + } + [Fact] + public void DivideInt16DataFrameColumnToByteDataFrameColumn() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn column = new ByteDataFrameColumn("Byte", columnEnumerable); + var otherColumnEnumerable = Enumerable.Range(1, 10).Select(x => (short)x); + Int16DataFrameColumn otherColumn = new Int16DataFrameColumn("Int16", otherColumnEnumerable); + Int32DataFrameColumn columnResult = column / otherColumn; + var verify = Enumerable.Range(1, 10).Select(x => (int)(1)); + var verifyColumn = new Int32DataFrameColumn("Verify", verify); + Assert.Equal(columnResult.Length, verify.Count()); + Assert.True(columnResult.ElementwiseEquals(verifyColumn).All()); + } + [Fact] + public void DivideUInt32DataFrameColumnToByteDataFrameColumn() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn column = new ByteDataFrameColumn("Byte", columnEnumerable); + var otherColumnEnumerable = Enumerable.Range(1, 10).Select(x => (uint)x); + UInt32DataFrameColumn otherColumn = new UInt32DataFrameColumn("UInt32", otherColumnEnumerable); + UInt32DataFrameColumn columnResult = column / otherColumn; + var verify = Enumerable.Range(1, 10).Select(x => (uint)(1)); + var verifyColumn = new UInt32DataFrameColumn("Verify", verify); + Assert.Equal(columnResult.Length, verify.Count()); + Assert.True(columnResult.ElementwiseEquals(verifyColumn).All()); + } + [Fact] + public void DivideUInt64DataFrameColumnToByteDataFrameColumn() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn column = new ByteDataFrameColumn("Byte", columnEnumerable); + var otherColumnEnumerable = Enumerable.Range(1, 10).Select(x => (ulong)x); + UInt64DataFrameColumn otherColumn = new UInt64DataFrameColumn("UInt64", otherColumnEnumerable); + UInt64DataFrameColumn columnResult = column / otherColumn; + var verify = Enumerable.Range(1, 10).Select(x => (ulong)(1)); + var verifyColumn = new UInt64DataFrameColumn("Verify", verify); + Assert.Equal(columnResult.Length, verify.Count()); + Assert.True(columnResult.ElementwiseEquals(verifyColumn).All()); + } + [Fact] + public void DivideUInt16DataFrameColumnToByteDataFrameColumn() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn column = new ByteDataFrameColumn("Byte", columnEnumerable); + var otherColumnEnumerable = Enumerable.Range(1, 10).Select(x => (ushort)x); + UInt16DataFrameColumn otherColumn = new UInt16DataFrameColumn("UInt16", otherColumnEnumerable); + Int32DataFrameColumn columnResult = column / otherColumn; + var verify = Enumerable.Range(1, 10).Select(x => (int)(1)); + var verifyColumn = new Int32DataFrameColumn("Verify", verify); + Assert.Equal(columnResult.Length, verify.Count()); + Assert.True(columnResult.ElementwiseEquals(verifyColumn).All()); + } + [Fact] + public void DivideByteToByteDataFrameColumn() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn column = new ByteDataFrameColumn("Byte", columnEnumerable); + byte value = 5; + Int32DataFrameColumn columnResult = column / value; + var verify = Enumerable.Range(1, 10).Select(x => (int)((int)x / (int)value)); + var verifyColumn = new Int32DataFrameColumn("Verify", verify); + Assert.Equal(columnResult.Length, verify.Count()); + Assert.True(columnResult.ElementwiseEquals(verifyColumn).All()); + } + [Fact] + public void DivideDecimalToByteDataFrameColumn() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn column = new ByteDataFrameColumn("Byte", columnEnumerable); + decimal value = 5; + DecimalDataFrameColumn columnResult = column / value; + var verify = Enumerable.Range(1, 10).Select(x => (decimal)((decimal)x / (decimal)value)); + var verifyColumn = new DecimalDataFrameColumn("Verify", verify); + Assert.Equal(columnResult.Length, verify.Count()); + Assert.True(columnResult.ElementwiseEquals(verifyColumn).All()); + } + [Fact] + public void DivideDoubleToByteDataFrameColumn() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn column = new ByteDataFrameColumn("Byte", columnEnumerable); + double value = 5; + DoubleDataFrameColumn columnResult = column / value; + var verify = Enumerable.Range(1, 10).Select(x => (double)((double)x / (double)value)); + var verifyColumn = new DoubleDataFrameColumn("Verify", verify); + Assert.Equal(columnResult.Length, verify.Count()); + Assert.True(columnResult.ElementwiseEquals(verifyColumn).All()); + } + [Fact] + public void DivideSingleToByteDataFrameColumn() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn column = new ByteDataFrameColumn("Byte", columnEnumerable); + float value = 5; + SingleDataFrameColumn columnResult = column / value; + var verify = Enumerable.Range(1, 10).Select(x => (float)((float)x / (float)value)); + var verifyColumn = new SingleDataFrameColumn("Verify", verify); + Assert.Equal(columnResult.Length, verify.Count()); + Assert.True(columnResult.ElementwiseEquals(verifyColumn).All()); + } + [Fact] + public void DivideInt32ToByteDataFrameColumn() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn column = new ByteDataFrameColumn("Byte", columnEnumerable); + int value = 5; + Int32DataFrameColumn columnResult = column / value; + var verify = Enumerable.Range(1, 10).Select(x => (int)((int)x / (int)value)); + var verifyColumn = new Int32DataFrameColumn("Verify", verify); + Assert.Equal(columnResult.Length, verify.Count()); + Assert.True(columnResult.ElementwiseEquals(verifyColumn).All()); + } + [Fact] + public void DivideInt64ToByteDataFrameColumn() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn column = new ByteDataFrameColumn("Byte", columnEnumerable); + long value = 5; + Int64DataFrameColumn columnResult = column / value; + var verify = Enumerable.Range(1, 10).Select(x => (long)((long)x / (long)value)); + var verifyColumn = new Int64DataFrameColumn("Verify", verify); + Assert.Equal(columnResult.Length, verify.Count()); + Assert.True(columnResult.ElementwiseEquals(verifyColumn).All()); + } + [Fact] + public void DivideSByteToByteDataFrameColumn() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn column = new ByteDataFrameColumn("Byte", columnEnumerable); + sbyte value = 5; + Int32DataFrameColumn columnResult = column / value; + var verify = Enumerable.Range(1, 10).Select(x => (int)((int)x / (int)value)); + var verifyColumn = new Int32DataFrameColumn("Verify", verify); + Assert.Equal(columnResult.Length, verify.Count()); + Assert.True(columnResult.ElementwiseEquals(verifyColumn).All()); + } + [Fact] + public void DivideInt16ToByteDataFrameColumn() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn column = new ByteDataFrameColumn("Byte", columnEnumerable); + short value = 5; + Int32DataFrameColumn columnResult = column / value; + var verify = Enumerable.Range(1, 10).Select(x => (int)((int)x / (int)value)); + var verifyColumn = new Int32DataFrameColumn("Verify", verify); + Assert.Equal(columnResult.Length, verify.Count()); + Assert.True(columnResult.ElementwiseEquals(verifyColumn).All()); + } + [Fact] + public void DivideUInt32ToByteDataFrameColumn() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn column = new ByteDataFrameColumn("Byte", columnEnumerable); + uint value = 5; + UInt32DataFrameColumn columnResult = column / value; + var verify = Enumerable.Range(1, 10).Select(x => (uint)((uint)x / (uint)value)); + var verifyColumn = new UInt32DataFrameColumn("Verify", verify); + Assert.Equal(columnResult.Length, verify.Count()); + Assert.True(columnResult.ElementwiseEquals(verifyColumn).All()); + } + [Fact] + public void DivideUInt64ToByteDataFrameColumn() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn column = new ByteDataFrameColumn("Byte", columnEnumerable); + ulong value = 5; + UInt64DataFrameColumn columnResult = column / value; + var verify = Enumerable.Range(1, 10).Select(x => (ulong)((ulong)x / (ulong)value)); + var verifyColumn = new UInt64DataFrameColumn("Verify", verify); + Assert.Equal(columnResult.Length, verify.Count()); + Assert.True(columnResult.ElementwiseEquals(verifyColumn).All()); + } + [Fact] + public void DivideUInt16ToByteDataFrameColumn() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn column = new ByteDataFrameColumn("Byte", columnEnumerable); + ushort value = 5; + Int32DataFrameColumn columnResult = column / value; + var verify = Enumerable.Range(1, 10).Select(x => (int)((int)x / (int)value)); + var verifyColumn = new Int32DataFrameColumn("Verify", verify); + Assert.Equal(columnResult.Length, verify.Count()); + Assert.True(columnResult.ElementwiseEquals(verifyColumn).All()); + } + [Fact] + public void ReverseDivideByteToByteDataFrameColumn() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn column = new ByteDataFrameColumn("Byte", columnEnumerable); + byte value = 5; + Int32DataFrameColumn columnResult = value / column; + var verify = Enumerable.Range(1, 10).Select(x => (int)((int)value / (int)x)); + var verifyColumn = new Int32DataFrameColumn("Verify", verify); + Assert.Equal(columnResult.Length, verify.Count()); + Assert.True(columnResult.ElementwiseEquals(verifyColumn).All()); + } + [Fact] + public void ReverseDivideDecimalToByteDataFrameColumn() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn column = new ByteDataFrameColumn("Byte", columnEnumerable); + decimal value = 5; + DecimalDataFrameColumn columnResult = value / column; + var verify = Enumerable.Range(1, 10).Select(x => (decimal)((decimal)value / (decimal)x)); + var verifyColumn = new DecimalDataFrameColumn("Verify", verify); + Assert.Equal(columnResult.Length, verify.Count()); + Assert.True(columnResult.ElementwiseEquals(verifyColumn).All()); + } + [Fact] + public void ReverseDivideDoubleToByteDataFrameColumn() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn column = new ByteDataFrameColumn("Byte", columnEnumerable); + double value = 5; + DoubleDataFrameColumn columnResult = value / column; + var verify = Enumerable.Range(1, 10).Select(x => (double)((double)value / (double)x)); + var verifyColumn = new DoubleDataFrameColumn("Verify", verify); + Assert.Equal(columnResult.Length, verify.Count()); + Assert.True(columnResult.ElementwiseEquals(verifyColumn).All()); + } + [Fact] + public void ReverseDivideSingleToByteDataFrameColumn() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn column = new ByteDataFrameColumn("Byte", columnEnumerable); + float value = 5; + SingleDataFrameColumn columnResult = value / column; + var verify = Enumerable.Range(1, 10).Select(x => (float)((float)value / (float)x)); + var verifyColumn = new SingleDataFrameColumn("Verify", verify); + Assert.Equal(columnResult.Length, verify.Count()); + Assert.True(columnResult.ElementwiseEquals(verifyColumn).All()); + } + [Fact] + public void ReverseDivideInt32ToByteDataFrameColumn() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn column = new ByteDataFrameColumn("Byte", columnEnumerable); + int value = 5; + Int32DataFrameColumn columnResult = value / column; + var verify = Enumerable.Range(1, 10).Select(x => (int)((int)value / (int)x)); + var verifyColumn = new Int32DataFrameColumn("Verify", verify); + Assert.Equal(columnResult.Length, verify.Count()); + Assert.True(columnResult.ElementwiseEquals(verifyColumn).All()); + } + [Fact] + public void ReverseDivideInt64ToByteDataFrameColumn() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn column = new ByteDataFrameColumn("Byte", columnEnumerable); + long value = 5; + Int64DataFrameColumn columnResult = value / column; + var verify = Enumerable.Range(1, 10).Select(x => (long)((long)value / (long)x)); + var verifyColumn = new Int64DataFrameColumn("Verify", verify); + Assert.Equal(columnResult.Length, verify.Count()); + Assert.True(columnResult.ElementwiseEquals(verifyColumn).All()); + } + [Fact] + public void ReverseDivideSByteToByteDataFrameColumn() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn column = new ByteDataFrameColumn("Byte", columnEnumerable); + sbyte value = 5; + Int32DataFrameColumn columnResult = value / column; + var verify = Enumerable.Range(1, 10).Select(x => (int)((int)value / (int)x)); + var verifyColumn = new Int32DataFrameColumn("Verify", verify); + Assert.Equal(columnResult.Length, verify.Count()); + Assert.True(columnResult.ElementwiseEquals(verifyColumn).All()); + } + [Fact] + public void ReverseDivideInt16ToByteDataFrameColumn() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn column = new ByteDataFrameColumn("Byte", columnEnumerable); + short value = 5; + Int32DataFrameColumn columnResult = value / column; + var verify = Enumerable.Range(1, 10).Select(x => (int)((int)value / (int)x)); + var verifyColumn = new Int32DataFrameColumn("Verify", verify); + Assert.Equal(columnResult.Length, verify.Count()); + Assert.True(columnResult.ElementwiseEquals(verifyColumn).All()); + } + [Fact] + public void ReverseDivideUInt32ToByteDataFrameColumn() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn column = new ByteDataFrameColumn("Byte", columnEnumerable); + uint value = 5; + UInt32DataFrameColumn columnResult = value / column; + var verify = Enumerable.Range(1, 10).Select(x => (uint)((uint)value / (uint)x)); + var verifyColumn = new UInt32DataFrameColumn("Verify", verify); + Assert.Equal(columnResult.Length, verify.Count()); + Assert.True(columnResult.ElementwiseEquals(verifyColumn).All()); + } + [Fact] + public void ReverseDivideUInt64ToByteDataFrameColumn() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn column = new ByteDataFrameColumn("Byte", columnEnumerable); + ulong value = 5; + UInt64DataFrameColumn columnResult = value / column; + var verify = Enumerable.Range(1, 10).Select(x => (ulong)((ulong)value / (ulong)x)); + var verifyColumn = new UInt64DataFrameColumn("Verify", verify); + Assert.Equal(columnResult.Length, verify.Count()); + Assert.True(columnResult.ElementwiseEquals(verifyColumn).All()); + } + [Fact] + public void ReverseDivideUInt16ToByteDataFrameColumn() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn column = new ByteDataFrameColumn("Byte", columnEnumerable); + ushort value = 5; + Int32DataFrameColumn columnResult = value / column; + var verify = Enumerable.Range(1, 10).Select(x => (int)((int)value / (int)x)); + var verifyColumn = new Int32DataFrameColumn("Verify", verify); + Assert.Equal(columnResult.Length, verify.Count()); + Assert.True(columnResult.ElementwiseEquals(verifyColumn).All()); + } + [Fact] + public void ModuloByteDataFrameColumnToByteDataFrameColumn() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn column = new ByteDataFrameColumn("Byte", columnEnumerable); + var otherColumnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn otherColumn = new ByteDataFrameColumn("Byte", otherColumnEnumerable); + Int32DataFrameColumn columnResult = column % otherColumn; + var verify = Enumerable.Range(1, 10).Select(x => (int)(0)); + var verifyColumn = new Int32DataFrameColumn("Verify", verify); + Assert.Equal(columnResult.Length, verify.Count()); + Assert.True(columnResult.ElementwiseEquals(verifyColumn).All()); + } + [Fact] + public void ModuloDecimalDataFrameColumnToByteDataFrameColumn() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn column = new ByteDataFrameColumn("Byte", columnEnumerable); + var otherColumnEnumerable = Enumerable.Range(1, 10).Select(x => (decimal)x); + DecimalDataFrameColumn otherColumn = new DecimalDataFrameColumn("Decimal", otherColumnEnumerable); + DecimalDataFrameColumn columnResult = column % otherColumn; + var verify = Enumerable.Range(1, 10).Select(x => (decimal)(0)); + var verifyColumn = new DecimalDataFrameColumn("Verify", verify); + Assert.Equal(columnResult.Length, verify.Count()); + Assert.True(columnResult.ElementwiseEquals(verifyColumn).All()); + } + [Fact] + public void ModuloDoubleDataFrameColumnToByteDataFrameColumn() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn column = new ByteDataFrameColumn("Byte", columnEnumerable); + var otherColumnEnumerable = Enumerable.Range(1, 10).Select(x => (double)x); + DoubleDataFrameColumn otherColumn = new DoubleDataFrameColumn("Double", otherColumnEnumerable); + DoubleDataFrameColumn columnResult = column % otherColumn; + var verify = Enumerable.Range(1, 10).Select(x => (double)(0)); + var verifyColumn = new DoubleDataFrameColumn("Verify", verify); + Assert.Equal(columnResult.Length, verify.Count()); + Assert.True(columnResult.ElementwiseEquals(verifyColumn).All()); + } + [Fact] + public void ModuloSingleDataFrameColumnToByteDataFrameColumn() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn column = new ByteDataFrameColumn("Byte", columnEnumerable); + var otherColumnEnumerable = Enumerable.Range(1, 10).Select(x => (float)x); + SingleDataFrameColumn otherColumn = new SingleDataFrameColumn("Single", otherColumnEnumerable); + SingleDataFrameColumn columnResult = column % otherColumn; + var verify = Enumerable.Range(1, 10).Select(x => (float)(0)); + var verifyColumn = new SingleDataFrameColumn("Verify", verify); + Assert.Equal(columnResult.Length, verify.Count()); + Assert.True(columnResult.ElementwiseEquals(verifyColumn).All()); + } + [Fact] + public void ModuloInt32DataFrameColumnToByteDataFrameColumn() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn column = new ByteDataFrameColumn("Byte", columnEnumerable); + var otherColumnEnumerable = Enumerable.Range(1, 10).Select(x => (int)x); + Int32DataFrameColumn otherColumn = new Int32DataFrameColumn("Int32", otherColumnEnumerable); + Int32DataFrameColumn columnResult = column % otherColumn; + var verify = Enumerable.Range(1, 10).Select(x => (int)(0)); + var verifyColumn = new Int32DataFrameColumn("Verify", verify); + Assert.Equal(columnResult.Length, verify.Count()); + Assert.True(columnResult.ElementwiseEquals(verifyColumn).All()); + } + [Fact] + public void ModuloInt64DataFrameColumnToByteDataFrameColumn() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn column = new ByteDataFrameColumn("Byte", columnEnumerable); + var otherColumnEnumerable = Enumerable.Range(1, 10).Select(x => (long)x); + Int64DataFrameColumn otherColumn = new Int64DataFrameColumn("Int64", otherColumnEnumerable); + Int64DataFrameColumn columnResult = column % otherColumn; + var verify = Enumerable.Range(1, 10).Select(x => (long)(0)); + var verifyColumn = new Int64DataFrameColumn("Verify", verify); + Assert.Equal(columnResult.Length, verify.Count()); + Assert.True(columnResult.ElementwiseEquals(verifyColumn).All()); + } + [Fact] + public void ModuloSByteDataFrameColumnToByteDataFrameColumn() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn column = new ByteDataFrameColumn("Byte", columnEnumerable); + var otherColumnEnumerable = Enumerable.Range(1, 10).Select(x => (sbyte)x); + SByteDataFrameColumn otherColumn = new SByteDataFrameColumn("SByte", otherColumnEnumerable); + Int32DataFrameColumn columnResult = column % otherColumn; + var verify = Enumerable.Range(1, 10).Select(x => (int)(0)); + var verifyColumn = new Int32DataFrameColumn("Verify", verify); + Assert.Equal(columnResult.Length, verify.Count()); + Assert.True(columnResult.ElementwiseEquals(verifyColumn).All()); + } + [Fact] + public void ModuloInt16DataFrameColumnToByteDataFrameColumn() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn column = new ByteDataFrameColumn("Byte", columnEnumerable); + var otherColumnEnumerable = Enumerable.Range(1, 10).Select(x => (short)x); + Int16DataFrameColumn otherColumn = new Int16DataFrameColumn("Int16", otherColumnEnumerable); + Int32DataFrameColumn columnResult = column % otherColumn; + var verify = Enumerable.Range(1, 10).Select(x => (int)(0)); + var verifyColumn = new Int32DataFrameColumn("Verify", verify); + Assert.Equal(columnResult.Length, verify.Count()); + Assert.True(columnResult.ElementwiseEquals(verifyColumn).All()); + } + [Fact] + public void ModuloUInt32DataFrameColumnToByteDataFrameColumn() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn column = new ByteDataFrameColumn("Byte", columnEnumerable); + var otherColumnEnumerable = Enumerable.Range(1, 10).Select(x => (uint)x); + UInt32DataFrameColumn otherColumn = new UInt32DataFrameColumn("UInt32", otherColumnEnumerable); + UInt32DataFrameColumn columnResult = column % otherColumn; + var verify = Enumerable.Range(1, 10).Select(x => (uint)(0)); + var verifyColumn = new UInt32DataFrameColumn("Verify", verify); + Assert.Equal(columnResult.Length, verify.Count()); + Assert.True(columnResult.ElementwiseEquals(verifyColumn).All()); + } + [Fact] + public void ModuloUInt64DataFrameColumnToByteDataFrameColumn() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn column = new ByteDataFrameColumn("Byte", columnEnumerable); + var otherColumnEnumerable = Enumerable.Range(1, 10).Select(x => (ulong)x); + UInt64DataFrameColumn otherColumn = new UInt64DataFrameColumn("UInt64", otherColumnEnumerable); + UInt64DataFrameColumn columnResult = column % otherColumn; + var verify = Enumerable.Range(1, 10).Select(x => (ulong)(0)); + var verifyColumn = new UInt64DataFrameColumn("Verify", verify); + Assert.Equal(columnResult.Length, verify.Count()); + Assert.True(columnResult.ElementwiseEquals(verifyColumn).All()); + } + [Fact] + public void ModuloUInt16DataFrameColumnToByteDataFrameColumn() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn column = new ByteDataFrameColumn("Byte", columnEnumerable); + var otherColumnEnumerable = Enumerable.Range(1, 10).Select(x => (ushort)x); + UInt16DataFrameColumn otherColumn = new UInt16DataFrameColumn("UInt16", otherColumnEnumerable); + Int32DataFrameColumn columnResult = column % otherColumn; + var verify = Enumerable.Range(1, 10).Select(x => (int)(0)); + var verifyColumn = new Int32DataFrameColumn("Verify", verify); + Assert.Equal(columnResult.Length, verify.Count()); + Assert.True(columnResult.ElementwiseEquals(verifyColumn).All()); + } + [Fact] + public void ModuloByteToByteDataFrameColumn() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn column = new ByteDataFrameColumn("Byte", columnEnumerable); + byte value = 5; + Int32DataFrameColumn columnResult = column % value; + var verify = Enumerable.Range(1, 10).Select(x => (int)((int)x % (int)value)); + var verifyColumn = new Int32DataFrameColumn("Verify", verify); + Assert.Equal(columnResult.Length, verify.Count()); + Assert.True(columnResult.ElementwiseEquals(verifyColumn).All()); + } + [Fact] + public void ModuloDecimalToByteDataFrameColumn() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn column = new ByteDataFrameColumn("Byte", columnEnumerable); + decimal value = 5; + DecimalDataFrameColumn columnResult = column % value; + var verify = Enumerable.Range(1, 10).Select(x => (decimal)((decimal)x % (decimal)value)); + var verifyColumn = new DecimalDataFrameColumn("Verify", verify); + Assert.Equal(columnResult.Length, verify.Count()); + Assert.True(columnResult.ElementwiseEquals(verifyColumn).All()); + } + [Fact] + public void ModuloDoubleToByteDataFrameColumn() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn column = new ByteDataFrameColumn("Byte", columnEnumerable); + double value = 5; + DoubleDataFrameColumn columnResult = column % value; + var verify = Enumerable.Range(1, 10).Select(x => (double)((double)x % (double)value)); + var verifyColumn = new DoubleDataFrameColumn("Verify", verify); + Assert.Equal(columnResult.Length, verify.Count()); + Assert.True(columnResult.ElementwiseEquals(verifyColumn).All()); + } + [Fact] + public void ModuloSingleToByteDataFrameColumn() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn column = new ByteDataFrameColumn("Byte", columnEnumerable); + float value = 5; + SingleDataFrameColumn columnResult = column % value; + var verify = Enumerable.Range(1, 10).Select(x => (float)((float)x % (float)value)); + var verifyColumn = new SingleDataFrameColumn("Verify", verify); + Assert.Equal(columnResult.Length, verify.Count()); + Assert.True(columnResult.ElementwiseEquals(verifyColumn).All()); + } + [Fact] + public void ModuloInt32ToByteDataFrameColumn() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn column = new ByteDataFrameColumn("Byte", columnEnumerable); + int value = 5; + Int32DataFrameColumn columnResult = column % value; + var verify = Enumerable.Range(1, 10).Select(x => (int)((int)x % (int)value)); + var verifyColumn = new Int32DataFrameColumn("Verify", verify); + Assert.Equal(columnResult.Length, verify.Count()); + Assert.True(columnResult.ElementwiseEquals(verifyColumn).All()); + } + [Fact] + public void ModuloInt64ToByteDataFrameColumn() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn column = new ByteDataFrameColumn("Byte", columnEnumerable); + long value = 5; + Int64DataFrameColumn columnResult = column % value; + var verify = Enumerable.Range(1, 10).Select(x => (long)((long)x % (long)value)); + var verifyColumn = new Int64DataFrameColumn("Verify", verify); + Assert.Equal(columnResult.Length, verify.Count()); + Assert.True(columnResult.ElementwiseEquals(verifyColumn).All()); + } + [Fact] + public void ModuloSByteToByteDataFrameColumn() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn column = new ByteDataFrameColumn("Byte", columnEnumerable); + sbyte value = 5; + Int32DataFrameColumn columnResult = column % value; + var verify = Enumerable.Range(1, 10).Select(x => (int)((int)x % (int)value)); + var verifyColumn = new Int32DataFrameColumn("Verify", verify); + Assert.Equal(columnResult.Length, verify.Count()); + Assert.True(columnResult.ElementwiseEquals(verifyColumn).All()); + } + [Fact] + public void ModuloInt16ToByteDataFrameColumn() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn column = new ByteDataFrameColumn("Byte", columnEnumerable); + short value = 5; + Int32DataFrameColumn columnResult = column % value; + var verify = Enumerable.Range(1, 10).Select(x => (int)((int)x % (int)value)); + var verifyColumn = new Int32DataFrameColumn("Verify", verify); + Assert.Equal(columnResult.Length, verify.Count()); + Assert.True(columnResult.ElementwiseEquals(verifyColumn).All()); + } + [Fact] + public void ModuloUInt32ToByteDataFrameColumn() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn column = new ByteDataFrameColumn("Byte", columnEnumerable); + uint value = 5; + UInt32DataFrameColumn columnResult = column % value; + var verify = Enumerable.Range(1, 10).Select(x => (uint)((uint)x % (uint)value)); + var verifyColumn = new UInt32DataFrameColumn("Verify", verify); + Assert.Equal(columnResult.Length, verify.Count()); + Assert.True(columnResult.ElementwiseEquals(verifyColumn).All()); + } + [Fact] + public void ModuloUInt64ToByteDataFrameColumn() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn column = new ByteDataFrameColumn("Byte", columnEnumerable); + ulong value = 5; + UInt64DataFrameColumn columnResult = column % value; + var verify = Enumerable.Range(1, 10).Select(x => (ulong)((ulong)x % (ulong)value)); + var verifyColumn = new UInt64DataFrameColumn("Verify", verify); + Assert.Equal(columnResult.Length, verify.Count()); + Assert.True(columnResult.ElementwiseEquals(verifyColumn).All()); + } + [Fact] + public void ModuloUInt16ToByteDataFrameColumn() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn column = new ByteDataFrameColumn("Byte", columnEnumerable); + ushort value = 5; + Int32DataFrameColumn columnResult = column % value; + var verify = Enumerable.Range(1, 10).Select(x => (int)((int)x % (int)value)); + var verifyColumn = new Int32DataFrameColumn("Verify", verify); + Assert.Equal(columnResult.Length, verify.Count()); + Assert.True(columnResult.ElementwiseEquals(verifyColumn).All()); + } + [Fact] + public void ReverseModuloByteToByteDataFrameColumn() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn column = new ByteDataFrameColumn("Byte", columnEnumerable); + byte value = 5; + Int32DataFrameColumn columnResult = value % column; + var verify = Enumerable.Range(1, 10).Select(x => (int)((int)value % (int)x)); + var verifyColumn = new Int32DataFrameColumn("Verify", verify); + Assert.Equal(columnResult.Length, verify.Count()); + Assert.True(columnResult.ElementwiseEquals(verifyColumn).All()); + } + [Fact] + public void ReverseModuloDecimalToByteDataFrameColumn() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn column = new ByteDataFrameColumn("Byte", columnEnumerable); + decimal value = 5; + DecimalDataFrameColumn columnResult = value % column; + var verify = Enumerable.Range(1, 10).Select(x => (decimal)((decimal)value % (decimal)x)); + var verifyColumn = new DecimalDataFrameColumn("Verify", verify); + Assert.Equal(columnResult.Length, verify.Count()); + Assert.True(columnResult.ElementwiseEquals(verifyColumn).All()); + } + [Fact] + public void ReverseModuloDoubleToByteDataFrameColumn() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn column = new ByteDataFrameColumn("Byte", columnEnumerable); + double value = 5; + DoubleDataFrameColumn columnResult = value % column; + var verify = Enumerable.Range(1, 10).Select(x => (double)((double)value % (double)x)); + var verifyColumn = new DoubleDataFrameColumn("Verify", verify); + Assert.Equal(columnResult.Length, verify.Count()); + Assert.True(columnResult.ElementwiseEquals(verifyColumn).All()); + } + [Fact] + public void ReverseModuloSingleToByteDataFrameColumn() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn column = new ByteDataFrameColumn("Byte", columnEnumerable); + float value = 5; + SingleDataFrameColumn columnResult = value % column; + var verify = Enumerable.Range(1, 10).Select(x => (float)((float)value % (float)x)); + var verifyColumn = new SingleDataFrameColumn("Verify", verify); + Assert.Equal(columnResult.Length, verify.Count()); + Assert.True(columnResult.ElementwiseEquals(verifyColumn).All()); + } + [Fact] + public void ReverseModuloInt32ToByteDataFrameColumn() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn column = new ByteDataFrameColumn("Byte", columnEnumerable); + int value = 5; + Int32DataFrameColumn columnResult = value % column; + var verify = Enumerable.Range(1, 10).Select(x => (int)((int)value % (int)x)); + var verifyColumn = new Int32DataFrameColumn("Verify", verify); + Assert.Equal(columnResult.Length, verify.Count()); + Assert.True(columnResult.ElementwiseEquals(verifyColumn).All()); + } + [Fact] + public void ReverseModuloInt64ToByteDataFrameColumn() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn column = new ByteDataFrameColumn("Byte", columnEnumerable); + long value = 5; + Int64DataFrameColumn columnResult = value % column; + var verify = Enumerable.Range(1, 10).Select(x => (long)((long)value % (long)x)); + var verifyColumn = new Int64DataFrameColumn("Verify", verify); + Assert.Equal(columnResult.Length, verify.Count()); + Assert.True(columnResult.ElementwiseEquals(verifyColumn).All()); + } + [Fact] + public void ReverseModuloSByteToByteDataFrameColumn() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn column = new ByteDataFrameColumn("Byte", columnEnumerable); + sbyte value = 5; + Int32DataFrameColumn columnResult = value % column; + var verify = Enumerable.Range(1, 10).Select(x => (int)((int)value % (int)x)); + var verifyColumn = new Int32DataFrameColumn("Verify", verify); + Assert.Equal(columnResult.Length, verify.Count()); + Assert.True(columnResult.ElementwiseEquals(verifyColumn).All()); + } + [Fact] + public void ReverseModuloInt16ToByteDataFrameColumn() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn column = new ByteDataFrameColumn("Byte", columnEnumerable); + short value = 5; + Int32DataFrameColumn columnResult = value % column; + var verify = Enumerable.Range(1, 10).Select(x => (int)((int)value % (int)x)); + var verifyColumn = new Int32DataFrameColumn("Verify", verify); + Assert.Equal(columnResult.Length, verify.Count()); + Assert.True(columnResult.ElementwiseEquals(verifyColumn).All()); + } + [Fact] + public void ReverseModuloUInt32ToByteDataFrameColumn() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn column = new ByteDataFrameColumn("Byte", columnEnumerable); + uint value = 5; + UInt32DataFrameColumn columnResult = value % column; + var verify = Enumerable.Range(1, 10).Select(x => (uint)((uint)value % (uint)x)); + var verifyColumn = new UInt32DataFrameColumn("Verify", verify); + Assert.Equal(columnResult.Length, verify.Count()); + Assert.True(columnResult.ElementwiseEquals(verifyColumn).All()); + } + [Fact] + public void ReverseModuloUInt64ToByteDataFrameColumn() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn column = new ByteDataFrameColumn("Byte", columnEnumerable); + ulong value = 5; + UInt64DataFrameColumn columnResult = value % column; + var verify = Enumerable.Range(1, 10).Select(x => (ulong)((ulong)value % (ulong)x)); + var verifyColumn = new UInt64DataFrameColumn("Verify", verify); + Assert.Equal(columnResult.Length, verify.Count()); + Assert.True(columnResult.ElementwiseEquals(verifyColumn).All()); + } + [Fact] + public void ReverseModuloUInt16ToByteDataFrameColumn() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn column = new ByteDataFrameColumn("Byte", columnEnumerable); + ushort value = 5; + Int32DataFrameColumn columnResult = value % column; + var verify = Enumerable.Range(1, 10).Select(x => (int)((int)value % (int)x)); + var verifyColumn = new Int32DataFrameColumn("Verify", verify); + Assert.Equal(columnResult.Length, verify.Count()); + Assert.True(columnResult.ElementwiseEquals(verifyColumn).All()); + } + [Fact] + public void ElementwiseEqualsBooleanToByte() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn column = new ByteDataFrameColumn("Byte", columnEnumerable); + var otherColumnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn otherColumn = new ByteDataFrameColumn("Byte", otherColumnEnumerable); + BooleanDataFrameColumn columnResult = column.ElementwiseEquals(otherColumn); + var verify = Enumerable.Range(1, 10).Select(x => true); + var verifyColumn = new BooleanDataFrameColumn("Verify", verify); + Assert.Equal(columnResult.Length, verify.Count()); + + // If this is equals, change thisx to false + Assert.True(columnResult.ElementwiseEquals(verifyColumn).All()); + } + [Fact] + public void ElementwiseEqualsBooleanToDecimal() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn column = new ByteDataFrameColumn("Byte", columnEnumerable); + var otherColumnEnumerable = Enumerable.Range(1, 10).Select(x => (decimal)x); + DecimalDataFrameColumn otherColumn = new DecimalDataFrameColumn("Decimal", otherColumnEnumerable); + BooleanDataFrameColumn columnResult = column.ElementwiseEquals(otherColumn); + var verify = Enumerable.Range(1, 10).Select(x => true); + var verifyColumn = new BooleanDataFrameColumn("Verify", verify); + Assert.Equal(columnResult.Length, verify.Count()); + + // If this is equals, change thisx to false + Assert.True(columnResult.ElementwiseEquals(verifyColumn).All()); + } + [Fact] + public void ElementwiseEqualsBooleanToDouble() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn column = new ByteDataFrameColumn("Byte", columnEnumerable); + var otherColumnEnumerable = Enumerable.Range(1, 10).Select(x => (double)x); + DoubleDataFrameColumn otherColumn = new DoubleDataFrameColumn("Double", otherColumnEnumerable); + BooleanDataFrameColumn columnResult = column.ElementwiseEquals(otherColumn); + var verify = Enumerable.Range(1, 10).Select(x => true); + var verifyColumn = new BooleanDataFrameColumn("Verify", verify); + Assert.Equal(columnResult.Length, verify.Count()); + + // If this is equals, change thisx to false + Assert.True(columnResult.ElementwiseEquals(verifyColumn).All()); + } + [Fact] + public void ElementwiseEqualsBooleanToSingle() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn column = new ByteDataFrameColumn("Byte", columnEnumerable); + var otherColumnEnumerable = Enumerable.Range(1, 10).Select(x => (float)x); + SingleDataFrameColumn otherColumn = new SingleDataFrameColumn("Single", otherColumnEnumerable); + BooleanDataFrameColumn columnResult = column.ElementwiseEquals(otherColumn); + var verify = Enumerable.Range(1, 10).Select(x => true); + var verifyColumn = new BooleanDataFrameColumn("Verify", verify); + Assert.Equal(columnResult.Length, verify.Count()); + + // If this is equals, change thisx to false + Assert.True(columnResult.ElementwiseEquals(verifyColumn).All()); + } + [Fact] + public void ElementwiseEqualsBooleanToInt32() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn column = new ByteDataFrameColumn("Byte", columnEnumerable); + var otherColumnEnumerable = Enumerable.Range(1, 10).Select(x => (int)x); + Int32DataFrameColumn otherColumn = new Int32DataFrameColumn("Int32", otherColumnEnumerable); + BooleanDataFrameColumn columnResult = column.ElementwiseEquals(otherColumn); + var verify = Enumerable.Range(1, 10).Select(x => true); + var verifyColumn = new BooleanDataFrameColumn("Verify", verify); + Assert.Equal(columnResult.Length, verify.Count()); + + // If this is equals, change thisx to false + Assert.True(columnResult.ElementwiseEquals(verifyColumn).All()); + } + [Fact] + public void ElementwiseEqualsBooleanToInt64() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn column = new ByteDataFrameColumn("Byte", columnEnumerable); + var otherColumnEnumerable = Enumerable.Range(1, 10).Select(x => (long)x); + Int64DataFrameColumn otherColumn = new Int64DataFrameColumn("Int64", otherColumnEnumerable); + BooleanDataFrameColumn columnResult = column.ElementwiseEquals(otherColumn); + var verify = Enumerable.Range(1, 10).Select(x => true); + var verifyColumn = new BooleanDataFrameColumn("Verify", verify); + Assert.Equal(columnResult.Length, verify.Count()); + + // If this is equals, change thisx to false + Assert.True(columnResult.ElementwiseEquals(verifyColumn).All()); + } + [Fact] + public void ElementwiseEqualsBooleanToSByte() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn column = new ByteDataFrameColumn("Byte", columnEnumerable); + var otherColumnEnumerable = Enumerable.Range(1, 10).Select(x => (sbyte)x); + SByteDataFrameColumn otherColumn = new SByteDataFrameColumn("SByte", otherColumnEnumerable); + BooleanDataFrameColumn columnResult = column.ElementwiseEquals(otherColumn); + var verify = Enumerable.Range(1, 10).Select(x => true); + var verifyColumn = new BooleanDataFrameColumn("Verify", verify); + Assert.Equal(columnResult.Length, verify.Count()); + + // If this is equals, change thisx to false + Assert.True(columnResult.ElementwiseEquals(verifyColumn).All()); + } + [Fact] + public void ElementwiseEqualsBooleanToInt16() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn column = new ByteDataFrameColumn("Byte", columnEnumerable); + var otherColumnEnumerable = Enumerable.Range(1, 10).Select(x => (short)x); + Int16DataFrameColumn otherColumn = new Int16DataFrameColumn("Int16", otherColumnEnumerable); + BooleanDataFrameColumn columnResult = column.ElementwiseEquals(otherColumn); + var verify = Enumerable.Range(1, 10).Select(x => true); + var verifyColumn = new BooleanDataFrameColumn("Verify", verify); + Assert.Equal(columnResult.Length, verify.Count()); + + // If this is equals, change thisx to false + Assert.True(columnResult.ElementwiseEquals(verifyColumn).All()); + } + [Fact] + public void ElementwiseEqualsBooleanToUInt32() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn column = new ByteDataFrameColumn("Byte", columnEnumerable); + var otherColumnEnumerable = Enumerable.Range(1, 10).Select(x => (uint)x); + UInt32DataFrameColumn otherColumn = new UInt32DataFrameColumn("UInt32", otherColumnEnumerable); + BooleanDataFrameColumn columnResult = column.ElementwiseEquals(otherColumn); + var verify = Enumerable.Range(1, 10).Select(x => true); + var verifyColumn = new BooleanDataFrameColumn("Verify", verify); + Assert.Equal(columnResult.Length, verify.Count()); + + // If this is equals, change thisx to false + Assert.True(columnResult.ElementwiseEquals(verifyColumn).All()); + } + [Fact] + public void ElementwiseEqualsBooleanToUInt64() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn column = new ByteDataFrameColumn("Byte", columnEnumerable); + var otherColumnEnumerable = Enumerable.Range(1, 10).Select(x => (ulong)x); + UInt64DataFrameColumn otherColumn = new UInt64DataFrameColumn("UInt64", otherColumnEnumerable); + BooleanDataFrameColumn columnResult = column.ElementwiseEquals(otherColumn); + var verify = Enumerable.Range(1, 10).Select(x => true); + var verifyColumn = new BooleanDataFrameColumn("Verify", verify); + Assert.Equal(columnResult.Length, verify.Count()); + + // If this is equals, change thisx to false + Assert.True(columnResult.ElementwiseEquals(verifyColumn).All()); + } + [Fact] + public void ElementwiseEqualsBooleanToUInt16() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn column = new ByteDataFrameColumn("Byte", columnEnumerable); + var otherColumnEnumerable = Enumerable.Range(1, 10).Select(x => (ushort)x); + UInt16DataFrameColumn otherColumn = new UInt16DataFrameColumn("UInt16", otherColumnEnumerable); + BooleanDataFrameColumn columnResult = column.ElementwiseEquals(otherColumn); + var verify = Enumerable.Range(1, 10).Select(x => true); + var verifyColumn = new BooleanDataFrameColumn("Verify", verify); + Assert.Equal(columnResult.Length, verify.Count()); + + // If this is equals, change thisx to false + Assert.True(columnResult.ElementwiseEquals(verifyColumn).All()); + } + [Fact] + public void ElementwiseEqualsBooleanToScalarByte() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn column = new ByteDataFrameColumn("Byte", columnEnumerable); + byte value = 100; + BooleanDataFrameColumn columnResult = column.ElementwiseEquals(value); + var verify = Enumerable.Range(1, 10).Select(x => (bool)(false)); + var verifyColumn = new BooleanDataFrameColumn("Verify", verify); + Assert.Equal(columnResult.Length, verify.Count()); + Assert.True(columnResult.ElementwiseEquals(verifyColumn).All()); + } + [Fact] + public void ElementwiseEqualsBooleanToScalarDecimal() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn column = new ByteDataFrameColumn("Byte", columnEnumerable); + decimal value = 100; + BooleanDataFrameColumn columnResult = column.ElementwiseEquals(value); + var verify = Enumerable.Range(1, 10).Select(x => (bool)(false)); + var verifyColumn = new BooleanDataFrameColumn("Verify", verify); + Assert.Equal(columnResult.Length, verify.Count()); + Assert.True(columnResult.ElementwiseEquals(verifyColumn).All()); + } + [Fact] + public void ElementwiseEqualsBooleanToScalarDouble() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn column = new ByteDataFrameColumn("Byte", columnEnumerable); + double value = 100; + BooleanDataFrameColumn columnResult = column.ElementwiseEquals(value); + var verify = Enumerable.Range(1, 10).Select(x => (bool)(false)); + var verifyColumn = new BooleanDataFrameColumn("Verify", verify); + Assert.Equal(columnResult.Length, verify.Count()); + Assert.True(columnResult.ElementwiseEquals(verifyColumn).All()); + } + [Fact] + public void ElementwiseEqualsBooleanToScalarSingle() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn column = new ByteDataFrameColumn("Byte", columnEnumerable); + float value = 100; + BooleanDataFrameColumn columnResult = column.ElementwiseEquals(value); + var verify = Enumerable.Range(1, 10).Select(x => (bool)(false)); + var verifyColumn = new BooleanDataFrameColumn("Verify", verify); + Assert.Equal(columnResult.Length, verify.Count()); + Assert.True(columnResult.ElementwiseEquals(verifyColumn).All()); + } + [Fact] + public void ElementwiseEqualsBooleanToScalarInt32() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn column = new ByteDataFrameColumn("Byte", columnEnumerable); + int value = 100; + BooleanDataFrameColumn columnResult = column.ElementwiseEquals(value); + var verify = Enumerable.Range(1, 10).Select(x => (bool)(false)); + var verifyColumn = new BooleanDataFrameColumn("Verify", verify); + Assert.Equal(columnResult.Length, verify.Count()); + Assert.True(columnResult.ElementwiseEquals(verifyColumn).All()); + } + [Fact] + public void ElementwiseEqualsBooleanToScalarInt64() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn column = new ByteDataFrameColumn("Byte", columnEnumerable); + long value = 100; + BooleanDataFrameColumn columnResult = column.ElementwiseEquals(value); + var verify = Enumerable.Range(1, 10).Select(x => (bool)(false)); + var verifyColumn = new BooleanDataFrameColumn("Verify", verify); + Assert.Equal(columnResult.Length, verify.Count()); + Assert.True(columnResult.ElementwiseEquals(verifyColumn).All()); + } + [Fact] + public void ElementwiseEqualsBooleanToScalarSByte() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn column = new ByteDataFrameColumn("Byte", columnEnumerable); + sbyte value = 100; + BooleanDataFrameColumn columnResult = column.ElementwiseEquals(value); + var verify = Enumerable.Range(1, 10).Select(x => (bool)(false)); + var verifyColumn = new BooleanDataFrameColumn("Verify", verify); + Assert.Equal(columnResult.Length, verify.Count()); + Assert.True(columnResult.ElementwiseEquals(verifyColumn).All()); + } + [Fact] + public void ElementwiseEqualsBooleanToScalarInt16() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn column = new ByteDataFrameColumn("Byte", columnEnumerable); + short value = 100; + BooleanDataFrameColumn columnResult = column.ElementwiseEquals(value); + var verify = Enumerable.Range(1, 10).Select(x => (bool)(false)); + var verifyColumn = new BooleanDataFrameColumn("Verify", verify); + Assert.Equal(columnResult.Length, verify.Count()); + Assert.True(columnResult.ElementwiseEquals(verifyColumn).All()); + } + [Fact] + public void ElementwiseEqualsBooleanToScalarUInt32() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn column = new ByteDataFrameColumn("Byte", columnEnumerable); + uint value = 100; + BooleanDataFrameColumn columnResult = column.ElementwiseEquals(value); + var verify = Enumerable.Range(1, 10).Select(x => (bool)(false)); + var verifyColumn = new BooleanDataFrameColumn("Verify", verify); + Assert.Equal(columnResult.Length, verify.Count()); + Assert.True(columnResult.ElementwiseEquals(verifyColumn).All()); + } + [Fact] + public void ElementwiseEqualsBooleanToScalarUInt64() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn column = new ByteDataFrameColumn("Byte", columnEnumerable); + ulong value = 100; + BooleanDataFrameColumn columnResult = column.ElementwiseEquals(value); + var verify = Enumerable.Range(1, 10).Select(x => (bool)(false)); + var verifyColumn = new BooleanDataFrameColumn("Verify", verify); + Assert.Equal(columnResult.Length, verify.Count()); + Assert.True(columnResult.ElementwiseEquals(verifyColumn).All()); + } + [Fact] + public void ElementwiseEqualsBooleanToScalarUInt16() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn column = new ByteDataFrameColumn("Byte", columnEnumerable); + ushort value = 100; + BooleanDataFrameColumn columnResult = column.ElementwiseEquals(value); + var verify = Enumerable.Range(1, 10).Select(x => (bool)(false)); + var verifyColumn = new BooleanDataFrameColumn("Verify", verify); + Assert.Equal(columnResult.Length, verify.Count()); + Assert.True(columnResult.ElementwiseEquals(verifyColumn).All()); + } + [Fact] + public void ElementwiseNotEqualsBooleanToByte() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn column = new ByteDataFrameColumn("Byte", columnEnumerable); + var otherColumnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn otherColumn = new ByteDataFrameColumn("Byte", otherColumnEnumerable); + BooleanDataFrameColumn columnResult = column.ElementwiseNotEquals(otherColumn); + var verify = Enumerable.Range(1, 10).Select(x => true); + var verifyColumn = new BooleanDataFrameColumn("Verify", verify); + Assert.Equal(columnResult.Length, verify.Count()); + + // If this is equals, change thisx to false + Assert.True(columnResult.ElementwiseNotEquals(verifyColumn).All()); + } + [Fact] + public void ElementwiseNotEqualsBooleanToDecimal() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn column = new ByteDataFrameColumn("Byte", columnEnumerable); + var otherColumnEnumerable = Enumerable.Range(1, 10).Select(x => (decimal)x); + DecimalDataFrameColumn otherColumn = new DecimalDataFrameColumn("Decimal", otherColumnEnumerable); + BooleanDataFrameColumn columnResult = column.ElementwiseNotEquals(otherColumn); + var verify = Enumerable.Range(1, 10).Select(x => true); + var verifyColumn = new BooleanDataFrameColumn("Verify", verify); + Assert.Equal(columnResult.Length, verify.Count()); + + // If this is equals, change thisx to false + Assert.True(columnResult.ElementwiseNotEquals(verifyColumn).All()); + } + [Fact] + public void ElementwiseNotEqualsBooleanToDouble() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn column = new ByteDataFrameColumn("Byte", columnEnumerable); + var otherColumnEnumerable = Enumerable.Range(1, 10).Select(x => (double)x); + DoubleDataFrameColumn otherColumn = new DoubleDataFrameColumn("Double", otherColumnEnumerable); + BooleanDataFrameColumn columnResult = column.ElementwiseNotEquals(otherColumn); + var verify = Enumerable.Range(1, 10).Select(x => true); + var verifyColumn = new BooleanDataFrameColumn("Verify", verify); + Assert.Equal(columnResult.Length, verify.Count()); + + // If this is equals, change thisx to false + Assert.True(columnResult.ElementwiseNotEquals(verifyColumn).All()); + } + [Fact] + public void ElementwiseNotEqualsBooleanToSingle() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn column = new ByteDataFrameColumn("Byte", columnEnumerable); + var otherColumnEnumerable = Enumerable.Range(1, 10).Select(x => (float)x); + SingleDataFrameColumn otherColumn = new SingleDataFrameColumn("Single", otherColumnEnumerable); + BooleanDataFrameColumn columnResult = column.ElementwiseNotEquals(otherColumn); + var verify = Enumerable.Range(1, 10).Select(x => true); + var verifyColumn = new BooleanDataFrameColumn("Verify", verify); + Assert.Equal(columnResult.Length, verify.Count()); + + // If this is equals, change thisx to false + Assert.True(columnResult.ElementwiseNotEquals(verifyColumn).All()); + } + [Fact] + public void ElementwiseNotEqualsBooleanToInt32() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn column = new ByteDataFrameColumn("Byte", columnEnumerable); + var otherColumnEnumerable = Enumerable.Range(1, 10).Select(x => (int)x); + Int32DataFrameColumn otherColumn = new Int32DataFrameColumn("Int32", otherColumnEnumerable); + BooleanDataFrameColumn columnResult = column.ElementwiseNotEquals(otherColumn); + var verify = Enumerable.Range(1, 10).Select(x => true); + var verifyColumn = new BooleanDataFrameColumn("Verify", verify); + Assert.Equal(columnResult.Length, verify.Count()); + + // If this is equals, change thisx to false + Assert.True(columnResult.ElementwiseNotEquals(verifyColumn).All()); + } + [Fact] + public void ElementwiseNotEqualsBooleanToInt64() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn column = new ByteDataFrameColumn("Byte", columnEnumerable); + var otherColumnEnumerable = Enumerable.Range(1, 10).Select(x => (long)x); + Int64DataFrameColumn otherColumn = new Int64DataFrameColumn("Int64", otherColumnEnumerable); + BooleanDataFrameColumn columnResult = column.ElementwiseNotEquals(otherColumn); + var verify = Enumerable.Range(1, 10).Select(x => true); + var verifyColumn = new BooleanDataFrameColumn("Verify", verify); + Assert.Equal(columnResult.Length, verify.Count()); + + // If this is equals, change thisx to false + Assert.True(columnResult.ElementwiseNotEquals(verifyColumn).All()); + } + [Fact] + public void ElementwiseNotEqualsBooleanToSByte() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn column = new ByteDataFrameColumn("Byte", columnEnumerable); + var otherColumnEnumerable = Enumerable.Range(1, 10).Select(x => (sbyte)x); + SByteDataFrameColumn otherColumn = new SByteDataFrameColumn("SByte", otherColumnEnumerable); + BooleanDataFrameColumn columnResult = column.ElementwiseNotEquals(otherColumn); + var verify = Enumerable.Range(1, 10).Select(x => true); + var verifyColumn = new BooleanDataFrameColumn("Verify", verify); + Assert.Equal(columnResult.Length, verify.Count()); + + // If this is equals, change thisx to false + Assert.True(columnResult.ElementwiseNotEquals(verifyColumn).All()); + } + [Fact] + public void ElementwiseNotEqualsBooleanToInt16() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn column = new ByteDataFrameColumn("Byte", columnEnumerable); + var otherColumnEnumerable = Enumerable.Range(1, 10).Select(x => (short)x); + Int16DataFrameColumn otherColumn = new Int16DataFrameColumn("Int16", otherColumnEnumerable); + BooleanDataFrameColumn columnResult = column.ElementwiseNotEquals(otherColumn); + var verify = Enumerable.Range(1, 10).Select(x => true); + var verifyColumn = new BooleanDataFrameColumn("Verify", verify); + Assert.Equal(columnResult.Length, verify.Count()); + + // If this is equals, change thisx to false + Assert.True(columnResult.ElementwiseNotEquals(verifyColumn).All()); + } + [Fact] + public void ElementwiseNotEqualsBooleanToUInt32() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn column = new ByteDataFrameColumn("Byte", columnEnumerable); + var otherColumnEnumerable = Enumerable.Range(1, 10).Select(x => (uint)x); + UInt32DataFrameColumn otherColumn = new UInt32DataFrameColumn("UInt32", otherColumnEnumerable); + BooleanDataFrameColumn columnResult = column.ElementwiseNotEquals(otherColumn); + var verify = Enumerable.Range(1, 10).Select(x => true); + var verifyColumn = new BooleanDataFrameColumn("Verify", verify); + Assert.Equal(columnResult.Length, verify.Count()); + + // If this is equals, change thisx to false + Assert.True(columnResult.ElementwiseNotEquals(verifyColumn).All()); + } + [Fact] + public void ElementwiseNotEqualsBooleanToUInt64() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn column = new ByteDataFrameColumn("Byte", columnEnumerable); + var otherColumnEnumerable = Enumerable.Range(1, 10).Select(x => (ulong)x); + UInt64DataFrameColumn otherColumn = new UInt64DataFrameColumn("UInt64", otherColumnEnumerable); + BooleanDataFrameColumn columnResult = column.ElementwiseNotEquals(otherColumn); + var verify = Enumerable.Range(1, 10).Select(x => true); + var verifyColumn = new BooleanDataFrameColumn("Verify", verify); + Assert.Equal(columnResult.Length, verify.Count()); + + // If this is equals, change thisx to false + Assert.True(columnResult.ElementwiseNotEquals(verifyColumn).All()); + } + [Fact] + public void ElementwiseNotEqualsBooleanToUInt16() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn column = new ByteDataFrameColumn("Byte", columnEnumerable); + var otherColumnEnumerable = Enumerable.Range(1, 10).Select(x => (ushort)x); + UInt16DataFrameColumn otherColumn = new UInt16DataFrameColumn("UInt16", otherColumnEnumerable); + BooleanDataFrameColumn columnResult = column.ElementwiseNotEquals(otherColumn); + var verify = Enumerable.Range(1, 10).Select(x => true); + var verifyColumn = new BooleanDataFrameColumn("Verify", verify); + Assert.Equal(columnResult.Length, verify.Count()); + + // If this is equals, change thisx to false + Assert.True(columnResult.ElementwiseNotEquals(verifyColumn).All()); + } + [Fact] + public void ElementwiseNotEqualsBooleanToScalarByte() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn column = new ByteDataFrameColumn("Byte", columnEnumerable); + byte value = 100; + BooleanDataFrameColumn columnResult = column.ElementwiseNotEquals(value); + var verify = Enumerable.Range(1, 10).Select(x => (bool)(false)); + var verifyColumn = new BooleanDataFrameColumn("Verify", verify); + Assert.Equal(columnResult.Length, verify.Count()); + Assert.True(columnResult.ElementwiseNotEquals(verifyColumn).All()); + } + [Fact] + public void ElementwiseNotEqualsBooleanToScalarDecimal() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn column = new ByteDataFrameColumn("Byte", columnEnumerable); + decimal value = 100; + BooleanDataFrameColumn columnResult = column.ElementwiseNotEquals(value); + var verify = Enumerable.Range(1, 10).Select(x => (bool)(false)); + var verifyColumn = new BooleanDataFrameColumn("Verify", verify); + Assert.Equal(columnResult.Length, verify.Count()); + Assert.True(columnResult.ElementwiseNotEquals(verifyColumn).All()); + } + [Fact] + public void ElementwiseNotEqualsBooleanToScalarDouble() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn column = new ByteDataFrameColumn("Byte", columnEnumerable); + double value = 100; + BooleanDataFrameColumn columnResult = column.ElementwiseNotEquals(value); + var verify = Enumerable.Range(1, 10).Select(x => (bool)(false)); + var verifyColumn = new BooleanDataFrameColumn("Verify", verify); + Assert.Equal(columnResult.Length, verify.Count()); + Assert.True(columnResult.ElementwiseNotEquals(verifyColumn).All()); + } + [Fact] + public void ElementwiseNotEqualsBooleanToScalarSingle() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn column = new ByteDataFrameColumn("Byte", columnEnumerable); + float value = 100; + BooleanDataFrameColumn columnResult = column.ElementwiseNotEquals(value); + var verify = Enumerable.Range(1, 10).Select(x => (bool)(false)); + var verifyColumn = new BooleanDataFrameColumn("Verify", verify); + Assert.Equal(columnResult.Length, verify.Count()); + Assert.True(columnResult.ElementwiseNotEquals(verifyColumn).All()); + } + [Fact] + public void ElementwiseNotEqualsBooleanToScalarInt32() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn column = new ByteDataFrameColumn("Byte", columnEnumerable); + int value = 100; + BooleanDataFrameColumn columnResult = column.ElementwiseNotEquals(value); + var verify = Enumerable.Range(1, 10).Select(x => (bool)(false)); + var verifyColumn = new BooleanDataFrameColumn("Verify", verify); + Assert.Equal(columnResult.Length, verify.Count()); + Assert.True(columnResult.ElementwiseNotEquals(verifyColumn).All()); + } + [Fact] + public void ElementwiseNotEqualsBooleanToScalarInt64() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn column = new ByteDataFrameColumn("Byte", columnEnumerable); + long value = 100; + BooleanDataFrameColumn columnResult = column.ElementwiseNotEquals(value); + var verify = Enumerable.Range(1, 10).Select(x => (bool)(false)); + var verifyColumn = new BooleanDataFrameColumn("Verify", verify); + Assert.Equal(columnResult.Length, verify.Count()); + Assert.True(columnResult.ElementwiseNotEquals(verifyColumn).All()); + } + [Fact] + public void ElementwiseNotEqualsBooleanToScalarSByte() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn column = new ByteDataFrameColumn("Byte", columnEnumerable); + sbyte value = 100; + BooleanDataFrameColumn columnResult = column.ElementwiseNotEquals(value); + var verify = Enumerable.Range(1, 10).Select(x => (bool)(false)); + var verifyColumn = new BooleanDataFrameColumn("Verify", verify); + Assert.Equal(columnResult.Length, verify.Count()); + Assert.True(columnResult.ElementwiseNotEquals(verifyColumn).All()); + } + [Fact] + public void ElementwiseNotEqualsBooleanToScalarInt16() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn column = new ByteDataFrameColumn("Byte", columnEnumerable); + short value = 100; + BooleanDataFrameColumn columnResult = column.ElementwiseNotEquals(value); + var verify = Enumerable.Range(1, 10).Select(x => (bool)(false)); + var verifyColumn = new BooleanDataFrameColumn("Verify", verify); + Assert.Equal(columnResult.Length, verify.Count()); + Assert.True(columnResult.ElementwiseNotEquals(verifyColumn).All()); + } + [Fact] + public void ElementwiseNotEqualsBooleanToScalarUInt32() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn column = new ByteDataFrameColumn("Byte", columnEnumerable); + uint value = 100; + BooleanDataFrameColumn columnResult = column.ElementwiseNotEquals(value); + var verify = Enumerable.Range(1, 10).Select(x => (bool)(false)); + var verifyColumn = new BooleanDataFrameColumn("Verify", verify); + Assert.Equal(columnResult.Length, verify.Count()); + Assert.True(columnResult.ElementwiseNotEquals(verifyColumn).All()); + } + [Fact] + public void ElementwiseNotEqualsBooleanToScalarUInt64() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn column = new ByteDataFrameColumn("Byte", columnEnumerable); + ulong value = 100; + BooleanDataFrameColumn columnResult = column.ElementwiseNotEquals(value); + var verify = Enumerable.Range(1, 10).Select(x => (bool)(false)); + var verifyColumn = new BooleanDataFrameColumn("Verify", verify); + Assert.Equal(columnResult.Length, verify.Count()); + Assert.True(columnResult.ElementwiseNotEquals(verifyColumn).All()); + } + [Fact] + public void ElementwiseNotEqualsBooleanToScalarUInt16() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (byte)x); + ByteDataFrameColumn column = new ByteDataFrameColumn("Byte", columnEnumerable); + ushort value = 100; + BooleanDataFrameColumn columnResult = column.ElementwiseNotEquals(value); + var verify = Enumerable.Range(1, 10).Select(x => (bool)(false)); + var verifyColumn = new BooleanDataFrameColumn("Verify", verify); + Assert.Equal(columnResult.Length, verify.Count()); + Assert.True(columnResult.ElementwiseNotEquals(verifyColumn).All()); + } + } +} diff --git a/test/Microsoft.Data.Analysis.Tests/DataFrameColumn.BinaryOperationTests.tt b/test/Microsoft.Data.Analysis.Tests/DataFrameColumn.BinaryOperationTests.tt new file mode 100644 index 0000000000..08597cc83b --- /dev/null +++ b/test/Microsoft.Data.Analysis.Tests/DataFrameColumn.BinaryOperationTests.tt @@ -0,0 +1,626 @@ +<#@ template debug="false" hostspecific="false" language="C#" #> +<#@ assembly name="System.Core" #> +<#@ import namespace="System.Linq" #> +<#@ import namespace="System.Text" #> +<#@ import namespace="System.Collections.Generic" #> +<#@ output extension=".cs" #> +<#@ include file="..\..\src\Microsoft.Data.Analysis\ColumnArithmeticTemplate.ttinclude"#> +<#@ include file="..\..\src\Microsoft.Data.Analysis\PrimitiveDataFrameColumn.BinaryOperations.Combinations.ttinclude" #> +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +// Generated from DataFrameColumn.BinaryOperationTests.tt. Do not modify directly + +using System; +using System.Collections.Generic; +using System.Linq; +using Xunit; + +namespace Microsoft.Data.Analysis.Tests +{ + public partial class DataFrameColumnTests + { +<# +bool supportedInPlace(string type1, string type2) +{ + primitiveTypeToPrimitivityLevelMap.TryGetValue(type1, out int columnTypeLevel); + primitiveTypeToPrimitivityLevelMap.TryGetValue(type2, out int otherColumnTypeLevel); + if (columnTypeLevel < otherColumnTypeLevel) + { + return false; + } + return true; +} +#> +<# +void GenerateBinaryVerify(string methodName, string fullReturnType, string returnType) +{ +#> +<# + if (methodName == "Add") + { +#> + var verify = Enumerable.Range(1, 10).Select(x => (<#=returnType#>)(2 * x)); + var verifyColumn = new <#=fullReturnType#>("Verify", verify); +<# + } + else if (methodName == "Subtract") + { +#> + var verify = Enumerable.Range(1, 10).Select(x => (<#=returnType#>)0); + var verifyColumn = new <#=fullReturnType#>("Verify", verify); +<# + } + else if (methodName == "Multiply") + { +#> + var verify = Enumerable.Range(1, 10).Select(x => (<#=returnType#>)(x * x)); + var verifyColumn = new <#=fullReturnType#>("Verify", verify); +<# + } + else if (methodName == "Divide") + { +#> + var verify = Enumerable.Range(1, 10).Select(x => (<#=returnType#>)(1)); + var verifyColumn = new <#=fullReturnType#>("Verify", verify); +<# + } + else if (methodName == "Modulo") + { +#> + var verify = Enumerable.Range(1, 10).Select(x => (<#=returnType#>)(0)); + var verifyColumn = new <#=fullReturnType#>("Verify", verify); +<# + } +#> +<# +} +#> +<# +// Only generate the tests for ByteDataFrameColumn. It exercises all the possible paths since it includes cloning the non byte columns and keeps the number of tests low enough. +void GenerateAllBinaryTestsForMethod(string methodName, string methodOperator) +{ + foreach (TypeCombination types in BinaryOperationCombinations.binaryOperationCombinations) +{ + string returnType = types.ReturnColumnType; + string columnType = types.ThisColumnType; + if (columnType != "byte") + { + continue; + } + string otherColumnType = types.OtherColumnType; + + string fullColumnType = GetCapitalizedPrimitiveTypes(columnType) + "DataFrameColumn"; + string fullReturnType = GetCapitalizedPrimitiveTypes(returnType) + "DataFrameColumn"; + string fullOtherColumnType = GetCapitalizedPrimitiveTypes(otherColumnType) + "DataFrameColumn"; + + string capitalizedReturnType = GetCapitalizedPrimitiveTypes(returnType); + string capitalizedColumnType = GetCapitalizedPrimitiveTypes(columnType); + string capitalizedOtherColumnType = GetCapitalizedPrimitiveTypes(otherColumnType); +#> + [Fact] + public void <#=methodName#><#=fullOtherColumnType#>To<#=fullColumnType#>() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (<#=columnType#>)x); + <#=fullColumnType#> column = new <#=fullColumnType#>("<#=capitalizedColumnType#>", columnEnumerable); + var otherColumnEnumerable = Enumerable.Range(1, 10).Select(x => (<#=otherColumnType#>)x); + <#=fullOtherColumnType#> otherColumn = new <#=fullOtherColumnType#>("<#=capitalizedOtherColumnType#>", otherColumnEnumerable); + <#=fullReturnType#> columnResult = column <#=methodOperator#> otherColumn; +<#GenerateBinaryVerify(methodName, fullReturnType, returnType); #> + Assert.Equal(columnResult.Length, verify.Count()); + Assert.True(columnResult.ElementwiseEquals(verifyColumn).All()); + } +<# +} +} +#> +<# +void GenerateBinaryScalarVerify(string methodName, string fullReturnType, string returnType, int value, bool isReverse) +{ + if (methodName.Contains("Add")) + { +#> + var verify = Enumerable.Range(1, 10).Select(x => (<#=returnType#>)((<#=returnType#>)x + (<#=returnType#>)value)); + var verifyColumn = new <#=fullReturnType#>("Verify", verify); +<# + } + else if (methodName.Contains("Subtract")) + { + if (!isReverse) + { +#> + var verify = Enumerable.Range(1, 10).Select(x => (<#=returnType#>)((<#=returnType#>)x - (<#=returnType#>)value)); +<# + } + else + { +#> + var verify = Enumerable.Range(1, 10).Select(x => (<#=returnType#>)((<#=returnType#>)value - (<#=returnType#>)x)); +<# + } +#> + var verifyColumn = new <#=fullReturnType#>("Verify", verify); +<# + } + else if (methodName.Contains("Multiply")) + { +#> + var verify = Enumerable.Range(1, 10).Select(x => (<#=returnType#>)((<#=returnType#>)x * (<#=returnType#>)value)); + var verifyColumn = new <#=fullReturnType#>("Verify", verify); +<# + } + else if (methodName.Contains("Divide")) + { + if (!isReverse) + { +#> + var verify = Enumerable.Range(1, 10).Select(x => (<#=returnType#>)((<#=returnType#>)x / (<#=returnType#>)value)); +<# + } + else + { +#> + var verify = Enumerable.Range(1, 10).Select(x => (<#=returnType#>)((<#=returnType#>)value / (<#=returnType#>)x)); +<# + } +#> + var verifyColumn = new <#=fullReturnType#>("Verify", verify); +<# + } + else if (methodName.Contains("Modulo")) + { + if (!isReverse) + { +#> + var verify = Enumerable.Range(1, 10).Select(x => (<#=returnType#>)((<#=returnType#>)x % (<#=returnType#>)value)); +<# + } + else + { +#> + var verify = Enumerable.Range(1, 10).Select(x => (<#=returnType#>)((<#=returnType#>)value % (<#=returnType#>)x)); +<# + } +#> + var verifyColumn = new <#=fullReturnType#>("Verify", verify); +<# + } +#> +<# +} +#> +<# +void GenerateBinaryComparisonScalarVerify(string methodName, string fullReturnType, string returnType, int value, bool isReverse) +{ + if (methodName.Contains("ElementwiseEquals")) + { +#> + var verify = Enumerable.Range(1, 10).Select(x => (<#=returnType#>)(false)); + var verifyColumn = new <#=fullReturnType#>("Verify", verify); +<# + } + else if (methodName.Contains("ElementwiseNotEquals")) + { + if (!isReverse) + { +#> + var verify = Enumerable.Range(1, 10).Select(x => (<#=returnType#>)(false)); +<# + } + else + { +#> + var verify = Enumerable.Range(1, 10).Select(x => (<#=returnType#>)(false)); +<# + } +#> + var verifyColumn = new <#=fullReturnType#>("Verify", verify); +<# + } + else if (methodName.Contains("Multiply")) + { +#> + var verify = Enumerable.Range(1, 10).Select(x => (<#=returnType#>)((<#=returnType#>)x * (<#=returnType#>)value)); + var verifyColumn = new <#=fullReturnType#>("Verify", verify); +<# + } + else if (methodName.Contains("Divide")) + { + if (!isReverse) + { +#> + var verify = Enumerable.Range(1, 10).Select(x => (<#=returnType#>)((<#=returnType#>)x / (<#=returnType#>)value)); +<# + } + else + { +#> + var verify = Enumerable.Range(1, 10).Select(x => (<#=returnType#>)((<#=returnType#>)value / (<#=returnType#>)x)); +<# + } +#> + var verifyColumn = new <#=fullReturnType#>("Verify", verify); +<# + } + else if (methodName.Contains("Modulo")) + { + if (!isReverse) + { +#> + var verify = Enumerable.Range(1, 10).Select(x => (<#=returnType#>)((<#=returnType#>)x % (<#=returnType#>)value)); +<# + } + else + { +#> + var verify = Enumerable.Range(1, 10).Select(x => (<#=returnType#>)((<#=returnType#>)value % (<#=returnType#>)x)); +<# + } +#> + var verifyColumn = new <#=fullReturnType#>("Verify", verify); +<# + } +#> +<# +} +#> +<# +void GenerateBinaryComparisonVerify(string methodName, string fullReturnType, string returnType, int value, bool isReverse) +{ + if (methodName.Contains("ElementwiseEquals")) + { +#> + var verify = Enumerable.Range(1, 10).Select(x => true); + var verifyColumn = new <#=fullReturnType#>("Verify", verify); +<# + } + else if (methodName.Contains("ElementwiseNotEquals")) + { + if (!isReverse) + { +#> + var verify = Enumerable.Range(1, 10).Select(x => true); +<# + } + else + { +#> + var verify = Enumerable.Range(1, 10).Select(x => true); +<# + } +#> + var verifyColumn = new <#=fullReturnType#>("Verify", verify); +<# + } + else if (methodName.Contains("Multiply")) + { +#> + var verify = Enumerable.Range(1, 10).Select(x => (<#=returnType#>)((<#=returnType#>)x * (<#=returnType#>)value)); + var verifyColumn = new <#=fullReturnType#>("Verify", verify); +<# + } + else if (methodName.Contains("Divide")) + { + if (!isReverse) + { +#> + var verify = Enumerable.Range(1, 10).Select(x => (<#=returnType#>)((<#=returnType#>)x / (<#=returnType#>)value)); +<# + } + else + { +#> + var verify = Enumerable.Range(1, 10).Select(x => (<#=returnType#>)((<#=returnType#>)value / (<#=returnType#>)x)); +<# + } +#> + var verifyColumn = new <#=fullReturnType#>("Verify", verify); +<# + } + else if (methodName.Contains("Modulo")) + { + if (!isReverse) + { +#> + var verify = Enumerable.Range(1, 10).Select(x => (<#=returnType#>)((<#=returnType#>)x % (<#=returnType#>)value)); +<# + } + else + { +#> + var verify = Enumerable.Range(1, 10).Select(x => (<#=returnType#>)((<#=returnType#>)value % (<#=returnType#>)x)); +<# + } +#> + var verifyColumn = new <#=fullReturnType#>("Verify", verify); +<# + } +#> +<# +} +#> +<# +void GenerateBinaryBitwiseScalarVerify(string methodName, string fullReturnType, string returnType, bool value, bool isReverse) +{ + if (methodName.Contains("And")) + { + if (!isReverse) + { +#> + var verify = Enumerable.Range(1, 10).Select(x => (<#=returnType#>)((<#=returnType#>)x & (<#=returnType#>)value)); +<# + } + else + { +#> + var verify = Enumerable.Range(1, 10).Select(x => (<#=returnType#>)((<#=returnType#>)value & (<#=returnType#>)x)); +<# + } +#> + var verifyColumn = new <#=fullReturnType#>("Verify", verify); +<# + } + else if (methodName.Contains("Or")) + { + if (!isReverse) + { +#> + var verify = Enumerable.Range(1, 10).Select(x => (<#=returnType#>)((<#=returnType#>)x | (<#=returnType#>)value)); +<# + } + else + { +#> + var verify = Enumerable.Range(1, 10).Select(x => (<#=returnType#>)((<#=returnType#>)value | (<#=returnType#>)x)); +<# + } +#> + var verifyColumn = new <#=fullReturnType#>("Verify", verify); +<# + } + else if (methodName.Contains("Xor")) + { + if (!isReverse) + { +#> + var verify = Enumerable.Range(1, 10).Select(x => (<#=returnType#>)((<#=returnType#>)x ^ (<#=returnType#>)value)); +<# + } + else + { +#> + var verify = Enumerable.Range(1, 10).Select(x => (<#=returnType#>)((<#=returnType#>)value ^ (<#=returnType#>)x)); +<# + } +#> + var verifyColumn = new <#=fullReturnType#>("Verify", verify); +<# + } +#> +<# +} +#> +<# +// Only generate the tests for ByteDataFrameColumn. It exercises all the possible paths since it includes cloning the non byte columns and keeps the number of tests low enough. +void GenerateAllBinaryScalarTestsForMethod(string methodName, string methodOperator) +{ + foreach (TypeCombination types in BinaryOperationCombinations.binaryOperationCombinations) +{ + string returnType = types.ReturnColumnType; + string columnType = types.ThisColumnType; + if (columnType != "byte") + { + continue; + } + string otherColumnType = types.OtherColumnType; + + string fullColumnType = GetCapitalizedPrimitiveTypes(columnType) + "DataFrameColumn"; + string fullReturnType = GetCapitalizedPrimitiveTypes(returnType) + "DataFrameColumn"; + string fullOtherColumnType = GetCapitalizedPrimitiveTypes(otherColumnType) + "DataFrameColumn"; + + string capitalizedReturnType = GetCapitalizedPrimitiveTypes(returnType); + string capitalizedColumnType = GetCapitalizedPrimitiveTypes(columnType); + string capitalizedOtherColumnType = GetCapitalizedPrimitiveTypes(otherColumnType); +#> + [Fact] + public void <#=methodName#><#=capitalizedOtherColumnType#>To<#=fullColumnType#>() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (<#=columnType#>)x); + <#=fullColumnType#> column = new <#=fullColumnType#>("<#=capitalizedColumnType#>", columnEnumerable); + <#=otherColumnType#> value = 5; +<# + if (methodName.Contains("Reverse")) + { +#> + <#=fullReturnType#> columnResult = value <#=methodOperator#> column; +<# + } + else + { +#> + <#=fullReturnType#> columnResult = column <#=methodOperator#> value; +<# + } +#> +<#GenerateBinaryScalarVerify(methodName, fullReturnType, returnType, (byte)5, methodName.Contains("Reverse") ? true : false); #> + Assert.Equal(columnResult.Length, verify.Count()); + Assert.True(columnResult.ElementwiseEquals(verifyColumn).All()); + } +<# +} +} +#> +<# +// Only generate the tests for BooleanDataFrameColumn. +void GenerateAllBinaryScalarBitwiseTestsForMethod(string methodName, string methodOperator) +{ + foreach (TypeCombination types in BinaryOperationCombinations.binaryOperationCombinations) +{ + string returnType = types.ReturnColumnType; + string columnType = types.ThisColumnType; + if (columnType != "byte") + { + continue; + } + string otherColumnType = types.OtherColumnType; + + string fullColumnType = GetCapitalizedPrimitiveTypes(columnType) + "DataFrameColumn"; + string fullReturnType = GetCapitalizedPrimitiveTypes(returnType) + "DataFrameColumn"; + string fullOtherColumnType = GetCapitalizedPrimitiveTypes(otherColumnType) + "DataFrameColumn"; + + string capitalizedReturnType = GetCapitalizedPrimitiveTypes(returnType); + string capitalizedColumnType = GetCapitalizedPrimitiveTypes(columnType); + string capitalizedOtherColumnType = GetCapitalizedPrimitiveTypes(otherColumnType); +#> + [Fact] + public void TestScalar<#=methodName#>On<#=fullColumnType#>() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (<#=columnType#>)false); + <#=fullColumnType#> column = new <#=fullColumnType#>("<#=capitalizedColumnType#>", columnEnumerable); + <#=otherColumnType#> value = true; +<# + if (methodName.Contains("Reverse")) + { +#> + <#=fullReturnType#> columnResult = value <#=methodOperator#> column; +<# + } + else + { +#> + <#=fullReturnType#> columnResult = column <#=methodOperator#> value; +<# + } +#> +<#GenerateBinaryBitwiseScalarVerify(methodName, fullReturnType, returnType, true, methodName.Contains("Reverse") ? true : false); #> + Assert.Equal(columnResult.Length, verify.Count()); + Assert.True(columnResult.ElementwiseEquals(verifyColumn).All()); + } +<# +} +} +#> +<# +// Only generate the tests for ByteDataFrameColumn. It exercises all the possible paths since it includes cloning the non byte columns and keeps the number of tests low enough. +void GenerateAllBinaryScalarComparisonTestsForMethod(string methodName, string methodOperator) +{ + foreach (TypeCombination types in ComparisonOperationCombinations.comparisonOperationCombinations) +{ + string returnType = types.ReturnColumnType; + string columnType = types.ThisColumnType; + if (columnType != "byte") + { + continue; + } + string otherColumnType = types.OtherColumnType; + + string fullColumnType = GetCapitalizedPrimitiveTypes(columnType) + "DataFrameColumn"; + string fullReturnType = GetCapitalizedPrimitiveTypes(returnType) + "DataFrameColumn"; + string fullOtherColumnType = GetCapitalizedPrimitiveTypes(otherColumnType) + "DataFrameColumn"; + + string capitalizedReturnType = GetCapitalizedPrimitiveTypes(returnType); + string capitalizedColumnType = GetCapitalizedPrimitiveTypes(columnType); + string capitalizedOtherColumnType = GetCapitalizedPrimitiveTypes(otherColumnType); +#> + [Fact] + public void <#=methodName#><#=capitalizedReturnType#>ToScalar<#=capitalizedOtherColumnType#>() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (<#=columnType#>)x); + <#=fullColumnType#> column = new <#=fullColumnType#>("<#=capitalizedColumnType#>", columnEnumerable); + <#=otherColumnType#> value = 100; + BooleanDataFrameColumn columnResult = column.<#=methodName#>(value); +<#GenerateBinaryComparisonScalarVerify(methodName, fullReturnType, returnType, (byte)5, methodName.Contains("Reverse") ? true : false); #> + Assert.Equal(columnResult.Length, verify.Count()); +<# if (!methodName.Contains("Not")) { #> + Assert.True(columnResult.ElementwiseEquals(verifyColumn).All()); +<# } else { #> + Assert.True(columnResult.ElementwiseNotEquals(verifyColumn).All()); +<# } #> + } +<# +} +} +#> +<# +// Only generate the tests for ByteDataFrameColumn. It exercises all the possible paths since it includes cloning the non byte columns and keeps the number of tests low enough. +void GenerateAllBinaryComparisonTestsForMethod(string methodName, string methodOperator) +{ + foreach (TypeCombination types in ComparisonOperationCombinations.comparisonOperationCombinations) +{ + string returnType = types.ReturnColumnType; + string columnType = types.ThisColumnType; + if (columnType != "byte") + { + continue; + } + string otherColumnType = types.OtherColumnType; + + string fullColumnType = GetCapitalizedPrimitiveTypes(columnType) + "DataFrameColumn"; + string fullReturnType = GetCapitalizedPrimitiveTypes(returnType) + "DataFrameColumn"; + string fullOtherColumnType = GetCapitalizedPrimitiveTypes(otherColumnType) + "DataFrameColumn"; + + string capitalizedReturnType = GetCapitalizedPrimitiveTypes(returnType); + string capitalizedColumnType = GetCapitalizedPrimitiveTypes(columnType); + string capitalizedOtherColumnType = GetCapitalizedPrimitiveTypes(otherColumnType); +#> + [Fact] + public void <#=methodName#><#=capitalizedReturnType#>To<#=capitalizedOtherColumnType#>() + { + var columnEnumerable = Enumerable.Range(1, 10).Select(x => (<#=columnType#>)x); + <#=fullColumnType#> column = new <#=fullColumnType#>("<#=capitalizedColumnType#>", columnEnumerable); + var otherColumnEnumerable = Enumerable.Range(1, 10).Select(x => (<#=otherColumnType#>)x); + <#=fullOtherColumnType#> otherColumn = new <#=fullOtherColumnType#>("<#=capitalizedOtherColumnType#>", otherColumnEnumerable); + BooleanDataFrameColumn columnResult = column.<#=methodName#>(otherColumn); +<#GenerateBinaryComparisonVerify(methodName, fullReturnType, returnType, (byte)5, methodName.Contains("Reverse") ? true : false); #> + Assert.Equal(columnResult.Length, verify.Count()); + + // If this is equals, change thisx to false +<# if (!methodName.Contains("Not")) { #> + Assert.True(columnResult.ElementwiseEquals(verifyColumn).All()); +<# } else { #> + Assert.True(columnResult.ElementwiseNotEquals(verifyColumn).All()); +<# } #> + } +<# +} +} +#> +<# + foreach (MethodConfiguration method in methodConfiguration) + { + if (method.MethodType == MethodType.Binary && method.IsNumeric) + { + GenerateAllBinaryTestsForMethod(method.MethodName, method.Operator); + } + else if (method.MethodType == MethodType.BinaryScalar && method.IsNumeric) + { + GenerateAllBinaryScalarTestsForMethod(method.MethodName, method.Operator); + GenerateAllBinaryScalarTestsForMethod("Reverse" + method.MethodName, method.Operator); + } + else if (method.MethodType == MethodType.ComparisonScalar) + { + // Test only the ElementwiseEquals and ElementwiseNotEquals methods to reduce the number of unit tests + if ((method.MethodName == "ElementwiseEquals") || (method.MethodName == "ElementwiseNotEquals")) + { + GenerateAllBinaryScalarComparisonTestsForMethod(method.MethodName, method.Operator); + } + } + else if (method.MethodType == MethodType.Comparison) + { + // Test only the ElementwiseEquals and ElementwiseNotEquals methods to reduce the number of unit tests + if ((method.MethodName == "ElementwiseEquals") || (method.MethodName == "ElementwiseNotEquals")) + { + GenerateAllBinaryComparisonTestsForMethod(method.MethodName, method.Operator); + } + } + /* + else if (method.MethodType == MethodType.BinaryScalar && method.IsBitwise) + { + GenerateAllBinaryScalarBitwiseTestsForMethod(method.MethodName, method.Operator); + } + */ + } +#> + } +} diff --git a/test/Microsoft.Data.Analysis.Tests/DataFrameIDataViewTests.cs b/test/Microsoft.Data.Analysis.Tests/DataFrameIDataViewTests.cs new file mode 100644 index 0000000000..dea8099876 --- /dev/null +++ b/test/Microsoft.Data.Analysis.Tests/DataFrameIDataViewTests.cs @@ -0,0 +1,423 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System; +using System.Linq; +using Microsoft.ML; +using Microsoft.ML.Data; +using Xunit; + +namespace Microsoft.Data.Analysis.Tests +{ + public partial class DataFrameIDataViewTests + { + [Fact] + public void TestIDataView() + { + IDataView dataView = DataFrameTests.MakeDataFrameWithAllColumnTypes(10, withNulls: false); + + DataDebuggerPreview preview = dataView.Preview(); + Assert.Equal(10, preview.RowView.Length); + Assert.Equal(15, preview.ColumnView.Length); + + Assert.Equal("Byte", preview.ColumnView[0].Column.Name); + Assert.Equal((byte)0, preview.ColumnView[0].Values[0]); + Assert.Equal((byte)1, preview.ColumnView[0].Values[1]); + + Assert.Equal("Decimal", preview.ColumnView[1].Column.Name); + Assert.Equal((double)0, preview.ColumnView[1].Values[0]); + Assert.Equal((double)1, preview.ColumnView[1].Values[1]); + + Assert.Equal("Double", preview.ColumnView[2].Column.Name); + Assert.Equal((double)0, preview.ColumnView[2].Values[0]); + Assert.Equal((double)1, preview.ColumnView[2].Values[1]); + + Assert.Equal("Float", preview.ColumnView[3].Column.Name); + Assert.Equal((float)0, preview.ColumnView[3].Values[0]); + Assert.Equal((float)1, preview.ColumnView[3].Values[1]); + + Assert.Equal("Int", preview.ColumnView[4].Column.Name); + Assert.Equal((int)0, preview.ColumnView[4].Values[0]); + Assert.Equal((int)1, preview.ColumnView[4].Values[1]); + + Assert.Equal("Long", preview.ColumnView[5].Column.Name); + Assert.Equal((long)0, preview.ColumnView[5].Values[0]); + Assert.Equal((long)1, preview.ColumnView[5].Values[1]); + + Assert.Equal("Sbyte", preview.ColumnView[6].Column.Name); + Assert.Equal((sbyte)0, preview.ColumnView[6].Values[0]); + Assert.Equal((sbyte)1, preview.ColumnView[6].Values[1]); + + Assert.Equal("Short", preview.ColumnView[7].Column.Name); + Assert.Equal((short)0, preview.ColumnView[7].Values[0]); + Assert.Equal((short)1, preview.ColumnView[7].Values[1]); + + Assert.Equal("Uint", preview.ColumnView[8].Column.Name); + Assert.Equal((uint)0, preview.ColumnView[8].Values[0]); + Assert.Equal((uint)1, preview.ColumnView[8].Values[1]); + + Assert.Equal("Ulong", preview.ColumnView[9].Column.Name); + Assert.Equal((ulong)0, preview.ColumnView[9].Values[0]); + Assert.Equal((ulong)1, preview.ColumnView[9].Values[1]); + + Assert.Equal("Ushort", preview.ColumnView[10].Column.Name); + Assert.Equal((ushort)0, preview.ColumnView[10].Values[0]); + Assert.Equal((ushort)1, preview.ColumnView[10].Values[1]); + + Assert.Equal("String", preview.ColumnView[11].Column.Name); + Assert.Equal("0".ToString(), preview.ColumnView[11].Values[0].ToString()); + Assert.Equal("1".ToString(), preview.ColumnView[11].Values[1].ToString()); + + Assert.Equal("Char", preview.ColumnView[12].Column.Name); + Assert.Equal((ushort)65, preview.ColumnView[12].Values[0]); + Assert.Equal((ushort)66, preview.ColumnView[12].Values[1]); + + Assert.Equal("Bool", preview.ColumnView[13].Column.Name); + Assert.Equal(true, preview.ColumnView[13].Values[0]); + Assert.Equal(false, preview.ColumnView[13].Values[1]); + + Assert.Equal("ArrowString", preview.ColumnView[14].Column.Name); + Assert.Equal("foo".ToString(), preview.ColumnView[14].Values[0].ToString()); + Assert.Equal("foo".ToString(), preview.ColumnView[14].Values[1].ToString()); + } + + [Fact] + public void TestIDataViewSchemaInvalidate() + { + DataFrame df = DataFrameTests.MakeDataFrameWithAllMutableColumnTypes(10, withNulls: false); + + IDataView dataView = df; + + DataViewSchema schema = dataView.Schema; + Assert.Equal(14, schema.Count); + + df.Columns.Remove("Bool"); + schema = dataView.Schema; + Assert.Equal(13, schema.Count); + + DataFrameColumn boolColumn = new PrimitiveDataFrameColumn("Bool", Enumerable.Range(0, (int)df.Rows.Count).Select(x => x % 2 == 1)); + df.Columns.Insert(0, boolColumn); + schema = dataView.Schema; + Assert.Equal(14, schema.Count); + Assert.Equal("Bool", schema[0].Name); + + DataFrameColumn boolClone = boolColumn.Clone(); + boolClone.SetName("BoolClone"); + df.Columns[1] = boolClone; + schema = dataView.Schema; + Assert.Equal("BoolClone", schema[1].Name); + } + + [Fact] + public void TestIDataViewWithNulls() + { + int length = 10; + IDataView dataView = DataFrameTests.MakeDataFrameWithAllColumnTypes(length, withNulls: true); + + DataDebuggerPreview preview = dataView.Preview(); + Assert.Equal(length, preview.RowView.Length); + Assert.Equal(15, preview.ColumnView.Length); + + Assert.Equal("Byte", preview.ColumnView[0].Column.Name); + Assert.Equal((byte)0, preview.ColumnView[0].Values[0]); + Assert.Equal((byte)1, preview.ColumnView[0].Values[1]); + Assert.Equal((byte)4, preview.ColumnView[0].Values[4]); + Assert.Equal((byte)0, preview.ColumnView[0].Values[5]); // null row + Assert.Equal((byte)6, preview.ColumnView[0].Values[6]); + + Assert.Equal("Decimal", preview.ColumnView[1].Column.Name); + Assert.Equal((double)0, preview.ColumnView[1].Values[0]); + Assert.Equal((double)1, preview.ColumnView[1].Values[1]); + Assert.Equal((double)4, preview.ColumnView[1].Values[4]); + Assert.Equal(double.NaN, preview.ColumnView[1].Values[5]); // null row + Assert.Equal((double)6, preview.ColumnView[1].Values[6]); + + Assert.Equal("Double", preview.ColumnView[2].Column.Name); + Assert.Equal((double)0, preview.ColumnView[2].Values[0]); + Assert.Equal((double)1, preview.ColumnView[2].Values[1]); + Assert.Equal((double)4, preview.ColumnView[2].Values[4]); + Assert.Equal(double.NaN, preview.ColumnView[2].Values[5]); // null row + Assert.Equal((double)6, preview.ColumnView[2].Values[6]); + + Assert.Equal("Float", preview.ColumnView[3].Column.Name); + Assert.Equal((float)0, preview.ColumnView[3].Values[0]); + Assert.Equal((float)1, preview.ColumnView[3].Values[1]); + Assert.Equal((float)4, preview.ColumnView[3].Values[4]); + Assert.Equal(float.NaN, preview.ColumnView[3].Values[5]); // null row + Assert.Equal((float)6, preview.ColumnView[3].Values[6]); + + Assert.Equal("Int", preview.ColumnView[4].Column.Name); + Assert.Equal((int)0, preview.ColumnView[4].Values[0]); + Assert.Equal((int)1, preview.ColumnView[4].Values[1]); + Assert.Equal((int)4, preview.ColumnView[4].Values[4]); + Assert.Equal((int)0, preview.ColumnView[4].Values[5]); // null row + Assert.Equal((int)6, preview.ColumnView[4].Values[6]); + + Assert.Equal("Long", preview.ColumnView[5].Column.Name); + Assert.Equal((long)0, preview.ColumnView[5].Values[0]); + Assert.Equal((long)1, preview.ColumnView[5].Values[1]); + Assert.Equal((long)4, preview.ColumnView[5].Values[4]); + Assert.Equal((long)0, preview.ColumnView[5].Values[5]); // null row + Assert.Equal((long)6, preview.ColumnView[5].Values[6]); + + Assert.Equal("Sbyte", preview.ColumnView[6].Column.Name); + Assert.Equal((sbyte)0, preview.ColumnView[6].Values[0]); + Assert.Equal((sbyte)1, preview.ColumnView[6].Values[1]); + Assert.Equal((sbyte)4, preview.ColumnView[6].Values[4]); + Assert.Equal((sbyte)0, preview.ColumnView[6].Values[5]); // null row + Assert.Equal((sbyte)6, preview.ColumnView[6].Values[6]); + + Assert.Equal("Short", preview.ColumnView[7].Column.Name); + Assert.Equal((short)0, preview.ColumnView[7].Values[0]); + Assert.Equal((short)1, preview.ColumnView[7].Values[1]); + Assert.Equal((short)4, preview.ColumnView[7].Values[4]); + Assert.Equal((short)0, preview.ColumnView[7].Values[5]); // null row + Assert.Equal((short)6, preview.ColumnView[7].Values[6]); + + Assert.Equal("Uint", preview.ColumnView[8].Column.Name); + Assert.Equal((uint)0, preview.ColumnView[8].Values[0]); + Assert.Equal((uint)1, preview.ColumnView[8].Values[1]); + Assert.Equal((uint)4, preview.ColumnView[8].Values[4]); + Assert.Equal((uint)0, preview.ColumnView[8].Values[5]); // null row + Assert.Equal((uint)6, preview.ColumnView[8].Values[6]); + + Assert.Equal("Ulong", preview.ColumnView[9].Column.Name); + Assert.Equal((ulong)0, preview.ColumnView[9].Values[0]); + Assert.Equal((ulong)1, preview.ColumnView[9].Values[1]); + Assert.Equal((ulong)4, preview.ColumnView[9].Values[4]); + Assert.Equal((ulong)0, preview.ColumnView[9].Values[5]); // null row + Assert.Equal((ulong)6, preview.ColumnView[9].Values[6]); + + Assert.Equal("Ushort", preview.ColumnView[10].Column.Name); + Assert.Equal((ushort)0, preview.ColumnView[10].Values[0]); + Assert.Equal((ushort)1, preview.ColumnView[10].Values[1]); + Assert.Equal((ushort)4, preview.ColumnView[10].Values[4]); + Assert.Equal((ushort)0, preview.ColumnView[10].Values[5]); // null row + Assert.Equal((ushort)6, preview.ColumnView[10].Values[6]); + + Assert.Equal("String", preview.ColumnView[11].Column.Name); + Assert.Equal("0", preview.ColumnView[11].Values[0].ToString()); + Assert.Equal("1", preview.ColumnView[11].Values[1].ToString()); + Assert.Equal("4", preview.ColumnView[11].Values[4].ToString()); + Assert.Equal("", preview.ColumnView[11].Values[5].ToString()); // null row + Assert.Equal("6", preview.ColumnView[11].Values[6].ToString()); + + Assert.Equal("Char", preview.ColumnView[12].Column.Name); + Assert.Equal((ushort)65, preview.ColumnView[12].Values[0]); + Assert.Equal((ushort)66, preview.ColumnView[12].Values[1]); + Assert.Equal((ushort)69, preview.ColumnView[12].Values[4]); + Assert.Equal((ushort)0, preview.ColumnView[12].Values[5]); // null row + Assert.Equal((ushort)71, preview.ColumnView[12].Values[6]); + + Assert.Equal("Bool", preview.ColumnView[13].Column.Name); + Assert.Equal(true, preview.ColumnView[13].Values[0]); + Assert.Equal(false, preview.ColumnView[13].Values[1]); + Assert.Equal(true, preview.ColumnView[13].Values[4]); + Assert.Equal(false, preview.ColumnView[13].Values[5]); // null row + Assert.Equal(true, preview.ColumnView[13].Values[6]); + + Assert.Equal("ArrowString", preview.ColumnView[14].Column.Name); + Assert.Equal("foo", preview.ColumnView[14].Values[0].ToString()); + Assert.Equal("foo", preview.ColumnView[14].Values[1].ToString()); + Assert.Equal("foo", preview.ColumnView[14].Values[4].ToString()); + Assert.Equal("", preview.ColumnView[14].Values[5].ToString()); // null row + Assert.Equal("foo", preview.ColumnView[14].Values[6].ToString()); + } + + [Fact] + public void TestDataFrameFromIDataView() + { + DataFrame df = DataFrameTests.MakeDataFrameWithAllColumnTypes(10, withNulls: false); + df.Columns.Remove("Char"); // Because chars are returned as uint16 by IDataView, so end up comparing CharDataFrameColumn to UInt16DataFrameColumn and fail asserts + IDataView dfAsIDataView = df; + DataFrame newDf = dfAsIDataView.ToDataFrame(); + Assert.Equal(dfAsIDataView.GetRowCount(), newDf.Rows.Count); + Assert.Equal(dfAsIDataView.Schema.Count, newDf.Columns.Count); + for (int i = 0; i < df.Columns.Count; i++) + { + Assert.True(df.Columns[i].ElementwiseEquals(newDf.Columns[i]).All()); + } + } + + [Fact] + public void TestDataFrameFromIDataView_SelectColumns() + { + DataFrame df = DataFrameTests.MakeDataFrameWithAllColumnTypes(10, withNulls: false); + IDataView dfAsIDataView = df; + DataFrame newDf = dfAsIDataView.ToDataFrame("Int", "Double"); + Assert.Equal(dfAsIDataView.GetRowCount(), newDf.Rows.Count); + Assert.Equal(2, newDf.Columns.Count); + Assert.True(df.Columns["Int"].ElementwiseEquals(newDf.Columns["Int"]).All()); + Assert.True(df.Columns["Double"].ElementwiseEquals(newDf.Columns["Double"]).All()); + } + + [Theory] + [InlineData(10, 5)] + [InlineData(110, 100)] + [InlineData(110, -1)] + public void TestDataFrameFromIDataView_SelectRows(int dataFrameSize, int rowSize) + { + DataFrame df = DataFrameTests.MakeDataFrameWithAllColumnTypes(dataFrameSize, withNulls: false); + df.Columns.Remove("Char"); // Because chars are returned as uint16 by DataViewSchema, so end up comparing CharDataFrameColumn to UInt16DataFrameColumn and fail asserts + df.Columns.Remove("Decimal"); // Because decimal is returned as double by DataViewSchema, so end up comparing DecimalDataFrameColumn to DoubleDataFrameColumn and fail asserts + IDataView dfAsIDataView = df; + DataFrame newDf; + if (rowSize == 100) + { + // Test default + newDf = dfAsIDataView.ToDataFrame(); + } + else + { + newDf = dfAsIDataView.ToDataFrame(rowSize); + } + if (rowSize == -1) + { + rowSize = dataFrameSize; + } + Assert.Equal(rowSize, newDf.Rows.Count); + Assert.Equal(df.Columns.Count, newDf.Columns.Count); + for (int i = 0; i < newDf.Columns.Count; i++) + { + Assert.Equal(rowSize, newDf.Columns[i].Length); + Assert.Equal(df.Columns[i].Name, newDf.Columns[i].Name); + } + Assert.Equal(dfAsIDataView.Schema.Count, newDf.Columns.Count); + for (int c = 0; c < df.Columns.Count; c++) + { + for (int r = 0; r < rowSize; r++) + { + Assert.Equal(df.Columns[c][r], newDf.Columns[c][r]); + } + } + } + + [Fact] + public void TestDataFrameFromIDataView_SelectColumnsAndRows() + { + DataFrame df = DataFrameTests.MakeDataFrameWithAllColumnTypes(10, withNulls: false); + IDataView dfAsIDataView = df; + DataFrame newDf = dfAsIDataView.ToDataFrame(5, "Int", "Double"); + Assert.Equal(5, newDf.Rows.Count); + for (int i = 0; i < newDf.Columns.Count; i++) + { + Assert.Equal(5, newDf.Columns[i].Length); + } + Assert.Equal(2, newDf.Columns.Count); + for (int r = 0; r < 5; r++) + { + Assert.Equal(df.Columns["Int"][r], newDf.Columns["Int"][r]); + Assert.Equal(df.Columns["Double"][r], newDf.Columns["Double"][r]); + } + } + + private class InputData + { + public string Name { get; set; } + public bool FilterNext { get; set; } + public float Value { get; set; } + } + + private IDataView GetASampleIDataView() + { + var mlContext = new MLContext(); + + // Get a small dataset as an IEnumerable. + var enumerableOfData = new[] + { + new InputData() { Name = "Joey", FilterNext = false, Value = 1.0f }, + new InputData() { Name = "Chandler", FilterNext = false , Value = 2.0f}, + new InputData() { Name = "Ross", FilterNext = false , Value = 3.0f}, + new InputData() { Name = "Monica", FilterNext = true , Value = 4.0f}, + new InputData() { Name = "Rachel", FilterNext = true , Value = 5.0f}, + new InputData() { Name = "Phoebe", FilterNext = false , Value = 6.0f}, + }; + + IDataView data = mlContext.Data.LoadFromEnumerable(enumerableOfData); + return data; + } + + private void VerifyDataFrameColumnAndDataViewColumnValues(string columnName, IDataView data, DataFrame df, int maxRows = -1) + { + int cc = 0; + var nameDataViewColumn = data.GetColumn(columnName); + foreach (var value in nameDataViewColumn) + { + if (maxRows != -1 && cc >= maxRows) + { + return; + } + Assert.Equal(value, df.Columns[columnName][cc++]); + } + } + + [Fact] + public void TestDataFrameFromIDataView_MLData() + { + IDataView data = GetASampleIDataView(); + DataFrame df = data.ToDataFrame(); + Assert.Equal(6, df.Rows.Count); + Assert.Equal(3, df.Columns.Count); + foreach (var column in df.Columns) + { + Assert.Equal(6, column.Length); + } + + VerifyDataFrameColumnAndDataViewColumnValues("Name", data, df); + VerifyDataFrameColumnAndDataViewColumnValues("FilterNext", data, df); + VerifyDataFrameColumnAndDataViewColumnValues("Value", data, df); + } + + [Fact] + public void TestDataFrameFromIDataView_MLData_SelectColumns() + { + IDataView data = GetASampleIDataView(); + DataFrame df = data.ToDataFrame("Name", "Value"); + Assert.Equal(6, df.Rows.Count); + Assert.Equal(2, df.Columns.Count); + foreach (var column in df.Columns) + { + Assert.Equal(6, column.Length); + } + + VerifyDataFrameColumnAndDataViewColumnValues("Name", data, df); + VerifyDataFrameColumnAndDataViewColumnValues("Value", data, df); + } + + [Theory] + [InlineData(3)] + [InlineData(0)] + public void TestDataFrameFromIDataView_MLData_SelectRows(int maxRows) + { + IDataView data = GetASampleIDataView(); + DataFrame df = data.ToDataFrame(maxRows); + Assert.Equal(maxRows, df.Rows.Count); + Assert.Equal(3, df.Columns.Count); + foreach (var column in df.Columns) + { + Assert.Equal(maxRows, column.Length); + } + + VerifyDataFrameColumnAndDataViewColumnValues("Name", data, df, maxRows); + VerifyDataFrameColumnAndDataViewColumnValues("FilterNext", data, df, maxRows); + VerifyDataFrameColumnAndDataViewColumnValues("Value", data, df, maxRows); + } + + [Fact] + public void TestDataFrameFromIDataView_MLData_SelectColumnsAndRows() + { + IDataView data = GetASampleIDataView(); + DataFrame df = data.ToDataFrame(3, "Name", "Value"); + Assert.Equal(3, df.Rows.Count); + Assert.Equal(2, df.Columns.Count); + foreach (var column in df.Columns) + { + Assert.Equal(3, column.Length); + } + + VerifyDataFrameColumnAndDataViewColumnValues("Name", data, df, 3); + VerifyDataFrameColumnAndDataViewColumnValues("Value", data, df, 3); + } + } +} diff --git a/test/Microsoft.Data.Analysis.Tests/DataFrameTests.cs b/test/Microsoft.Data.Analysis.Tests/DataFrameTests.cs new file mode 100644 index 0000000000..300babbffb --- /dev/null +++ b/test/Microsoft.Data.Analysis.Tests/DataFrameTests.cs @@ -0,0 +1,2326 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using Apache.Arrow; +using Microsoft.ML; +using Xunit; + +namespace Microsoft.Data.Analysis.Tests +{ + public partial class DataFrameTests + { + public static DataFrame MakeDataFrameWithTwoColumns(int length, bool withNulls = true) + { + DataFrameColumn dataFrameColumn1 = new Int32DataFrameColumn("Int1", Enumerable.Range(0, length).Select(x => x)); + DataFrameColumn dataFrameColumn2 = new Int32DataFrameColumn("Int2", Enumerable.Range(10, length).Select(x => x)); + if (withNulls) + { + dataFrameColumn1[length / 2] = null; + dataFrameColumn2[length / 2] = null; + } + DataFrame dataFrame = new DataFrame(); + dataFrame.Columns.Insert(0, dataFrameColumn1); + dataFrame.Columns.Insert(1, dataFrameColumn2); + return dataFrame; + } + + public static ArrowStringDataFrameColumn CreateArrowStringColumn(int length, bool withNulls = true) + { + byte[] dataMemory = new byte[length * 3]; + byte[] nullMemory = new byte[BitUtility.ByteCount(length)]; + byte[] offsetMemory = new byte[(length + 1) * 4]; + + // Initialize offset with 0 as the first value + offsetMemory[0] = 0; + offsetMemory[1] = 0; + offsetMemory[2] = 0; + offsetMemory[3] = 0; + + // Append "foo" length times, with a possible `null` in the middle + int validStringsIndex = 0; + for (int i = 0; i < length; i++) + { + if (withNulls && i == length / 2) + { + BitUtility.SetBit(nullMemory, i, false); + } + else + { + int dataMemoryIndex = validStringsIndex * 3; + dataMemory[dataMemoryIndex++] = 102; + dataMemory[dataMemoryIndex++] = 111; + dataMemory[dataMemoryIndex++] = 111; + BitUtility.SetBit(nullMemory, i, true); + + validStringsIndex++; + } + + // write the current length to (index + 1) + int offsetIndex = (i + 1) * 4; + int offsetValue = 3 * validStringsIndex; + byte[] offsetValueBytes = BitConverter.GetBytes(offsetValue); + offsetMemory[offsetIndex++] = offsetValueBytes[0]; + offsetMemory[offsetIndex++] = offsetValueBytes[1]; + offsetMemory[offsetIndex++] = offsetValueBytes[2]; + offsetMemory[offsetIndex++] = offsetValueBytes[3]; + } + + int nullCount = withNulls ? 1 : 0; + return new ArrowStringDataFrameColumn("ArrowString", dataMemory, offsetMemory, nullMemory, length, nullCount); + } + + public static DataFrame MakeDataFrameWithAllColumnTypes(int length, bool withNulls = true) + { + DataFrame df = MakeDataFrameWithAllMutableColumnTypes(length, withNulls); + DataFrameColumn arrowStringColumn = CreateArrowStringColumn(length, withNulls); + df.Columns.Insert(df.Columns.Count, arrowStringColumn); + return df; + } + + public static DataFrame MakeDataFrameWithAllMutableColumnTypes(int length, bool withNulls = true) + { + DataFrame df = MakeDataFrameWithNumericAndStringColumns(length, withNulls); + DataFrameColumn boolColumn = new BooleanDataFrameColumn("Bool", Enumerable.Range(0, length).Select(x => x % 2 == 0)); + df.Columns.Insert(df.Columns.Count, boolColumn); + if (withNulls) + { + boolColumn[length / 2] = null; + } + return df; + } + + public static DataFrame MakeDataFrameWithNumericAndBoolColumns(int length, bool withNulls = true) + { + DataFrame df = MakeDataFrameWithNumericColumns(length, withNulls); + DataFrameColumn boolColumn = new BooleanDataFrameColumn("Bool", Enumerable.Range(0, length).Select(x => x % 2 == 0)); + df.Columns.Insert(df.Columns.Count, boolColumn); + if (withNulls) + { + boolColumn[length / 2] = null; + } + return df; + } + + public static DataFrame MakeDataFrameWithNumericAndStringColumns(int length, bool withNulls = true) + { + DataFrame df = MakeDataFrameWithNumericColumns(length, withNulls); + DataFrameColumn stringColumn = new StringDataFrameColumn("String", Enumerable.Range(0, length).Select(x => x.ToString())); + df.Columns.Insert(df.Columns.Count, stringColumn); + if (withNulls) + { + stringColumn[length / 2] = null; + } + + DataFrameColumn charColumn = new CharDataFrameColumn("Char", Enumerable.Range(0, length).Select(x => (char)(x + 65))); + df.Columns.Insert(df.Columns.Count, charColumn); + if (withNulls) + { + charColumn[length / 2] = null; + } + return df; + } + + public static DataFrame MakeDataFrameWithNumericColumns(int length, bool withNulls = true) + { + DataFrameColumn byteColumn = new ByteDataFrameColumn("Byte", Enumerable.Range(0, length).Select(x => (byte)x)); + DataFrameColumn decimalColumn = new DecimalDataFrameColumn("Decimal", Enumerable.Range(0, length).Select(x => (decimal)x)); + DataFrameColumn doubleColumn = new DoubleDataFrameColumn("Double", Enumerable.Range(0, length).Select(x => (double)x)); + DataFrameColumn floatColumn = new SingleDataFrameColumn("Float", Enumerable.Range(0, length).Select(x => (float)x)); + DataFrameColumn intColumn = new Int32DataFrameColumn("Int", Enumerable.Range(0, length).Select(x => x)); + DataFrameColumn longColumn = new Int64DataFrameColumn("Long", Enumerable.Range(0, length).Select(x => (long)x)); + DataFrameColumn sbyteColumn = new SByteDataFrameColumn("Sbyte", Enumerable.Range(0, length).Select(x => (sbyte)x)); + DataFrameColumn shortColumn = new Int16DataFrameColumn("Short", Enumerable.Range(0, length).Select(x => (short)x)); + DataFrameColumn uintColumn = new UInt32DataFrameColumn("Uint", Enumerable.Range(0, length).Select(x => (uint)x)); + DataFrameColumn ulongColumn = new UInt64DataFrameColumn("Ulong", Enumerable.Range(0, length).Select(x => (ulong)x)); + DataFrameColumn ushortColumn = new UInt16DataFrameColumn("Ushort", Enumerable.Range(0, length).Select(x => (ushort)x)); + + DataFrame dataFrame = new DataFrame(new List { byteColumn, decimalColumn, doubleColumn, floatColumn, intColumn, longColumn, sbyteColumn, shortColumn, uintColumn, ulongColumn, ushortColumn }); + + if (withNulls) + { + for (int i = 0; i < dataFrame.Columns.Count; i++) + { + dataFrame.Columns[i][length / 2] = null; + } + } + return dataFrame; + } + + public static DataFrame MakeDataFrame(int length, bool withNulls = true) + where T1 : unmanaged + where T2 : unmanaged + { + DataFrameColumn baseColumn1 = DataFrameColumn.Create("Column1", Enumerable.Range(0, length).Select(x => (T1)Convert.ChangeType(x % 2 == 0 ? 0 : 1, typeof(T1)))); + DataFrameColumn baseColumn2 = DataFrameColumn.Create("Column2", Enumerable.Range(0, length).Select(x => (T2)Convert.ChangeType(x % 2 == 0 ? 0 : 1, typeof(T2)))); + DataFrame dataFrame = new DataFrame(new List { baseColumn1, baseColumn2 }); + + if (withNulls) + { + for (int i = 0; i < dataFrame.Columns.Count; i++) + { + dataFrame.Columns[i][length / 2] = null; + } + } + + return dataFrame; + } + + public DataFrame SplitTrainTest(DataFrame input, float testRatio, out DataFrame Test) + { + IEnumerable randomIndices = Enumerable.Range(0, (int)input.Rows.Count); + IEnumerable trainIndices = randomIndices.Take((int)(input.Rows.Count * testRatio)); + IEnumerable testIndices = randomIndices.Skip((int)(input.Rows.Count * testRatio)); + Test = input[testIndices]; + return input[trainIndices]; + } + + + [Fact] + public void TestIndexer() + { + DataFrame dataFrame = MakeDataFrameWithTwoColumns(length: 10); + var foo = dataFrame[0, 0]; + Assert.Equal(0, dataFrame[0, 0]); + Assert.Equal(11, dataFrame[1, 1]); + Assert.Equal(2, dataFrame.Columns.Count); + Assert.Equal("Int1", dataFrame.Columns[0].Name); + + var headList = dataFrame.Head(5); + Assert.Equal(14, (int)headList.Rows[4][1]); + + var tailList = dataFrame.Tail(5); + Assert.Equal(19, (int)tailList.Rows[4][1]); + + dataFrame[2, 1] = 1000; + Assert.Equal(1000, dataFrame[2, 1]); + + var row = dataFrame.Rows[4]; + Assert.Equal(14, (int)row[1]); + + var column = dataFrame["Int2"] as Int32DataFrameColumn; + Assert.Equal(1000, (int)column[2]); + + Assert.Throws(() => dataFrame["Int5"]); + Assert.Throws(() => dataFrame[(string)null]); + } + + [Fact] + public void ColumnAndTableCreationTest() + { + DataFrameColumn intColumn = new Int32DataFrameColumn("IntColumn", Enumerable.Range(0, 10).Select(x => x)); + DataFrameColumn floatColumn = new SingleDataFrameColumn("FloatColumn", Enumerable.Range(0, 10).Select(x => (float)x)); + DataFrame dataFrame = new DataFrame(); + dataFrame.Columns.Insert(0, intColumn); + dataFrame.Columns.Insert(1, floatColumn); + Assert.Equal(10, dataFrame.Rows.Count); + Assert.Equal(2, dataFrame.Columns.Count); + Assert.Equal(10, dataFrame.Columns[0].Length); + Assert.Equal("IntColumn", dataFrame.Columns[0].Name); + Assert.Equal(10, dataFrame.Columns[1].Length); + Assert.Equal("FloatColumn", dataFrame.Columns[1].Name); + + DataFrameColumn bigColumn = new SingleDataFrameColumn("BigColumn", Enumerable.Range(0, 11).Select(x => (float)x)); + DataFrameColumn repeatedName = new SingleDataFrameColumn("FloatColumn", Enumerable.Range(0, 10).Select(x => (float)x)); + Assert.Throws(() => dataFrame.Columns.Insert(2, bigColumn)); + Assert.Throws(() => dataFrame.Columns.Insert(2, repeatedName)); + Assert.Throws(() => dataFrame.Columns.Insert(10, repeatedName)); + + Assert.Equal(2, dataFrame.Columns.Count); + DataFrameColumn intColumnCopy = new Int32DataFrameColumn("IntColumn", Enumerable.Range(0, 10).Select(x => x)); + Assert.Throws(() => dataFrame.Columns[1] = intColumnCopy); + + DataFrameColumn differentIntColumn = new Int32DataFrameColumn("IntColumn1", Enumerable.Range(0, 10).Select(x => x)); + dataFrame.Columns[1] = differentIntColumn; + Assert.True(object.ReferenceEquals(differentIntColumn, dataFrame.Columns[1])); + + dataFrame.Columns.RemoveAt(1); + Assert.Single(dataFrame.Columns); + Assert.True(ReferenceEquals(intColumn, dataFrame.Columns[0])); + + // Test the params constructor + DataFrame dataFrame1 = new DataFrame(intColumn, floatColumn); + Assert.Equal(2, dataFrame1.Columns.Count); + Assert.Equal(intColumn, dataFrame1.Columns[0]); + Assert.Equal(floatColumn, dataFrame1.Columns[1]); + } + + [Fact] + public void InsertAndRemoveColumnTests() + { + DataFrame dataFrame = MakeDataFrameWithAllMutableColumnTypes(10); + DataFrameColumn intColumn = new Int32DataFrameColumn("IntColumn", Enumerable.Range(0, 10).Select(x => x)); + DataFrameColumn charColumn = dataFrame.Columns["Char"]; + int insertedIndex = dataFrame.Columns.Count; + dataFrame.Columns.Insert(dataFrame.Columns.Count, intColumn); + dataFrame.Columns.RemoveAt(0); + DataFrameColumn intColumn_1 = dataFrame.Columns["IntColumn"]; + DataFrameColumn charColumn_1 = dataFrame.Columns["Char"]; + Assert.True(ReferenceEquals(intColumn, intColumn_1)); + Assert.True(ReferenceEquals(charColumn, charColumn_1)); + } + + [Fact] + public void TestBinaryOperations() + { + DataFrame df = MakeDataFrameWithTwoColumns(12); + IReadOnlyList listOfInts = new List() { 5, 5 }; + + // The following binary ops return a copy + var ret = df.Add(5); + Assert.Equal(0, df[0, 0]); + Assert.Equal(5, ret[0, 0]); + ret = df.Add(listOfInts); + Assert.Equal(0, df[0, 0]); + Assert.Equal(5, ret[0, 0]); + ret = df.Subtract(5); + Assert.Equal(0, df[0, 0]); + Assert.Equal(-5, ret[0, 0]); + ret = df.Subtract(listOfInts); + Assert.Equal(0, df[0, 0]); + Assert.Equal(-5, ret[0, 0]); + ret = df.Multiply(5); + Assert.Equal(1, df[1, 0]); + Assert.Equal(5, ret[1, 0]); + ret = df.Multiply(listOfInts); + Assert.Equal(1, df[1, 0]); + Assert.Equal(5, ret[1, 0]); + ret = df.Divide(5); + Assert.Equal(5, df[5, 0]); + Assert.Equal(1, ret[5, 0]); + ret = df.Divide(listOfInts); + Assert.Equal(5, df[5, 0]); + Assert.Equal(1, ret[5, 0]); + ret = df.Modulo(5); + Assert.Equal(5, df[5, 0]); + Assert.Equal(0, ret[5, 0]); + ret = df.Modulo(listOfInts); + Assert.Equal(5, df[5, 0]); + Assert.Equal(0, ret[5, 0]); + + Assert.Equal(true, df.ElementwiseGreaterThanOrEqual(5)[7, 0]); + Assert.Equal(true, df.ElementwiseGreaterThanOrEqual(listOfInts)[7, 0]); + Assert.Equal(true, df.ElementwiseLessThanOrEqual(5)[4, 0]); + Assert.Equal(true, df.ElementwiseLessThanOrEqual(listOfInts)[4, 0]); + Assert.Equal(false, df.ElementwiseGreaterThan(5)[5, 0]); + Assert.Equal(false, df.ElementwiseGreaterThan(listOfInts)[5, 0]); + Assert.Equal(false, df.ElementwiseLessThan(5)[5, 0]); + Assert.Equal(false, df.ElementwiseLessThan(listOfInts)[5, 0]); + // The following binary ops are in place + Assert.Equal(5, df.Add(5, inPlace: true)[0, 0]); + Assert.Equal(10, df.Add(listOfInts, inPlace: true)[0, 0]); + Assert.Equal(5, df.Subtract(5, inPlace: true)[0, 0]); + Assert.Equal(0, df.Subtract(listOfInts, inPlace: true)[0, 0]); + Assert.Equal(5, df.Multiply(5, inPlace: true)[1, 0]); + Assert.Equal(25, df.Multiply(listOfInts, inPlace: true)[1, 0]); + Assert.Equal(5, df.Divide(5, inPlace: true)[1, 0]); + Assert.Equal(1, df.Divide(listOfInts, inPlace: true)[1, 0]); + Assert.Equal(1, df.Modulo(5, inPlace: true)[1, 0]); + Assert.Equal(1, df.Modulo(listOfInts, inPlace: true)[1, 0]); + Assert.Equal(2, df.LeftShift(1)[1, 0]); + Assert.Equal(1, df.RightShift(1)[2, 0]); + } + + [Fact] + public void TestBinaryOperationsWithColumns() + { + int length = 10; + var df1 = MakeDataFrameWithNumericColumns(length); + var df2 = MakeDataFrameWithNumericColumns(length); + + DataFrameColumn newColumn; + DataFrameColumn verify; + for (int i = 0; i < df1.Columns.Count; i++) + { + newColumn = df1.Columns[df1.Columns[i].Name] + df2.Columns[df2.Columns[i].Name]; + verify = newColumn.ElementwiseEquals(df1.Columns[i] * 2); + Assert.Equal(true, verify[0]); + + newColumn = df1.Columns[df1.Columns[i].Name] - df2.Columns[df2.Columns[i].Name]; + verify = newColumn.ElementwiseEquals(0); + Assert.Equal(true, verify[0]); + + newColumn = df1.Columns[df1.Columns[i].Name] * df2.Columns[df2.Columns[i].Name]; + verify = newColumn.ElementwiseEquals(df1.Columns[i] * df1.Columns[i]); + Assert.Equal(true, verify[0]); + + var df1Column = df1.Columns[i] + 1; + var df2Column = df2.Columns[i] + 1; + newColumn = df1Column / df2Column; + verify = newColumn.ElementwiseEquals(1); + Assert.Equal(true, verify[0]); + + newColumn = df1Column % df2Column; + verify = newColumn.ElementwiseEquals(0); + Assert.Equal(true, verify[0]); + + verify = df1.Columns[df1.Columns[i].Name].ElementwiseEquals(df2.Columns[df2.Columns[i].Name]); + Assert.True(verify.All()); + + verify = df1.Columns[df1.Columns[i].Name].ElementwiseNotEquals(df2.Columns[df2.Columns[i].Name]); + Assert.False(verify.Any()); + + verify = df1.Columns[df1.Columns[i].Name].ElementwiseGreaterThanOrEqual(df2.Columns[df2.Columns[i].Name]); + Assert.True(verify.All()); + + verify = df1.Columns[df1.Columns[i].Name].ElementwiseLessThanOrEqual(df2.Columns[df2.Columns[i].Name]); + Assert.True(verify.All()); + + verify = df1.Columns[df1.Columns[i].Name].ElementwiseGreaterThan(df2.Columns[df2.Columns[i].Name]); + Assert.False(verify.Any()); + + verify = df1.Columns[df1.Columns[i].Name].ElementwiseLessThan(df2.Columns[df2.Columns[i].Name]); + Assert.False(verify.Any()); + } + } + + [Fact] + public void TestBinaryOperationsWithConversions() + { + DataFrame df = DataFrameTests.MakeDataFrameWithTwoColumns(10); + + // Add a double to an int column + DataFrame dfd = df.Add(5.0f); + var dtype = dfd.Columns[0].DataType; + Assert.True(dtype == typeof(double)); + + // Add a decimal to an int column + DataFrame dfm = df.Add(5.0m); + dtype = dfm.Columns[0].DataType; + Assert.True(dtype == typeof(decimal)); + + // int + bool should throw + Assert.Throws(() => df.Add(true)); + + var dataFrameColumn1 = new DoubleDataFrameColumn("Double1", Enumerable.Range(0, 10).Select(x => (double)x)); + df.Columns[0] = dataFrameColumn1; + // Double + comparison ops should throw + Assert.Throws(() => df.And(true)); + } + + [Fact] + public void TestBinaryOperationsOnBoolColumn() + { + var df = new DataFrame(); + var dataFrameColumn1 = new BooleanDataFrameColumn("Bool1", Enumerable.Range(0, 10).Select(x => true)); + var dataFrameColumn2 = new BooleanDataFrameColumn("Bool2", Enumerable.Range(0, 10).Select(x => true)); + df.Columns.Insert(0, dataFrameColumn1); + df.Columns.Insert(1, dataFrameColumn2); + + // bool + int should throw + Assert.Throws(() => df.Add(5)); + // Left shift should throw + Assert.Throws(() => df.LeftShift(5)); + + IReadOnlyList listOfBools = new List() { true, false }; + // boolean and And should work + var newdf = df.And(true); + Assert.Equal(true, newdf[4, 0]); + var newdf1 = df.And(listOfBools); + Assert.Equal(false, newdf1[4, 1]); + + newdf = df.Or(true); + Assert.Equal(true, newdf[4, 0]); + newdf1 = df.Or(listOfBools); + Assert.Equal(true, newdf1[4, 1]); + + newdf = df.Xor(true); + Assert.Equal(false, newdf[4, 0]); + newdf1 = df.Xor(listOfBools); + Assert.Equal(true, newdf1[4, 1]); + } + + [Fact] + public void TestBinaryOperationsOnArrowStringColumn() + { + var df = new DataFrame(); + var strArrayBuilder = new StringArray.Builder(); + for (int i = 0; i < 10; i++) + { + strArrayBuilder.Append(i.ToString()); + } + StringArray strArray = strArrayBuilder.Build(); + + ArrowStringDataFrameColumn stringColumn = new ArrowStringDataFrameColumn("String", strArray.ValueBuffer.Memory, strArray.ValueOffsetsBuffer.Memory, strArray.NullBitmapBuffer.Memory, strArray.Length, strArray.NullCount); + df.Columns.Insert(0, stringColumn); + + DataFrameColumn newCol = stringColumn.ElementwiseEquals(4); + Assert.Equal(true, newCol[4]); + Assert.Equal(false, newCol[0]); + Assert.Equal(false, newCol[5]); + + newCol = stringColumn.ElementwiseEquals("4"); + Assert.Equal(true, newCol[4]); + Assert.Equal(false, newCol[0]); + + newCol = stringColumn.ElementwiseEquals("foo"); + Assert.False(newCol.All()); + newCol = stringColumn.ElementwiseEquals(null); + Assert.False(newCol.All()); + + ArrowStringDataFrameColumn stringColumnCopy = new ArrowStringDataFrameColumn("String", strArray.ValueBuffer.Memory, strArray.ValueOffsetsBuffer.Memory, strArray.NullBitmapBuffer.Memory, strArray.Length, strArray.NullCount); + newCol = stringColumn.ElementwiseEquals(stringColumnCopy); + Assert.True(newCol.All()); + + DataFrameColumn stringColumnCopyAsBaseColumn = stringColumnCopy; + newCol = stringColumn.ElementwiseEquals(stringColumnCopyAsBaseColumn); + Assert.True(newCol.All()); + + newCol = stringColumn.ElementwiseNotEquals(5); + Assert.Equal(true, newCol[0]); + Assert.Equal(false, newCol[5]); + + newCol = stringColumn.ElementwiseNotEquals("5"); + Assert.Equal(true, newCol[0]); + Assert.Equal(false, newCol[5]); + + newCol = stringColumn.ElementwiseNotEquals("foo"); + Assert.True(newCol.All()); + newCol = stringColumn.ElementwiseNotEquals(null); + Assert.True(newCol.All()); + + newCol = stringColumn.ElementwiseNotEquals(stringColumnCopy); + Assert.False(newCol.All()); + + newCol = stringColumn.ElementwiseNotEquals(stringColumnCopyAsBaseColumn); + Assert.False(newCol.All()); + } + + [Fact] + public void TestBinaryOperationsOnStringColumn() + { + var df = new DataFrame(); + DataFrameColumn stringColumn = new StringDataFrameColumn("String", Enumerable.Range(0, 10).Select(x => x.ToString())); + df.Columns.Insert(0, stringColumn); + + DataFrameColumn newCol = stringColumn.ElementwiseEquals(5); + Assert.Equal(true, newCol[5]); + Assert.Equal(false, newCol[0]); + + newCol = (stringColumn as StringDataFrameColumn).ElementwiseEquals("5"); + Assert.Equal(true, newCol[5]); + Assert.Equal(false, newCol[0]); + + DataFrameColumn stringColumnCopy = new StringDataFrameColumn("String", Enumerable.Range(0, 10).Select(x => x.ToString())); + newCol = stringColumn.ElementwiseEquals(stringColumnCopy); + Assert.Equal(true, newCol[5]); + Assert.Equal(true, newCol[0]); + + StringDataFrameColumn typedStringColumn = stringColumn as StringDataFrameColumn; + StringDataFrameColumn typedStringColumnCopy = stringColumnCopy as StringDataFrameColumn; + newCol = typedStringColumn.ElementwiseEquals(typedStringColumnCopy); + Assert.True(newCol.All()); + + newCol = stringColumn.ElementwiseNotEquals(5); + Assert.Equal(false, newCol[5]); + Assert.Equal(true, newCol[0]); + + newCol = typedStringColumn.ElementwiseNotEquals("5"); + Assert.Equal(false, newCol[5]); + Assert.Equal(true, newCol[0]); + + newCol = stringColumn.ElementwiseNotEquals(stringColumnCopy); + Assert.Equal(false, newCol[5]); + Assert.Equal(false, newCol[0]); + + newCol = typedStringColumn.ElementwiseNotEquals(typedStringColumnCopy); + Assert.False(newCol.All()); + + newCol = typedStringColumn.Add("suffix"); + for (int i = 0; i < newCol.Length; i++) + { + Assert.Equal(newCol[i], typedStringColumn[i] + "suffix"); + } + DataFrameColumn addString = typedStringColumn + "suffix"; + for (int i = 0; i < addString.Length; i++) + { + Assert.Equal(addString[i], typedStringColumn[i] + "suffix"); + } + Assert.True(newCol.ElementwiseEquals(addString).All()); + addString = "prefix" + typedStringColumn; + for (int i = 0; i < addString.Length; i++) + { + Assert.Equal(addString[i], "prefix" + typedStringColumn[i]); + } + } + + [Fact] + public void TestBinaryOperatorsWithConversions() + { + var df = MakeDataFrameWithNumericColumns(10); + + DataFrame tempDf = df + 1; + Assert.Equal(tempDf[0, 0], (byte)df[0, 0] + (double)1); + tempDf = df + 1.1; + Assert.Equal(tempDf[0, 0], (byte)df[0, 0] + 1.1); + tempDf = df + 1.1m; + Assert.Equal(tempDf[0, 0], (byte)df[0, 0] + 1.1m); + Assert.True(typeof(decimal) == tempDf.Columns["Int"].DataType); + + tempDf = df - 1.1; + Assert.Equal(tempDf[0, 0], (byte)df[0, 0] - 1.1); + tempDf = df - 1.1m; + Assert.Equal(tempDf[0, 0], (byte)df[0, 0] - 1.1m); + Assert.True(typeof(decimal) == tempDf.Columns["Int"].DataType); + + tempDf = df * 1.1; + Assert.Equal(tempDf[0, 0], (byte)df[0, 0] * 1.1); + tempDf = df * 1.1m; + Assert.Equal(tempDf[0, 0], (byte)df[0, 0] * 1.1m); + Assert.True(typeof(decimal) == tempDf.Columns["Int"].DataType); + + tempDf = df / 1.1; + Assert.Equal(tempDf[0, 0], (byte)df[0, 0] / 1.1); + tempDf = df / 1.1m; + Assert.Equal(tempDf[0, 0], (byte)df[0, 0] / 1.1m); + Assert.True(typeof(decimal) == tempDf.Columns["Int"].DataType); + + tempDf = df % 1.1; + Assert.Equal(tempDf[0, 0], (byte)df[0, 0] % 1.1); + tempDf = df % 1.1m; + Assert.Equal(tempDf[0, 0], (byte)df[0, 0] % 1.1m); + Assert.True(typeof(decimal) == tempDf.Columns["Int"].DataType); + + tempDf = 1 + df; + Assert.Equal(tempDf[0, 0], (byte)df[0, 0] + (double)1); + tempDf = 1.1 + df; + Assert.Equal(tempDf[0, 0], (byte)df[0, 0] + 1.1); + tempDf = 1.1m + df; + Assert.Equal(tempDf[0, 0], (byte)df[0, 0] + 1.1m); + Assert.True(typeof(decimal) == tempDf.Columns["Int"].DataType); + + tempDf = 1.1 - df; + Assert.Equal(tempDf[0, 0], 1.1 - (byte)df[0, 0]); + tempDf = 1.1m - df; + Assert.Equal(tempDf[0, 0], 1.1m - (byte)df[0, 0]); + Assert.True(typeof(decimal) == tempDf.Columns["Int"].DataType); + + tempDf = 1.1 * df; + Assert.Equal(tempDf[0, 0], (byte)df[0, 0] * 1.1); + tempDf = 1.1m * df; + Assert.Equal(tempDf[0, 0], (byte)df[0, 0] * 1.1m); + Assert.True(typeof(decimal) == tempDf.Columns["Int"].DataType); + + // To prevent a divide by zero + var plusOne = df + 1; + tempDf = 1.1 / plusOne; + Assert.Equal(tempDf[0, 0], 1.1 / (double)plusOne[0, 0]); + var plusDecimal = df + 1.1m; + tempDf = 1.1m / plusDecimal; + Assert.Equal(tempDf[0, 0], (1.1m) / (decimal)plusDecimal[0, 0]); + Assert.True(typeof(decimal) == tempDf.Columns["Int"].DataType); + + tempDf = 1.1 % plusOne; + Assert.Equal(tempDf[0, 0], 1.1 % (double)plusOne[0, 0]); + tempDf = 1.1m % plusDecimal; + Assert.Equal(tempDf[0, 0], 1.1m % (decimal)plusDecimal[0, 0]); + Assert.True(typeof(decimal) == tempDf.Columns["Int"].DataType); + + Assert.Equal((byte)0, df[0, 0]); + } + + [Fact] + public void TestBinaryOperationsOnColumns() + { + Int32DataFrameColumn column = new Int32DataFrameColumn("Int", Enumerable.Range(0, 10)); + Assert.ThrowsAny(() => column.Add(5.5, inPlace: true)); + Assert.ThrowsAny(() => column.ReverseAdd(5.5, inPlace: true)); + string str = "A String"; + Assert.ThrowsAny(() => column.Add(str, inPlace: true)); + Assert.ThrowsAny(() => column.ReverseAdd(str, inPlace: true)); + } + + [Fact] + public void TestColumnReverseOrderState() + { + var column = new Int32DataFrameColumn("Int", Enumerable.Range(0, 10)); + var newColumn = 1 - column; + var checkOrderColumn = 1 - newColumn; + Assert.True(checkOrderColumn.ElementwiseEquals(column).All()); + } + + [Fact] + public void TestProjectionAndAppend() + { + DataFrame df = MakeDataFrameWithTwoColumns(10); + + df["Int3"] = df.Columns["Int1"] * 2 + df.Columns["Int2"]; + Assert.Equal(16, df.Columns["Int3"][2]); + } + + [Fact] + public void TestComputations() + { + DataFrame df = MakeDataFrameWithAllMutableColumnTypes(10); + df["Int"][0] = -10; + Assert.Equal(-10, df.Columns["Int"][0]); + + DataFrameColumn absColumn = df.Columns["Int"].Abs(); + Assert.Equal(10, absColumn[0]); + Assert.Equal(-10, df.Columns["Int"][0]); + df.Columns["Int"].Abs(true); + Assert.Equal(10, df.Columns["Int"][0]); + + Assert.Throws(() => df.Columns["Byte"].All()); + Assert.Throws(() => df.Columns["Byte"].Any()); + Assert.Throws(() => df.Columns["Char"].All()); + Assert.Throws(() => df.Columns["Char"].Any()); + Assert.Throws(() => df.Columns["Decimal"].All()); + Assert.Throws(() => df.Columns["Decimal"].Any()); + Assert.Throws(() => df.Columns["Double"].All()); + Assert.Throws(() => df.Columns["Double"].Any()); + Assert.Throws(() => df.Columns["Float"].All()); + Assert.Throws(() => df.Columns["Float"].Any()); + Assert.Throws(() => df.Columns["Int"].All()); + Assert.Throws(() => df.Columns["Int"].Any()); + Assert.Throws(() => df.Columns["Long"].All()); + Assert.Throws(() => df.Columns["Long"].Any()); + Assert.Throws(() => df.Columns["Sbyte"].All()); + Assert.Throws(() => df.Columns["Sbyte"].Any()); + Assert.Throws(() => df.Columns["Short"].All()); + Assert.Throws(() => df.Columns["Short"].Any()); + Assert.Throws(() => df.Columns["Uint"].All()); + Assert.Throws(() => df.Columns["Uint"].Any()); + Assert.Throws(() => df.Columns["Ulong"].All()); + Assert.Throws(() => df.Columns["Ulong"].Any()); + Assert.Throws(() => df.Columns["Ushort"].All()); + Assert.Throws(() => df.Columns["Ushort"].Any()); + + bool any = df.Columns["Bool"].Any(); + bool all = df.Columns["Bool"].All(); + Assert.True(any); + Assert.False(all); + + // Test the computation results + df.Columns["Double"][0] = 100.0; + DataFrameColumn doubleColumn = df.Columns["Double"].CumulativeMax(); + for (int i = 0; i < doubleColumn.Length; i++) + { + if (i == 5) + Assert.Null(doubleColumn[i]); + else + Assert.Equal(100.0, (double)doubleColumn[i]); + } + Assert.Equal(1.0, df.Columns["Double"][1]); + df.Columns["Double"].CumulativeMax(true); + for (int i = 0; i < df.Columns["Double"].Length; i++) + { + if (i == 5) + Assert.Null(df.Columns["Double"][i]); + else + Assert.Equal(100.0, (double)df.Columns["Double"][i]); + } + + df.Columns["Float"][0] = -10.0f; + DataFrameColumn floatColumn = df.Columns["Float"].CumulativeMin(); + for (int i = 0; i < floatColumn.Length; i++) + { + if (i == 5) + Assert.Null(floatColumn[i]); + else + Assert.Equal(-10.0f, (float)floatColumn[i]); + } + Assert.Equal(9.0f, df.Columns["Float"][9]); + df.Columns["Float"].CumulativeMin(true); + for (int i = 0; i < df.Columns["Float"].Length; i++) + { + if (i == 5) + Assert.Null(df.Columns["Float"][i]); + else + Assert.Equal(-10.0f, (float)df.Columns["Float"][i]); + } + + DataFrameColumn uintColumn = df.Columns["Uint"].CumulativeProduct(); + Assert.Equal((uint)0, uintColumn[8]); + Assert.Equal((uint)8, df.Columns["Uint"][8]); + df.Columns["Uint"].CumulativeProduct(true); + Assert.Equal((uint)0, df.Columns["Uint"][9]); + + DataFrameColumn ushortColumn = df.Columns["Ushort"].CumulativeSum(); + Assert.Equal((ushort)40, ushortColumn[9]); + Assert.Equal((ushort)9, df.Columns["Ushort"][9]); + df.Columns["Ushort"].CumulativeSum(true); + Assert.Equal((ushort)40, df.Columns["Ushort"][9]); + + Assert.Equal(100.0, df.Columns["Double"].Max()); + Assert.Equal(-10.0f, df.Columns["Float"].Min()); + Assert.Equal((uint)0, df.Columns["Uint"].Product()); + Assert.Equal((ushort)140, df.Columns["Ushort"].Sum()); + + df.Columns["Double"][0] = 100.1; + Assert.Equal(100.1, df.Columns["Double"][0]); + DataFrameColumn roundColumn = df.Columns["Double"].Round(); + Assert.Equal(100.0, roundColumn[0]); + Assert.Equal(100.1, df.Columns["Double"][0]); + df.Columns["Double"].Round(true); + Assert.Equal(100.0, df.Columns["Double"][0]); + + // Test that none of the numeric column types throw + for (int i = 0; i < df.Columns.Count; i++) + { + DataFrameColumn column = df.Columns[i]; + if (column.DataType == typeof(bool)) + { + Assert.Throws(() => column.CumulativeMax()); + Assert.Throws(() => column.CumulativeMin()); + Assert.Throws(() => column.CumulativeProduct()); + Assert.Throws(() => column.CumulativeSum()); + Assert.Throws(() => column.Max()); + Assert.Throws(() => column.Min()); + Assert.Throws(() => column.Product()); + Assert.Throws(() => column.Sum()); + continue; + } + else if (column.DataType == typeof(string)) + { + Assert.Throws(() => column.CumulativeMax()); + Assert.Throws(() => column.CumulativeMin()); + Assert.Throws(() => column.CumulativeProduct()); + Assert.Throws(() => column.CumulativeSum()); + Assert.Throws(() => column.Max()); + Assert.Throws(() => column.Min()); + Assert.Throws(() => column.Product()); + Assert.Throws(() => column.Sum()); + continue; + } + column.CumulativeMax(); + column.CumulativeMin(); + column.CumulativeProduct(); + column.CumulativeSum(); + column.Max(); + column.Min(); + column.Product(); + column.Sum(); + } + } + + [Fact] + public void TestOrderBy() + { + DataFrame df = MakeDataFrameWithAllMutableColumnTypes(20); + df.Columns["Int"][0] = 100; + df.Columns["Int"][19] = -1; + df.Columns["Int"][5] = 2000; + + // Sort by "Int" in ascending order + var sortedDf = df.OrderBy("Int"); + Assert.Null(sortedDf.Columns["Int"][19]); + Assert.Equal(-1, sortedDf.Columns["Int"][0]); + Assert.Equal(100, sortedDf.Columns["Int"][17]); + Assert.Equal(2000, sortedDf.Columns["Int"][18]); + + // Sort by "Int" in descending order + sortedDf = df.OrderByDescending("Int"); + Assert.Null(sortedDf.Columns["Int"][19]); + Assert.Equal(-1, sortedDf.Columns["Int"][18]); + Assert.Equal(100, sortedDf.Columns["Int"][1]); + Assert.Equal(2000, sortedDf.Columns["Int"][0]); + + // Sort by "String" in ascending order + sortedDf = df.OrderBy("String"); + Assert.Null(sortedDf.Columns["Int"][19]); + Assert.Equal(1, sortedDf.Columns["Int"][1]); + Assert.Equal(8, sortedDf.Columns["Int"][17]); + Assert.Equal(9, sortedDf.Columns["Int"][18]); + + // Sort by "String" in descending order + sortedDf = df.OrderByDescending("String"); + Assert.Null(sortedDf.Columns["Int"][19]); + Assert.Equal(8, sortedDf.Columns["Int"][1]); + Assert.Equal(9, sortedDf.Columns["Int"][0]); + } + + [Fact] + public void TestSplitAndSort() + { + DataFrame df = MakeDataFrameWithAllMutableColumnTypes(20); + df.Columns["Int"][0] = 100000; + df.Columns["Int"][df.Rows.Count - 1] = -1; + df.Columns["Int"][5] = 200000; + DataFrame dfTest; + DataFrame dfTrain = SplitTrainTest(df, 0.8f, out dfTest); + + // Sort by "Int" in ascending order + var sortedDf = dfTrain.OrderBy("Int"); + Assert.Null(sortedDf.Columns["Int"][sortedDf.Rows.Count - 1]); + Assert.Equal(1, sortedDf.Columns["Int"][0]); + Assert.Equal(100000, sortedDf.Columns["Int"][sortedDf.Rows.Count - 3]); + Assert.Equal(200000, sortedDf.Columns["Int"][sortedDf.Rows.Count - 2]); + } + + [Fact] + public void TestStringColumnSort() + { + // StringDataFrameColumn specific sort tests + StringDataFrameColumn strColumn = new StringDataFrameColumn("String", 0); + Assert.Equal(0, strColumn.NullCount); + for (int i = 0; i < 5; i++) + { + strColumn.Append(null); + } + Assert.Equal(5, strColumn.NullCount); + // Should handle all nulls + StringDataFrameColumn sortedStrColumn = strColumn.Sort() as StringDataFrameColumn; + Assert.Equal(5, sortedStrColumn.NullCount); + Assert.Null(sortedStrColumn[0]); + + for (int i = 0; i < 5; i++) + { + strColumn.Append(i.ToString()); + } + Assert.Equal(5, strColumn.NullCount); + + // Ascending sort + sortedStrColumn = strColumn.Sort() as StringDataFrameColumn; + Assert.Equal("0", sortedStrColumn[0]); + Assert.Null(sortedStrColumn[9]); + + // Descending sort + sortedStrColumn = strColumn.Sort(false) as StringDataFrameColumn; + Assert.Equal("4", sortedStrColumn[0]); + Assert.Null(sortedStrColumn[9]); + } + + [Theory] + [InlineData(5)] + [InlineData(12)] + [InlineData(100)] + [InlineData(1000)] + public void TestPrimitiveColumnSort(int numberOfNulls) + { + // Primitive Column Sort + Int32DataFrameColumn intColumn = new Int32DataFrameColumn("Int", 0); + Assert.Equal(0, intColumn.NullCount); + intColumn.AppendMany(null, numberOfNulls); + Assert.Equal(numberOfNulls, intColumn.NullCount); + + // Should handle all nulls + PrimitiveDataFrameColumn sortedIntColumn = intColumn.Sort(); + Assert.Equal(numberOfNulls, sortedIntColumn.NullCount); + Assert.Null(sortedIntColumn[0]); + + for (int i = 0; i < 5; i++) + { + intColumn.Append(i); + } + Assert.Equal(numberOfNulls, intColumn.NullCount); + + // Ascending sort + sortedIntColumn = intColumn.Sort(); + Assert.Equal(0, sortedIntColumn[0]); + Assert.Null(sortedIntColumn[9]); + + // Descending sort + sortedIntColumn = intColumn.Sort(ascending: false); + Assert.Equal(4, sortedIntColumn[0]); + Assert.Null(sortedIntColumn[9]); + } + + private void VerifyJoin(DataFrame join, DataFrame left, DataFrame right, JoinAlgorithm joinAlgorithm) + { + Int64DataFrameColumn mapIndices = new Int64DataFrameColumn("map", join.Rows.Count); + for (long i = 0; i < join.Rows.Count; i++) + { + mapIndices[i] = i; + } + for (int i = 0; i < join.Columns.Count; i++) + { + DataFrameColumn joinColumn = join.Columns[i]; + DataFrameColumn isEqual; + + if (joinAlgorithm == JoinAlgorithm.Left) + { + if (i < left.Columns.Count) + { + DataFrameColumn leftColumn = left.Columns[i]; + isEqual = joinColumn.ElementwiseEquals(leftColumn); + } + else + { + int columnIndex = i - left.Columns.Count; + DataFrameColumn rightColumn = right.Columns[columnIndex]; + DataFrameColumn compareColumn = rightColumn.Length <= join.Rows.Count ? rightColumn.Clone(numberOfNullsToAppend: join.Rows.Count - rightColumn.Length) : rightColumn.Clone(mapIndices); + isEqual = joinColumn.ElementwiseEquals(compareColumn); + } + } + else if (joinAlgorithm == JoinAlgorithm.Right) + { + if (i < left.Columns.Count) + { + DataFrameColumn leftColumn = left.Columns[i]; + DataFrameColumn compareColumn = leftColumn.Length <= join.Rows.Count ? leftColumn.Clone(numberOfNullsToAppend: join.Rows.Count - leftColumn.Length) : leftColumn.Clone(mapIndices); + isEqual = joinColumn.ElementwiseEquals(compareColumn); + } + else + { + int columnIndex = i - left.Columns.Count; + DataFrameColumn rightColumn = right.Columns[columnIndex]; + isEqual = joinColumn.ElementwiseEquals(rightColumn); + } + } + else if (joinAlgorithm == JoinAlgorithm.Inner) + { + if (i < left.Columns.Count) + { + DataFrameColumn leftColumn = left.Columns[i]; + isEqual = joinColumn.ElementwiseEquals(leftColumn.Clone(mapIndices)); + } + else + { + int columnIndex = i - left.Columns.Count; + DataFrameColumn rightColumn = right.Columns[columnIndex]; + isEqual = joinColumn.ElementwiseEquals(rightColumn.Clone(mapIndices)); + } + } + else + { + if (i < left.Columns.Count) + { + DataFrameColumn leftColumn = left.Columns[i]; + isEqual = joinColumn.ElementwiseEquals(leftColumn.Clone(numberOfNullsToAppend: join.Rows.Count - leftColumn.Length)); + } + else + { + int columnIndex = i - left.Columns.Count; + DataFrameColumn rightColumn = right.Columns[columnIndex]; + isEqual = joinColumn.ElementwiseEquals(rightColumn.Clone(numberOfNullsToAppend: join.Rows.Count - rightColumn.Length)); + } + } + for (int j = 0; j < join.Rows.Count; j++) + { + Assert.Equal(true, isEqual[j]); + } + } + } + + private void VerifyMerge(DataFrame merge, DataFrame left, DataFrame right, JoinAlgorithm joinAlgorithm) + { + if (joinAlgorithm == JoinAlgorithm.Left || joinAlgorithm == JoinAlgorithm.Inner) + { + HashSet intersection = new HashSet(); + for (int i = 0; i < merge.Columns["Int_left"].Length; i++) + { + if (merge.Columns["Int_left"][i] == null) + continue; + intersection.Add((int)merge.Columns["Int_left"][i]); + } + for (int i = 0; i < left.Columns["Int"].Length; i++) + { + if (left.Columns["Int"][i] != null && intersection.Contains((int)left.Columns["Int"][i])) + intersection.Remove((int)left.Columns["Int"][i]); + } + Assert.Empty(intersection); + } + else if (joinAlgorithm == JoinAlgorithm.Right) + { + HashSet intersection = new HashSet(); + for (int i = 0; i < merge.Columns["Int_right"].Length; i++) + { + if (merge.Columns["Int_right"][i] == null) + continue; + intersection.Add((int)merge.Columns["Int_right"][i]); + } + for (int i = 0; i < right.Columns["Int"].Length; i++) + { + if (right.Columns["Int"][i] != null && intersection.Contains((int)right.Columns["Int"][i])) + intersection.Remove((int)right.Columns["Int"][i]); + } + Assert.Empty(intersection); + } + else if (joinAlgorithm == JoinAlgorithm.FullOuter) + { + VerifyMerge(merge, left, right, JoinAlgorithm.Left); + VerifyMerge(merge, left, right, JoinAlgorithm.Right); + } + } + + [Fact] + public void TestJoin() + { + DataFrame left = MakeDataFrameWithAllMutableColumnTypes(10); + DataFrame right = MakeDataFrameWithAllMutableColumnTypes(5); + + // Tests with right.Rows.Count < left.Rows.Count + // Left join + DataFrame join = left.Join(right); + Assert.Equal(join.Rows.Count, left.Rows.Count); + Assert.Equal(join.Columns.Count, left.Columns.Count + right.Columns.Count); + Assert.Null(join.Columns["Int_right"][6]); + VerifyJoin(join, left, right, JoinAlgorithm.Left); + + // Right join + join = left.Join(right, joinAlgorithm: JoinAlgorithm.Right); + Assert.Equal(join.Rows.Count, right.Rows.Count); + Assert.Equal(join.Columns.Count, left.Columns.Count + right.Columns.Count); + Assert.Equal(join.Columns["Int_right"][3], right.Columns["Int"][3]); + Assert.Null(join.Columns["Int_right"][2]); + VerifyJoin(join, left, right, JoinAlgorithm.Right); + + // Outer join + join = left.Join(right, joinAlgorithm: JoinAlgorithm.FullOuter); + Assert.Equal(join.Rows.Count, left.Rows.Count); + Assert.Equal(join.Columns.Count, left.Columns.Count + right.Columns.Count); + Assert.Null(join.Columns["Int_right"][6]); + VerifyJoin(join, left, right, JoinAlgorithm.FullOuter); + + // Inner join + join = left.Join(right, joinAlgorithm: JoinAlgorithm.Inner); + Assert.Equal(join.Rows.Count, right.Rows.Count); + Assert.Equal(join.Columns.Count, left.Columns.Count + right.Columns.Count); + Assert.Equal(join.Columns["Int_right"][3], right.Columns["Int"][3]); + Assert.Null(join.Columns["Int_right"][2]); + VerifyJoin(join, left, right, JoinAlgorithm.Inner); + + // Tests with right.Rows.Count > left.Rows.Count + // Left join + right = MakeDataFrameWithAllMutableColumnTypes(15); + join = left.Join(right); + Assert.Equal(join.Rows.Count, left.Rows.Count); + Assert.Equal(join.Columns.Count, left.Columns.Count + right.Columns.Count); + Assert.Equal(join.Columns["Int_right"][6], right.Columns["Int"][6]); + VerifyJoin(join, left, right, JoinAlgorithm.Left); + + // Right join + join = left.Join(right, joinAlgorithm: JoinAlgorithm.Right); + Assert.Equal(join.Rows.Count, right.Rows.Count); + Assert.Equal(join.Columns.Count, left.Columns.Count + right.Columns.Count); + Assert.Equal(join.Columns["Int_right"][2], right.Columns["Int"][2]); + Assert.Null(join.Columns["Int_left"][12]); + VerifyJoin(join, left, right, JoinAlgorithm.Right); + + // Outer join + join = left.Join(right, joinAlgorithm: JoinAlgorithm.FullOuter); + Assert.Equal(join.Rows.Count, right.Rows.Count); + Assert.Equal(join.Columns.Count, left.Columns.Count + right.Columns.Count); + Assert.Null(join.Columns["Int_left"][12]); + VerifyJoin(join, left, right, JoinAlgorithm.FullOuter); + + // Inner join + join = left.Join(right, joinAlgorithm: JoinAlgorithm.Inner); + Assert.Equal(join.Rows.Count, left.Rows.Count); + Assert.Equal(join.Columns.Count, left.Columns.Count + right.Columns.Count); + Assert.Equal(join.Columns["Int_right"][2], right.Columns["Int"][2]); + VerifyJoin(join, left, right, JoinAlgorithm.Inner); + } + + [Fact] + public void TestGroupBy() + { + DataFrame df = MakeDataFrameWithNumericAndBoolColumns(10); + DataFrame count = df.GroupBy("Bool").Count(); + Assert.Equal(2, count.Rows.Count); + Assert.Equal((long)5, count.Columns["Int"][0]); + Assert.Equal((long)4, count.Columns["Decimal"][1]); + for (int r = 0; r < count.Rows.Count; r++) + { + for (int c = 1; c < count.Columns.Count; c++) + { + Assert.Equal((long)(r == 0 ? 5 : 4), count.Columns[c][r]); + } + } + + DataFrame first = df.GroupBy("Bool").First(); + Assert.Equal(2, first.Rows.Count); + for (int r = 0; r < 2; r++) + { + for (int c = 0; c < count.Columns.Count; c++) + { + DataFrameColumn originalColumn = df.Columns[c]; + DataFrameColumn firstColumn = first.Columns[originalColumn.Name]; + Assert.Equal(originalColumn[r], firstColumn[r]); + } + } + + DataFrame head = df.GroupBy("Bool").Head(3); + List verify = new List() { 0, 3, 1, 4, 2, 5 }; + for (int r = 0; r < 5; r++) + { + for (int c = 0; c < count.Columns.Count; c++) + { + DataFrameColumn originalColumn = df.Columns[c]; + DataFrameColumn headColumn = head.Columns[originalColumn.Name]; + Assert.Equal(originalColumn[r].ToString(), headColumn[verify[r]].ToString()); + } + } + for (int c = 0; c < count.Columns.Count; c++) + { + DataFrameColumn originalColumn = df.Columns[c]; + if (originalColumn.Name == "Bool") + continue; + DataFrameColumn headColumn = head.Columns[originalColumn.Name]; + Assert.Equal(originalColumn[5], headColumn[verify[5]]); + } + Assert.Equal(6, head.Rows.Count); + + DataFrame tail = df.GroupBy("Bool").Tail(3); + Assert.Equal(6, tail.Rows.Count); + List originalColumnVerify = new List() { 6, 8, 7, 9 }; + List tailColumnVerity = new List() { 1, 2, 4, 5 }; + for (int r = 0; r < 4; r++) + { + for (int c = 0; c < count.Columns.Count; c++) + { + DataFrameColumn originalColumn = df.Columns[c]; + DataFrameColumn tailColumn = tail.Columns[originalColumn.Name]; + Assert.Equal(originalColumn[originalColumnVerify[r]].ToString(), tailColumn[tailColumnVerity[r]].ToString()); + } + } + + DataFrame max = df.GroupBy("Bool").Max(); + Assert.Equal(2, max.Rows.Count); + for (int r = 0; r < 2; r++) + { + for (int c = 0; c < count.Columns.Count; c++) + { + DataFrameColumn originalColumn = df.Columns[c]; + if (originalColumn.Name == "Bool" || originalColumn.Name == "Char") + continue; + DataFrameColumn maxColumn = max.Columns[originalColumn.Name]; + Assert.Equal(((long)(r == 0 ? 8 : 9)).ToString(), maxColumn[r].ToString()); + } + } + + DataFrame min = df.GroupBy("Bool").Min(); + Assert.Equal(2, min.Rows.Count); + + DataFrame product = df.GroupBy("Bool").Product(); + Assert.Equal(2, product.Rows.Count); + + DataFrame sum = df.GroupBy("Bool").Sum(); + Assert.Equal(2, sum.Rows.Count); + + DataFrame mean = df.GroupBy("Bool").Mean(); + Assert.Equal(2, mean.Rows.Count); + for (int r = 0; r < 2; r++) + { + for (int c = 0; c < count.Columns.Count; c++) + { + DataFrameColumn originalColumn = df.Columns[c]; + if (originalColumn.Name == "Bool" || originalColumn.Name == "Char") + continue; + DataFrameColumn minColumn = min.Columns[originalColumn.Name]; + Assert.Equal("0", minColumn[r].ToString()); + + DataFrameColumn productColumn = product.Columns[originalColumn.Name]; + Assert.Equal("0", productColumn[r].ToString()); + + DataFrameColumn sumColumn = sum.Columns[originalColumn.Name]; + Assert.Equal("20", sumColumn[r].ToString()); + } + } + + DataFrame columnSum = df.GroupBy("Bool").Sum("Int"); + Assert.Equal(2, columnSum.Columns.Count); + Assert.Equal(20, columnSum.Columns["Int"][0]); + Assert.Equal(20, columnSum.Columns["Int"][1]); + DataFrame columnMax = df.GroupBy("Bool").Max("Int"); + Assert.Equal(2, columnMax.Columns.Count); + Assert.Equal(8, columnMax.Columns["Int"][0]); + Assert.Equal(9, columnMax.Columns["Int"][1]); + DataFrame columnProduct = df.GroupBy("Bool").Product("Int"); + Assert.Equal(2, columnProduct.Columns.Count); + Assert.Equal(0, columnProduct.Columns["Int"][0]); + Assert.Equal(0, columnProduct.Columns["Int"][1]); + DataFrame columnMin = df.GroupBy("Bool").Min("Int"); + Assert.Equal(2, columnMin.Columns.Count); + Assert.Equal(0, columnMin.Columns["Int"][0]); + Assert.Equal(0, columnMin.Columns["Int"][1]); + + DataFrame countIntColumn = df.GroupBy("Bool").Count("Int"); + Assert.Equal(2, countIntColumn.Columns.Count); + Assert.Equal(2, countIntColumn.Rows.Count); + Assert.Equal((long)5, countIntColumn.Columns["Int"][0]); + Assert.Equal((long)4, countIntColumn.Columns["Int"][1]); + + DataFrame firstDecimalColumn = df.GroupBy("Bool").First("Decimal"); + Assert.Equal(2, firstDecimalColumn.Columns.Count); + Assert.Equal(2, firstDecimalColumn.Rows.Count); + Assert.Equal((decimal)0, firstDecimalColumn.Columns["Decimal"][0]); + Assert.Equal((decimal)1, firstDecimalColumn.Columns["Decimal"][1]); + } + + [Fact] + public void TestGoupByDifferentColumnTypes() + { + void GroupCountAndAssert(DataFrame frame) + { + DataFrame grouped = frame.GroupBy("Column1").Count(); + Assert.Equal(2, grouped.Rows.Count); + } + + DataFrame df = MakeDataFrame(10, false); + GroupCountAndAssert(df); + + df = MakeDataFrame(10, false); + GroupCountAndAssert(df); + + df = MakeDataFrame(10, false); + GroupCountAndAssert(df); + + df = MakeDataFrame(10, false); + GroupCountAndAssert(df); + + df = MakeDataFrame(10, false); + GroupCountAndAssert(df); + + df = MakeDataFrame(10, false); + GroupCountAndAssert(df); + + df = MakeDataFrame(10, false); + GroupCountAndAssert(df); + + df = MakeDataFrame(10, false); + GroupCountAndAssert(df); + + df = MakeDataFrame(10, false); + GroupCountAndAssert(df); + + df = MakeDataFrame(10, false); + GroupCountAndAssert(df); + + df = MakeDataFrame(10, false); + GroupCountAndAssert(df); + + df = MakeDataFrame(10, false); + GroupCountAndAssert(df); + } + + [Fact] + public void TestIEnumerable() + { + DataFrame df = MakeDataFrameWithAllColumnTypes(10); + + int totalValueCount = 0; + for (int i = 0; i < df.Columns.Count; i++) + { + DataFrameColumn baseColumn = df.Columns[i]; + foreach (object value in baseColumn) + { + totalValueCount++; + } + } + Assert.Equal(10 * df.Columns.Count, totalValueCount); + + // spot check a few column types: + + StringDataFrameColumn stringColumn = (StringDataFrameColumn)df.Columns["String"]; + StringBuilder actualStrings = new StringBuilder(); + foreach (string value in stringColumn) + { + if (value == null) + { + actualStrings.Append(""); + } + else + { + actualStrings.Append(value); + } + } + Assert.Equal("012346789", actualStrings.ToString()); + + ArrowStringDataFrameColumn arrowStringColumn = (ArrowStringDataFrameColumn)df.Columns["ArrowString"]; + actualStrings.Clear(); + foreach (string value in arrowStringColumn) + { + if (value == null) + { + actualStrings.Append(""); + } + else + { + actualStrings.Append(value); + } + } + Assert.Equal("foofoofoofoofoofoofoofoofoo", actualStrings.ToString()); + + SingleDataFrameColumn floatColumn = (SingleDataFrameColumn)df.Columns["Float"]; + actualStrings.Clear(); + foreach (float? value in floatColumn) + { + if (value == null) + { + actualStrings.Append(""); + } + else + { + actualStrings.Append(value); + } + } + Assert.Equal("012346789", actualStrings.ToString()); + + Int32DataFrameColumn intColumn = (Int32DataFrameColumn)df.Columns["Int"]; + actualStrings.Clear(); + foreach (int? value in intColumn) + { + if (value == null) + { + actualStrings.Append(""); + } + else + { + actualStrings.Append(value); + } + } + Assert.Equal("012346789", actualStrings.ToString()); + } + + [Fact] + public void TestColumnClamp() + { + DataFrame df = MakeDataFrameWithNumericColumns(10); + // Out of place + DataFrameColumn clamped = df.Columns["Int"].Clamp(3, 7); + Assert.Equal(3, clamped[0]); + Assert.Equal(0, df.Columns["Int"][0]); + Assert.Equal(3, clamped[1]); + Assert.Equal(1, df.Columns["Int"][1]); + Assert.Equal(3, clamped[2]); + Assert.Equal(2, df.Columns["Int"][2]); + Assert.Equal(3, clamped[3]); + Assert.Equal(3, df.Columns["Int"][3]); + Assert.Equal(4, clamped[4]); + Assert.Equal(4, df.Columns["Int"][4]); + Assert.Null(clamped[5]); + Assert.Null(df.Columns["Int"][5]); + Assert.Equal(6, clamped[6]); + Assert.Equal(6, df.Columns["Int"][6]); + Assert.Equal(7, clamped[7]); + Assert.Equal(7, df.Columns["Int"][7]); + Assert.Equal(7, clamped[8]); + Assert.Equal(8, df.Columns["Int"][8]); + Assert.Equal(7, clamped[9]); + Assert.Equal(9, df.Columns["Int"][9]); + + // In place + df.Columns["Int"].Clamp(3, 7, true); + Assert.Equal(3, df.Columns["Int"][0]); + Assert.Equal(3, df.Columns["Int"][1]); + Assert.Equal(3, df.Columns["Int"][2]); + Assert.Equal(3, df.Columns["Int"][3]); + Assert.Equal(4, df.Columns["Int"][4]); + Assert.Null(df.Columns["Int"][5]); + Assert.Equal(6, df.Columns["Int"][6]); + Assert.Equal(7, df.Columns["Int"][7]); + Assert.Equal(7, df.Columns["Int"][8]); + Assert.Equal(7, df.Columns["Int"][9]); + } + + [Fact] + public void TestColumnFilter() + { + DataFrame df = MakeDataFrameWithNumericColumns(10); + DataFrameColumn filtered = df.Columns["Int"].Filter(3, 7); + Assert.Equal(4, filtered.Length); + Assert.Equal(3, filtered[0]); + Assert.Equal(4, filtered[1]); + Assert.Equal(6, filtered[2]); + Assert.Equal(7, filtered[3]); + } + + [Fact] + public void TestDataFrameClamp() + { + DataFrame df = MakeDataFrameWithAllColumnTypes(10); + IEnumerable dfColumns = ((IDataView)df).Schema; + + void VerifyDataFrameClamp(DataFrame clampedColumn) + { + + IEnumerable clampedColumns = ((IDataView)clampedColumn).Schema; + Assert.Equal(df.Columns.Count, clampedColumn.Columns.Count); + Assert.Equal(dfColumns, clampedColumns); + for (int c = 0; c < df.Columns.Count; c++) + { + DataFrameColumn column = clampedColumn.Columns[c]; + if (column.IsNumericColumn()) + { + for (int i = 0; i < 4; i++) + { + Assert.Equal("3", column[i].ToString()); + } + Assert.Equal(4.ToString(), column[4].ToString()); + Assert.Null(column[5]); + Assert.Equal(6.ToString(), column[6].ToString()); + for (int i = 7; i < 10; i++) + { + Assert.Equal("7", column[i].ToString()); + } + } + else + { + for (int i = 0; i < column.Length; i++) + { + var colD = df.Columns[c][i]; + var ocD = column[i]; + Assert.Equal(df.Columns[c][i], column[i]); + } + } + } + } + + // Out of place + DataFrame clamped = df.Clamp(3, 7); + VerifyDataFrameClamp(clamped); + for (int i = 0; i < 10; i++) + { + if (i != 5) + Assert.Equal(i, df.Columns["Int"][i]); + else + Assert.Null(df.Columns["Int"][5]); + } + + // Inplace + df.Clamp(3, 7, true); + VerifyDataFrameClamp(df); + + } + + [Fact] + public void TestDataFrameFilter() + { + DataFrame df = MakeDataFrameWithAllMutableColumnTypes(10); + DataFrame boolColumnFiltered = df[df.Columns["Bool"].ElementwiseEquals(true)]; + List verify = new List { 0, 2, 4, 6, 8 }; + Assert.Equal(5, boolColumnFiltered.Rows.Count); + for (int i = 0; i < boolColumnFiltered.Columns.Count; i++) + { + DataFrameColumn column = boolColumnFiltered.Columns[i]; + if (column.Name == "Char" || column.Name == "Bool" || column.Name == "String") + continue; + for (int j = 0; j < column.Length; j++) + { + Assert.Equal(verify[j].ToString(), column[j].ToString()); + } + } + DataFrame intEnumerableFiltered = df[Enumerable.Range(0, 10)]; + DataFrame boolEnumerableFiltered = df[Enumerable.Range(0, 10).Select(x => true)]; + DataFrame longEnumerableFiltered = df[Enumerable.Range(0, 10).Select(x => (long)x)]; + Assert.Equal(intEnumerableFiltered.Columns.Count, df.Columns.Count); + Assert.Equal(boolEnumerableFiltered.Columns.Count, df.Columns.Count); + Assert.Equal(longEnumerableFiltered.Columns.Count, df.Columns.Count); + for (int i = 0; i < intEnumerableFiltered.Columns.Count; i++) + { + DataFrameColumn intFilteredColumn = intEnumerableFiltered.Columns[i]; + DataFrameColumn dfColumn = df.Columns[i]; + DataFrameColumn boolFilteredColumn = boolEnumerableFiltered.Columns[i]; + DataFrameColumn longFilteredColumn = longEnumerableFiltered.Columns[i]; + Assert.True(intFilteredColumn.ElementwiseEquals(dfColumn).All()); + Assert.True(boolFilteredColumn.ElementwiseEquals(dfColumn).All()); + Assert.True(longFilteredColumn.ElementwiseEquals(dfColumn).All()); + } + } + + [Fact] + public void TestPrefixAndSuffix() + { + DataFrame df = MakeDataFrameWithAllColumnTypes(10); + IEnumerable columnNames = ((IDataView)df).Schema; + + DataFrame prefix = df.AddPrefix("Prefix_"); + IEnumerable prefixNames = ((IDataView)prefix).Schema; + foreach ((DataViewSchema.Column First, DataViewSchema.Column Second) in columnNames.Zip(((IDataView)df).Schema, (e1, e2) => (e1, e2))) + { + Assert.Equal(First.Name, Second.Name); + } + foreach ((DataViewSchema.Column First, DataViewSchema.Column Second) in prefixNames.Zip(columnNames, (e1, e2) => (e1, e2))) + { + Assert.Equal(First.Name, "Prefix_" + Second.Name); + } + + // Inplace + df.AddPrefix("Prefix_", true); + prefixNames = ((IDataView)df).Schema; + foreach ((DataViewSchema.Column First, DataViewSchema.Column Second) in columnNames.Zip(prefixNames, (e1, e2) => (e1, e2))) + { + Assert.Equal("Prefix_" + First.Name, Second.Name); + } + + DataFrame suffix = df.AddSuffix("_Suffix"); + IEnumerable suffixNames = ((IDataView)suffix).Schema; + foreach ((DataViewSchema.Column First, DataViewSchema.Column Second) in ((IDataView)df).Schema.Zip(columnNames, (e1, e2) => (e1, e2))) + { + Assert.Equal(First.Name, "Prefix_" + Second.Name); + } + foreach ((DataViewSchema.Column First, DataViewSchema.Column Second) in columnNames.Zip(suffixNames, (e1, e2) => (e1, e2))) + { + Assert.Equal("Prefix_" + First.Name + "_Suffix", Second.Name); + } + + // InPlace + df.AddSuffix("_Suffix", true); + suffixNames = ((IDataView)df).Schema; + foreach ((DataViewSchema.Column First, DataViewSchema.Column Second) in columnNames.Zip(suffixNames, (e1, e2) => (e1, e2))) + { + Assert.Equal("Prefix_" + First.Name + "_Suffix", Second.Name); + } + } + + [Fact] + public void TestSample() + { + DataFrame df = MakeDataFrameWithAllColumnTypes(10); + DataFrame sampled = df.Sample(7); + Assert.Equal(7, sampled.Rows.Count); + Assert.Equal(df.Columns.Count, sampled.Columns.Count); + + // all sampled rows should be unique. + HashSet uniqueRowValues = new HashSet(); + foreach(int? value in sampled.Columns["Int"]) + { + uniqueRowValues.Add(value); + } + Assert.Equal(uniqueRowValues.Count, sampled.Rows.Count); + + // should throw exception as sample size is greater than dataframe rows + Assert.Throws(()=> df.Sample(13)); + } + + [Fact] + public void TestMerge() + { + DataFrame left = MakeDataFrameWithAllMutableColumnTypes(10); + DataFrame right = MakeDataFrameWithAllMutableColumnTypes(5); + + // Tests with right.Rows.Count < left.Rows.Count + // Left merge + DataFrame merge = left.Merge(right, "Int", "Int"); + Assert.Equal(10, merge.Rows.Count); + Assert.Equal(merge.Columns.Count, left.Columns.Count + right.Columns.Count); + Assert.Null(merge.Columns["Int_right"][6]); + Assert.Null(merge.Columns["Int_left"][5]); + VerifyMerge(merge, left, right, JoinAlgorithm.Left); + + // Right merge + merge = left.Merge(right, "Int", "Int", joinAlgorithm: JoinAlgorithm.Right); + Assert.Equal(5, merge.Rows.Count); + Assert.Equal(merge.Columns.Count, left.Columns.Count + right.Columns.Count); + Assert.Equal(merge.Columns["Int_right"][3], right.Columns["Int"][3]); + Assert.Null(merge.Columns["Int_right"][2]); + VerifyMerge(merge, left, right, JoinAlgorithm.Right); + + // Outer merge + merge = left.Merge(right, "Int", "Int", joinAlgorithm: JoinAlgorithm.FullOuter); + Assert.Equal(merge.Rows.Count, left.Rows.Count); + Assert.Equal(merge.Columns.Count, left.Columns.Count + right.Columns.Count); + Assert.Null(merge.Columns["Int_right"][6]); + VerifyMerge(merge, left, right, JoinAlgorithm.FullOuter); + + // Inner merge + merge = left.Merge(right, "Int", "Int", joinAlgorithm: JoinAlgorithm.Inner); + Assert.Equal(merge.Rows.Count, right.Rows.Count); + Assert.Equal(merge.Columns.Count, left.Columns.Count + right.Columns.Count); + Assert.Equal(merge.Columns["Int_right"][2], right.Columns["Int"][3]); + Assert.Null(merge.Columns["Int_right"][4]); + VerifyMerge(merge, left, right, JoinAlgorithm.Inner); + + // Tests with right.Rows.Count > left.Rows.Count + // Left merge + right = MakeDataFrameWithAllMutableColumnTypes(15); + merge = left.Merge(right, "Int", "Int"); + Assert.Equal(merge.Rows.Count, left.Rows.Count); + Assert.Equal(merge.Columns.Count, left.Columns.Count + right.Columns.Count); + Assert.Equal(merge.Columns["Int_right"][6], right.Columns["Int"][6]); + VerifyMerge(merge, left, right, JoinAlgorithm.Left); + + // Right merge + merge = left.Merge(right, "Int", "Int", joinAlgorithm: JoinAlgorithm.Right); + Assert.Equal(merge.Rows.Count, right.Rows.Count); + Assert.Equal(merge.Columns.Count, left.Columns.Count + right.Columns.Count); + Assert.Equal(merge.Columns["Int_right"][2], right.Columns["Int"][2]); + Assert.Null(merge.Columns["Int_left"][12]); + VerifyMerge(merge, left, right, JoinAlgorithm.Right); + + // Outer merge + merge = left.Merge(right, "Int", "Int", joinAlgorithm: JoinAlgorithm.FullOuter); + Assert.Equal(16, merge.Rows.Count); + Assert.Equal(merge.Columns.Count, left.Columns.Count + right.Columns.Count); + Assert.Null(merge.Columns["Int_left"][12]); + Assert.Null(merge.Columns["Int_left"][5]); + VerifyMerge(merge, left, right, JoinAlgorithm.FullOuter); + + // Inner merge + merge = left.Merge(right, "Int", "Int", joinAlgorithm: JoinAlgorithm.Inner); + Assert.Equal(9, merge.Rows.Count); + Assert.Equal(merge.Columns.Count, left.Columns.Count + right.Columns.Count); + Assert.Equal(merge.Columns["Int_right"][2], right.Columns["Int"][2]); + VerifyMerge(merge, left, right, JoinAlgorithm.Inner); + } + + [Fact] + public void TestDescription() + { + DataFrame df = MakeDataFrameWithAllMutableColumnTypes(10); + + // Add a column manually here until we fix https://github.com/dotnet/corefxlab/issues/2784 + PrimitiveDataFrameColumn dateTimes = new PrimitiveDataFrameColumn("DateTimes"); + for (int i = 0; i < 10; i++) + { + dateTimes.Append(DateTime.Parse("2019/01/01")); + } + df.Columns.Add(dateTimes); + + DataFrame description = df.Description(); + DataFrameColumn descriptionColumn = description.Columns[0]; + Assert.Equal("Description", descriptionColumn.Name); + Assert.Equal("Length (excluding null values)", descriptionColumn[0]); + Assert.Equal("Max", descriptionColumn[1]); + Assert.Equal("Min", descriptionColumn[2]); + Assert.Equal("Mean", descriptionColumn[3]); + for (int i = 1; i < description.Columns.Count - 1; i++) + { + DataFrameColumn column = description.Columns[i]; + Assert.Equal(df.Columns[i - 1].Name, column.Name); + Assert.Equal(4, column.Length); + Assert.Equal((float)9, column[0]); + Assert.Equal((float)9, column[1]); + Assert.Equal((float)0, column[2]); + Assert.Equal((float)4, column[3]); + } + + // Explicitly check the dateTimes column + DataFrameColumn dateTimeColumn = description.Columns[description.Columns.Count - 1]; + Assert.Equal(dateTimeColumn.Name, dateTimes.Name); + Assert.Equal(4, dateTimeColumn.Length); + Assert.Equal((float)10, dateTimeColumn[0]); + Assert.Null(dateTimeColumn[1]); + Assert.Null(dateTimeColumn[2]); + Assert.Null(dateTimeColumn[3]); + } + + [Fact] + public void TestInfo() + { + DataFrame df = MakeDataFrameWithAllMutableColumnTypes(10); + + // Add a column manually here until we fix https://github.com/dotnet/corefxlab/issues/2784 + PrimitiveDataFrameColumn dateTimes = new PrimitiveDataFrameColumn("DateTimes"); + for (int i = 0; i < 10; i++) + { + dateTimes.Append(DateTime.Parse("2019/01/01")); + } + df.Columns.Add(dateTimes); + + DataFrame Info = df.Info(); + DataFrameColumn infoColumn = Info.Columns[0]; + Assert.Equal("Info", infoColumn.Name); + Assert.Equal("Length (excluding null values)", infoColumn[1]); + Assert.Equal("DataType", infoColumn[0]); + + for (int i = 1; i < Info.Columns.Count; i++) + { + DataFrameColumn column = Info.Columns[i]; + Assert.Equal(df.Columns[i - 1].DataType.ToString(), column[0].ToString()); + Assert.Equal(2, column.Length); + } + } + + [Fact] + public void TestDropNulls() + { + DataFrame df = MakeDataFrameWithAllMutableColumnTypes(20); + DataFrame anyNulls = df.DropNulls(); + Assert.Equal(19, anyNulls.Rows.Count); + + DataFrame allNulls = df.DropNulls(DropNullOptions.All); + Assert.Equal(19, allNulls.Rows.Count); + } + + [Fact] + public void TestInsertMismatchedColumnToEmptyDataFrame() + { + DataFrame df = new DataFrame(); + DataFrameColumn dataFrameColumn1 = new Int32DataFrameColumn("Int1"); + df.Columns.Insert(0, dataFrameColumn1); + + // should throw exception as column sizes are mismatched. + + Assert.Throws(() => df.Columns.Insert(1, new Int32DataFrameColumn("Int2", Enumerable.Range(0, 5).Select(x => x)))); + } + + [Fact] + public void TestFillNulls() + { + DataFrame df = MakeDataFrameWithTwoColumns(20); + Assert.Null(df[10, 0]); + DataFrame fillNulls = df.FillNulls(1000); + Assert.Equal(1000, (int)fillNulls[10, 1]); + Assert.Null(df[10, 0]); + df.FillNulls(1000, true); + Assert.Equal(1000, df[10, 1]); + + StringDataFrameColumn strColumn = new StringDataFrameColumn("String", 0); + strColumn.Append(null); + strColumn.Append(null); + Assert.Equal(2, strColumn.Length); + Assert.Equal(2, strColumn.NullCount); + DataFrameColumn filled = strColumn.FillNulls("foo"); + Assert.Equal(2, strColumn.Length); + Assert.Equal(2, strColumn.NullCount); + Assert.Equal(2, filled.Length); + Assert.Equal(0, filled.NullCount); + Assert.Equal("foo", filled[0]); + Assert.Equal("foo", filled[1]); + Assert.Null(strColumn[0]); + Assert.Null(strColumn[1]); + + // In place + strColumn.FillNulls("foo", true); + Assert.Equal(2, strColumn.Length); + Assert.Equal(0, strColumn.NullCount); + Assert.Equal("foo", strColumn[0]); + Assert.Equal("foo", strColumn[1]); + + // ArrowStringColumn (not inplace) + ArrowStringDataFrameColumn arrowColumn = CreateArrowStringColumn(3); + Assert.Equal(3, arrowColumn.Length); + Assert.Equal(1, arrowColumn.NullCount); + Assert.Null(arrowColumn[1]); + ArrowStringDataFrameColumn arrowColumnFilled = arrowColumn.FillNulls("foo"); + Assert.Equal(3, arrowColumn.Length); + Assert.Equal(1, arrowColumn.NullCount); + Assert.Equal(3, arrowColumnFilled.Length); + Assert.Equal(0, arrowColumnFilled.NullCount); + Assert.Equal("foo", arrowColumnFilled[1]); + Assert.Equal(arrowColumn[0], arrowColumnFilled[0]); + Assert.Equal(arrowColumn[2], arrowColumnFilled[2]); + } + + [Fact] + public void TestValueCounts() + { + DataFrame df = MakeDataFrameWithAllColumnTypes(10, withNulls: false); + DataFrame valueCounts = df.Columns["Bool"].ValueCounts(); + Assert.Equal(2, valueCounts.Rows.Count); + Assert.Equal((long)5, valueCounts.Columns["Counts"][0]); + Assert.Equal((long)5, valueCounts.Columns["Counts"][1]); + } + + [Fact] + public void TestApplyElementwiseNullCount() + { + DataFrame df = MakeDataFrameWithTwoColumns(10); + Int32DataFrameColumn column = df.Columns["Int1"] as Int32DataFrameColumn; + Assert.Equal(1, column.NullCount); + + // Change all existing values to null + column.ApplyElementwise((int? value, long rowIndex) => + { + if (!(value is null)) + return null; + return value; + }); + Assert.Equal(column.Length, column.NullCount); + + // Don't change null values + column.ApplyElementwise((int? value, long rowIndex) => + { + return value; + }); + Assert.Equal(column.Length, column.NullCount); + + // Change all null values to real values + column.ApplyElementwise((int? value, long rowIndex) => + { + return 5; + }); + Assert.Equal(0, column.NullCount); + + // Don't change real values + column.ApplyElementwise((int? value, long rowIndex) => + { + return value; + }); + Assert.Equal(0, column.NullCount); + + } + + [Theory] + [InlineData(10, 5)] + [InlineData(20, 20)] + public void TestClone(int dfLength, int intDfLength) + { + DataFrame df = MakeDataFrameWithAllColumnTypes(dfLength, withNulls: true); + DataFrame intDf = MakeDataFrameWithTwoColumns(intDfLength, false); + Int32DataFrameColumn intColumn = intDf.Columns["Int1"] as Int32DataFrameColumn; + DataFrame clone = df[intColumn]; + Assert.Equal(intDfLength, clone.Rows.Count); + Assert.Equal(df.Columns.Count, clone.Columns.Count); + for (int i = 0; i < df.Columns.Count; i++) + { + DataFrameColumn dfColumn = df.Columns[i]; + DataFrameColumn cloneColumn = clone.Columns[i]; + for (long r = 0; r < clone.Rows.Count; r++) + { + Assert.Equal(dfColumn[r], cloneColumn[r]); + } + } + } + + [Fact] + public void TestColumnCreationFromExisitingColumn() + { + DataFrame df = MakeDataFrameWithAllColumnTypes(10); + BooleanDataFrameColumn bigInts = new BooleanDataFrameColumn("BigInts", df.Columns["Int"].ElementwiseGreaterThan(5)); + for (int i = 0; i < 10; i++) + { + if (i <= 5) + Assert.False(bigInts[i]); + else + Assert.True(bigInts[i]); + } + } + + [Fact] + public void TestColumns() + { + DataFrame df = MakeDataFrameWithAllColumnTypes(10); + IReadOnlyList columns = df.Columns; + int i = 0; + Assert.Equal(columns.Count, df.Columns.Count); + foreach (DataFrameColumn dataFrameColumn in columns) + { + Assert.Equal(dataFrameColumn, df.Columns[i++]); + } + + } + + [Fact] + public void TestRows() + { + DataFrame df = MakeDataFrameWithAllColumnTypes(10); + DataFrameRowCollection rows = df.Rows; + Assert.Equal(10, rows.Count); + DataFrameRow firstRow = rows[0]; + object firstValue = firstRow[0]; + Assert.Equal(df[0, 0], firstValue); + long rowCount = 0; + foreach (DataFrameRow row in rows) + { + int columnIndex = 0; + foreach (var value in row) + { + Assert.Equal(df.Columns[columnIndex][rowCount], value); + columnIndex++; + } + rowCount++; + } + Assert.Equal(df.Rows.Count, rowCount); + + DataFrameRow nullRow = rows[5]; + int intColumnIndex = df.Columns.IndexOf("Int"); + Assert.Equal(1, df.Columns[intColumnIndex].NullCount); + nullRow[intColumnIndex] = 5; + Assert.Equal(0, df.Columns[intColumnIndex].NullCount); + nullRow[intColumnIndex] = null; + Assert.Equal(1, df.Columns[intColumnIndex].NullCount); + } + + [Fact] + public void TestMutationOnRows() + { + DataFrame df = MakeDataFrameWithNumericColumns(10); + DataFrameRowCollection rows = df.Rows; + + foreach (DataFrameRow row in rows) + { + for (int i = 0; i < df.Columns.Count; i++) + { + DataFrameColumn column = df.Columns[i]; + row[i] = Convert.ChangeType(12, column.DataType); + } + } + + foreach (var column in df.Columns) + { + foreach (var value in column) + { + Assert.Equal("12", value.ToString()); + } + } + } + + [Fact] + public void TestAppendRows() + { + DataFrame df = MakeDataFrame(10); + DataFrame df2 = MakeDataFrame(5); + Assert.Equal(10, df.Rows.Count); + Assert.Equal(1, df.Columns[0].NullCount); + Assert.Equal(1, df.Columns[1].NullCount); + + DataFrame ret = df.Append(df2.Rows, inPlace: false); + Assert.Equal(10, df.Rows.Count); + Assert.Equal(1, df.Columns[0].NullCount); + Assert.Equal(1, df.Columns[1].NullCount); + + Verify(ret, df, df2); + + void Verify(DataFrame ret, DataFrame check1, DataFrame check2) + { + Assert.Equal(15, ret.Rows.Count); + Assert.Equal(2, ret.Columns[0].NullCount); + Assert.Equal(2, ret.Columns[1].NullCount); + for (long i = 0; i < ret.Rows.Count; i++) + { + DataFrameRow row = ret.Rows[i]; + for (int j = 0; j < check1.Columns.Count; j++) + { + if (i < check1.Rows.Count) + { + Assert.Equal(row[j], check1.Rows[i][j]); + } + else + { + Assert.Equal(row[j]?.ToString(), (check2.Rows[i - check1.Rows.Count][j])?.ToString()); + } + } + } + } + + DataFrame dfClone = df.Clone(); + df.Append(df2.Rows, inPlace: true); + Verify(df, dfClone, df2); + } + + [Fact] + public void TestAppendRow() + { + DataFrame df = MakeDataFrame(10); + df.Append(new List { 5, true }, inPlace: true); + Assert.Equal(11, df.Rows.Count); + Assert.Equal(1, df.Columns[0].NullCount); + Assert.Equal(1, df.Columns[1].NullCount); + + DataFrame ret = df.Append(new List { 5, true }); + Assert.Equal(12, ret.Rows.Count); + Assert.Equal(1, ret.Columns[0].NullCount); + Assert.Equal(1, ret.Columns[1].NullCount); + + df.Append(new List { 100 }, inPlace: true); + Assert.Equal(12, df.Rows.Count); + Assert.Equal(1, df.Columns[0].NullCount); + Assert.Equal(2, df.Columns[1].NullCount); + + ret = df.Append(new List { 100 }, inPlace: false); + Assert.Equal(13, ret.Rows.Count); + Assert.Equal(1, ret.Columns[0].NullCount); + Assert.Equal(3, ret.Columns[1].NullCount); + + df.Append(new List { null, null }, inPlace: true); + Assert.Equal(13, df.Rows.Count); + Assert.Equal(2, df.Columns[0].NullCount); + Assert.Equal(3, df.Columns[1].NullCount); + ret = df.Append(new List { null, null }, inPlace: false); + Assert.Equal(14, ret.Rows.Count); + Assert.Equal(3, ret.Columns[0].NullCount); + Assert.Equal(4, ret.Columns[1].NullCount); + + df.Append(new Dictionary { { "Column1", (object)5 }, { "Column2", false } }, inPlace: true); + Assert.Equal(14, df.Rows.Count); + Assert.Equal(2, df.Columns[0].NullCount); + Assert.Equal(3, df.Columns[1].NullCount); + ret = df.Append(new Dictionary { { "Column1", (object)5 }, { "Column2", false } }, inPlace: false); + Assert.Equal(15, ret.Rows.Count); + Assert.Equal(2, ret.Columns[0].NullCount); + Assert.Equal(3, ret.Columns[1].NullCount); + + df.Append(new Dictionary { { "Column1", 5 } }, inPlace: true); + Assert.Equal(15, df.Rows.Count); + + Assert.Equal(15, df.Columns["Column1"].Length); + Assert.Equal(15, df.Columns["Column2"].Length); + Assert.Equal(2, df.Columns[0].NullCount); + Assert.Equal(4, df.Columns[1].NullCount); + ret = df.Append(new Dictionary { { "Column1", 5 } }, inPlace: false); + Assert.Equal(16, ret.Rows.Count); + + Assert.Equal(16, ret.Columns["Column1"].Length); + Assert.Equal(16, ret.Columns["Column2"].Length); + Assert.Equal(2, ret.Columns[0].NullCount); + Assert.Equal(5, ret.Columns[1].NullCount); + + df.Append(new Dictionary { { "Column2", false } }, inPlace: true); + Assert.Equal(16, df.Rows.Count); + Assert.Equal(16, df.Columns["Column1"].Length); + Assert.Equal(16, df.Columns["Column2"].Length); + Assert.Equal(3, df.Columns[0].NullCount); + Assert.Equal(4, df.Columns[1].NullCount); + ret = df.Append(new Dictionary { { "Column2", false } }, inPlace: false); + Assert.Equal(17, ret.Rows.Count); + Assert.Equal(17, ret.Columns["Column1"].Length); + Assert.Equal(17, ret.Columns["Column2"].Length); + Assert.Equal(4, ret.Columns[0].NullCount); + Assert.Equal(4, ret.Columns[1].NullCount); + + df.Append((IEnumerable)null, inPlace: true); + Assert.Equal(17, df.Rows.Count); + Assert.Equal(17, df.Columns["Column1"].Length); + Assert.Equal(17, df.Columns["Column2"].Length); + Assert.Equal(4, df.Columns[0].NullCount); + Assert.Equal(5, df.Columns[1].NullCount); + ret = df.Append((IEnumerable)null, inPlace: false); + Assert.Equal(18, ret.Rows.Count); + Assert.Equal(18, ret.Columns["Column1"].Length); + Assert.Equal(18, ret.Columns["Column2"].Length); + Assert.Equal(5, ret.Columns[0].NullCount); + Assert.Equal(6, ret.Columns[1].NullCount); + + // DataFrame must remain usable even if Append throws + Assert.Throws(() => df.Append(new List { 5, "str" }, inPlace: true)); + Assert.Throws(() => df.Append(new Dictionary { { "Column2", "str" } }, inPlace: true)); + Assert.Throws(() => df.Append(new List { 5, true, true }, inPlace: true)); + + df.Append(inPlace: true); + Assert.Equal(18, df.Rows.Count); + Assert.Equal(18, df.Columns["Column1"].Length); + Assert.Equal(18, df.Columns["Column2"].Length); + Assert.Equal(5, df.Columns[0].NullCount); + Assert.Equal(6, df.Columns[1].NullCount); + + ret = df.Append(inPlace: false); + Assert.Equal(18, df.Rows.Count); + Assert.Equal(18, df.Columns["Column1"].Length); + Assert.Equal(18, df.Columns["Column2"].Length); + Assert.Equal(5, df.Columns[0].NullCount); + Assert.Equal(6, df.Columns[1].NullCount); + Assert.Equal(19, ret.Rows.Count); + Assert.Equal(19, ret.Columns["Column1"].Length); + Assert.Equal(19, ret.Columns["Column2"].Length); + Assert.Equal(6, ret.Columns[0].NullCount); + Assert.Equal(7, ret.Columns[1].NullCount); + } + + [Fact] + public void TestAppendEmptyValue() + { + DataFrame df = MakeDataFrame(10); + df.Append(new List { "", true }, inPlace: true); + Assert.Equal(11, df.Rows.Count); + Assert.Equal(2, df.Columns[0].NullCount); + Assert.Equal(1, df.Columns[1].NullCount); + + StringDataFrameColumn column = new StringDataFrameColumn("Strings", Enumerable.Range(0, 11).Select(x => x.ToString())); + df.Columns.Add(column); + + df.Append(new List { 1, true, "" }, inPlace: true); + Assert.Equal(12, df.Rows.Count); + Assert.Equal(2, df.Columns[0].NullCount); + Assert.Equal(1, df.Columns[1].NullCount); + Assert.Equal(0, df.Columns[2].NullCount); + + df.Append(new List { 1, true, null }, inPlace: true); + Assert.Equal(13, df.Rows.Count); + Assert.Equal(1, df.Columns[2].NullCount); + } + + [Fact] + public void TestApply() + { + int[] values = { 1, 2, 3, 4, 5 }; + var col = new Int32DataFrameColumn("Ints", values); + PrimitiveDataFrameColumn newCol = col.Apply(i => i + 0.5d); + + Assert.Equal(values.Length, newCol.Length); + + for (int i = 0; i < newCol.Length; i++) + { + Assert.Equal(col[i], values[i]); // Make sure values didn't change + Assert.Equal(newCol[i], values[i] + 0.5d); + } + } + + [Fact] + public void TestDataFrameCreate() + { + int length = 10; + void AssertLengthTypeAndValues(DataFrameColumn column, Type type) + { + Assert.Equal(column.DataType, type); + Assert.Equal(length, column.Length); + for (long i = 0; i < column.Length; i++) + { + Assert.Equal(i.ToString(), column[i].ToString()); + } + } + DataFrameColumn stringColumn = DataFrameColumn.Create("String", Enumerable.Range(0, length).Select(x => x.ToString())); + AssertLengthTypeAndValues(stringColumn, typeof(string)); + DataFrameColumn byteColumn = DataFrameColumn.Create("Byte", Enumerable.Range(0, length).Select(x => (byte)x)); + AssertLengthTypeAndValues(byteColumn, typeof(byte)); + DataFrameColumn decimalColumn = DataFrameColumn.Create("Decimal", Enumerable.Range(0, length).Select(x => (decimal)x)); + AssertLengthTypeAndValues(decimalColumn, typeof(decimal)); + DataFrameColumn doubleColumn = DataFrameColumn.Create("Double", Enumerable.Range(0, length).Select(x => (double)x)); + AssertLengthTypeAndValues(doubleColumn, typeof(double)); + DataFrameColumn floatColumn = DataFrameColumn.Create("Float", Enumerable.Range(0, length).Select(x => (float)x)); + AssertLengthTypeAndValues(floatColumn, typeof(float)); + DataFrameColumn intColumn = DataFrameColumn.Create("Int", Enumerable.Range(0, length).Select(x => x)); + AssertLengthTypeAndValues(intColumn, typeof(int)); + DataFrameColumn longColumn = DataFrameColumn.Create("Long", Enumerable.Range(0, length).Select(x => (long)x)); + AssertLengthTypeAndValues(longColumn, typeof(long)); + DataFrameColumn sbyteColumn = DataFrameColumn.Create("Sbyte", Enumerable.Range(0, length).Select(x => (sbyte)x)); + AssertLengthTypeAndValues(sbyteColumn, typeof(sbyte)); + DataFrameColumn shortColumn = DataFrameColumn.Create("Short", Enumerable.Range(0, length).Select(x => (short)x)); + AssertLengthTypeAndValues(shortColumn, typeof(short)); + DataFrameColumn uintColumn = DataFrameColumn.Create("Uint", Enumerable.Range(0, length).Select(x => (uint)x)); + AssertLengthTypeAndValues(uintColumn, typeof(uint)); + DataFrameColumn ulongColumn = DataFrameColumn.Create("Ulong", Enumerable.Range(0, length).Select(x => (ulong)x)); + AssertLengthTypeAndValues(ulongColumn, typeof(ulong)); + DataFrameColumn ushortColumn = DataFrameColumn.Create("Ushort", Enumerable.Range(0, length).Select(x => (ushort)x)); + AssertLengthTypeAndValues(ushortColumn, typeof(ushort)); + } + + [Fact] + public void TestBinaryOperationsOnExplodedNumericColumns() + { + DataFrame df = MakeDataFrameWithNumericAndBoolColumns(10, withNulls: false); + Int32DataFrameColumn ints = df.Columns["Int"] as Int32DataFrameColumn; + Int32DataFrameColumn res = ints.Add(1).Subtract(1).Multiply(10).Divide(10).LeftShift(2).RightShift(2); + Assert.True(res.ElementwiseEquals(ints).All()); + Assert.True(res.ElementwiseGreaterThanOrEqual(ints).All()); + Assert.True(res.ElementwiseLessThanOrEqual(ints).All()); + Assert.False(res.ElementwiseNotEquals(ints).All()); + Assert.False(res.ElementwiseGreaterThan(ints).All()); + Assert.False(res.ElementwiseLessThan(ints).All()); + + // Test inPlace + Int32DataFrameColumn inPlace = ints.Add(1, inPlace: true).Subtract(1, inPlace: true).Multiply(10, inPlace: true).Divide(10, inPlace: true).LeftShift(2, inPlace: true).RightShift(2, inPlace: true).Add(100, inPlace: true); + Assert.True(inPlace.ElementwiseEquals(ints).All()); + Assert.True(inPlace.ElementwiseGreaterThanOrEqual(ints).All()); + Assert.True(inPlace.ElementwiseLessThanOrEqual(ints).All()); + Assert.False(inPlace.ElementwiseNotEquals(ints).All()); + Assert.False(inPlace.ElementwiseGreaterThan(ints).All()); + Assert.False(inPlace.ElementwiseLessThan(ints).All()); + + Assert.False(inPlace.ElementwiseEquals(res).All()); + Assert.True(inPlace.ElementwiseGreaterThanOrEqual(res).All()); + Assert.False(inPlace.ElementwiseLessThanOrEqual(res).All()); + Assert.True(inPlace.ElementwiseNotEquals(res).All()); + Assert.True(inPlace.ElementwiseGreaterThan(res).All()); + Assert.False(inPlace.ElementwiseLessThan(res).All()); + + // Test Bool column + BooleanDataFrameColumn bools = df.Columns["Bool"] as BooleanDataFrameColumn; + BooleanDataFrameColumn allFalse = bools.Or(true).And(true).Xor(true); + Assert.True(allFalse.ElementwiseEquals(false).All()); + + // Test inPlace + BooleanDataFrameColumn inPlaceAllFalse = bools.Or(true, inPlace: true).And(true, inPlace: true).Xor(true, inPlace: true); + Assert.True(inPlaceAllFalse.ElementwiseEquals(bools).All()); + + // Test Reverse Operations + Int32DataFrameColumn reverse = ints.ReverseAdd(1).ReverseSubtract(1).ReverseMultiply(-1); + Assert.True(reverse.ElementwiseEquals(ints).All()); + + // Test inPlace + Int32DataFrameColumn reverseInPlace = ints.ReverseAdd(1, inPlace: true).ReverseSubtract(1, inPlace: true).ReverseMultiply(-1, inPlace: true).ReverseDivide(100, inPlace: true); + Assert.True(reverseInPlace.ElementwiseEquals(ints).All()); + Assert.False(reverseInPlace.ElementwiseEquals(reverse).All()); + } + + [Fact] + public void TestArrowStringApply() + { + ArrowStringDataFrameColumn column = CreateArrowStringColumn(10); + ArrowStringDataFrameColumn ret = column.Apply((string cur) => + { + if (cur != null) + { + return cur + "123"; + } + return null; + }); + for (long i = 0; i < column.Length; i++) + { + if (column[i] != null) + { + Assert.Equal(column[i] + "123", ret[i]); + } + else + { + Assert.Null(ret[i]); + } + } + Assert.Equal(1, ret.NullCount); + + // Test null counts + ret = column.Apply((string cur) => + { + return null; + }); + Assert.Equal(column.Length, ret.NullCount); + } + + [Fact] + public void GetColumnTests() + { + DataFrame dataFrame = MakeDataFrameWithAllColumnTypes(10); + PrimitiveDataFrameColumn primitiveInts = dataFrame.Columns.GetPrimitiveColumn("Int"); + Assert.NotNull(primitiveInts); + Assert.Throws(() => dataFrame.Columns.GetPrimitiveColumn("Int")); + + StringDataFrameColumn strings = dataFrame.Columns.GetStringColumn("String"); + Assert.NotNull(strings); + Assert.Throws(() => dataFrame.Columns.GetStringColumn("ArrowString")); + + ArrowStringDataFrameColumn arrowStrings = dataFrame.Columns.GetArrowStringColumn("ArrowString"); + Assert.NotNull(arrowStrings); + Assert.Throws(() => dataFrame.Columns.GetArrowStringColumn("String")); + + ByteDataFrameColumn bytes = dataFrame.Columns.GetByteColumn("Byte"); + Assert.NotNull(bytes); + Assert.Throws(() => dataFrame.Columns.GetSingleColumn("Byte")); + + Int32DataFrameColumn ints = dataFrame.Columns.GetInt32Column("Int"); + Assert.NotNull(ints); + Assert.Throws(() => dataFrame.Columns.GetSingleColumn("Int")); + + BooleanDataFrameColumn bools = dataFrame.Columns.GetBooleanColumn("Bool"); + Assert.NotNull(bools); + Assert.Throws(() => dataFrame.Columns.GetSingleColumn("Bool")); + + CharDataFrameColumn chars = dataFrame.Columns.GetCharColumn("Char"); + Assert.NotNull(chars); + Assert.Throws(() => dataFrame.Columns.GetSingleColumn("Char")); + + DecimalDataFrameColumn decimals = dataFrame.Columns.GetDecimalColumn("Decimal"); + Assert.NotNull(decimals); + Assert.Throws(() => dataFrame.Columns.GetSingleColumn("Decimal")); + + DoubleDataFrameColumn doubles = dataFrame.Columns.GetDoubleColumn("Double"); + Assert.NotNull(doubles); + Assert.Throws(() => dataFrame.Columns.GetSingleColumn("Double")); + + SingleDataFrameColumn singles = dataFrame.Columns.GetSingleColumn("Float"); + Assert.NotNull(singles); + Assert.Throws(() => dataFrame.Columns.GetDoubleColumn("Float")); + + Int64DataFrameColumn longs = dataFrame.Columns.GetInt64Column("Long"); + Assert.NotNull(longs); + Assert.Throws(() => dataFrame.Columns.GetSingleColumn("Long")); + + SByteDataFrameColumn sbytes = dataFrame.Columns.GetSByteColumn("Sbyte"); + Assert.NotNull(sbytes); + Assert.Throws(() => dataFrame.Columns.GetSingleColumn("Sbyte")); + + Int16DataFrameColumn shorts = dataFrame.Columns.GetInt16Column("Short"); + Assert.NotNull(shorts); + Assert.Throws(() => dataFrame.Columns.GetSingleColumn("Short")); + + UInt32DataFrameColumn uints = dataFrame.Columns.GetUInt32Column("Uint"); + Assert.NotNull(uints); + Assert.Throws(() => dataFrame.Columns.GetSingleColumn("Uint")); + + UInt64DataFrameColumn ulongs = dataFrame.Columns.GetUInt64Column("Ulong"); + Assert.NotNull(ulongs); + Assert.Throws(() => dataFrame.Columns.GetSingleColumn("Ulong")); + + UInt16DataFrameColumn ushorts = dataFrame.Columns.GetUInt16Column("Ushort"); + Assert.NotNull(ushorts); + Assert.Throws(() => dataFrame.Columns.GetSingleColumn("Ushort")); + + } + } +} diff --git a/test/Microsoft.Data.Analysis.Tests/Microsoft.Data.Analysis.Tests.csproj b/test/Microsoft.Data.Analysis.Tests/Microsoft.Data.Analysis.Tests.csproj new file mode 100644 index 0000000000..8032812924 --- /dev/null +++ b/test/Microsoft.Data.Analysis.Tests/Microsoft.Data.Analysis.Tests.csproj @@ -0,0 +1,37 @@ + + + $(NoWarn);MSML_ParameterLocalVarName;MSML_PrivateFieldName;MSML_ExtendBaseTestClass;MSML_GeneralName + + + + + + + + + + + + TextTemplatingFileGenerator + DataFrameColumn.BinaryOperationTests.cs + + + + + + + + + + True + True + DataFrameColumn.BinaryOperationTests.tt + + + + + + + + + diff --git a/test/Microsoft.Data.Analysis.Tests/TextFieldParserTests.cs b/test/Microsoft.Data.Analysis.Tests/TextFieldParserTests.cs new file mode 100644 index 0000000000..c481d13b28 --- /dev/null +++ b/test/Microsoft.Data.Analysis.Tests/TextFieldParserTests.cs @@ -0,0 +1,419 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System; +using System.IO; +using System.Text; +using Xunit; + +namespace Microsoft.Data.Analysis.Tests +{ + public class TextFieldParserTests + { + private Stream GetStream(string streamData) + { + return new MemoryStream(Encoding.Default.GetBytes(streamData)); + } + + [Fact] + public void Constructors() + { + string data = @"abc123"; + + // public TextFieldParser(System.IO.Stream stream) + using (var stream = GetStream(data)) + { + using (var parser = new TextFieldParser(stream)) + { + } + Assert.Throws(() => stream.ReadByte()); + } + + // public TextFieldParser(System.IO.Stream stream, System.Text.Encoding defaultEncoding, bool detectEncoding, bool leaveOpen); + using (var stream = GetStream(data)) + { + using (var parser = new TextFieldParser(stream, defaultEncoding: Encoding.Unicode, detectEncoding: true, leaveOpen: true)) + { + } + _ = stream.ReadByte(); + } + + // public TextFieldParser(System.IO.TextReader reader) + using (var reader = new StreamReader(GetStream(data))) + { + using (var parser = new TextFieldParser(reader)) + { + } + Assert.Throws(() => reader.ReadToEnd()); + } + } + + [Fact] + public void Close() + { + string data = @"abc123"; + using (var stream = GetStream(data)) + { + using (var parser = new TextFieldParser(stream)) + { + parser.Close(); + } + } + + using (var parser = new TextFieldParser(GetStream(data))) + { + parser.Close(); + } + + { + var parser = new TextFieldParser(GetStream(data)); + parser.Close(); + parser.Close(); + } + + { + TextFieldParser parser; + using (parser = new TextFieldParser(GetStream(data))) + { + } + parser.Close(); + } + } + + [Fact] + public void Properties() + { + + string data = @"abc123"; + + using (var parser = new TextFieldParser(GetStream(data))) + { + Assert.Null(parser.CommentTokens); + parser.CommentTokens = new[] { "[", "]" }; + Assert.Equal(new[] { "[", "]" }, parser.CommentTokens); + + Assert.Null(parser.Delimiters); + parser.SetDelimiters(new[] { "A", "123" }); + Assert.Equal(new[] { "A", "123" }, parser.Delimiters); + parser.SetDelimiters(new[] { "123", "B" }); + Assert.Equal(new[] { "123", "B" }, parser.Delimiters); + + Assert.Null(parser.FieldWidths); + parser.SetFieldWidths(new[] { 1, 2, int.MaxValue }); + Assert.Equal(new[] { 1, 2, int.MaxValue }, parser.FieldWidths); + parser.SetFieldWidths(new[] { int.MaxValue, 3 }); + Assert.Equal(new[] { int.MaxValue, 3 }, parser.FieldWidths); + Assert.Throws(() => parser.SetFieldWidths(new[] { -1, -1 })); + + Assert.True(parser.HasFieldsEnclosedInQuotes); + parser.HasFieldsEnclosedInQuotes = false; + Assert.False(parser.HasFieldsEnclosedInQuotes); + + Assert.Equal(FieldType.Delimited, parser.TextFieldType); + parser.TextFieldType = FieldType.FixedWidth; + Assert.Equal(FieldType.FixedWidth, parser.TextFieldType); + + Assert.True(parser.TrimWhiteSpace); + parser.TrimWhiteSpace = false; + Assert.False(parser.TrimWhiteSpace); + } + } + + [Fact] + public void ReadLine_ReadToEnd() + { + string data = @"abc +123"; + + using (var parser = new TextFieldParser(GetStream(data))) + { + Assert.False(parser.EndOfData); + + Assert.Equal( +@"abc +123", + parser.ReadToEnd()); + Assert.Equal(-1, parser.LineNumber); + Assert.True(parser.EndOfData); + } + + using (var parser = new TextFieldParser(GetStream(data))) + { + Assert.Equal("abc", parser.ReadLine()); + Assert.Equal(2, parser.LineNumber); + Assert.False(parser.EndOfData); + + Assert.Equal("123", parser.ReadToEnd()); + Assert.Equal(-1, parser.LineNumber); + Assert.True(parser.EndOfData); + } + + using (var parser = new TextFieldParser(GetStream(data))) + { + Assert.Equal("abc", parser.ReadLine()); + Assert.Equal(2, parser.LineNumber); + Assert.False(parser.EndOfData); + + Assert.Equal("123", parser.ReadLine()); + Assert.Equal(-1, parser.LineNumber); + Assert.True(parser.EndOfData); + + Assert.Null(parser.ReadToEnd()); + Assert.Equal(-1, parser.LineNumber); + Assert.True(parser.EndOfData); + } + } + + [Fact] + public void ErrorLine() + { + string data = @"abc 123 +def 45 +ghi 789"; + + using (var parser = new TextFieldParser(GetStream(data))) + { + parser.TextFieldType = FieldType.FixedWidth; + parser.SetFieldWidths(new[] { 3, 4 }); + + Assert.Equal(-1, parser.ErrorLineNumber); + Assert.Equal("", parser.ErrorLine); + + Assert.Equal(new[] { "abc", "123" }, parser.ReadFields()); + Assert.Equal(-1, parser.ErrorLineNumber); + Assert.Equal("", parser.ErrorLine); + + Assert.Throws(() => parser.ReadFields()); + Assert.Equal(2, parser.ErrorLineNumber); + Assert.Equal("def 45", parser.ErrorLine); + + Assert.Equal(new[] { "ghi", "789" }, parser.ReadFields()); + Assert.Equal(2, parser.ErrorLineNumber); + Assert.Equal("def 45", parser.ErrorLine); + } + } + + [Fact] + public void HasFieldsEnclosedInQuotes_TrimWhiteSpace() + { + string data = @""""", "" "" ,""abc"", "" 123 "" ,"; + + using (var parser = new TextFieldParser(GetStream(data))) + { + parser.SetDelimiters(new[] { "," }); + Assert.Equal(new[] { "", "", "abc", "123", "" }, parser.ReadFields()); + } + + using (var parser = new TextFieldParser(GetStream(data))) + { + parser.TrimWhiteSpace = false; + parser.SetDelimiters(new[] { "," }); + Assert.Equal(new[] { "", " ", "abc", " 123 ", "" }, parser.ReadFields()); + } + + using (var parser = new TextFieldParser(GetStream(data))) + { + parser.HasFieldsEnclosedInQuotes = false; + parser.SetDelimiters(new[] { "," }); + Assert.Equal(new[] { @"""""", @""" """, @"""abc""", @""" 123 """, "" }, parser.ReadFields()); + } + + using (var parser = new TextFieldParser(GetStream(data))) + { + parser.TrimWhiteSpace = false; + parser.HasFieldsEnclosedInQuotes = false; + parser.SetDelimiters(new[] { "," }); + Assert.Equal(new[] { @"""""", @" "" "" ", @"""abc""", @" "" 123 "" ", "" }, parser.ReadFields()); + } + + data = @""","", "", """; + using (var parser = new TextFieldParser(GetStream(data))) + { + parser.TrimWhiteSpace = false; + parser.SetDelimiters(new[] { "," }); + Assert.Equal(new[] { ",", ", " }, parser.ReadFields()); + } + } + + [Fact] + public void PeekChars() + { + string data = @"abc,123 +def,456 +ghi,789"; + + using (var parser = new TextFieldParser(GetStream(data))) + { + Assert.Throws(() => parser.PeekChars(0)); + + Assert.Equal("a", parser.PeekChars(1)); + Assert.Equal("abc,123", parser.PeekChars(10)); + + Assert.Equal("abc,123", parser.ReadLine()); + + parser.TextFieldType = FieldType.FixedWidth; + parser.SetFieldWidths(new[] { 3, -1 }); + + Assert.Equal("d", parser.PeekChars(1)); + Assert.Equal("def,456", parser.PeekChars(10)); + Assert.Equal(new[] { "def", ",456" }, parser.ReadFields()); + + parser.TextFieldType = FieldType.Delimited; + parser.SetDelimiters(new[] { "," }); + + Assert.Equal("g", parser.PeekChars(1)); + Assert.Equal("ghi,789", parser.PeekChars(10)); + Assert.Equal(new[] { "ghi", "789" }, parser.ReadFields()); + + Assert.Null(parser.PeekChars(1)); + Assert.Null(parser.PeekChars(10)); + } + } + + [Fact] + public void ReadFields_FieldWidths() + { + string data = @"abc,123 +def,456 +ghi,789"; + + using (var parser = new TextFieldParser(GetStream(data))) + { + parser.TextFieldType = FieldType.FixedWidth; + + Assert.Throws(() => parser.ReadFields()); + + parser.SetFieldWidths(new[] { -1 }); + Assert.Equal(new[] { "abc,123" }, parser.ReadFields()); + + parser.SetFieldWidths(new[] { 3, -1 }); + Assert.Equal(new[] { "def", ",456" }, parser.ReadFields()); + + parser.SetFieldWidths(new[] { 3, 2 }); + Assert.Equal(new[] { "ghi", ",7" }, parser.ReadFields()); + + parser.SetFieldWidths(new[] { 3, 2 }); + Assert.Null(parser.ReadFields()); + } + } + + [Fact] + public void ReadFields_Delimiters_LineNumber() + { + string data = @"abc,123 +def,456 +ghi,789"; + + using (var parser = new TextFieldParser(GetStream(data))) + { + Assert.Equal(1, parser.LineNumber); + + Assert.Throws(() => parser.ReadFields()); + Assert.Equal(1, parser.LineNumber); + + parser.SetDelimiters(new[] { "," }); + Assert.Equal(new[] { "abc","123" }, parser.ReadFields()); + Assert.Equal(2, parser.LineNumber); + + parser.SetDelimiters(new[] { ";", "," }); + Assert.Equal(new[] { "def", "456" }, parser.ReadFields()); + Assert.Equal(3, parser.LineNumber); + + parser.SetDelimiters(new[] { "g", "9" }); + Assert.Equal(new[] { "", "hi,78", "" }, parser.ReadFields()); + Assert.Equal(-1, parser.LineNumber); + } + + data = @",, + +, +"; + + using (var parser = new TextFieldParser(GetStream(data))) + { + Assert.Equal(1, parser.LineNumber); + + parser.SetDelimiters(new[] { "," }); + Assert.Equal(new[] { "", "", "" }, parser.ReadFields()); + Assert.Equal(2, parser.LineNumber); + + // ReadFields should ignore the empty new line + Assert.Equal(new[] { "", "" }, parser.ReadFields()); + Assert.Equal(-1, parser.LineNumber); + + Assert.Null(parser.ReadFields()); + Assert.Equal(-1, parser.LineNumber); + + Assert.Null(parser.ReadFields()); + Assert.Equal(-1, parser.LineNumber); + } + } + + [Fact] + public void UnmatchedQuote_MalformedLineException() + { + string data = @""""", """; + + using (var parser = new TextFieldParser(GetStream(data))) + { + parser.SetDelimiters(new[] { "," }); + Assert.Throws(() => parser.ReadFields()); + } + } + + [Fact] + public void ReadFields_QuoteOnNewLine() + { + string data = @"abc,""123 +123"" +def,456 +ghi,789"; + + using (var parser = new TextFieldParser(GetStream(data))) + { + Assert.Equal(1, parser.LineNumber); + + Assert.Throws(() => parser.ReadFields()); + Assert.Equal(1, parser.LineNumber); + + parser.SetDelimiters(new[] { "," }); + Assert.Equal(new[] { "abc",@"123 +123" }, parser.ReadFields()); + Assert.Equal(3, parser.LineNumber); + + parser.SetDelimiters(new[] { ";", "," }); + Assert.Equal(new[] { "def", "456" }, parser.ReadFields()); + Assert.Equal(4, parser.LineNumber); + + parser.SetDelimiters(new[] { "g", "9" }); + Assert.Equal(new[] { "", "hi,78", "" }, parser.ReadFields()); + Assert.Equal(-1, parser.LineNumber); + } + + data = @",, + +, +"; + + using (var parser = new TextFieldParser(GetStream(data))) + { + Assert.Equal(1, parser.LineNumber); + + parser.SetDelimiters(new[] { "," }); + Assert.Equal(new[] { "", "", "" }, parser.ReadFields()); + Assert.Equal(2, parser.LineNumber); + + // ReadFields should ignore the empty new line + Assert.Equal(new[] { "", "" }, parser.ReadFields()); + Assert.Equal(-1, parser.LineNumber); + + Assert.Null(parser.ReadFields()); + Assert.Equal(-1, parser.LineNumber); + + Assert.Null(parser.ReadFields()); + Assert.Equal(-1, parser.LineNumber); + } + } + } +} diff --git a/test/Microsoft.Extensions.ML.Tests/Microsoft.Extensions.ML.Tests.csproj b/test/Microsoft.Extensions.ML.Tests/Microsoft.Extensions.ML.Tests.csproj index 377369de9b..2105028eea 100644 --- a/test/Microsoft.Extensions.ML.Tests/Microsoft.Extensions.ML.Tests.csproj +++ b/test/Microsoft.Extensions.ML.Tests/Microsoft.Extensions.ML.Tests.csproj @@ -12,6 +12,14 @@ + + + + + + + + diff --git a/test/Microsoft.ML.AutoML.Tests/ApprovalTests/ColumnInferenceTests.Wiki_column_inference_result_should_be_serializable.approved.txt b/test/Microsoft.ML.AutoML.Tests/ApprovalTests/ColumnInferenceTests.Wiki_column_inference_result_should_be_serializable.approved.txt new file mode 100644 index 0000000000..79c9e98a07 --- /dev/null +++ b/test/Microsoft.ML.AutoML.Tests/ApprovalTests/ColumnInferenceTests.Wiki_column_inference_result_should_be_serializable.approved.txt @@ -0,0 +1,66 @@ +{ + "TextLoaderOptions": { + "AllowQuoting": true, + "AllowSparse": false, + "InputSize": null, + "Separators": [ + "\t" + ], + "DecimalMarker": ".", + "Columns": [ + { + "Name": "Sentiment", + "Source": [ + { + "Min": 0, + "Max": 0, + "AutoEnd": false, + "VariableEnd": false, + "AllOther": false, + "ForceVector": false + } + ], + "KeyCount": null, + "DataKind": 11 + }, + { + "Name": "SentimentText", + "Source": [ + { + "Min": 1, + "Max": 1, + "AutoEnd": false, + "VariableEnd": false, + "AllOther": false, + "ForceVector": false + } + ], + "KeyCount": null, + "DataKind": 11 + } + ], + "TrimWhitespace": false, + "HasHeader": true, + "UseThreads": true, + "ReadMultilines": false, + "HeaderFile": null, + "MaxRows": null, + "EscapeChar": "\"", + "MissingRealsAsNaNs": false + }, + "ColumnInformation": { + "LabelColumnName": "Sentiment", + "UserIdColumnName": null, + "GroupIdColumnName": null, + "ItemIdColumnName": null, + "ExampleWeightColumnName": null, + "SamplingKeyColumnName": null, + "CategoricalColumnNames": [], + "NumericColumnNames": [], + "TextColumnNames": [ + "SentimentText" + ], + "IgnoredColumnNames": [], + "ImagePathColumnNames": [] + } +} \ No newline at end of file diff --git a/test/Microsoft.ML.AutoML.Tests/AutoFitTests.cs b/test/Microsoft.ML.AutoML.Tests/AutoFitTests.cs index 40ccfdc067..d5af1f1be5 100644 --- a/test/Microsoft.ML.AutoML.Tests/AutoFitTests.cs +++ b/test/Microsoft.ML.AutoML.Tests/AutoFitTests.cs @@ -2,12 +2,17 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +using System; +using System.Collections.Generic; +using System.Globalization; using System.Linq; +using System.Threading; using Microsoft.ML.Data; +using Microsoft.ML.Runtime; using Microsoft.ML.TestFramework; using Microsoft.ML.TestFramework.Attributes; using Microsoft.ML.TestFrameworkCommon; -using Microsoft.ML.Trainers.LightGbm; +using Microsoft.ML.TestFrameworkCommon.Attributes; using Xunit; using Xunit.Abstractions; using static Microsoft.ML.DataOperationsCatalog; @@ -16,10 +21,40 @@ namespace Microsoft.ML.AutoML.Test { public class AutoFitTests : BaseTestClass { + // Marker necessary for AutoFitContextLogTest to ensure that the wanted logs + // from Experiment's sub MLContexts were relayed to the main calling MLContext. + bool _markerAutoFitContextLogTest; public AutoFitTests(ITestOutputHelper output) : base(output) { } + private void MlContextLog(object sender, LoggingEventArgs e) + { + // Log containing ImageClassificationTrainer will only come from AutoML's sub + // contexts. + if (!_markerAutoFitContextLogTest && e.Message.Contains("[Source=ImageClassificationTrainer;")) + _markerAutoFitContextLogTest = true; + } + + [TensorFlowFact] + public void AutoFitContextLogTest() + { + // This test confirms that logs produced from contexts made during AutoML experiment + // runs are correctly relayed to the main Experiment MLContext. + _markerAutoFitContextLogTest = false; + var context = new MLContext(1); + context.Log += MlContextLog; + var datasetPath = DatasetUtil.GetFlowersDataset(); + var columnInference = context.Auto().InferColumns(datasetPath, "Label"); + var textLoader = context.Data.CreateTextLoader(columnInference.TextLoaderOptions); + var trainData = textLoader.Load(datasetPath); + var result = context.Auto() + .CreateMulticlassClassificationExperiment(15) + .Execute(trainData, columnInference.ColumnInformation); + Assert.True(_markerAutoFitContextLogTest, "Image classification trainer logs from Experiment's sub contexts" + + "were not relayed to the main MLContext."); + } + [Fact] public void AutoFitBinaryTest() { @@ -37,19 +72,48 @@ public void AutoFitBinaryTest() Assert.NotNull(result.BestRun.TrainerName); } - [Fact] - public void AutoFitMultiTest() + [Theory] + [InlineData(true)] + [InlineData(false)] + public void AutoFitMultiTest(bool useNumberOfCVFolds) { var context = new MLContext(0); var columnInference = context.Auto().InferColumns(DatasetUtil.TrivialMulticlassDatasetPath, DatasetUtil.TrivialMulticlassDatasetLabel); var textLoader = context.Data.CreateTextLoader(columnInference.TextLoaderOptions); var trainData = textLoader.Load(DatasetUtil.TrivialMulticlassDatasetPath); - var result = context.Auto() - .CreateMulticlassClassificationExperiment(0) - .Execute(trainData, 5, DatasetUtil.TrivialMulticlassDatasetLabel); - Assert.True(result.BestRun.Results.First().ValidationMetrics.MicroAccuracy >= 0.7); - var scoredData = result.BestRun.Results.First().Model.Transform(trainData); - Assert.Equal(NumberDataViewType.Single, scoredData.Schema[DefaultColumnNames.PredictedLabel].Type); + + if (useNumberOfCVFolds) + { + // When setting numberOfCVFolds + // The results object is a CrossValidationExperimentResults<> object + uint numberOfCVFolds = 5; + var result = context.Auto() + .CreateMulticlassClassificationExperiment(0) + .Execute(trainData, numberOfCVFolds, DatasetUtil.TrivialMulticlassDatasetLabel); + + Assert.True(result.BestRun.Results.First().ValidationMetrics.MicroAccuracy >= 0.7); + var scoredData = result.BestRun.Results.First().Model.Transform(trainData); + Assert.Equal(NumberDataViewType.Single, scoredData.Schema[DefaultColumnNames.PredictedLabel].Type); + } + else + { + // When using this other API, if the trainset is under the + // crossValRowCounThreshold, AutoML will also perform CrossValidation + // but through a very different path that the one above, + // throw a CrossValSummaryRunner and will return + // a different type of object as "result" which would now be + // simply a ExperimentResult<> object + + int crossValRowCountThreshold = 15000; + trainData = context.Data.TakeRows(trainData, crossValRowCountThreshold - 1); + var result = context.Auto() + .CreateMulticlassClassificationExperiment(0) + .Execute(trainData, DatasetUtil.TrivialMulticlassDatasetLabel); + + Assert.True(result.BestRun.ValidationMetrics.MicroAccuracy >= 0.7); + var scoredData = result.BestRun.Model.Transform(trainData); + Assert.Equal(NumberDataViewType.Single, scoredData.Schema[DefaultColumnNames.PredictedLabel].Type); + } } [TensorFlowFact] @@ -102,22 +166,53 @@ private void Context_Log(object sender, LoggingEventArgs e) //throw new NotImplementedException(); } - [Fact] - public void AutoFitRegressionTest() + [Theory] + [InlineData("en-US")] + [InlineData("ar-SA")] + [InlineData("pl-PL")] + public void AutoFitRegressionTest(string culture) { - var context = new MLContext(1); - var dataPath = DatasetUtil.GetMlNetGeneratedRegressionDataset(); - var columnInference = context.Auto().InferColumns(dataPath, DatasetUtil.MlNetGeneratedRegressionLabel); - var textLoader = context.Data.CreateTextLoader(columnInference.TextLoaderOptions); - var trainData = textLoader.Load(dataPath); - var validationData = context.Data.TakeRows(trainData, 20); - trainData = context.Data.SkipRows(trainData, 20); - var result = context.Auto() - .CreateRegressionExperiment(0) - .Execute(trainData, validationData, - new ColumnInformation() { LabelColumnName = DatasetUtil.MlNetGeneratedRegressionLabel }); + var originalCulture = Thread.CurrentThread.CurrentCulture; + try + { + Thread.CurrentThread.CurrentCulture = new CultureInfo(culture); + + // If users run AutoML with a different locale, sometimes + // the sweeper encounters problems when parsing some strings. + // So testing in another culture is necessary. + // Furthermore, these issues might only occur after ~70 + // iterations, so setting the internal maxModels parameter. + int maxModels = culture == "en-US" ? 1 : 75; - Assert.True(result.RunDetails.Max(i => i.ValidationMetrics.RSquared > 0.9)); + var experimentSettings = new RegressionExperimentSettings { MaxModels = maxModels }; + + if (!Environment.Is64BitProcess) + { + // LightGBM isn't available on x86 machines + experimentSettings.Trainers.Remove(RegressionTrainer.LightGbm); + } + + var context = new MLContext(1); + var dataPath = DatasetUtil.GetMlNetGeneratedRegressionDataset(); + var columnInference = context.Auto().InferColumns(dataPath, DatasetUtil.MlNetGeneratedRegressionLabel); + var textLoader = context.Data.CreateTextLoader(columnInference.TextLoaderOptions); + var trainData = textLoader.Load(dataPath); + var validationData = context.Data.TakeRows(trainData, 20); + trainData = context.Data.SkipRows(trainData, 20); + var result = context.Auto() + .CreateRegressionExperiment(experimentSettings) + .Execute(trainData, validationData, + new ColumnInformation() { LabelColumnName = DatasetUtil.MlNetGeneratedRegressionLabel }); + + Assert.True(result.RunDetails.Max(i => i?.ValidationMetrics?.RSquared) > 0.99); + + // Test the internal maxModels parameter + Assert.True(culture == "en-US" || result.RunDetails.Count() == 75, $"RunDetails.Count() = {result.RunDetails.Count()}, is not 75"); + } + finally + { + Thread.CurrentThread.CurrentCulture = originalCulture; + } } [LightGBMFact] @@ -137,8 +232,13 @@ public void AutoFitRankingTest() trainDataView = mlContext.Data.SkipRows(trainDataView, 500); // STEP 2: Run AutoML experiment + var settings = new RankingExperimentSettings() + { + MaxExperimentTimeInSeconds = 5, + OptimizationMetricTruncationLevel = 3 + }; var experiment = mlContext.Auto() - .CreateRankingExperiment(5); + .CreateRankingExperiment(settings); ExperimentResult[] experimentResults = { @@ -162,10 +262,13 @@ public void AutoFitRankingTest() for (int i = 0; i < experimentResults.Length; i++) { RunDetail bestRun = experimentResults[i].BestRun; + // The user requested 3, but we always return at least 10. + Assert.Equal(10, bestRun.ValidationMetrics.DiscountedCumulativeGains.Count); + Assert.Equal(10, bestRun.ValidationMetrics.NormalizedDiscountedCumulativeGains.Count); Assert.True(experimentResults[i].RunDetails.Count() > 0); Assert.NotNull(bestRun.ValidationMetrics); Assert.True(bestRun.ValidationMetrics.NormalizedDiscountedCumulativeGains.Last() > 0.4); - Assert.True(bestRun.ValidationMetrics.DiscountedCumulativeGains.Last() > 20); + Assert.True(bestRun.ValidationMetrics.DiscountedCumulativeGains.Last() > 19); var outputSchema = bestRun.Model.GetOutputSchema(trainDataView.Schema); var expectedOutputNames = new string[] { labelColumnName, groupIdColumnName, groupIdColumnName, featuresColumnVectorNameA, featuresColumnVectorNameB, "Features", scoreColumnName }; @@ -233,34 +336,53 @@ public void AutoFitRecommendationTest() var testDataView = reader.Load(new MultiFileSource(GetDataPath(TestDatasets.trivialMatrixFactorization.testFilename))); // STEP 2: Run AutoML experiment - ExperimentResult experimentResult = mlContext.Auto() - .CreateRecommendationExperiment(5) - .Execute(trainDataView, testDataView, - new ColumnInformation() - { - LabelColumnName = labelColumnName, - UserIdColumnName = userColumnName, - ItemIdColumnName = itemColumnName - }); - - RunDetail bestRun = experimentResult.BestRun; - Assert.True(experimentResult.RunDetails.Count() > 1); - Assert.NotNull(bestRun.ValidationMetrics); - Assert.True(experimentResult.RunDetails.Max(i => i.ValidationMetrics.RSquared != 0)); - - var outputSchema = bestRun.Model.GetOutputSchema(trainDataView.Schema); - var expectedOutputNames = new string[] { labelColumnName, userColumnName, userColumnName, itemColumnName, itemColumnName, scoreColumnName }; - foreach (var col in outputSchema) - Assert.True(col.Name == expectedOutputNames[col.Index]); - - IDataView testDataViewWithBestScore = bestRun.Model.Transform(testDataView); - // Retrieve label column's index from the test IDataView - testDataView.Schema.TryGetColumnIndex(labelColumnName, out int labelColumnId); - // Retrieve score column's index from the IDataView produced by the trained model - testDataViewWithBestScore.Schema.TryGetColumnIndex(scoreColumnName, out int scoreColumnId); - - var metrices = mlContext.Recommendation().Evaluate(testDataViewWithBestScore, labelColumnName: labelColumnName, scoreColumnName: scoreColumnName); - Assert.NotEqual(0, metrices.MeanSquaredError); + try + { + ExperimentResult experimentResult = mlContext.Auto() + .CreateRecommendationExperiment(5) + .Execute(trainDataView, testDataView, + new ColumnInformation() + { + LabelColumnName = labelColumnName, + UserIdColumnName = userColumnName, + ItemIdColumnName = itemColumnName + }); + + RunDetail bestRun = experimentResult.BestRun; + Assert.True(experimentResult.RunDetails.Count() > 1); + Assert.NotNull(bestRun.ValidationMetrics); + Assert.True(experimentResult.RunDetails.Max(i => i?.ValidationMetrics?.RSquared* i?.ValidationMetrics?.RSquared) > 0.5); + + var outputSchema = bestRun.Model.GetOutputSchema(trainDataView.Schema); + var expectedOutputNames = new string[] { labelColumnName, userColumnName, userColumnName, itemColumnName, itemColumnName, scoreColumnName }; + foreach (var col in outputSchema) + Assert.True(col.Name == expectedOutputNames[col.Index]); + + IDataView testDataViewWithBestScore = bestRun.Model.Transform(testDataView); + // Retrieve label column's index from the test IDataView + testDataView.Schema.TryGetColumnIndex(labelColumnName, out int labelColumnId); + // Retrieve score column's index from the IDataView produced by the trained model + testDataViewWithBestScore.Schema.TryGetColumnIndex(scoreColumnName, out int scoreColumnId); + + var metrices = mlContext.Recommendation().Evaluate(testDataViewWithBestScore, labelColumnName: labelColumnName, scoreColumnName: scoreColumnName); + Assert.NotEqual(0, metrices.MeanSquaredError); + } + catch (AggregateException ae) + { + // During CI unit testing, the host machines can run slower than normal, which + // can increase the run time of unit tests and throw OperationCanceledExceptions + // from multiple threads in the form of a single AggregateException. + foreach (var ex in ae.Flatten().InnerExceptions) + { + var ignoredExceptions = new List(); + if (ex is OperationCanceledException) + continue; + else + ignoredExceptions.Add(ex); + if (ignoredExceptions.Count > 0) + throw new AggregateException(ignoredExceptions); + } + } } [Fact] @@ -320,6 +442,57 @@ public void AutoFitWithPresplittedData() } + [LightGBMFact] + public void AutoFitMaxExperimentTimeTest() + { + // A single binary classification experiment takes less than 5 seconds. + // System.OperationCanceledException is thrown when ongoing experiment + // is canceled and at least one model has been generated. + // BinaryClassificationExperiment includes LightGBM, which is not 32-bit + // compatible. + var context = new MLContext(1); + var dataPath = DatasetUtil.GetUciAdultDataset(); + var columnInference = context.Auto().InferColumns(dataPath, DatasetUtil.UciAdultLabel); + var textLoader = context.Data.CreateTextLoader(columnInference.TextLoaderOptions); + var trainData = textLoader.Load(dataPath); + var experiment = context.Auto() + .CreateBinaryClassificationExperiment(15) + .Execute(trainData, new ColumnInformation() { LabelColumnName = DatasetUtil.UciAdultLabel }); + + // Ensure the (last) model that was training when maximum experiment time was reached has been stopped, + // and that its MLContext has been canceled. Sometimes during CI unit testing, the host machines can run slower than normal, which + // can increase the run time of unit tests, and may not produce multiple runs. + if (experiment.RunDetails.Select(r => r.Exception == null).Count() > 1 && experiment.RunDetails.Last().Exception != null) + { + var expectedExceptionMessage = "Operation was canceled"; + var lastException = experiment.RunDetails.Last().Exception; + var containsMessage = lastException.Message.Contains(expectedExceptionMessage); + + if(lastException is AggregateException lastAggregateException) + { + // Sometimes multiple threads might throw the same "Operation was cancelled" + // exception and all of them are grouped inside an AggregateException + // Must check that all exceptions are the expected one. + containsMessage = true; + foreach (var ex in lastAggregateException.Flatten().InnerExceptions) + { + if (!ex.Message.Contains(expectedExceptionMessage)) + { + containsMessage = false; + } + } + } + + + Assert.True(containsMessage, + $"Did not obtain '{expectedExceptionMessage}' error." + + $"Obtained unexpected error of type {lastException.GetType()} with message: {lastException.Message}"); + + // Ensure that the best found model can still run after maximum experiment time was reached. + IDataView predictions = experiment.BestRun.Model.Transform(trainData); + } + } + private TextLoader.Options GetLoaderArgs(string labelColumnName, string userIdColumnName, string itemIdColumnName) { return new TextLoader.Options() @@ -351,4 +524,4 @@ private TextLoader.Options GetLoaderArgsRank(string labelColumnName, string grou }; } } -} +} \ No newline at end of file diff --git a/test/Microsoft.ML.AutoML.Tests/ColumnInferenceTests.cs b/test/Microsoft.ML.AutoML.Tests/ColumnInferenceTests.cs index f7b7c2f2fb..63ada4d493 100644 --- a/test/Microsoft.ML.AutoML.Tests/ColumnInferenceTests.cs +++ b/test/Microsoft.ML.AutoML.Tests/ColumnInferenceTests.cs @@ -2,9 +2,13 @@ using System.Collections.Generic; using System.IO; using System.Linq; +using ApprovalTests; +using ApprovalTests.Namers; +using ApprovalTests.Reporters; using FluentAssertions; using Microsoft.ML.Data; using Microsoft.ML.TestFramework; +using Newtonsoft.Json; using Xunit; using Xunit.Abstractions; @@ -222,5 +226,19 @@ public void InferColumnsFromMultilineInputFile() Assert.Equal("description", result.ColumnInformation.TextColumnNames.First()); Assert.Equal("animal", result.ColumnInformation.CategoricalColumnNames.First()); } + + [Fact] + [UseReporter(typeof(DiffReporter))] + [UseApprovalSubdirectory("ApprovalTests")] + public void Wiki_column_inference_result_should_be_serializable() + { + var wiki = Path.Combine("TestData", "wiki-column-inference.json"); + using (var stream = new StreamReader(wiki)) + { + var json = stream.ReadToEnd(); + var columnInferenceResults = JsonConvert.DeserializeObject(json); + Approvals.Verify(JsonConvert.SerializeObject(columnInferenceResults, Formatting.Indented)); + } + } } } diff --git a/test/Microsoft.ML.AutoML.Tests/GetNextPipelineTests.cs b/test/Microsoft.ML.AutoML.Tests/GetNextPipelineTests.cs index fb0a65bf5a..cec77327f1 100644 --- a/test/Microsoft.ML.AutoML.Tests/GetNextPipelineTests.cs +++ b/test/Microsoft.ML.AutoML.Tests/GetNextPipelineTests.cs @@ -9,6 +9,7 @@ using Newtonsoft.Json; using Microsoft.ML.TestFramework; using Xunit.Abstractions; +using Microsoft.ML.Runtime; namespace Microsoft.ML.AutoML.Test { @@ -27,7 +28,8 @@ public void GetNextPipeline() var columns = DatasetColumnInfoUtil.GetDatasetColumnInfo(context, uciAdult, new ColumnInformation() { LabelColumnName = DatasetUtil.UciAdultLabel }); // get next pipeline - var pipeline = PipelineSuggester.GetNextPipeline(context, new List(), columns, TaskKind.BinaryClassification); + var pipeline = PipelineSuggester.GetNextPipeline(context, new List(), columns, + TaskKind.BinaryClassification, ((IChannelProvider)context).Start("AutoMLTest")); // serialize & deserialize pipeline var serialized = JsonConvert.SerializeObject(pipeline); @@ -57,7 +59,7 @@ public void GetNextPipelineMock() for (var i = 0; i < maxIterations; i++) { // Get next pipeline - var pipeline = PipelineSuggester.GetNextPipeline(context, history, columns, task); + var pipeline = PipelineSuggester.GetNextPipeline(context, history, columns, task, ((IChannelProvider)context).Start("AutoMLTest")); if (pipeline == null) { break; diff --git a/test/Microsoft.ML.AutoML.Tests/MetricsAgentsTests.cs b/test/Microsoft.ML.AutoML.Tests/MetricsAgentsTests.cs index 0f9b336d84..69e70f0465 100644 --- a/test/Microsoft.ML.AutoML.Tests/MetricsAgentsTests.cs +++ b/test/Microsoft.ML.AutoML.Tests/MetricsAgentsTests.cs @@ -61,7 +61,7 @@ public void BinaryMetricsPerfectTest() [Fact] public void MulticlassMetricsGetScoreTest() { - var metrics = MetricsUtil.CreateMulticlassClassificationMetrics(0.1, 0.2, 0.3, 0.4, 0, 0.5, new double[] {}); + var metrics = MetricsUtil.CreateMulticlassClassificationMetrics(0.1, 0.2, 0.3, 0.4, 0, new double[] {0.5}, new double[] {}); Assert.Equal(0.1, GetScore(metrics, MulticlassClassificationMetric.MicroAccuracy)); Assert.Equal(0.2, GetScore(metrics, MulticlassClassificationMetric.MacroAccuracy)); Assert.Equal(0.3, GetScore(metrics, MulticlassClassificationMetric.LogLoss)); @@ -72,7 +72,7 @@ public void MulticlassMetricsGetScoreTest() [Fact] public void MulticlassMetricsNonPerfectTest() { - var metrics = MetricsUtil.CreateMulticlassClassificationMetrics(0.1, 0.2, 0.3, 0.4, 0, 0.5, new double[] { }); + var metrics = MetricsUtil.CreateMulticlassClassificationMetrics(0.1, 0.2, 0.3, 0.4, 0, new double[] { 0.5 }, new double[] { }); Assert.False(IsPerfectModel(metrics, MulticlassClassificationMetric.MacroAccuracy)); Assert.False(IsPerfectModel(metrics, MulticlassClassificationMetric.MicroAccuracy)); Assert.False(IsPerfectModel(metrics, MulticlassClassificationMetric.LogLoss)); @@ -83,7 +83,7 @@ public void MulticlassMetricsNonPerfectTest() [Fact] public void MulticlassMetricsPerfectTest() { - var metrics = MetricsUtil.CreateMulticlassClassificationMetrics(1, 1, 0, 1, 0, 1, new double[] { }); + var metrics = MetricsUtil.CreateMulticlassClassificationMetrics(1, 1, 0, 1, 0, new double[] { 1 }, new double[] { }); Assert.True(IsPerfectModel(metrics, MulticlassClassificationMetric.MicroAccuracy)); Assert.True(IsPerfectModel(metrics, MulticlassClassificationMetric.MacroAccuracy)); Assert.True(IsPerfectModel(metrics, MulticlassClassificationMetric.LogLoss)); @@ -127,14 +127,14 @@ public void RankingMetricsGetScoreTest() double[] ndcg = { 0.2, 0.3, 0.4 }; double[] dcg = { 0.2, 0.3, 0.4 }; var metrics = MetricsUtil.CreateRankingMetrics(dcg, ndcg); - Assert.Equal(0.4, GetScore(metrics, RankingMetric.Dcg)); - Assert.Equal(0.4, GetScore(metrics, RankingMetric.Ndcg)); + Assert.Equal(0.4, GetScore(metrics, RankingMetric.Dcg, 3)); + Assert.Equal(0.4, GetScore(metrics, RankingMetric.Ndcg, 3)); double[] largeNdcg = { 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.85, 0.9, 0.95 }; double[] largeDcg = { 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.85, 0.9, 0.95 }; metrics = MetricsUtil.CreateRankingMetrics(largeDcg, largeNdcg); - Assert.Equal(0.9, GetScore(metrics, RankingMetric.Dcg)); - Assert.Equal(0.9, GetScore(metrics, RankingMetric.Ndcg)); + Assert.Equal(0.3, GetScore(metrics, RankingMetric.Dcg, 3)); + Assert.Equal(0.3, GetScore(metrics, RankingMetric.Ndcg, 3)); } [Fact] @@ -143,8 +143,8 @@ public void RankingMetricsNonPerfectTest() double[] ndcg = { 0.2, 0.3, 0.4 }; double[] dcg = { 0.2, 0.3, 0.4 }; var metrics = MetricsUtil.CreateRankingMetrics(dcg, ndcg); - Assert.False(IsPerfectModel(metrics, RankingMetric.Dcg)); - Assert.False(IsPerfectModel(metrics, RankingMetric.Ndcg)); + Assert.False(IsPerfectModel(metrics, RankingMetric.Dcg, 3)); + Assert.False(IsPerfectModel(metrics, RankingMetric.Ndcg, 3)); } [Fact] @@ -153,8 +153,8 @@ public void RankingMetricsPerfectTest() double[] ndcg = { 0.2, 0.3, 1 }; double[] dcg = { 0.2, 0.3, 1 }; var metrics = MetricsUtil.CreateRankingMetrics(dcg, ndcg); - Assert.False(IsPerfectModel(metrics, RankingMetric.Dcg)); //REVIEW: No true Perfect model - Assert.True(IsPerfectModel(metrics, RankingMetric.Ndcg)); + Assert.False(IsPerfectModel(metrics, RankingMetric.Dcg, 3)); //REVIEW: No true Perfect model + Assert.True(IsPerfectModel(metrics, RankingMetric.Ndcg, 3)); } [Fact] @@ -162,7 +162,7 @@ public void ThrowNotSupportedMetricException() { var ex = MetricsAgentUtil.BuildMetricNotSupportedException(BinaryClassificationMetric.Accuracy); Assert.Equal(typeof(NotSupportedException), ex.GetType()); - } + } private static double GetScore(BinaryClassificationMetrics metrics, BinaryClassificationMetric metric) { @@ -179,9 +179,9 @@ private static double GetScore(RegressionMetrics metrics, RegressionMetric metri return new RegressionMetricsAgent(null, metric).GetScore(metrics); } - private static double GetScore(RankingMetrics metrics, RankingMetric metric) + private static double GetScore(RankingMetrics metrics, RankingMetric metric, uint dcgTruncationLevel) { - return new RankingMetricsAgent(null, metric).GetScore(metrics); + return new RankingMetricsAgent(null, metric, dcgTruncationLevel).GetScore(metrics); } private static bool IsPerfectModel(BinaryClassificationMetrics metrics, BinaryClassificationMetric metric) @@ -202,9 +202,9 @@ private static bool IsPerfectModel(RegressionMetrics metrics, RegressionMetric m return IsPerfectModel(metricsAgent, metrics); } - private static bool IsPerfectModel(RankingMetrics metrics, RankingMetric metric) + private static bool IsPerfectModel(RankingMetrics metrics, RankingMetric metric, uint dcgTruncationLevel) { - var metricsAgent = new RankingMetricsAgent(null, metric); + var metricsAgent = new RankingMetricsAgent(null, metric, dcgTruncationLevel); return IsPerfectModel(metricsAgent, metrics); } diff --git a/test/Microsoft.ML.AutoML.Tests/MetricsUtil.cs b/test/Microsoft.ML.AutoML.Tests/MetricsUtil.cs index 828eccf9d2..3f306fdcbe 100644 --- a/test/Microsoft.ML.AutoML.Tests/MetricsUtil.cs +++ b/test/Microsoft.ML.AutoML.Tests/MetricsUtil.cs @@ -21,7 +21,7 @@ public static BinaryClassificationMetrics CreateBinaryClassificationMetrics( public static MulticlassClassificationMetrics CreateMulticlassClassificationMetrics( double accuracyMicro, double accuracyMacro, double logLoss, - double logLossReduction, int topK, double topKAccuracy, + double logLossReduction, int topK, double[] topKAccuracy, double[] perClassLogLoss) { return CreateInstance(accuracyMicro, diff --git a/test/Microsoft.ML.AutoML.Tests/Microsoft.ML.AutoML.Tests.csproj b/test/Microsoft.ML.AutoML.Tests/Microsoft.ML.AutoML.Tests.csproj index af86334edf..fad409f5f0 100644 --- a/test/Microsoft.ML.AutoML.Tests/Microsoft.ML.AutoML.Tests.csproj +++ b/test/Microsoft.ML.AutoML.Tests/Microsoft.ML.AutoML.Tests.csproj @@ -7,30 +7,13 @@ + - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - + PreserveNewest @@ -41,6 +24,7 @@ + diff --git a/test/Microsoft.ML.AutoML.Tests/TestData/wiki-column-inference.json b/test/Microsoft.ML.AutoML.Tests/TestData/wiki-column-inference.json new file mode 100644 index 0000000000..79c9e98a07 --- /dev/null +++ b/test/Microsoft.ML.AutoML.Tests/TestData/wiki-column-inference.json @@ -0,0 +1,66 @@ +{ + "TextLoaderOptions": { + "AllowQuoting": true, + "AllowSparse": false, + "InputSize": null, + "Separators": [ + "\t" + ], + "DecimalMarker": ".", + "Columns": [ + { + "Name": "Sentiment", + "Source": [ + { + "Min": 0, + "Max": 0, + "AutoEnd": false, + "VariableEnd": false, + "AllOther": false, + "ForceVector": false + } + ], + "KeyCount": null, + "DataKind": 11 + }, + { + "Name": "SentimentText", + "Source": [ + { + "Min": 1, + "Max": 1, + "AutoEnd": false, + "VariableEnd": false, + "AllOther": false, + "ForceVector": false + } + ], + "KeyCount": null, + "DataKind": 11 + } + ], + "TrimWhitespace": false, + "HasHeader": true, + "UseThreads": true, + "ReadMultilines": false, + "HeaderFile": null, + "MaxRows": null, + "EscapeChar": "\"", + "MissingRealsAsNaNs": false + }, + "ColumnInformation": { + "LabelColumnName": "Sentiment", + "UserIdColumnName": null, + "GroupIdColumnName": null, + "ItemIdColumnName": null, + "ExampleWeightColumnName": null, + "SamplingKeyColumnName": null, + "CategoricalColumnNames": [], + "NumericColumnNames": [], + "TextColumnNames": [ + "SentimentText" + ], + "IgnoredColumnNames": [], + "ImagePathColumnNames": [] + } +} \ No newline at end of file diff --git a/test/Microsoft.ML.AutoML.Tests/UserInputValidationTests.cs b/test/Microsoft.ML.AutoML.Tests/UserInputValidationTests.cs index 6c007c8279..259acede05 100644 --- a/test/Microsoft.ML.AutoML.Tests/UserInputValidationTests.cs +++ b/test/Microsoft.ML.AutoML.Tests/UserInputValidationTests.cs @@ -5,6 +5,7 @@ using System; using System.Collections.Generic; using System.IO; +using System.Linq; using System.Threading.Tasks; using Microsoft.ML.Data; using Microsoft.ML.TestFramework; @@ -43,10 +44,26 @@ public void ValidateExperimentExecuteLabelNotInTrain() { foreach (var task in new[] { TaskKind.Recommendation, TaskKind.Regression, TaskKind.Ranking }) { + const string columnName = "ReallyLongNonExistingColumnName"; var ex = Assert.Throws(() => UserInputValidationUtil.ValidateExperimentExecuteArgs(_data, - new ColumnInformation() { LabelColumnName = "L" }, null, task)); + new ColumnInformation() { LabelColumnName = columnName }, null, task)); - Assert.Equal("Provided label column 'L' not found in training data.", ex.Message); + Assert.Equal($"Provided label column '{columnName}' not found in training data.", ex.Message); + } + } + + [Fact] + public void ValidateExperimentExecuteLabelNotInTrainMistyped() + { + foreach (var task in new[] { TaskKind.Recommendation, TaskKind.Regression, TaskKind.Ranking }) + { + var originalColumnName = _data.Schema.First().Name; + var mistypedColumnName = originalColumnName + "a"; + var ex = Assert.Throws(() => UserInputValidationUtil.ValidateExperimentExecuteArgs(_data, + new ColumnInformation() { LabelColumnName = mistypedColumnName }, null, task)); + + Assert.Equal($"Provided label column '{mistypedColumnName}' not found in training data. Did you mean '{originalColumnName}'.", + ex.Message); } } diff --git a/test/Microsoft.ML.Benchmarks.Tests/BenchmarksTest.cs b/test/Microsoft.ML.Benchmarks.Tests/BenchmarksTest.cs index 88f975927a..285aad7845 100644 --- a/test/Microsoft.ML.Benchmarks.Tests/BenchmarksTest.cs +++ b/test/Microsoft.ML.Benchmarks.Tests/BenchmarksTest.cs @@ -10,13 +10,13 @@ using BenchmarkDotNet.Jobs; using BenchmarkDotNet.Loggers; using BenchmarkDotNet.Running; -using Microsoft.ML.Benchmarks.Harness; +using Microsoft.ML.PerformanceTests.Harness; using Microsoft.ML.TestFramework; using Microsoft.ML.TestFramework.Attributes; using Xunit; using Xunit.Abstractions; -namespace Microsoft.ML.Benchmarks.Tests +namespace Microsoft.ML.PerformanceTests.Tests { public class TestConfig : RecommendedConfig { diff --git a/test/Microsoft.ML.Benchmarks.Tests/Microsoft.ML.Benchmarks.Tests.csproj b/test/Microsoft.ML.Benchmarks.Tests/Microsoft.ML.Benchmarks.Tests.csproj index ad555d7b49..9df7fd4b36 100644 --- a/test/Microsoft.ML.Benchmarks.Tests/Microsoft.ML.Benchmarks.Tests.csproj +++ b/test/Microsoft.ML.Benchmarks.Tests/Microsoft.ML.Benchmarks.Tests.csproj @@ -1,7 +1,7 @@  - + diff --git a/test/Microsoft.ML.Benchmarks/Program.cs b/test/Microsoft.ML.Benchmarks/Program.cs deleted file mode 100644 index 13d41b1341..0000000000 --- a/test/Microsoft.ML.Benchmarks/Program.cs +++ /dev/null @@ -1,27 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System.Globalization; -using System.Threading; -using BenchmarkDotNet.Running; - -namespace Microsoft.ML.Benchmarks -{ - class Program - { - /// - /// execute dotnet run -c Release and choose the benchmarks you want to run - /// - /// - static void Main(string[] args) - { - // enforce Neutral Language as "en-us" because the input data files use dot as decimal separator (and it fails for cultures with ",") - Thread.CurrentThread.CurrentCulture = CultureInfo.InvariantCulture; - - BenchmarkSwitcher - .FromAssembly(typeof(Program).Assembly) - .Run(args, new RecommendedConfig()); - } - } -} diff --git a/test/Microsoft.ML.CodeAnalyzer.Tests/Code/ContractsCheckTest.cs b/test/Microsoft.ML.CodeAnalyzer.Tests/Code/ContractsCheckTest.cs index 532d5ff49e..6822853ba4 100644 --- a/test/Microsoft.ML.CodeAnalyzer.Tests/Code/ContractsCheckTest.cs +++ b/test/Microsoft.ML.CodeAnalyzer.Tests/Code/ContractsCheckTest.cs @@ -39,8 +39,8 @@ public async Task ContractsCheck() VerifyCS.Diagnostic(ContractsCheckAnalyzer.SimpleMessageDiagnostic.Rule).WithLocation(basis + 32, 35).WithArguments("Check", "\"Less fine: \" + env.GetType().Name"), VerifyCS.Diagnostic(ContractsCheckAnalyzer.NameofDiagnostic.Rule).WithLocation(basis + 34, 17).WithArguments("CheckUserArg", "name", "\"p\""), VerifyCS.Diagnostic(ContractsCheckAnalyzer.DecodeMessageWithLoadContextDiagnostic.Rule).WithLocation(basis + 39, 41).WithArguments("CheckDecode", "\"This message is suspicious\""), - new DiagnosticResult("CS0122", DiagnosticSeverity.Error).WithLocation("Test1.cs", 752, 24).WithMessage("'ICancelable' is inaccessible due to its protection level"), - new DiagnosticResult("CS0122", DiagnosticSeverity.Error).WithLocation("Test1.cs", 752, 67).WithMessage("'ICancelable.IsCanceled' is inaccessible due to its protection level"), + new DiagnosticResult("CS0122", DiagnosticSeverity.Error).WithSpan("/0/Test1.cs", 752, 24, 752, 35).WithMessage("'ICancelable' is inaccessible due to its protection level"), + new DiagnosticResult("CS0122", DiagnosticSeverity.Error).WithSpan("/0/Test1.cs", 752, 67, 752, 77).WithMessage("'ICancelable.IsCanceled' is inaccessible due to its protection level"), }; var test = new VerifyCS.Test @@ -126,9 +126,9 @@ public async Task ContractsCheckFix() VerifyCS.Diagnostic(ContractsCheckAnalyzer.NameofDiagnostic.Rule).WithLocation(23, 39).WithArguments("CheckValue", "paramName", "\"noMatch\""), VerifyCS.Diagnostic(ContractsCheckAnalyzer.NameofDiagnostic.Rule).WithLocation(24, 53).WithArguments("CheckUserArg", "name", "\"chumble\""), VerifyCS.Diagnostic(ContractsCheckAnalyzer.NameofDiagnostic.Rule).WithLocation(25, 53).WithArguments("CheckUserArg", "name", "\"sp\""), - new DiagnosticResult("CS0122", DiagnosticSeverity.Error).WithLocation("Test1.cs", 752, 24).WithMessage("'ICancelable' is inaccessible due to its protection level"), - new DiagnosticResult("CS0122", DiagnosticSeverity.Error).WithLocation("Test1.cs", 752, 67).WithMessage("'ICancelable.IsCanceled' is inaccessible due to its protection level"), - new DiagnosticResult("CS1503", DiagnosticSeverity.Error).WithLocation("Test1.cs", 753, 90).WithMessage("Argument 2: cannot convert from 'Microsoft.ML.Runtime.IHostEnvironment' to 'Microsoft.ML.Runtime.IExceptionContext'"), + new DiagnosticResult("CS0122", DiagnosticSeverity.Error).WithSpan("/0/Test1.cs", 752, 24, 752, 35).WithMessage("'ICancelable' is inaccessible due to its protection level"), + new DiagnosticResult("CS0122", DiagnosticSeverity.Error).WithSpan("/0/Test1.cs", 752, 67, 752, 77).WithMessage("'ICancelable.IsCanceled' is inaccessible due to its protection level"), + new DiagnosticResult("CS1503", DiagnosticSeverity.Error).WithSpan("/0/Test1.cs", 753, 90, 753, 93).WithMessage("Argument 2: cannot convert from 'Microsoft.ML.Runtime.IHostEnvironment' to 'Microsoft.ML.Runtime.IExceptionContext'"), }, }, FixedState = @@ -146,9 +146,9 @@ public async Task ContractsCheckFix() { VerifyCS.Diagnostic(ContractsCheckAnalyzer.ExceptionDiagnostic.Rule).WithLocation(9, 43).WithArguments("ExceptParam"), VerifyCS.Diagnostic(ContractsCheckAnalyzer.NameofDiagnostic.Rule).WithLocation(23, 39).WithArguments("CheckValue", "paramName", "\"noMatch\""), - new DiagnosticResult("CS0122", DiagnosticSeverity.Error).WithLocation("Test1.cs", 752, 24).WithMessage("'ICancelable' is inaccessible due to its protection level"), - new DiagnosticResult("CS0122", DiagnosticSeverity.Error).WithLocation("Test1.cs", 752, 67).WithMessage("'ICancelable.IsCanceled' is inaccessible due to its protection level"), - new DiagnosticResult("CS1503", DiagnosticSeverity.Error).WithLocation("Test1.cs", 753, 90).WithMessage("Argument 2: cannot convert from 'Microsoft.ML.Runtime.IHostEnvironment' to 'Microsoft.ML.Runtime.IExceptionContext'"), + new DiagnosticResult("CS0122", DiagnosticSeverity.Error).WithSpan("/0/Test1.cs", 752, 24, 752, 35).WithMessage("'ICancelable' is inaccessible due to its protection level"), + new DiagnosticResult("CS0122", DiagnosticSeverity.Error).WithSpan("/0/Test1.cs", 752, 67, 752, 77).WithMessage("'ICancelable.IsCanceled' is inaccessible due to its protection level"), + new DiagnosticResult("CS1503", DiagnosticSeverity.Error).WithSpan("/0/Test1.cs", 753, 90, 753, 93).WithMessage("Argument 2: cannot convert from 'Microsoft.ML.Runtime.IHostEnvironment' to 'Microsoft.ML.Runtime.IExceptionContext'"), }, }, }; diff --git a/test/Microsoft.ML.CodeGenerator.Tests/ApprovalTests/ConsoleCodeGeneratorTests.AzureCodeGeneratorTest.ConsumeModel.cs.approved.txt b/test/Microsoft.ML.CodeGenerator.Tests/ApprovalTests/ConsoleCodeGeneratorTests.AzureCodeGeneratorTest.ConsumeModel.cs.approved.txt index 0706528fe5..27940abbc5 100644 --- a/test/Microsoft.ML.CodeGenerator.Tests/ApprovalTests/ConsoleCodeGeneratorTests.AzureCodeGeneratorTest.ConsumeModel.cs.approved.txt +++ b/test/Microsoft.ML.CodeGenerator.Tests/ApprovalTests/ConsoleCodeGeneratorTests.AzureCodeGeneratorTest.ConsumeModel.cs.approved.txt @@ -14,7 +14,7 @@ namespace Test.Model { private static Lazy> PredictionEngine = new Lazy>(CreatePredictionEngine); - public static string MLNetModelPath = Path.GetFullPath("\path\to\model"); + public static string MLNetModelPath = Path.Combine(System.AppContext.BaseDirectory, "\path\to\model"); // For more info on consuming ML.NET models, visit https://aka.ms/mlnet-consume // Method for consuming model in your app diff --git a/test/Microsoft.ML.CodeGenerator.Tests/ApprovalTests/ConsoleCodeGeneratorTests.AzureImageCodeGeneratorTest.ConsumeModel.cs.approved.txt b/test/Microsoft.ML.CodeGenerator.Tests/ApprovalTests/ConsoleCodeGeneratorTests.AzureImageCodeGeneratorTest.ConsumeModel.cs.approved.txt index 102d17059d..95db062089 100644 --- a/test/Microsoft.ML.CodeGenerator.Tests/ApprovalTests/ConsoleCodeGeneratorTests.AzureImageCodeGeneratorTest.ConsumeModel.cs.approved.txt +++ b/test/Microsoft.ML.CodeGenerator.Tests/ApprovalTests/ConsoleCodeGeneratorTests.AzureImageCodeGeneratorTest.ConsumeModel.cs.approved.txt @@ -14,9 +14,9 @@ namespace CodeGenTest.Model { private static Lazy> PredictionEngine = new Lazy>(CreatePredictionEngine); - public static string MLNetModelPath = Path.GetFullPath("/path/to/model"); + public static string MLNetModelPath = Path.Combine(System.AppContext.BaseDirectory, "/path/to/model"); - public static string OnnxModelPath = Path.GetFullPath("/path/to/onnxModel"); + public static string OnnxModelPath = Path.Combine(System.AppContext.BaseDirectory, "/path/to/onnxModel"); // For more info on consuming ML.NET models, visit https://aka.ms/mlnet-consume // Method for consuming model in your app diff --git a/test/Microsoft.ML.CodeGenerator.Tests/ApprovalTests/ConsoleCodeGeneratorTests.AzureObjectDetectionCodeGeneratorTest.ConsumeModel.cs.approved.txt b/test/Microsoft.ML.CodeGenerator.Tests/ApprovalTests/ConsoleCodeGeneratorTests.AzureObjectDetectionCodeGeneratorTest.ConsumeModel.cs.approved.txt index 102d17059d..95db062089 100644 --- a/test/Microsoft.ML.CodeGenerator.Tests/ApprovalTests/ConsoleCodeGeneratorTests.AzureObjectDetectionCodeGeneratorTest.ConsumeModel.cs.approved.txt +++ b/test/Microsoft.ML.CodeGenerator.Tests/ApprovalTests/ConsoleCodeGeneratorTests.AzureObjectDetectionCodeGeneratorTest.ConsumeModel.cs.approved.txt @@ -14,9 +14,9 @@ namespace CodeGenTest.Model { private static Lazy> PredictionEngine = new Lazy>(CreatePredictionEngine); - public static string MLNetModelPath = Path.GetFullPath("/path/to/model"); + public static string MLNetModelPath = Path.Combine(System.AppContext.BaseDirectory, "/path/to/model"); - public static string OnnxModelPath = Path.GetFullPath("/path/to/onnxModel"); + public static string OnnxModelPath = Path.Combine(System.AppContext.BaseDirectory, "/path/to/onnxModel"); // For more info on consuming ML.NET models, visit https://aka.ms/mlnet-consume // Method for consuming model in your app diff --git a/test/Microsoft.ML.CodeGenerator.Tests/ApprovalTests/ConsoleCodeGeneratorTests.ConsumeModelContentTest.approved.txt b/test/Microsoft.ML.CodeGenerator.Tests/ApprovalTests/ConsoleCodeGeneratorTests.ConsumeModelContentTest.approved.txt index fb1e37cb14..4f0b83618b 100644 --- a/test/Microsoft.ML.CodeGenerator.Tests/ApprovalTests/ConsoleCodeGeneratorTests.ConsumeModelContentTest.approved.txt +++ b/test/Microsoft.ML.CodeGenerator.Tests/ApprovalTests/ConsoleCodeGeneratorTests.ConsumeModelContentTest.approved.txt @@ -18,7 +18,7 @@ namespace TestNamespace.Model { private static Lazy> PredictionEngine = new Lazy>(CreatePredictionEngine); - public static string MLNetModelPath = Path.GetFullPath("x:\models\model.zip"); + public static string MLNetModelPath = Path.Combine(System.AppContext.BaseDirectory, "x:\models\model.zip"); // For more info on consuming ML.NET models, visit https://aka.ms/mlnet-consume // Method for consuming model in your app diff --git a/test/Microsoft.ML.CodeGenerator.Tests/ApprovalTests/ConsoleCodeGeneratorTests.Recommendation_GenerateModelProjectContents_VerifyConsumeModel.approved.txt b/test/Microsoft.ML.CodeGenerator.Tests/ApprovalTests/ConsoleCodeGeneratorTests.Recommendation_GenerateModelProjectContents_VerifyConsumeModel.approved.txt index fb1e37cb14..4f0b83618b 100644 --- a/test/Microsoft.ML.CodeGenerator.Tests/ApprovalTests/ConsoleCodeGeneratorTests.Recommendation_GenerateModelProjectContents_VerifyConsumeModel.approved.txt +++ b/test/Microsoft.ML.CodeGenerator.Tests/ApprovalTests/ConsoleCodeGeneratorTests.Recommendation_GenerateModelProjectContents_VerifyConsumeModel.approved.txt @@ -18,7 +18,7 @@ namespace TestNamespace.Model { private static Lazy> PredictionEngine = new Lazy>(CreatePredictionEngine); - public static string MLNetModelPath = Path.GetFullPath("x:\models\model.zip"); + public static string MLNetModelPath = Path.Combine(System.AppContext.BaseDirectory, "x:\models\model.zip"); // For more info on consuming ML.NET models, visit https://aka.ms/mlnet-consume // Method for consuming model in your app diff --git a/test/Microsoft.ML.CodeGenerator.Tests/ApprovalTests/TemplateTest.TestConsumeModel_AzureImage.approved.txt b/test/Microsoft.ML.CodeGenerator.Tests/ApprovalTests/TemplateTest.TestConsumeModel_AzureImage.approved.txt index 102796208a..39829e5c2c 100644 --- a/test/Microsoft.ML.CodeGenerator.Tests/ApprovalTests/TemplateTest.TestConsumeModel_AzureImage.approved.txt +++ b/test/Microsoft.ML.CodeGenerator.Tests/ApprovalTests/TemplateTest.TestConsumeModel_AzureImage.approved.txt @@ -14,9 +14,9 @@ namespace Namespace.Model { private static Lazy> PredictionEngine = new Lazy>(CreatePredictionEngine); - public static string MLNetModelPath = Path.GetFullPath("mlmodel.zip"); + public static string MLNetModelPath = Path.Combine(System.AppContext.BaseDirectory, "mlmodel.zip"); - public static string OnnxModelPath = Path.GetFullPath("onnx.onnx"); + public static string OnnxModelPath = Path.Combine(System.AppContext.BaseDirectory, "onnx.onnx"); // For more info on consuming ML.NET models, visit https://aka.ms/mlnet-consume // Method for consuming model in your app diff --git a/test/Microsoft.ML.CodeGenerator.Tests/ApprovalTests/TemplateTest.TestConsumeModel_AzureObjectDetection.approved.txt b/test/Microsoft.ML.CodeGenerator.Tests/ApprovalTests/TemplateTest.TestConsumeModel_AzureObjectDetection.approved.txt index a4c874b77b..68be854510 100644 --- a/test/Microsoft.ML.CodeGenerator.Tests/ApprovalTests/TemplateTest.TestConsumeModel_AzureObjectDetection.approved.txt +++ b/test/Microsoft.ML.CodeGenerator.Tests/ApprovalTests/TemplateTest.TestConsumeModel_AzureObjectDetection.approved.txt @@ -14,9 +14,9 @@ namespace Namespace.Model { private static Lazy> PredictionEngine = new Lazy>(CreatePredictionEngine); - public static string MLNetModelPath = Path.GetFullPath("mlmodel.zip"); + public static string MLNetModelPath = Path.Combine(System.AppContext.BaseDirectory, "mlmodel.zip"); - public static string OnnxModelPath = Path.GetFullPath("onnx.onnx"); + public static string OnnxModelPath = Path.Combine(System.AppContext.BaseDirectory, "onnx.onnx"); // For more info on consuming ML.NET models, visit https://aka.ms/mlnet-consume // Method for consuming model in your app diff --git a/test/Microsoft.ML.CodeGenerator.Tests/ApprovalTests/TemplateTest.TestConsumeModel_NotAzureImage_NotObjectDetection.approved.txt b/test/Microsoft.ML.CodeGenerator.Tests/ApprovalTests/TemplateTest.TestConsumeModel_NotAzureImage_NotObjectDetection.approved.txt index b1e4146d53..30fa1b7dfb 100644 --- a/test/Microsoft.ML.CodeGenerator.Tests/ApprovalTests/TemplateTest.TestConsumeModel_NotAzureImage_NotObjectDetection.approved.txt +++ b/test/Microsoft.ML.CodeGenerator.Tests/ApprovalTests/TemplateTest.TestConsumeModel_NotAzureImage_NotObjectDetection.approved.txt @@ -14,7 +14,7 @@ namespace Namespace.Model { private static Lazy> PredictionEngine = new Lazy>(CreatePredictionEngine); - public static string MLNetModelPath = Path.GetFullPath("mlmodel.zip"); + public static string MLNetModelPath = Path.Combine(System.AppContext.BaseDirectory, "mlmodel.zip"); // For more info on consuming ML.NET models, visit https://aka.ms/mlnet-consume // Method for consuming model in your app diff --git a/test/Microsoft.ML.CodeGenerator.Tests/Microsoft.ML.CodeGenerator.Tests.csproj b/test/Microsoft.ML.CodeGenerator.Tests/Microsoft.ML.CodeGenerator.Tests.csproj index 4765fd112a..c3a34bb966 100644 --- a/test/Microsoft.ML.CodeGenerator.Tests/Microsoft.ML.CodeGenerator.Tests.csproj +++ b/test/Microsoft.ML.CodeGenerator.Tests/Microsoft.ML.CodeGenerator.Tests.csproj @@ -17,4 +17,9 @@ + + + + + diff --git a/test/Microsoft.ML.Core.Tests/Microsoft.ML.Core.Tests.csproj b/test/Microsoft.ML.Core.Tests/Microsoft.ML.Core.Tests.csproj index e6127e6938..ac8a35dd5a 100644 --- a/test/Microsoft.ML.Core.Tests/Microsoft.ML.Core.Tests.csproj +++ b/test/Microsoft.ML.Core.Tests/Microsoft.ML.Core.Tests.csproj @@ -1,8 +1,12 @@  CORECLR + Test + + + @@ -22,7 +26,7 @@ - + diff --git a/test/Microsoft.ML.Core.Tests/UnitTests/TestEntryPoints.cs b/test/Microsoft.ML.Core.Tests/UnitTests/TestEntryPoints.cs index 4bca373ad7..c58531fa0d 100644 --- a/test/Microsoft.ML.Core.Tests/UnitTests/TestEntryPoints.cs +++ b/test/Microsoft.ML.Core.Tests/UnitTests/TestEntryPoints.cs @@ -6888,10 +6888,17 @@ void RankingWithColumnIdEntryPoint() // Since we used a toy dataset, we won't worry much about comparing actual // Double values of the result. Simply check that we get results. - Assert.Equal(3, ndcgArray.Length); + Assert.Equal(10, ndcgArray.Length); Assert.True(ndcgArray[0] > 0); Assert.True(ndcgArray[1] > 0); - Assert.True(ndcgArray[2] > 0); + Assert.True(ndcgArray[2] > 0); + Assert.True(ndcgArray[3] > 0); + Assert.True(ndcgArray[4] > 0); + Assert.True(ndcgArray[5] > 0); + Assert.True(ndcgArray[6] > 0); + Assert.True(ndcgArray[7] > 0); + Assert.True(ndcgArray[8] > 0); + Assert.True(ndcgArray[9] > 0); } } } diff --git a/test/Microsoft.ML.CpuMath.PerformanceTests/Microsoft.ML.CpuMath.PerformanceTests.csproj b/test/Microsoft.ML.CpuMath.PerformanceTests/Microsoft.ML.CpuMath.PerformanceTests.csproj index 72982dc251..4e79957fd5 100644 --- a/test/Microsoft.ML.CpuMath.PerformanceTests/Microsoft.ML.CpuMath.PerformanceTests.csproj +++ b/test/Microsoft.ML.CpuMath.PerformanceTests/Microsoft.ML.CpuMath.PerformanceTests.csproj @@ -10,6 +10,8 @@ --> true + false + true diff --git a/test/Microsoft.ML.Functional.Tests/Common.cs b/test/Microsoft.ML.IntegrationTests/Common.cs similarity index 99% rename from test/Microsoft.ML.Functional.Tests/Common.cs rename to test/Microsoft.ML.IntegrationTests/Common.cs index b8f943e094..be60b71c3e 100644 --- a/test/Microsoft.ML.Functional.Tests/Common.cs +++ b/test/Microsoft.ML.IntegrationTests/Common.cs @@ -6,11 +6,11 @@ using System.Collections.Generic; using System.Linq; using Microsoft.ML.Data; -using Microsoft.ML.Functional.Tests.Datasets; +using Microsoft.ML.IntegrationTests.Datasets; using Xunit; using Xunit.Sdk; -namespace Microsoft.ML.Functional.Tests +namespace Microsoft.ML.IntegrationTests { internal static class Common { diff --git a/test/Microsoft.ML.Functional.Tests/DataIO.cs b/test/Microsoft.ML.IntegrationTests/DataIO.cs similarity index 97% rename from test/Microsoft.ML.Functional.Tests/DataIO.cs rename to test/Microsoft.ML.IntegrationTests/DataIO.cs index 2cff7132c8..431b1ff2f7 100644 --- a/test/Microsoft.ML.Functional.Tests/DataIO.cs +++ b/test/Microsoft.ML.IntegrationTests/DataIO.cs @@ -3,17 +3,17 @@ // See the LICENSE file in the project root for more information. using System.IO; -using Microsoft.ML.Functional.Tests.Datasets; +using Microsoft.ML.IntegrationTests.Datasets; using Microsoft.ML.TestFrameworkCommon; using Xunit; using Xunit.Abstractions; -namespace Microsoft.ML.Functional.Tests +namespace Microsoft.ML.IntegrationTests { /// /// Test data input and output formats. /// - public class DataIO : FunctionalTestBaseClass + public class DataIO : IntegrationTestBaseClass { // Separators to test private readonly char[] _separators; diff --git a/test/Microsoft.ML.Functional.Tests/DataTransformation.cs b/test/Microsoft.ML.IntegrationTests/DataTransformation.cs similarity index 98% rename from test/Microsoft.ML.Functional.Tests/DataTransformation.cs rename to test/Microsoft.ML.IntegrationTests/DataTransformation.cs index 8ce91e83dc..445680f7d5 100644 --- a/test/Microsoft.ML.Functional.Tests/DataTransformation.cs +++ b/test/Microsoft.ML.IntegrationTests/DataTransformation.cs @@ -3,7 +3,7 @@ // See the LICENSE file in the project root for more information. using System; -using Microsoft.ML.Functional.Tests.Datasets; +using Microsoft.ML.IntegrationTests.Datasets; using Microsoft.ML.TestFrameworkCommon; using Microsoft.ML.Trainers; using Microsoft.ML.Transforms.Text; @@ -11,9 +11,9 @@ using Xunit.Abstractions; using static Microsoft.ML.Transforms.HashingEstimator; -namespace Microsoft.ML.Functional.Tests +namespace Microsoft.ML.IntegrationTests { - public class DataTransformation : FunctionalTestBaseClass + public class DataTransformation : IntegrationTestBaseClass { public DataTransformation(ITestOutputHelper output) : base(output) { diff --git a/test/Microsoft.ML.Functional.Tests/Datasets/Adult.cs b/test/Microsoft.ML.IntegrationTests/Datasets/Adult.cs similarity index 97% rename from test/Microsoft.ML.Functional.Tests/Datasets/Adult.cs rename to test/Microsoft.ML.IntegrationTests/Datasets/Adult.cs index 440515ac06..d0f764e1cb 100644 --- a/test/Microsoft.ML.Functional.Tests/Datasets/Adult.cs +++ b/test/Microsoft.ML.IntegrationTests/Datasets/Adult.cs @@ -4,7 +4,7 @@ using Microsoft.ML.Data; -namespace Microsoft.ML.Functional.Tests.Datasets +namespace Microsoft.ML.IntegrationTests.Datasets { /// /// A class for the Adult test dataset. diff --git a/test/Microsoft.ML.Functional.Tests/Datasets/CommonColumns.cs b/test/Microsoft.ML.IntegrationTests/Datasets/CommonColumns.cs similarity index 95% rename from test/Microsoft.ML.Functional.Tests/Datasets/CommonColumns.cs rename to test/Microsoft.ML.IntegrationTests/Datasets/CommonColumns.cs index 3081c1d7b1..9f54184af7 100644 --- a/test/Microsoft.ML.Functional.Tests/Datasets/CommonColumns.cs +++ b/test/Microsoft.ML.IntegrationTests/Datasets/CommonColumns.cs @@ -2,7 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -namespace Microsoft.ML.Functional.Tests.Datasets +namespace Microsoft.ML.IntegrationTests.Datasets { /// /// A class to hold a feature column. diff --git a/test/Microsoft.ML.Functional.Tests/Datasets/HousingRegression.cs b/test/Microsoft.ML.IntegrationTests/Datasets/HousingRegression.cs similarity index 97% rename from test/Microsoft.ML.Functional.Tests/Datasets/HousingRegression.cs rename to test/Microsoft.ML.IntegrationTests/Datasets/HousingRegression.cs index 1ca055d212..001046c3cf 100644 --- a/test/Microsoft.ML.Functional.Tests/Datasets/HousingRegression.cs +++ b/test/Microsoft.ML.IntegrationTests/Datasets/HousingRegression.cs @@ -4,7 +4,7 @@ using Microsoft.ML.Data; -namespace Microsoft.ML.Functional.Tests.Datasets +namespace Microsoft.ML.IntegrationTests.Datasets { /// /// A schematized class for loading the HousingRegression dataset. diff --git a/test/Microsoft.ML.Functional.Tests/Datasets/Iris.cs b/test/Microsoft.ML.IntegrationTests/Datasets/Iris.cs similarity index 98% rename from test/Microsoft.ML.Functional.Tests/Datasets/Iris.cs rename to test/Microsoft.ML.IntegrationTests/Datasets/Iris.cs index 7877069f21..ee487b45dc 100644 --- a/test/Microsoft.ML.Functional.Tests/Datasets/Iris.cs +++ b/test/Microsoft.ML.IntegrationTests/Datasets/Iris.cs @@ -6,7 +6,7 @@ using System; using Microsoft.ML.Data; -namespace Microsoft.ML.Functional.Tests.Datasets +namespace Microsoft.ML.IntegrationTests.Datasets { /// /// A class for the Iris test dataset. diff --git a/test/Microsoft.ML.Functional.Tests/Datasets/MnistOneClass.cs b/test/Microsoft.ML.IntegrationTests/Datasets/MnistOneClass.cs similarity index 95% rename from test/Microsoft.ML.Functional.Tests/Datasets/MnistOneClass.cs rename to test/Microsoft.ML.IntegrationTests/Datasets/MnistOneClass.cs index 6329a80b0b..40ad9b8910 100644 --- a/test/Microsoft.ML.Functional.Tests/Datasets/MnistOneClass.cs +++ b/test/Microsoft.ML.IntegrationTests/Datasets/MnistOneClass.cs @@ -4,7 +4,7 @@ using Microsoft.ML.Data; -namespace Microsoft.ML.Functional.Tests.Datasets +namespace Microsoft.ML.IntegrationTests.Datasets { internal sealed class MnistOneClass { diff --git a/test/Microsoft.ML.Functional.Tests/Datasets/Sentiment.cs b/test/Microsoft.ML.IntegrationTests/Datasets/Sentiment.cs similarity index 91% rename from test/Microsoft.ML.Functional.Tests/Datasets/Sentiment.cs rename to test/Microsoft.ML.IntegrationTests/Datasets/Sentiment.cs index 2465e291b3..e2cd7e2ae6 100644 --- a/test/Microsoft.ML.Functional.Tests/Datasets/Sentiment.cs +++ b/test/Microsoft.ML.IntegrationTests/Datasets/Sentiment.cs @@ -4,7 +4,7 @@ using Microsoft.ML.Data; -namespace Microsoft.ML.Functional.Tests.Datasets +namespace Microsoft.ML.IntegrationTests.Datasets { /// /// A class for reading in the Sentiment test dataset. diff --git a/test/Microsoft.ML.Functional.Tests/Datasets/TrivialMatrixFactorization.cs b/test/Microsoft.ML.IntegrationTests/Datasets/TrivialMatrixFactorization.cs similarity index 96% rename from test/Microsoft.ML.Functional.Tests/Datasets/TrivialMatrixFactorization.cs rename to test/Microsoft.ML.IntegrationTests/Datasets/TrivialMatrixFactorization.cs index e2cf6d7128..e04f6b0de1 100644 --- a/test/Microsoft.ML.Functional.Tests/Datasets/TrivialMatrixFactorization.cs +++ b/test/Microsoft.ML.IntegrationTests/Datasets/TrivialMatrixFactorization.cs @@ -5,7 +5,7 @@ using Microsoft.ML.Data; -namespace Microsoft.ML.Functional.Tests.Datasets +namespace Microsoft.ML.IntegrationTests.Datasets { /// /// A class describing the TrivialMatrixFactorization test dataset. diff --git a/test/Microsoft.ML.Functional.Tests/Datasets/TypeTestData.cs b/test/Microsoft.ML.IntegrationTests/Datasets/TypeTestData.cs similarity index 99% rename from test/Microsoft.ML.Functional.Tests/Datasets/TypeTestData.cs rename to test/Microsoft.ML.IntegrationTests/Datasets/TypeTestData.cs index 1d3eee5955..7b218ad10b 100644 --- a/test/Microsoft.ML.Functional.Tests/Datasets/TypeTestData.cs +++ b/test/Microsoft.ML.IntegrationTests/Datasets/TypeTestData.cs @@ -6,7 +6,7 @@ using System.Collections.Generic; using Microsoft.ML.Data; -namespace Microsoft.ML.Functional.Tests.Datasets +namespace Microsoft.ML.IntegrationTests.Datasets { /// /// A class containing one property per . diff --git a/test/Microsoft.ML.Functional.Tests/Debugging.cs b/test/Microsoft.ML.IntegrationTests/Debugging.cs similarity index 98% rename from test/Microsoft.ML.Functional.Tests/Debugging.cs rename to test/Microsoft.ML.IntegrationTests/Debugging.cs index b58433e157..3e89f594ef 100644 --- a/test/Microsoft.ML.Functional.Tests/Debugging.cs +++ b/test/Microsoft.ML.IntegrationTests/Debugging.cs @@ -5,16 +5,16 @@ using System.Collections.Concurrent; using System.Collections.Generic; using Microsoft.ML.Data; -using Microsoft.ML.Functional.Tests.Datasets; +using Microsoft.ML.IntegrationTests.Datasets; using Microsoft.ML.TestFrameworkCommon; using Microsoft.ML.Trainers; using Microsoft.ML.Transforms.Text; using Xunit; using Xunit.Abstractions; -namespace Microsoft.ML.Functional.Tests +namespace Microsoft.ML.IntegrationTests { - public class Debugging : FunctionalTestBaseClass + public class Debugging : IntegrationTestBaseClass { public Debugging(ITestOutputHelper output) : base(output) { diff --git a/test/Microsoft.ML.Functional.Tests/Evaluation.cs b/test/Microsoft.ML.IntegrationTests/Evaluation.cs similarity index 98% rename from test/Microsoft.ML.Functional.Tests/Evaluation.cs rename to test/Microsoft.ML.IntegrationTests/Evaluation.cs index bc9f87ee8d..3f92fa98b7 100644 --- a/test/Microsoft.ML.Functional.Tests/Evaluation.cs +++ b/test/Microsoft.ML.IntegrationTests/Evaluation.cs @@ -3,7 +3,7 @@ // See the LICENSE file in the project root for more information. using Microsoft.ML.Data; -using Microsoft.ML.Functional.Tests.Datasets; +using Microsoft.ML.IntegrationTests.Datasets; using Microsoft.ML.TestFrameworkCommon; using Microsoft.ML.TestFrameworkCommon.Attributes; using Microsoft.ML.Trainers; @@ -11,9 +11,9 @@ using Xunit; using Xunit.Abstractions; -namespace Microsoft.ML.Functional.Tests +namespace Microsoft.ML.IntegrationTests { - public class Evaluation : FunctionalTestBaseClass + public class Evaluation : IntegrationTestBaseClass { public Evaluation(ITestOutputHelper output): base(output) { diff --git a/test/Microsoft.ML.Functional.Tests/Explainability.cs b/test/Microsoft.ML.IntegrationTests/Explainability.cs similarity index 97% rename from test/Microsoft.ML.Functional.Tests/Explainability.cs rename to test/Microsoft.ML.IntegrationTests/Explainability.cs index b470a63336..124137a0e7 100644 --- a/test/Microsoft.ML.Functional.Tests/Explainability.cs +++ b/test/Microsoft.ML.IntegrationTests/Explainability.cs @@ -3,19 +3,19 @@ // See the LICENSE file in the project root for more information. using Microsoft.ML.Data; -using Microsoft.ML.Functional.Tests.Datasets; +using Microsoft.ML.IntegrationTests.Datasets; using Microsoft.ML.TestFrameworkCommon; using Microsoft.ML.Trainers; using Microsoft.ML.Trainers.FastTree; using Xunit; using Xunit.Abstractions; -namespace Microsoft.ML.Functional.Tests +namespace Microsoft.ML.IntegrationTests { /// /// Test explainability features. /// - public class Explainability : FunctionalTestBaseClass + public class Explainability : IntegrationTestBaseClass { public Explainability(ITestOutputHelper output) : base(output) { @@ -36,13 +36,13 @@ public void GlobalFeatureImportanceWithPermutationFeatureImportance(bool saveMod // Create a pipeline to train on the housing data. var pipeline = mlContext.Transforms.Concatenate("Features", HousingRegression.Features) - .Append(mlContext.Regression.Trainers.Sdca()); + .Append(mlContext.Regression.Trainers.FastTree()); // Fit the pipeline var model = pipeline.Fit(data); IDataView transformedData; - RegressionPredictionTransformer linearPredictor; + RegressionPredictionTransformer linearPredictor; if(saveModel) { @@ -57,7 +57,7 @@ public void GlobalFeatureImportanceWithPermutationFeatureImportance(bool saveMod transformedData = loadedModel.Transform(data); // Extract linear predictor - linearPredictor = (loadedModel as TransformerChain).LastTransformer as RegressionPredictionTransformer; + linearPredictor = (loadedModel as TransformerChain).LastTransformer as RegressionPredictionTransformer; } else { diff --git a/test/Microsoft.ML.Functional.Tests/FunctionalTestBaseClass.cs b/test/Microsoft.ML.IntegrationTests/IntegrationTestBaseClass.cs similarity index 88% rename from test/Microsoft.ML.Functional.Tests/FunctionalTestBaseClass.cs rename to test/Microsoft.ML.IntegrationTests/IntegrationTestBaseClass.cs index 092040ca88..1674679214 100644 --- a/test/Microsoft.ML.Functional.Tests/FunctionalTestBaseClass.cs +++ b/test/Microsoft.ML.IntegrationTests/IntegrationTestBaseClass.cs @@ -12,11 +12,11 @@ using Microsoft.ML.TestFrameworkCommon.Attributes; using Xunit.Abstractions; -namespace Microsoft.ML.Functional.Tests +namespace Microsoft.ML.IntegrationTests { - public class FunctionalTestBaseClass : IDisposable + public class IntegrationTestBaseClass : IDisposable { - static FunctionalTestBaseClass() + static IntegrationTestBaseClass() { RootDir = TestCommon.GetRepoRoot(); DataDir = Path.Combine(RootDir, "test", "data"); @@ -31,7 +31,7 @@ static FunctionalTestBaseClass() protected static string DataDir { get; } protected ITestOutputHelper Output { get; } - public FunctionalTestBaseClass(ITestOutputHelper output) + public IntegrationTestBaseClass(ITestOutputHelper output) { //This locale is currently set for tests only so that the produced output //files can be compared on systems with other locales to give set of known @@ -39,12 +39,12 @@ public FunctionalTestBaseClass(ITestOutputHelper output) Thread.CurrentThread.CurrentCulture = new CultureInfo("en-US"); #if NETFRAMEWORK - string codeBaseUri = typeof(FunctionalTestBaseClass).Assembly.CodeBase; + string codeBaseUri = typeof(IntegrationTestBaseClass).Assembly.CodeBase; string path = new Uri(codeBaseUri).AbsolutePath; var currentAssemblyLocation = new FileInfo(Directory.GetParent(path).FullName); #else // There is an extra folder in the netfx path representing the runtime identifier. - var currentAssemblyLocation = new FileInfo(typeof(FunctionalTestBaseClass).Assembly.Location); + var currentAssemblyLocation = new FileInfo(typeof(IntegrationTestBaseClass).Assembly.Location); #endif OutDir = Path.Combine(currentAssemblyLocation.Directory.FullName, "TestOutput"); Directory.CreateDirectory(OutDir); diff --git a/test/Microsoft.ML.Functional.Tests/IntrospectiveTraining.cs b/test/Microsoft.ML.IntegrationTests/IntrospectiveTraining.cs similarity index 99% rename from test/Microsoft.ML.Functional.Tests/IntrospectiveTraining.cs rename to test/Microsoft.ML.IntegrationTests/IntrospectiveTraining.cs index eb4361f953..77eebc24fa 100644 --- a/test/Microsoft.ML.Functional.Tests/IntrospectiveTraining.cs +++ b/test/Microsoft.ML.IntegrationTests/IntrospectiveTraining.cs @@ -7,7 +7,7 @@ using System.Collections.Immutable; using System.Linq; using Microsoft.ML.Data; -using Microsoft.ML.Functional.Tests.Datasets; +using Microsoft.ML.IntegrationTests.Datasets; using Microsoft.ML.TestFrameworkCommon; using Microsoft.ML.Trainers; using Microsoft.ML.Trainers.FastTree; @@ -15,9 +15,9 @@ using Xunit; using Xunit.Abstractions; -namespace Microsoft.ML.Functional.Tests +namespace Microsoft.ML.IntegrationTests { - public class IntrospectiveTraining : FunctionalTestBaseClass + public class IntrospectiveTraining : IntegrationTestBaseClass { public IntrospectiveTraining(ITestOutputHelper output) : base(output) { diff --git a/test/Microsoft.ML.Functional.Tests/Microsoft.ML.Functional.Tests.csproj b/test/Microsoft.ML.IntegrationTests/Microsoft.ML.IntegrationTests.csproj similarity index 91% rename from test/Microsoft.ML.Functional.Tests/Microsoft.ML.Functional.Tests.csproj rename to test/Microsoft.ML.IntegrationTests/Microsoft.ML.IntegrationTests.csproj index 624384d9b5..d925c75212 100644 --- a/test/Microsoft.ML.Functional.Tests/Microsoft.ML.Functional.Tests.csproj +++ b/test/Microsoft.ML.IntegrationTests/Microsoft.ML.IntegrationTests.csproj @@ -6,6 +6,10 @@ false Project + + false + true + @@ -25,6 +29,8 @@ + + diff --git a/test/Microsoft.ML.Functional.Tests/ModelFiles.cs b/test/Microsoft.ML.IntegrationTests/ModelFiles.cs similarity index 98% rename from test/Microsoft.ML.Functional.Tests/ModelFiles.cs rename to test/Microsoft.ML.IntegrationTests/ModelFiles.cs index 64c86a08cd..26102de5f9 100644 --- a/test/Microsoft.ML.Functional.Tests/ModelFiles.cs +++ b/test/Microsoft.ML.IntegrationTests/ModelFiles.cs @@ -9,16 +9,16 @@ using System.Text.RegularExpressions; using Microsoft.ML.Calibrators; using Microsoft.ML.Data; -using Microsoft.ML.Functional.Tests.Datasets; +using Microsoft.ML.IntegrationTests.Datasets; using Microsoft.ML.TestFrameworkCommon; using Microsoft.ML.Trainers.FastTree; using Microsoft.ML.Transforms; using Xunit; using Xunit.Abstractions; -namespace Microsoft.ML.Functional.Tests +namespace Microsoft.ML.IntegrationTests { - public partial class ModelFiles : FunctionalTestBaseClass + public partial class ModelFiles : IntegrationTestBaseClass { public ModelFiles(ITestOutputHelper output) : base(output) { @@ -68,7 +68,7 @@ public void DetermineNugetVersionFromModel() { // The only line in the file is the version of the model. var line = reader.ReadLine(); - Assert.Matches(new Regex(@"(\d+).(\d+)\.(\d+)\.(\d+) \@BuiltBy:(.)* \@SrcCode:(.)*"), line); + Assert.Matches(new Regex(@"(\d+)\.(\d+)\.(\d+)(-[dev|ci|preview\.(\d+)\.(\d+)\.(\d+)]){0,1}"), line); } } } @@ -79,8 +79,8 @@ public void DetermineNugetVersionFromModel() /// /// Serves two scenarios: /// 1. I can train a model and save it to a file, including transforms. - /// 2. Training and prediction happen in different processes (or even different machines). - /// The actual test will not run in different processes, but will simulate the idea that the + /// 2. Training and prediction happen in different processes (or even different machines). + /// The actual test will not run in different processes, but will simulate the idea that the /// "communication pipe" is just a serialized model of some form. /// [Fact] @@ -110,7 +110,7 @@ public void FitPipelineSaveModelAndPredict() serializedModel = mlContext.Model.Load(file, out var serializedSchema); TestCommon.CheckSameSchemas(data.Schema, serializedSchema); } - + // Create prediction engine and test predictions. var originalPredictionEngine = mlContext.Model.CreatePredictionEngine(model); var serializedPredictionEngine = mlContext.Model.CreatePredictionEngine(serializedModel); @@ -395,7 +395,7 @@ public void SaveCompositeLoaderAndLoad() out var loadedWithLoader, out var loadedLoaderWithTransformer); // Because we saved the transform model as part of the composite loader, with no transforms, // the transform that should be loaded should be an empty transformer chain, since the "model," - // such as it is, has been combined with the loader. + // such as it is, has been combined with the loader. Assert.Empty(Assert.IsType>(loadedWithSchema)); Assert.Empty(Assert.IsType>(loadedWithLoader)); diff --git a/test/Microsoft.ML.Functional.Tests/ONNX.cs b/test/Microsoft.ML.IntegrationTests/ONNX.cs similarity index 98% rename from test/Microsoft.ML.Functional.Tests/ONNX.cs rename to test/Microsoft.ML.IntegrationTests/ONNX.cs index 28e5993424..e6a317081c 100644 --- a/test/Microsoft.ML.Functional.Tests/ONNX.cs +++ b/test/Microsoft.ML.IntegrationTests/ONNX.cs @@ -4,7 +4,7 @@ using System.IO; using Microsoft.ML.Data; -using Microsoft.ML.Functional.Tests.Datasets; +using Microsoft.ML.IntegrationTests.Datasets; using Microsoft.ML.TestFrameworkCommon; using Microsoft.ML.TestFrameworkCommon.Attributes; using Microsoft.ML.Trainers; @@ -12,9 +12,9 @@ using Xunit; using Xunit.Abstractions; -namespace Microsoft.ML.Functional.Tests +namespace Microsoft.ML.IntegrationTests { - public class ONNX : FunctionalTestBaseClass + public class ONNX : IntegrationTestBaseClass { // These two members are meant to be changed // Only when manually testing the Onnx GPU nuggets diff --git a/test/Microsoft.ML.Functional.Tests/Prediction.cs b/test/Microsoft.ML.IntegrationTests/Prediction.cs similarity index 96% rename from test/Microsoft.ML.Functional.Tests/Prediction.cs rename to test/Microsoft.ML.IntegrationTests/Prediction.cs index 657cb20fcb..40df4c104b 100644 --- a/test/Microsoft.ML.Functional.Tests/Prediction.cs +++ b/test/Microsoft.ML.IntegrationTests/Prediction.cs @@ -6,15 +6,15 @@ using System.Collections.Generic; using Microsoft.ML.Calibrators; using Microsoft.ML.Data; -using Microsoft.ML.Functional.Tests.Datasets; +using Microsoft.ML.IntegrationTests.Datasets; using Microsoft.ML.TestFrameworkCommon; using Microsoft.ML.Trainers; using Xunit; using Xunit.Abstractions; -namespace Microsoft.ML.Functional.Tests +namespace Microsoft.ML.IntegrationTests { - public class PredictionScenarios : FunctionalTestBaseClass + public class PredictionScenarios : IntegrationTestBaseClass { public PredictionScenarios(ITestOutputHelper output) : base(output) { diff --git a/test/Microsoft.ML.Functional.Tests/SchemaDefinitionTests.cs b/test/Microsoft.ML.IntegrationTests/SchemaDefinitionTests.cs similarity index 98% rename from test/Microsoft.ML.Functional.Tests/SchemaDefinitionTests.cs rename to test/Microsoft.ML.IntegrationTests/SchemaDefinitionTests.cs index c6c588857d..9a066eae6a 100644 --- a/test/Microsoft.ML.Functional.Tests/SchemaDefinitionTests.cs +++ b/test/Microsoft.ML.IntegrationTests/SchemaDefinitionTests.cs @@ -9,9 +9,9 @@ using Xunit; using Xunit.Abstractions; -namespace Microsoft.ML.Functional.Tests +namespace Microsoft.ML.IntegrationTests { - public class SchemaDefinitionTests : FunctionalTestBaseClass + public class SchemaDefinitionTests : IntegrationTestBaseClass { private MLContext _ml; diff --git a/test/Microsoft.ML.Functional.Tests/Training.cs b/test/Microsoft.ML.IntegrationTests/Training.cs similarity index 99% rename from test/Microsoft.ML.Functional.Tests/Training.cs rename to test/Microsoft.ML.IntegrationTests/Training.cs index 26b268d2d6..582d1cd1a7 100644 --- a/test/Microsoft.ML.Functional.Tests/Training.cs +++ b/test/Microsoft.ML.IntegrationTests/Training.cs @@ -4,16 +4,16 @@ using System.Linq; using Microsoft.ML.Data; -using Microsoft.ML.Functional.Tests.Datasets; +using Microsoft.ML.IntegrationTests.Datasets; using Microsoft.ML.TestFrameworkCommon; using Microsoft.ML.Trainers; using Microsoft.ML.Trainers.FastTree; using Xunit; using Xunit.Abstractions; -namespace Microsoft.ML.Functional.Tests +namespace Microsoft.ML.IntegrationTests { - public class Training : FunctionalTestBaseClass + public class Training : IntegrationTestBaseClass { public Training(ITestOutputHelper output) : base(output) { diff --git a/test/Microsoft.ML.Functional.Tests/Validation.cs b/test/Microsoft.ML.IntegrationTests/Validation.cs similarity index 98% rename from test/Microsoft.ML.Functional.Tests/Validation.cs rename to test/Microsoft.ML.IntegrationTests/Validation.cs index 50ed4a1698..78f82cf17f 100644 --- a/test/Microsoft.ML.Functional.Tests/Validation.cs +++ b/test/Microsoft.ML.IntegrationTests/Validation.cs @@ -5,7 +5,7 @@ using System; using System.Linq; using Microsoft.ML.Data; -using Microsoft.ML.Functional.Tests.Datasets; +using Microsoft.ML.IntegrationTests.Datasets; using Microsoft.ML.TestFrameworkCommon; using Microsoft.ML.Trainers; using Microsoft.ML.Trainers.FastTree; @@ -13,9 +13,9 @@ using Xunit; using Xunit.Abstractions; -namespace Microsoft.ML.Functional.Tests +namespace Microsoft.ML.IntegrationTests { - public class Validation : FunctionalTestBaseClass + public class Validation : IntegrationTestBaseClass { public Validation(ITestOutputHelper output) : base(output) { diff --git a/test/Microsoft.ML.Functional.Tests/xunit.runner.json b/test/Microsoft.ML.IntegrationTests/xunit.runner.json similarity index 100% rename from test/Microsoft.ML.Functional.Tests/xunit.runner.json rename to test/Microsoft.ML.IntegrationTests/xunit.runner.json diff --git a/test/Microsoft.ML.NightlyBuild.Tests/Microsoft.ML.NightlyBuild.Tests.csproj b/test/Microsoft.ML.NightlyBuild.Tests/Microsoft.ML.NightlyBuild.Tests.csproj index b211da7378..4e8f8106ab 100644 --- a/test/Microsoft.ML.NightlyBuild.Tests/Microsoft.ML.NightlyBuild.Tests.csproj +++ b/test/Microsoft.ML.NightlyBuild.Tests/Microsoft.ML.NightlyBuild.Tests.csproj @@ -1,4 +1,4 @@ - + @@ -11,7 +11,7 @@ - + diff --git a/test/Microsoft.ML.OnnxTransformerTest/Microsoft.ML.OnnxTransformerTest.csproj b/test/Microsoft.ML.OnnxTransformerTest/Microsoft.ML.OnnxTransformerTest.csproj index 4dcc9cdfc9..dd5706eafa 100644 --- a/test/Microsoft.ML.OnnxTransformerTest/Microsoft.ML.OnnxTransformerTest.csproj +++ b/test/Microsoft.ML.OnnxTransformerTest/Microsoft.ML.OnnxTransformerTest.csproj @@ -1,4 +1,8 @@  + + true + true + @@ -14,14 +18,14 @@ - + DnnImageModels\ResNetPrepOnnx\ResNetPreprocess.onnx PreserveNewest - + DnnImageModels\ResNet18Onnx\ResNet18.onnx PreserveNewest diff --git a/test/Microsoft.ML.Benchmarks/BenchmarkBase.cs b/test/Microsoft.ML.PerformanceTests/BenchmarkBase.cs similarity index 99% rename from test/Microsoft.ML.Benchmarks/BenchmarkBase.cs rename to test/Microsoft.ML.PerformanceTests/BenchmarkBase.cs index 4632ca5ed6..a648ca303a 100644 --- a/test/Microsoft.ML.Benchmarks/BenchmarkBase.cs +++ b/test/Microsoft.ML.PerformanceTests/BenchmarkBase.cs @@ -8,7 +8,7 @@ using Microsoft.ML.Runtime; using Microsoft.ML.TestFrameworkCommon; -namespace Microsoft.ML.Benchmarks +namespace Microsoft.ML.PerformanceTests { public class BenchmarkBase { diff --git a/test/Microsoft.ML.Benchmarks/CacheDataViewBench.cs b/test/Microsoft.ML.PerformanceTests/CacheDataViewBench.cs similarity index 97% rename from test/Microsoft.ML.Benchmarks/CacheDataViewBench.cs rename to test/Microsoft.ML.PerformanceTests/CacheDataViewBench.cs index bc9a56cfeb..15b2ab6ea6 100644 --- a/test/Microsoft.ML.Benchmarks/CacheDataViewBench.cs +++ b/test/Microsoft.ML.PerformanceTests/CacheDataViewBench.cs @@ -4,10 +4,10 @@ using System; using BenchmarkDotNet.Attributes; -using Microsoft.ML.Benchmarks.Harness; +using Microsoft.ML.PerformanceTests.Harness; using Microsoft.ML.Data; -namespace Microsoft.ML.Benchmarks +namespace Microsoft.ML.PerformanceTests { [CIBenchmark] public class CacheDataViewBench : BenchmarkBase diff --git a/test/Microsoft.ML.Benchmarks/FeaturizeTextBench.cs b/test/Microsoft.ML.PerformanceTests/FeaturizeTextBench.cs similarity index 99% rename from test/Microsoft.ML.Benchmarks/FeaturizeTextBench.cs rename to test/Microsoft.ML.PerformanceTests/FeaturizeTextBench.cs index 46496c5100..fdb7475a8c 100644 --- a/test/Microsoft.ML.Benchmarks/FeaturizeTextBench.cs +++ b/test/Microsoft.ML.PerformanceTests/FeaturizeTextBench.cs @@ -11,7 +11,7 @@ using Microsoft.ML.Transforms.Text; using Xunit; -namespace Microsoft.ML.Benchmarks +namespace Microsoft.ML.PerformanceTests { [Config(typeof(TrainConfig))] public class FeaturizeTextBench : BenchmarkBase diff --git a/test/Microsoft.ML.Benchmarks/Harness/Configs.cs b/test/Microsoft.ML.PerformanceTests/Harness/Configs.cs similarity index 82% rename from test/Microsoft.ML.Benchmarks/Harness/Configs.cs rename to test/Microsoft.ML.PerformanceTests/Harness/Configs.cs index 037df6eefd..2893956bef 100644 --- a/test/Microsoft.ML.Benchmarks/Harness/Configs.cs +++ b/test/Microsoft.ML.PerformanceTests/Harness/Configs.cs @@ -9,9 +9,9 @@ using BenchmarkDotNet.Toolchains; using BenchmarkDotNet.Toolchains.CsProj; using BenchmarkDotNet.Toolchains.DotNetCli; -using Microsoft.ML.Benchmarks.Harness; +using Microsoft.ML.PerformanceTests.Harness; -namespace Microsoft.ML.Benchmarks +namespace Microsoft.ML.PerformanceTests { public class RecommendedConfig : ManualConfig { @@ -39,14 +39,19 @@ protected virtual Job GetJobDefinition() /// private IToolchain CreateToolchain() { + TimeSpan timeout = TimeSpan.FromMinutes(5); + #if NETFRAMEWORK var tfm = "net461"; - var csProj = CsProjClassicNetToolchain.Net461; + var csProj = CsProjClassicNetToolchain.From(tfm, timeout: timeout); #else - var tfm = AppDomain.CurrentDomain.GetData("FX_PRODUCT_VERSION") == null ? - NetCoreAppSettings.NetCoreApp21.TargetFrameworkMoniker : NetCoreAppSettings.NetCoreApp31.TargetFrameworkMoniker; - var csProj = AppDomain.CurrentDomain.GetData("FX_PRODUCT_VERSION") == null ? - CsProjCoreToolchain.NetCoreApp21 : CsProjCoreToolchain.NetCoreApp31; + var settings = AppDomain.CurrentDomain.GetData("FX_PRODUCT_VERSION") == null + ? NetCoreAppSettings.NetCoreApp21 : NetCoreAppSettings.NetCoreApp31; + + settings = settings.WithTimeout(timeout); + + var tfm = settings.TargetFrameworkMoniker; + var csProj = CsProjCoreToolchain.From(settings); #endif return new Toolchain( tfm, diff --git a/test/Microsoft.ML.Benchmarks/Harness/Metrics.cs b/test/Microsoft.ML.PerformanceTests/Harness/Metrics.cs similarity index 98% rename from test/Microsoft.ML.Benchmarks/Harness/Metrics.cs rename to test/Microsoft.ML.PerformanceTests/Harness/Metrics.cs index 5a2da65ec6..1d42b04495 100644 --- a/test/Microsoft.ML.Benchmarks/Harness/Metrics.cs +++ b/test/Microsoft.ML.PerformanceTests/Harness/Metrics.cs @@ -11,7 +11,7 @@ using BenchmarkDotNet.Reports; using BenchmarkDotNet.Running; -namespace Microsoft.ML.Benchmarks +namespace Microsoft.ML.PerformanceTests { public abstract class WithExtraMetrics : BenchmarkBase { diff --git a/test/Microsoft.ML.Benchmarks/Harness/ProjectGenerator.cs b/test/Microsoft.ML.PerformanceTests/Harness/ProjectGenerator.cs similarity index 98% rename from test/Microsoft.ML.Benchmarks/Harness/ProjectGenerator.cs rename to test/Microsoft.ML.PerformanceTests/Harness/ProjectGenerator.cs index 7600f1a7ea..f5a0b96769 100644 --- a/test/Microsoft.ML.Benchmarks/Harness/ProjectGenerator.cs +++ b/test/Microsoft.ML.PerformanceTests/Harness/ProjectGenerator.cs @@ -10,7 +10,7 @@ using BenchmarkDotNet.Toolchains; using BenchmarkDotNet.Toolchains.CsProj; -namespace Microsoft.ML.Benchmarks.Harness +namespace Microsoft.ML.PerformanceTests.Harness { /// /// to avoid side effects of benchmarks affect each other BenchmarkDotNet runs every benchmark in a standalone, dedicated process diff --git a/test/Microsoft.ML.Benchmarks/HashBench.cs b/test/Microsoft.ML.PerformanceTests/HashBench.cs similarity index 99% rename from test/Microsoft.ML.Benchmarks/HashBench.cs rename to test/Microsoft.ML.PerformanceTests/HashBench.cs index a6d62166b9..afb00dc511 100644 --- a/test/Microsoft.ML.Benchmarks/HashBench.cs +++ b/test/Microsoft.ML.PerformanceTests/HashBench.cs @@ -5,12 +5,12 @@ using System; using System.Linq; using BenchmarkDotNet.Attributes; -using Microsoft.ML.Benchmarks.Harness; +using Microsoft.ML.PerformanceTests.Harness; using Microsoft.ML.Data; using Microsoft.ML.Runtime; using Microsoft.ML.Transforms; -namespace Microsoft.ML.Benchmarks +namespace Microsoft.ML.PerformanceTests { [CIBenchmark] public class HashBench : BenchmarkBase diff --git a/test/Microsoft.ML.Benchmarks/Helpers/CIBenchmark.cs b/test/Microsoft.ML.PerformanceTests/Helpers/CIBenchmark.cs similarity index 91% rename from test/Microsoft.ML.Benchmarks/Helpers/CIBenchmark.cs rename to test/Microsoft.ML.PerformanceTests/Helpers/CIBenchmark.cs index 6de9ecb88a..dba140c455 100644 --- a/test/Microsoft.ML.Benchmarks/Helpers/CIBenchmark.cs +++ b/test/Microsoft.ML.PerformanceTests/Helpers/CIBenchmark.cs @@ -3,7 +3,7 @@ // See the LICENSE file in the project root for more information. using System; -namespace Microsoft.ML.Benchmarks.Harness +namespace Microsoft.ML.PerformanceTests.Harness { /// /// This attribute is used to identify the benchmarks diff --git a/test/Microsoft.ML.Benchmarks/Helpers/EmptyWriter.cs b/test/Microsoft.ML.PerformanceTests/Helpers/EmptyWriter.cs similarity index 93% rename from test/Microsoft.ML.Benchmarks/Helpers/EmptyWriter.cs rename to test/Microsoft.ML.PerformanceTests/Helpers/EmptyWriter.cs index a54c8f54df..9298f4261b 100644 --- a/test/Microsoft.ML.Benchmarks/Helpers/EmptyWriter.cs +++ b/test/Microsoft.ML.PerformanceTests/Helpers/EmptyWriter.cs @@ -5,7 +5,7 @@ using System.IO; using System.Text; -namespace Microsoft.ML.Benchmarks +namespace Microsoft.ML.PerformanceTests { // Adding this class to not print anything to the console. // This is required for the current version of BenchmarkDotNet diff --git a/test/Microsoft.ML.Benchmarks/Helpers/EnvironmentFactory.cs b/test/Microsoft.ML.PerformanceTests/Helpers/EnvironmentFactory.cs similarity index 98% rename from test/Microsoft.ML.Benchmarks/Helpers/EnvironmentFactory.cs rename to test/Microsoft.ML.PerformanceTests/Helpers/EnvironmentFactory.cs index d691c70ef9..e7e430a61c 100644 --- a/test/Microsoft.ML.Benchmarks/Helpers/EnvironmentFactory.cs +++ b/test/Microsoft.ML.PerformanceTests/Helpers/EnvironmentFactory.cs @@ -7,7 +7,7 @@ using Microsoft.ML.Trainers; using Microsoft.ML.Transforms; -namespace Microsoft.ML.Benchmarks +namespace Microsoft.ML.PerformanceTests { internal static class EnvironmentFactory { diff --git a/test/Microsoft.ML.Benchmarks/Helpers/Errors.cs b/test/Microsoft.ML.PerformanceTests/Helpers/Errors.cs similarity index 91% rename from test/Microsoft.ML.Benchmarks/Helpers/Errors.cs rename to test/Microsoft.ML.PerformanceTests/Helpers/Errors.cs index 344cbbccb7..94ede8d60a 100644 --- a/test/Microsoft.ML.Benchmarks/Helpers/Errors.cs +++ b/test/Microsoft.ML.PerformanceTests/Helpers/Errors.cs @@ -2,7 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -namespace Microsoft.ML.Benchmarks +namespace Microsoft.ML.PerformanceTests { internal class Errors { diff --git a/test/Microsoft.ML.Benchmarks/Helpers/ExecuteMaml.cs b/test/Microsoft.ML.PerformanceTests/Helpers/ExecuteMaml.cs similarity index 93% rename from test/Microsoft.ML.Benchmarks/Helpers/ExecuteMaml.cs rename to test/Microsoft.ML.PerformanceTests/Helpers/ExecuteMaml.cs index be81171210..e3f075ee61 100644 --- a/test/Microsoft.ML.Benchmarks/Helpers/ExecuteMaml.cs +++ b/test/Microsoft.ML.PerformanceTests/Helpers/ExecuteMaml.cs @@ -4,7 +4,7 @@ using System; using Microsoft.ML.Tools; -namespace Microsoft.ML.Benchmarks +namespace Microsoft.ML.PerformanceTests { internal static class ExecuteMaml { diff --git a/test/Microsoft.ML.Benchmarks/ImageClassificationBench.cs b/test/Microsoft.ML.PerformanceTests/ImageClassificationBench.cs similarity index 99% rename from test/Microsoft.ML.Benchmarks/ImageClassificationBench.cs rename to test/Microsoft.ML.PerformanceTests/ImageClassificationBench.cs index fd7fe0ea44..2b4f267b69 100644 --- a/test/Microsoft.ML.Benchmarks/ImageClassificationBench.cs +++ b/test/Microsoft.ML.PerformanceTests/ImageClassificationBench.cs @@ -15,7 +15,7 @@ using System.Net.Http; using Microsoft.ML.Vision; -namespace Microsoft.ML.Benchmarks +namespace Microsoft.ML.PerformanceTests { [Config(typeof(TrainConfig))] public class ImageClassificationBench : BenchmarkBase diff --git a/test/Microsoft.ML.Benchmarks/KMeansAndLogisticRegressionBench.cs b/test/Microsoft.ML.PerformanceTests/KMeansAndLogisticRegressionBench.cs similarity index 96% rename from test/Microsoft.ML.Benchmarks/KMeansAndLogisticRegressionBench.cs rename to test/Microsoft.ML.PerformanceTests/KMeansAndLogisticRegressionBench.cs index 7157963c24..82c0da7022 100644 --- a/test/Microsoft.ML.Benchmarks/KMeansAndLogisticRegressionBench.cs +++ b/test/Microsoft.ML.PerformanceTests/KMeansAndLogisticRegressionBench.cs @@ -3,12 +3,12 @@ // See the LICENSE file in the project root for more information. using BenchmarkDotNet.Attributes; -using Microsoft.ML.Benchmarks.Harness; +using Microsoft.ML.PerformanceTests.Harness; using Microsoft.ML.Calibrators; using Microsoft.ML.Data; using Microsoft.ML.Trainers; -namespace Microsoft.ML.Benchmarks +namespace Microsoft.ML.PerformanceTests { [CIBenchmark] public class KMeansAndLogisticRegressionBench : BenchmarkBase diff --git a/test/Microsoft.ML.Benchmarks/Microsoft.ML.Benchmarks.csproj b/test/Microsoft.ML.PerformanceTests/Microsoft.ML.PerformanceTests.csproj similarity index 94% rename from test/Microsoft.ML.Benchmarks/Microsoft.ML.Benchmarks.csproj rename to test/Microsoft.ML.PerformanceTests/Microsoft.ML.PerformanceTests.csproj index af434d9820..c295cb68c9 100644 --- a/test/Microsoft.ML.Benchmarks/Microsoft.ML.Benchmarks.csproj +++ b/test/Microsoft.ML.PerformanceTests/Microsoft.ML.PerformanceTests.csproj @@ -2,6 +2,8 @@ Exe false + false + true diff --git a/test/Microsoft.ML.Benchmarks/Numeric/Ranking.cs b/test/Microsoft.ML.PerformanceTests/Numeric/Ranking.cs similarity index 99% rename from test/Microsoft.ML.Benchmarks/Numeric/Ranking.cs rename to test/Microsoft.ML.PerformanceTests/Numeric/Ranking.cs index c737c95b5d..78504fe752 100644 --- a/test/Microsoft.ML.Benchmarks/Numeric/Ranking.cs +++ b/test/Microsoft.ML.PerformanceTests/Numeric/Ranking.cs @@ -11,7 +11,7 @@ using Microsoft.ML.Transforms; using Microsoft.ML.TestFrameworkCommon; -namespace Microsoft.ML.Benchmarks +namespace Microsoft.ML.PerformanceTests { [Config(typeof(TrainConfig))] public class RankingTrain : BenchmarkBase diff --git a/test/Microsoft.ML.Benchmarks/PredictionEngineBench.cs b/test/Microsoft.ML.PerformanceTests/PredictionEngineBench.cs similarity index 98% rename from test/Microsoft.ML.Benchmarks/PredictionEngineBench.cs rename to test/Microsoft.ML.PerformanceTests/PredictionEngineBench.cs index 9255f14c52..0e2f2823f3 100644 --- a/test/Microsoft.ML.Benchmarks/PredictionEngineBench.cs +++ b/test/Microsoft.ML.PerformanceTests/PredictionEngineBench.cs @@ -3,12 +3,12 @@ // See the LICENSE file in the project root for more information. using BenchmarkDotNet.Attributes; -using Microsoft.ML.Benchmarks.Harness; +using Microsoft.ML.PerformanceTests.Harness; using Microsoft.ML.Data; using Microsoft.ML.Trainers; using Microsoft.ML.Transforms; -namespace Microsoft.ML.Benchmarks +namespace Microsoft.ML.PerformanceTests { [CIBenchmark] public class PredictionEngineBench : BenchmarkBase diff --git a/test/Microsoft.ML.PerformanceTests/Program.cs b/test/Microsoft.ML.PerformanceTests/Program.cs new file mode 100644 index 0000000000..a5f2824815 --- /dev/null +++ b/test/Microsoft.ML.PerformanceTests/Program.cs @@ -0,0 +1,53 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System; +using System.Globalization; +using System.Threading; +using BenchmarkDotNet.Running; + +namespace Microsoft.ML.PerformanceTests +{ + class Program + { + /// + /// execute dotnet run -c Release and choose the benchmarks you want to run + /// + /// + static void Main(string[] args) + { + // enforce Neutral Language as "en-us" because the input data files use dot as decimal separator (and it fails for cultures with ",") + Thread.CurrentThread.CurrentCulture = CultureInfo.InvariantCulture; + + /* + Available Benchmarks: + #0 TextPredictionEngineCreationBenchmark + #1 CacheDataViewBench + #2 FeaturizeTextBench + #3 HashBench + #4 ImageClassificationBench + #5 KMeansAndLogisticRegressionBench + #6 MulticlassClassificationTest + #7 MulticlassClassificationTrain + #8 PredictionEngineBench + #9 RankingTest + #10 RankingTrain + #11 RffTransformTrain + #12 ShuffleRowsBench + #13 StochasticDualCoordinateAscentClassifierBench + #14 TextLoaderBench + */ + + // TO-DO: Further investigate how to run each benchmark separately. + // Arcade's `-performanceTest` command results in a predefined dotnet call that does not allow for additional arguments + // to be passed (say, for selecting individual benchmarks to run). + // Link to code: + // https://github.com/dotnet/arcade/blob/4873d157a8f34f8cc7e28b3f9938b32c642ef542/src/Microsoft.DotNet.Arcade.Sdk/tools/Performance.targets#L16-L19 + BenchmarkSwitcher + .FromAssembly(typeof(Program).Assembly) + .RunAll(new RecommendedConfig()); + + } + } +} diff --git a/test/Microsoft.ML.Benchmarks/README.md b/test/Microsoft.ML.PerformanceTests/README.md similarity index 63% rename from test/Microsoft.ML.Benchmarks/README.md rename to test/Microsoft.ML.PerformanceTests/README.md index 368c00030e..57807b6442 100644 --- a/test/Microsoft.ML.Benchmarks/README.md +++ b/test/Microsoft.ML.PerformanceTests/README.md @@ -1,4 +1,4 @@ -# ML.NET Benchmarks +# ML.NET Benchmarks/Performance Tests This project contains performance benchmarks. @@ -8,46 +8,19 @@ This project contains performance benchmarks. git submodule update --init -**Pre-requisite:** On a clean repo with initialized submodules, `build.cmd` at the root installs the right version of dotnet.exe and builds the solution. You need to build the solution in `Release` with native dependencies. +**Pre-requisite:** On a clean repo with initialized submodules, `build.cmd` at the root installs the right version of dotnet.exe and builds the solution. You need to build the solution in `Release`. - build.cmd -release -buildNative - -Moreover, to run some of the benchmarks you have to download external dependencies. + build.cmd -configuration Release - build.cmd -- /t:DownloadExternalTestFiles /p:IncludeBenchmarkData=true +1. Navigate to the performance tests directory (machinelearning\test\Microsoft.ML.PerformanceTests) -1. Navigate to the benchmarks directory (machinelearning\test\Microsoft.ML.Benchmarks) - -2. Run the benchmarks in Release, choose one of the benchmarks when prompted - -```log - dotnet run -c Release -``` - -3. To run specific tests only, pass in the filter to the harness: - -```log - dotnet run -c Release -- --filter namespace* - dotnet run -c Release -- --filter *typeName* - dotnet run -c Release -- --filter *.methodName - dotnet run -c Release -- --filter namespace.typeName.methodName -``` - -4. GC Statistics - -To get the total number of allocated managed memory please pass additional console argument: `--memory` or just `-m`. This feature is disabled by default because it requires an additional iteration (which is expensive for time consuming benchmarks). - -| Gen 0 | Gen 1 | Gen 2 | Allocated | -|------------:|-----------:|----------:|----------:| -| 175000.0000 | 33000.0000 | 7000.0000 | 238.26 MB | - -5. To find out more about supported command line arguments run +2. Run the benchmarks in Release: ```log - dotnet run -c Release -- --help + build.cmd -configuration Release -performanceTest ``` -## .NET Core 3.0 +## .NET Core 3.1 **Pre-requisite:** Follow the [netcoreapp3.1 instructions](../../docs/building/netcoreapp3.1-instructions.md). @@ -55,12 +28,12 @@ To get the total number of allocated managed memory please pass additional conso $env:DOTNET_MULTILEVEL_LOOKUP=0 -1. Navigate to the benchmarks directory (machinelearning\test\Microsoft.ML.Benchmarks) +1. Navigate to the benchmarks directory (machinelearning\test\Microsoft.ML.PerformanceTests) -2. Run the benchmarks in `Release-netcoreapp3_1` configuration, choose one of the benchmarks when prompted +2. Run the benchmarks in `Release-netcoreapp3_1` configuration: ```log - ..\..\Tools\dotnetcli\dotnet.exe run -c Release-netcoreapp3_1 + build.cmd -configuration Release-netcoreapp3_1 -performanceTest ``` ## Authoring new benchmarks @@ -91,7 +64,7 @@ you can debug this test locally by: 1- Building the solution in the release mode locally -build.cmd -release -buildNative +build.cmd -configuration Release -performanceTest 2- Changing the configuration in Visual Studio from Debug -> Release 3- Changing the annotation in the `BenchmarksProjectIsNotBroken` to replace `BenchmarkTheory` with `Theory`, as below. diff --git a/test/Microsoft.ML.Benchmarks/RffTransform.cs b/test/Microsoft.ML.PerformanceTests/RffTransform.cs similarity index 96% rename from test/Microsoft.ML.Benchmarks/RffTransform.cs rename to test/Microsoft.ML.PerformanceTests/RffTransform.cs index 659f87c2c4..81f6507b95 100644 --- a/test/Microsoft.ML.Benchmarks/RffTransform.cs +++ b/test/Microsoft.ML.PerformanceTests/RffTransform.cs @@ -4,12 +4,12 @@ using System.IO; using BenchmarkDotNet.Attributes; -using Microsoft.ML.Benchmarks.Harness; +using Microsoft.ML.PerformanceTests.Harness; using Microsoft.ML.Data; using Microsoft.ML.TestFrameworkCommon; using Microsoft.ML.Transforms; -namespace Microsoft.ML.Benchmarks +namespace Microsoft.ML.PerformanceTests { [CIBenchmark] public class RffTransformTrain : BenchmarkBase diff --git a/test/Microsoft.ML.Benchmarks/ShuffleRowsBench.cs b/test/Microsoft.ML.PerformanceTests/ShuffleRowsBench.cs similarity index 94% rename from test/Microsoft.ML.Benchmarks/ShuffleRowsBench.cs rename to test/Microsoft.ML.PerformanceTests/ShuffleRowsBench.cs index 95ff4be7e3..710923bad6 100644 --- a/test/Microsoft.ML.Benchmarks/ShuffleRowsBench.cs +++ b/test/Microsoft.ML.PerformanceTests/ShuffleRowsBench.cs @@ -3,10 +3,10 @@ // See the LICENSE file in the project root for more information. using BenchmarkDotNet.Attributes; -using Microsoft.ML.Benchmarks.Harness; +using Microsoft.ML.PerformanceTests.Harness; using Microsoft.ML.Data; -namespace Microsoft.ML.Benchmarks +namespace Microsoft.ML.PerformanceTests { [CIBenchmark] public class ShuffleRowsBench : BenchmarkBase diff --git a/test/Microsoft.ML.Benchmarks/StochasticDualCoordinateAscentClassifierBench.cs b/test/Microsoft.ML.PerformanceTests/StochasticDualCoordinateAscentClassifierBench.cs similarity index 90% rename from test/Microsoft.ML.Benchmarks/StochasticDualCoordinateAscentClassifierBench.cs rename to test/Microsoft.ML.PerformanceTests/StochasticDualCoordinateAscentClassifierBench.cs index 8aaeb53711..e54df47295 100644 --- a/test/Microsoft.ML.Benchmarks/StochasticDualCoordinateAscentClassifierBench.cs +++ b/test/Microsoft.ML.PerformanceTests/StochasticDualCoordinateAscentClassifierBench.cs @@ -6,13 +6,13 @@ using System.Globalization; using BenchmarkDotNet.Attributes; using BenchmarkDotNet.Engines; -using Microsoft.ML.Benchmarks.Harness; +using Microsoft.ML.PerformanceTests.Harness; using Microsoft.ML.Data; using Microsoft.ML.Trainers; using Microsoft.ML.Transforms; using Microsoft.ML.Transforms.Text; -namespace Microsoft.ML.Benchmarks +namespace Microsoft.ML.PerformanceTests { [CIBenchmark] public class StochasticDualCoordinateAscentClassifierBench : WithExtraMetrics @@ -37,6 +37,8 @@ public class StochasticDualCoordinateAscentClassifierBench : WithExtraMetrics private PredictionEngine _predictionEngine; private IrisData[][] _batches; private MulticlassClassificationMetrics _metrics; + private MulticlassClassificationEvaluator _evaluator; + private IDataView _scoredIrisTestData; protected override IEnumerable GetMetrics() { @@ -118,7 +120,7 @@ public void TrainSentiment() _consumer.Consume(predicted); } - [GlobalSetup(Targets = new string[] { nameof(PredictIris), nameof(PredictIrisBatchOf1), nameof(PredictIrisBatchOf2), nameof(PredictIrisBatchOf5) })] + [GlobalSetup(Targets = new string[] { nameof(PredictIris), nameof(PredictIrisBatchOf1), nameof(PredictIrisBatchOf2), nameof(PredictIrisBatchOf5), nameof(EvaluateMetrics) })] public void SetupPredictBenchmarks() { _trainedModel = Train(_dataPath); @@ -141,9 +143,9 @@ public void SetupPredictBenchmarks() var loader = new TextLoader(_mlContext, options: options); IDataView testData = loader.Load(_dataPath); - IDataView scoredTestData = _trainedModel.Transform(testData); - var evaluator = new MulticlassClassificationEvaluator(_mlContext, new MulticlassClassificationEvaluator.Arguments()); - _metrics = evaluator.Evaluate(scoredTestData, DefaultColumnNames.Label, DefaultColumnNames.Score, DefaultColumnNames.PredictedLabel); + _scoredIrisTestData = _trainedModel.Transform(testData); + _evaluator = new MulticlassClassificationEvaluator(_mlContext, new MulticlassClassificationEvaluator.Arguments()); + _metrics = _evaluator.Evaluate(_scoredIrisTestData, DefaultColumnNames.Label, DefaultColumnNames.Score, DefaultColumnNames.PredictedLabel); _batches = new IrisData[_batchSizes.Length][]; for (int i = 0; i < _batches.Length; i++) @@ -168,6 +170,9 @@ public void SetupPredictBenchmarks() [Benchmark] public void PredictIrisBatchOf5() => _trainedModel.Transform(_mlContext.Data.LoadFromEnumerable(_batches[2])); + + [Benchmark] + public void EvaluateMetrics() => _evaluator.Evaluate(_scoredIrisTestData, DefaultColumnNames.Label, DefaultColumnNames.Score, DefaultColumnNames.PredictedLabel); } public class IrisData diff --git a/test/Microsoft.ML.Benchmarks/Text/MultiClassClassification.cs b/test/Microsoft.ML.PerformanceTests/Text/MultiClassClassification.cs similarity index 99% rename from test/Microsoft.ML.Benchmarks/Text/MultiClassClassification.cs rename to test/Microsoft.ML.PerformanceTests/Text/MultiClassClassification.cs index ade958e2e0..87234138c2 100644 --- a/test/Microsoft.ML.Benchmarks/Text/MultiClassClassification.cs +++ b/test/Microsoft.ML.PerformanceTests/Text/MultiClassClassification.cs @@ -10,7 +10,7 @@ using Microsoft.ML.Transforms; using Microsoft.ML.TestFrameworkCommon; -namespace Microsoft.ML.Benchmarks +namespace Microsoft.ML.PerformanceTests { [Config(typeof(TrainConfig))] public class MulticlassClassificationTrain : BenchmarkBase diff --git a/test/Microsoft.ML.Benchmarks/TextLoaderBench.cs b/test/Microsoft.ML.PerformanceTests/TextLoaderBench.cs similarity index 99% rename from test/Microsoft.ML.Benchmarks/TextLoaderBench.cs rename to test/Microsoft.ML.PerformanceTests/TextLoaderBench.cs index 8f1faf6b76..73abceed60 100644 --- a/test/Microsoft.ML.Benchmarks/TextLoaderBench.cs +++ b/test/Microsoft.ML.PerformanceTests/TextLoaderBench.cs @@ -11,7 +11,7 @@ using Microsoft.ML.Transforms.Text; using Xunit; -namespace Microsoft.ML.Benchmarks +namespace Microsoft.ML.PerformanceTests { [Config(typeof(TrainConfig))] public class TextLoaderBench : BenchmarkBase diff --git a/test/Microsoft.ML.Benchmarks/TextPredictionEngineCreation.cs b/test/Microsoft.ML.PerformanceTests/TextPredictionEngineCreation.cs similarity index 98% rename from test/Microsoft.ML.Benchmarks/TextPredictionEngineCreation.cs rename to test/Microsoft.ML.PerformanceTests/TextPredictionEngineCreation.cs index 81eedd5651..91e1019273 100644 --- a/test/Microsoft.ML.Benchmarks/TextPredictionEngineCreation.cs +++ b/test/Microsoft.ML.PerformanceTests/TextPredictionEngineCreation.cs @@ -5,7 +5,7 @@ using System.IO; using BenchmarkDotNet.Attributes; using Microsoft.ML; -using Microsoft.ML.Benchmarks; +using Microsoft.ML.PerformanceTests; using Microsoft.ML.Trainers; namespace micro diff --git a/test/Microsoft.ML.TestFramework/Attributes/TensorflowFactAttribute.cs b/test/Microsoft.ML.TestFramework/Attributes/TensorflowFactAttribute.cs index f7ae0ecf91..d2376ef3ac 100644 --- a/test/Microsoft.ML.TestFramework/Attributes/TensorflowFactAttribute.cs +++ b/test/Microsoft.ML.TestFramework/Attributes/TensorflowFactAttribute.cs @@ -3,6 +3,7 @@ // See the LICENSE file in the project root for more information. using System; +using System.Runtime.InteropServices; using Microsoft.ML.TestFrameworkCommon.Attributes; namespace Microsoft.ML.TestFramework.Attributes @@ -12,14 +13,17 @@ namespace Microsoft.ML.TestFramework.Attributes /// public sealed class TensorFlowFactAttribute : EnvironmentSpecificFactAttribute { - public TensorFlowFactAttribute() : base("TensorFlow is 64-bit only") + public TensorFlowFactAttribute() : base("TensorFlow is 64-bit only and is not supported on Linux with libc < v2.23") { } /// protected override bool IsEnvironmentSupported() { - return Environment.Is64BitProcess; + return Environment.Is64BitProcess && + ( RuntimeInformation.IsOSPlatform(OSPlatform.Windows) || + AttributeHelpers.CheckLibcVersionGreaterThanMinimum(new Version(2, 23))); + } } } diff --git a/test/Microsoft.ML.TestFramework/Attributes/TensorflowTheoryAttribute.cs b/test/Microsoft.ML.TestFramework/Attributes/TensorflowTheoryAttribute.cs index 24b73a56f5..feed8047d7 100644 --- a/test/Microsoft.ML.TestFramework/Attributes/TensorflowTheoryAttribute.cs +++ b/test/Microsoft.ML.TestFramework/Attributes/TensorflowTheoryAttribute.cs @@ -3,6 +3,9 @@ // See the LICENSE file in the project root for more information. using System; +using System.Runtime.InteropServices; +using Microsoft.ML.TestFrameworkCommon.Attributes; + namespace Microsoft.ML.TestFramework.Attributes { /// @@ -10,14 +13,16 @@ namespace Microsoft.ML.TestFramework.Attributes /// public sealed class TensorFlowTheoryAttribute : EnvironmentSpecificTheoryAttribute { - public TensorFlowTheoryAttribute() : base("TensorFlow is 64-bit only") + public TensorFlowTheoryAttribute() : base("TensorFlow is 64-bit only and is not supported on Linux with libc < v2.23") { } /// protected override bool IsEnvironmentSupported() { - return Environment.Is64BitProcess; + return Environment.Is64BitProcess && + (RuntimeInformation.IsOSPlatform(OSPlatform.Windows) || + AttributeHelpers.CheckLibcVersionGreaterThanMinimum(new Version(2, 23))); } } } \ No newline at end of file diff --git a/test/Microsoft.ML.TestFramework/BaseTestBaseline.cs b/test/Microsoft.ML.TestFramework/BaseTestBaseline.cs index c67b19efa6..5457f3af20 100644 --- a/test/Microsoft.ML.TestFramework/BaseTestBaseline.cs +++ b/test/Microsoft.ML.TestFramework/BaseTestBaseline.cs @@ -674,9 +674,7 @@ private static double Round(double value, int digitsOfPrecision) public void CompareResults(string leftColumnName, string rightColumnName, IDataView left, IDataView right, int precision = 6, bool isRightColumnOnnxScalar = false) { var leftColumn = left.Schema[leftColumnName]; - var rightColumn = right.Schema[rightColumnName]; var leftType = leftColumn.Type.GetItemType(); - var rightType = rightColumn.Type.GetItemType(); if (leftType == NumberDataViewType.SByte) CompareSelectedColumns(leftColumnName, rightColumnName, left, right, isRightColumnOnnxScalar: isRightColumnOnnxScalar); diff --git a/test/Microsoft.ML.TestFramework/BaseTestClass.cs b/test/Microsoft.ML.TestFramework/BaseTestClass.cs index 1397c8daf1..38c7496a3c 100644 --- a/test/Microsoft.ML.TestFramework/BaseTestClass.cs +++ b/test/Microsoft.ML.TestFramework/BaseTestClass.cs @@ -81,7 +81,7 @@ void IDisposable.Dispose() Cleanup(); Process proc = Process.GetCurrentProcess(); Console.WriteLine($"Finished test: {FullTestName} " + - $"with memory usage {proc.PrivateMemorySize64.ToString("N", CultureInfo.InvariantCulture)}"); + $"with memory usage {proc.WorkingSet64.ToString("N", CultureInfo.InvariantCulture)}"); } protected virtual void Initialize() diff --git a/test/Microsoft.ML.TestFramework/Microsoft.ML.TestFramework.csproj b/test/Microsoft.ML.TestFramework/Microsoft.ML.TestFramework.csproj index 557c4a8ec0..d9b057e907 100644 --- a/test/Microsoft.ML.TestFramework/Microsoft.ML.TestFramework.csproj +++ b/test/Microsoft.ML.TestFramework/Microsoft.ML.TestFramework.csproj @@ -1,4 +1,8 @@  + + true + true + @@ -12,10 +16,11 @@ + - + @@ -25,7 +30,7 @@ - + PreserveNewest diff --git a/test/Microsoft.ML.TestFramework/Properties/AssemblyInfo.cs b/test/Microsoft.ML.TestFramework/Properties/AssemblyInfo.cs index 947c9c4dd1..bdeb8111e2 100644 --- a/test/Microsoft.ML.TestFramework/Properties/AssemblyInfo.cs +++ b/test/Microsoft.ML.TestFramework/Properties/AssemblyInfo.cs @@ -4,6 +4,6 @@ using System.Runtime.CompilerServices; using Microsoft.ML; -[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.Predictor.Tests" + PublicKey.TestValue)] -[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.TimeSeries.Tests" + PublicKey.TestValue)] +[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.Predictor.Tests" + PublicKey.Value)] +[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.TimeSeries.Tests" + PublicKey.Value)] [assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.Tests" + PublicKey.TestValue)] diff --git a/test/Microsoft.ML.Tests/EvaluateTests.cs b/test/Microsoft.ML.Tests/EvaluateTests.cs new file mode 100644 index 0000000000..ee5c58016f --- /dev/null +++ b/test/Microsoft.ML.Tests/EvaluateTests.cs @@ -0,0 +1,67 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System.Linq; +using Microsoft.ML.Data; +using Microsoft.ML.TestFramework; +using Xunit; +using Xunit.Abstractions; + +namespace Microsoft.ML.Tests +{ + public class EvaluateTests : BaseTestClass + { + public EvaluateTests(ITestOutputHelper output) + : base(output) + { + } + + public class MulticlassEvaluatorInput + { + public float Label { get; set; } + + [VectorType(4)] + public float[] Score { get; set; } + + public float PredictedLabel { get; set; } + } + + [Fact] + public void MulticlassEvaluatorTopKArray() + { + var mlContext = new MLContext(seed: 1); + + // Notice that the probability assigned to the correct label (i.e. Score[0]) + // decreases on each row so as to get the expected TopK accuracy array hardcoded below. + var inputArray = new[] + { + new MulticlassEvaluatorInput{Label = 0, Score = new[] {0.4f, 0.3f, 0.2f, 0.1f}, PredictedLabel = 0}, + new MulticlassEvaluatorInput{Label = 0, Score = new[] {0.3f, 0.4f, 0.2f, 0.1f}, PredictedLabel = 1}, + new MulticlassEvaluatorInput{Label = 0, Score = new[] {0.2f, 0.3f, 0.4f, 0.1f}, PredictedLabel = 2}, + new MulticlassEvaluatorInput{Label = 0, Score = new[] {0.1f, 0.3f, 0.2f, 0.4f}, PredictedLabel = 3}, + }; + + var expectedTopKArray = new[] { 0.25d, 0.5d, 0.75d, 1.0d }; + + var inputDV = mlContext.Data.LoadFromEnumerable(inputArray); + var metrics = mlContext.MulticlassClassification.Evaluate(inputDV, topKPredictionCount: 4); + Assert.Equal(expectedTopKArray, metrics.TopKAccuracyForAllK); + + + // After introducing a sample whose label was unseen (i.e. the Score array doesn't assign it a probability) + // then the Top K array changes, as its values are divided by the total number of instances + // that were evaluated. + var inputArray2 = inputArray.AppendElement(new MulticlassEvaluatorInput { + Label = 5, Score = new[] { 0.1f, 0.3f, 0.2f, 0.4f }, PredictedLabel = 3 }); + + var expectedTopKArray2 = new[] { 0.2d, 0.4d, 0.6d, 0.8d }; + + var inputDV2 = mlContext.Data.LoadFromEnumerable(inputArray2); + var metrics2 = mlContext.MulticlassClassification.Evaluate(inputDV2, topKPredictionCount: 4); + var outpu2 = metrics2.TopKAccuracyForAllK.ToArray(); + for (int i = 0; i < expectedTopKArray2.Length; i++) + Assert.Equal(expectedTopKArray2[i], outpu2[i], precision: 7); + } + } +} diff --git a/test/Microsoft.ML.Tests/Microsoft.ML.Tests.csproj b/test/Microsoft.ML.Tests/Microsoft.ML.Tests.csproj index 01a1e1c5ac..23e925133a 100644 --- a/test/Microsoft.ML.Tests/Microsoft.ML.Tests.csproj +++ b/test/Microsoft.ML.Tests/Microsoft.ML.Tests.csproj @@ -3,8 +3,12 @@ Microsoft.ML.Tests true + Test + + + diff --git a/test/Microsoft.ML.Tests/OnnxConversionTest.cs b/test/Microsoft.ML.Tests/OnnxConversionTest.cs index 69dbbe57e5..5e97a970a6 100644 --- a/test/Microsoft.ML.Tests/OnnxConversionTest.cs +++ b/test/Microsoft.ML.Tests/OnnxConversionTest.cs @@ -91,7 +91,7 @@ public void SimpleEndToEndOnnxConversionTest() // Step 3: Check ONNX model's text format. This test will be not necessary if Step 2 can run on Linux and // Mac to support cross-platform tests. - + CheckEquality(subDir, onnxTextName, digitsOfPrecision: 3); Done(); @@ -139,7 +139,7 @@ private class BreastCancerBinaryClassification [Fact] public void KmeansOnnxConversionTest() { - // Create a new context for ML.NET operations. It can be used for exception tracking and logging, + // Create a new context for ML.NET operations. It can be used for exception tracking and logging, // as a catalog of available operations and as the source of randomness. var mlContext = new MLContext(seed: 1); @@ -384,7 +384,7 @@ public void TextNormalizingOnnxConversionTest() new TextNormalizingEstimator(mlContext, keepDiacritics: true, caseMode: TextNormalizingEstimator.CaseMode.Upper, columns: new[] { ("UpperText", "text") })).Append( new TextNormalizingEstimator(mlContext, keepDiacritics: true, caseMode: TextNormalizingEstimator.CaseMode.None, columns: new[] { ("OriginalText", "text") })); var onnxFileName = $"TextNormalizing.onnx"; - + TestPipeline(pipeline, dataView, onnxFileName, new ColumnComparison[] { new ColumnComparison("NormText"), new ColumnComparison("UpperText"), new ColumnComparison("OriginalText") }); Done(); @@ -788,7 +788,7 @@ public void RemoveVariablesInPipelineTest() .Append(mlContext.Transforms.NormalizeMinMax("Features")) .Append(mlContext.BinaryClassification.Trainers.FastTree(labelColumnName: "Label", featureColumnName: "Features", numberOfLeaves: 2, numberOfTrees: 1, minimumExampleCountPerLeaf: 2)); - var model = pipeline.Fit(data); + using var model = pipeline.Fit(data); var transformedData = model.Transform(data); var onnxConversionContext = new OnnxContextImpl(mlContext, "A Simple Pipeline", "ML.NET", "0", 0, "machinelearning.dotnet", OnnxVersion.Stable); @@ -1154,7 +1154,7 @@ public void IndicateMissingValuesOnnxConversionTest() // IsNaN outputs a binary tensor. Support for this has been added in the latest version // of Onnxruntime, but that hasn't been released yet. - // So we need to convert its type to Int32 until then. + // So we need to convert its type to Int32 until then. // ConvertType part of the pipeline can be removed once we pick up a new release of the Onnx runtime var pipeline = mlContext.Transforms.IndicateMissingValues(new[] { new InputOutputColumnPair("MissingIndicator", "Features"), }) @@ -1209,6 +1209,165 @@ public void ValueToKeyMappingOnnxConversionTest( Done(); } + [Theory] + [CombinatorialData] + // Due to lack of support in OnnxRuntime, String => String mappings are not supported + public void ValueMappingOnnxConversionTest([CombinatorialValues(DataKind.Int64, DataKind.Int32, DataKind.UInt32, DataKind.UInt64, + DataKind.UInt16, DataKind.Int16, DataKind.Double, DataKind.String, DataKind.Boolean)] + DataKind keyType, [CombinatorialValues(true, false)] bool treatValuesAsKeyType) + { + var mlContext = new MLContext(seed: 1); + string filePath = (keyType == DataKind.Boolean) ? GetDataPath("type-conversion-boolean.txt") + : GetDataPath("type-conversion.txt"); + + TextLoader.Column[] columnsVector = new[] + { + new TextLoader.Column("Keys", keyType, 0, 2) + }; + TextLoader.Column[] columnsScalar = new[] + { + new TextLoader.Column("Keys", keyType, 0) + }; + IDataView[] dataViews = + { + mlContext.Data.LoadFromTextFile(filePath, columnsScalar, separatorChar: '\t'), //scalar + mlContext.Data.LoadFromTextFile(filePath, columnsVector , separatorChar: '\t') //vector + }; + List> pipelines = new List>(); + + if (keyType == DataKind.Single) + { + pipelines.Add(mlContext.Transforms.Conversion.MapValue("Value", new Dictionary { { 3, 6 }, { 23, 46 } }, "Keys", treatValuesAsKeyType)); + pipelines.Add(mlContext.Transforms.Conversion.MapValue("Value", new Dictionary { { 3, 6 }, { 23, 46 } }, "Keys", treatValuesAsKeyType)); + pipelines.Add(mlContext.Transforms.Conversion.MapValue("Value", new Dictionary { { 3, 6 }, { 23, 46 } }, "Keys", treatValuesAsKeyType)); + pipelines.Add(mlContext.Transforms.Conversion.MapValue("Value", new Dictionary { { 3, 6 }, { 23, 46 } }, "Keys", treatValuesAsKeyType)); + pipelines.Add(mlContext.Transforms.Conversion.MapValue("Value", new Dictionary { { 3, 6 }, { 23, 46 } }, "Keys", treatValuesAsKeyType)); + pipelines.Add(mlContext.Transforms.Conversion.MapValue("Value", new Dictionary { { 3, 6 }, { 23, 46 } }, "Keys", treatValuesAsKeyType)); + pipelines.Add(mlContext.Transforms.Conversion.MapValue("Value", new Dictionary { { 3, "True" }, { 23, "False" } }, "Keys", treatValuesAsKeyType)); + pipelines.Add(mlContext.Transforms.Conversion.MapValue("Value", new Dictionary { { 3, 6 }, { 23, 46 } }, "Keys", treatValuesAsKeyType)); + pipelines.Add(mlContext.Transforms.Conversion.MapValue("Value", new Dictionary { { 3, 698 }, { 23, 7908 } }, "Keys", treatValuesAsKeyType)); + pipelines.Add(mlContext.Transforms.Conversion.MapValue("Value", new Dictionary { { 3, false }, { 23, true } }, "Keys", treatValuesAsKeyType)); + } + else if (keyType == DataKind.Double) + { + pipelines.Add(mlContext.Transforms.Conversion.MapValue("Value", new Dictionary { { 3, 6 }, { 23, 46 } }, "Keys")); + pipelines.Add(mlContext.Transforms.Conversion.MapValue("Value", new Dictionary { { 3, 6 }, { 23, 46 } }, "Keys")); + pipelines.Add(mlContext.Transforms.Conversion.MapValue("Value", new Dictionary { { 3, 6 }, { 23, 46 } }, "Keys")); + pipelines.Add(mlContext.Transforms.Conversion.MapValue("Value", new Dictionary { { 3, 6 }, { 23, 46 } }, "Keys")); + pipelines.Add(mlContext.Transforms.Conversion.MapValue("Value", new Dictionary { { 3, "True" }, { 23, "False" } }, "Keys")); + pipelines.Add(mlContext.Transforms.Conversion.MapValue("Value", new Dictionary { { 3, 6 }, { 23, 46 } }, "Keys")); + pipelines.Add(mlContext.Transforms.Conversion.MapValue("Value", new Dictionary { { 3, 698 }, { 23, 7908 } }, "Keys")); + pipelines.Add(mlContext.Transforms.Conversion.MapValue("Value", new Dictionary { { 3, 698 }, { 23, 7908 } }, "Keys")); + pipelines.Add(mlContext.Transforms.Conversion.MapValue("Value", new Dictionary { { 3, true }, { 23, false } }, "Keys")); + } + else if (keyType == DataKind.Boolean) + { + pipelines.Add(mlContext.Transforms.Conversion.MapValue("Value", new Dictionary { { true, 6 }, { false, 46 } }, "Keys")); + pipelines.Add(mlContext.Transforms.Conversion.MapValue("Value", new Dictionary { { true, 6 }, { false, 46 } }, "Keys")); + pipelines.Add(mlContext.Transforms.Conversion.MapValue("Value", new Dictionary { { true, 6 }, { false, 46 } }, "Keys")); + pipelines.Add(mlContext.Transforms.Conversion.MapValue("Value", new Dictionary { { true, 6 }, { false, 46 } }, "Keys")); + pipelines.Add(mlContext.Transforms.Conversion.MapValue("Value", new Dictionary { { true, 6 }, { false, 46 } }, "Keys")); + pipelines.Add(mlContext.Transforms.Conversion.MapValue("Value", new Dictionary { { true, "True" }, { false, "False" } }, "Keys")); + pipelines.Add(mlContext.Transforms.Conversion.MapValue("Value", new Dictionary { { true, 6 }, { false, 46 } }, "Keys")); + pipelines.Add(mlContext.Transforms.Conversion.MapValue("Value", new Dictionary { { true, 698 }, { false, 7908 } }, "Keys")); + pipelines.Add(mlContext.Transforms.Conversion.MapValue("Value", new Dictionary { { true, 698 }, { false, 7908 } }, "Keys")); + pipelines.Add(mlContext.Transforms.Conversion.MapValue("Value", new Dictionary { { false, true }, { true, false } }, "Keys")); + } + else if (keyType == DataKind.String) + { + pipelines.Add(mlContext.Transforms.Conversion.MapValue("Value", new Dictionary { { "3", 3 }, { "23", 23 } }, "Keys")); + pipelines.Add(mlContext.Transforms.Conversion.MapValue("Value", new Dictionary { { "3", 3 }, { "23", 23 } }, "Keys")); + pipelines.Add(mlContext.Transforms.Conversion.MapValue("Value", new Dictionary { { "3", 6 }, { "23", 46 } }, "Keys")); + pipelines.Add(mlContext.Transforms.Conversion.MapValue("Value", new Dictionary { { "3", 6 }, { "23", 46 } }, "Keys")); + pipelines.Add(mlContext.Transforms.Conversion.MapValue("Value", new Dictionary { { "3", 6 }, { "23", 46 } }, "Keys")); + pipelines.Add(mlContext.Transforms.Conversion.MapValue("Value", new Dictionary { { "3", 6 }, { "23", 23 } }, "Keys")); + pipelines.Add(mlContext.Transforms.Conversion.MapValue("Value", new Dictionary { { "3", 6 }, { "23", 23 } }, "Keys")); + pipelines.Add(mlContext.Transforms.Conversion.MapValue("Value", new Dictionary { { "3", 3 }, { "23", 23 } }, "Keys")); + pipelines.Add(mlContext.Transforms.Conversion.MapValue("Value", new Dictionary { { "3", true }, { "23", false } }, "Keys")); + } + else if (keyType == DataKind.Int32) + { + pipelines.Add(mlContext.Transforms.Conversion.MapValue("Value", new Dictionary { { 3, 6 }, { 23, 46 } }, "Keys")); + pipelines.Add(mlContext.Transforms.Conversion.MapValue("Value", new Dictionary { { 3, 6 }, { 23, 46 } }, "Keys")); + pipelines.Add(mlContext.Transforms.Conversion.MapValue("Value", new Dictionary { { 3, 6 }, { 23, 46 } }, "Keys")); + pipelines.Add(mlContext.Transforms.Conversion.MapValue("Value", new Dictionary { { 3, 6 }, { 23, 46 } }, "Keys")); + pipelines.Add(mlContext.Transforms.Conversion.MapValue("Value", new Dictionary { { 3, 6 }, { 23, 46 } }, "Keys")); + pipelines.Add(mlContext.Transforms.Conversion.MapValue("Value", new Dictionary { { 3, 6 }, { 23, 46 } }, "Keys")); + pipelines.Add(mlContext.Transforms.Conversion.MapValue("Value", new Dictionary { { 3, "True" }, { 23, "False" } }, "Keys")); + pipelines.Add(mlContext.Transforms.Conversion.MapValue("Value", new Dictionary { { 3, 6.435f }, { 23, 23.534f } }, "Keys")); + pipelines.Add(mlContext.Transforms.Conversion.MapValue("Value", new Dictionary { { 3, 6.435f }, { 23, 23.534f } }, "Keys")); + } + else if (keyType == DataKind.Int16) + { + pipelines.Add(mlContext.Transforms.Conversion.MapValue("Value", new Dictionary { { 3, 6 }, { 23, 46 } }, "Keys")); + pipelines.Add(mlContext.Transforms.Conversion.MapValue("Value", new Dictionary { { 3, 6 }, { 23, 46 } }, "Keys")); + pipelines.Add(mlContext.Transforms.Conversion.MapValue("Value", new Dictionary { { 3, 6 }, { 23, 46 } }, "Keys")); + pipelines.Add(mlContext.Transforms.Conversion.MapValue("Value", new Dictionary { { 3, 6 }, { 23, 46 } }, "Keys")); + pipelines.Add(mlContext.Transforms.Conversion.MapValue("Value", new Dictionary { { 3, 6 }, { 23, 46 } }, "Keys")); + pipelines.Add(mlContext.Transforms.Conversion.MapValue("Value", new Dictionary { { 3, 6 }, { 23, 46 } }, "Keys")); + pipelines.Add(mlContext.Transforms.Conversion.MapValue("Value", new Dictionary { { 3, "True" }, { 23, "False" } }, "Keys")); + pipelines.Add(mlContext.Transforms.Conversion.MapValue("Value", new Dictionary { { 3, 6.435f }, { 23, 23.534f } }, "Keys")); + pipelines.Add(mlContext.Transforms.Conversion.MapValue("Value", new Dictionary { { 3, 6.435f }, { 23, 23.534f } }, "Keys")); + } + else if (keyType == DataKind.Int64) + { + pipelines.Add(mlContext.Transforms.Conversion.MapValue("Value", new Dictionary { { 3, 6 }, { 23, 46 } }, "Keys")); + pipelines.Add(mlContext.Transforms.Conversion.MapValue("Value", new Dictionary { { 3, 6 }, { 23, 46 } }, "Keys")); + pipelines.Add(mlContext.Transforms.Conversion.MapValue("Value", new Dictionary { { 3, 6 }, { 23, 46 } }, "Keys")); + pipelines.Add(mlContext.Transforms.Conversion.MapValue("Value", new Dictionary { { 3, 6 }, { 23, 46 } }, "Keys")); + pipelines.Add(mlContext.Transforms.Conversion.MapValue("Value", new Dictionary { { 3, 6 }, { 23, 46 } }, "Keys")); + pipelines.Add(mlContext.Transforms.Conversion.MapValue("Value", new Dictionary { { 3, 6 }, { 23, 46 } }, "Keys")); + pipelines.Add(mlContext.Transforms.Conversion.MapValue("Value", new Dictionary { { 3, "True" }, { 23, "False" } }, "Keys")); + pipelines.Add(mlContext.Transforms.Conversion.MapValue("Value", new Dictionary { { 3, 6.435f }, { 23, 23.534f } }, "Keys")); + pipelines.Add(mlContext.Transforms.Conversion.MapValue("Value", new Dictionary { { 3, 6.435f }, { 23, 23.534f } }, "Keys")); + } + else if (keyType == DataKind.UInt32) + { + pipelines.Add(mlContext.Transforms.Conversion.MapValue("Value", new Dictionary { { 3, 6 }, { 23, 46 } }, "Keys")); + pipelines.Add(mlContext.Transforms.Conversion.MapValue("Value", new Dictionary { { 3, 6 }, { 23, 46 } }, "Keys")); + pipelines.Add(mlContext.Transforms.Conversion.MapValue("Value", new Dictionary { { 3, 6 }, { 23, 46 } }, "Keys")); + pipelines.Add(mlContext.Transforms.Conversion.MapValue("Value", new Dictionary { { 3, 6 }, { 23, 46 } }, "Keys")); + pipelines.Add(mlContext.Transforms.Conversion.MapValue("Value", new Dictionary { { 3, 6 }, { 23, 46 } }, "Keys")); + pipelines.Add(mlContext.Transforms.Conversion.MapValue("Value", new Dictionary { { 3, 6 }, { 23, 46 } }, "Keys")); + pipelines.Add(mlContext.Transforms.Conversion.MapValue("Value", new Dictionary { { 3, "True" }, { 23, "False" } }, "Keys")); + pipelines.Add(mlContext.Transforms.Conversion.MapValue("Value", new Dictionary { { 3, 6.435f }, { 23, 23.534f } }, "Keys")); + pipelines.Add(mlContext.Transforms.Conversion.MapValue("Value", new Dictionary { { 3, 6.435f }, { 23, 23.534f } }, "Keys")); + } + else if (keyType == DataKind.UInt16) + { + pipelines.Add(mlContext.Transforms.Conversion.MapValue("Value", new Dictionary { { 3, 6 }, { 23, 46 } }, "Keys")); + pipelines.Add(mlContext.Transforms.Conversion.MapValue("Value", new Dictionary { { 3, 6 }, { 23, 46 } }, "Keys")); + pipelines.Add(mlContext.Transforms.Conversion.MapValue("Value", new Dictionary { { 3, 6 }, { 23, 46 } }, "Keys")); + pipelines.Add(mlContext.Transforms.Conversion.MapValue("Value", new Dictionary { { 3, 6 }, { 23, 46 } }, "Keys")); + pipelines.Add(mlContext.Transforms.Conversion.MapValue("Value", new Dictionary { { 3, 6 }, { 23, 46 } }, "Keys")); + pipelines.Add(mlContext.Transforms.Conversion.MapValue("Value", new Dictionary { { 3, 6 }, { 23, 46 } }, "Keys")); + pipelines.Add(mlContext.Transforms.Conversion.MapValue("Value", new Dictionary { { 3, "True" }, { 23, "False" } }, "Keys")); + pipelines.Add(mlContext.Transforms.Conversion.MapValue("Value", new Dictionary { { 3, 6.435f }, { 23, 23.534f } }, "Keys")); + pipelines.Add(mlContext.Transforms.Conversion.MapValue("Value", new Dictionary { { 3, 6.435f }, { 23, 23.534f } }, "Keys")); + } + else if (keyType == DataKind.UInt64) + { + pipelines.Add(mlContext.Transforms.Conversion.MapValue("Value", new Dictionary { { 3, 6 }, { 23, 46 } }, "Keys")); + pipelines.Add(mlContext.Transforms.Conversion.MapValue("Value", new Dictionary { { 3, 6 }, { 23, 46 } }, "Keys")); + pipelines.Add(mlContext.Transforms.Conversion.MapValue("Value", new Dictionary { { 3, 6 }, { 23, 46 } }, "Keys")); + pipelines.Add(mlContext.Transforms.Conversion.MapValue("Value", new Dictionary { { 3, 6 }, { 23, 46 } }, "Keys")); + pipelines.Add(mlContext.Transforms.Conversion.MapValue("Value", new Dictionary { { 3, 6 }, { 23, 46 } }, "Keys")); + pipelines.Add(mlContext.Transforms.Conversion.MapValue("Value", new Dictionary { { 3, 6 }, { 23, 46 } }, "Keys")); + pipelines.Add(mlContext.Transforms.Conversion.MapValue("Value", new Dictionary { { 3, "True" }, { 23, "False" } }, "Keys")); + pipelines.Add(mlContext.Transforms.Conversion.MapValue("Value", new Dictionary { { 3, 6.435f }, { 23, 23.534f } }, "Keys")); + pipelines.Add(mlContext.Transforms.Conversion.MapValue("Value", new Dictionary { { 3, 6.435f }, { 23, 23.534f } }, "Keys")); + } + foreach (IEstimator pipeline in pipelines) + { + for (int j = 0; j < dataViews.Length; j++) + { + var onnxFileName = "ValueMapping.onnx"; + TestPipeline(pipeline, dataViews[j], onnxFileName, new ColumnComparison[] { new ColumnComparison("Value") }); + } + } + Done(); + } + [Theory] [InlineData(DataKind.Single)] [InlineData(DataKind.Int64)] @@ -1323,9 +1482,12 @@ public void NgramOnnxConversionTest( weighting: weighting)), mlContext.Transforms.Text.ProduceWordBags("Tokens", "Text", - ngramLength: ngramLength, - useAllLengths: useAllLength, - weighting: weighting) + ngramLength: ngramLength, + useAllLengths: useAllLength, + weighting: weighting), + + mlContext.Transforms.Text.TokenizeIntoWords("Tokens0", "Text") + .Append(mlContext.Transforms.Text.ProduceWordBags("Tokens", "Tokens0")) }; for (int i = 0; i < pipelines.Length; i++) @@ -1346,7 +1508,7 @@ public void NgramOnnxConversionTest( var onnxEstimator = mlContext.Transforms.ApplyOnnxModel(onnxFilePath, gpuDeviceId: _gpuDeviceId, fallbackToCpu: _fallbackToCpu); var onnxTransformer = onnxEstimator.Fit(dataView); var onnxResult = onnxTransformer.Transform(dataView); - var columnName = i == pipelines.Length - 1 ? "Tokens" : "NGrams"; + var columnName = i >= pipelines.Length - 2 ? "Tokens" : "NGrams"; CompareResults(columnName, columnName, transformedData, onnxResult, 3); VBuffer> mlNetSlots = default; @@ -1541,6 +1703,46 @@ public void CopyColumnsOnnxTest() Done(); } + [Fact] + public void SelectiveExportOnnxTest() + { + var mlContext = new MLContext(seed: 1); + + var trainDataPath = GetDataPath(TestDatasets.generatedRegressionDataset.trainFilename); + var dataView = mlContext.Data.LoadFromTextFile(trainDataPath, + separatorChar: ';', + hasHeader: true); + + var mlpipeline = mlContext.Transforms.CopyColumns("Target1", "Target"); + var onnxFileName = "copycolumns.onnx"; + + var mlmodel = mlpipeline.Fit(dataView); + + var onnxModelPath = GetOutputPath(onnxFileName); + using (var stream = File.Create(onnxModelPath)) + { + mlContext.Model.ConvertToOnnx(mlmodel, dataView, stream, "Target1"); + } + + var model = new OnnxCSharpToProtoWrapper.ModelProto(); + using (var modelStream = File.OpenRead(onnxModelPath)) + using (var codedStream = Google.Protobuf.CodedInputStream.CreateWithLimits(modelStream, Int32.MaxValue, 10)) + model = OnnxCSharpToProtoWrapper.ModelProto.Parser.ParseFrom(codedStream); + + Assert.True(model.Graph.Output.Count == 1); + Assert.Equal("Target1.output", model.Graph.Output[0].Name); + + // Make sure that even though the column wasn't passed to ONNX, that it can still be used directly from ML.Net + var pipeline = mlContext.Transforms.ApplyOnnxModel(onnxModelPath); + var loadedModel = pipeline.Fit(dataView); + + // Getting the preview will cause an issue if there is an error since ONNX is no longer exporting that column. + var loadedData = loadedModel.Transform(dataView).Preview(1); + Assert.Equal((Single)140.66, loadedData.ColumnView[1].Values[0]); + + Done(); + } + [Fact] public void UseKeyDataViewTypeAsUInt32InOnnxInput() { @@ -1803,7 +2005,7 @@ public void NonDefaultColNamesMultiClassificationOnnxConversionTest() } Done(); } - + [Fact] public void OneHotHashEncodingOnnxConversionWithCustomOpSetVersionTest() { @@ -2026,7 +2228,7 @@ private void TestPipeline(EstimatorChain(EstimatorChain pipeline, IDataView dataView, string onnxFileName, ColumnComparison[] columnsToCompare, string onnxTxtName = null, string onnxTxtSubDir = null) where TLastTransformer : class, ITransformer { - var model = pipeline.Fit(dataView); + using var model = pipeline.Fit(dataView); var transformedData = model.Transform(dataView); var onnxModel = ML.Model.ConvertToOnnxProtobuf(model, dataView); diff --git a/test/Microsoft.ML.Tests/PermutationFeatureImportanceTests.cs b/test/Microsoft.ML.Tests/PermutationFeatureImportanceTests.cs index 7b5772eb01..1e901550e7 100644 --- a/test/Microsoft.ML.Tests/PermutationFeatureImportanceTests.cs +++ b/test/Microsoft.ML.Tests/PermutationFeatureImportanceTests.cs @@ -469,6 +469,10 @@ public void TestPfiRankingOnDenseFeatures(bool saveModel) var loadedModel = ML.Model.Load(modelAndSchemaPath, out var schema); var castedModel = loadedModel as RankingPredictionTransformer; + + // Saving and Loading the model cause the internal random state to change, so we reset the seed + // here so help the tests pass. + ML = new MLContext(0); pfi = ML.Ranking.PermutationFeatureImportance(castedModel, data); } else diff --git a/test/Microsoft.ML.Tests/ScenariosWithDirectInstantiation/TensorflowTests.cs b/test/Microsoft.ML.Tests/ScenariosWithDirectInstantiation/TensorflowTests.cs index 60517fcd97..3508cfe481 100644 --- a/test/Microsoft.ML.Tests/ScenariosWithDirectInstantiation/TensorflowTests.cs +++ b/test/Microsoft.ML.Tests/ScenariosWithDirectInstantiation/TensorflowTests.cs @@ -278,7 +278,7 @@ private List GetShapeData() }); } - [ConditionalFact(typeof(Environment), nameof(Environment.Is64BitProcess))] // TensorFlow is 64-bit only + [TensorFlowFact] // TensorFlow is 64-bit only public void TensorFlowTransformInputShapeTest() { var modelLocation = "model_shape_test"; @@ -1152,7 +1152,6 @@ public void TensorFlowGettingSchemaMultipleTimes() } } - [TensorFlowFact] public void TensorFlowTransformCifarInvalidShape() { @@ -1260,6 +1259,20 @@ class TextOutput public string[] BOut { get; set; } } + class PrimitiveInput + { + [LoadColumn(0)] + public string input1; + + [LoadColumn(1)] + public string input2; + } + + class PrimitiveOutput + { + public string string_merge { get; set; } + } + [TensorFlowFact] public void TensorFlowStringTest() { @@ -1286,6 +1299,34 @@ public void TensorFlowStringTest() Assert.Equal(string.Join(" ", input.B).Replace("/", " "), textOutput.BOut[0]); } + [TensorFlowFact] + public void TensorFlowPrimitiveInputTest() + { + using var tensorFlowModel = _mlContext.Model.LoadTensorFlowModel(@"model_primitive_input_test"); + var schema = tensorFlowModel.GetModelSchema(); + Assert.True(schema.GetColumnOrNull("input1").HasValue); + Assert.True(schema.GetColumnOrNull("input1").Value.Type is TextDataViewType); + Assert.True(schema.GetColumnOrNull("input2").HasValue); + Assert.True(schema.GetColumnOrNull("input2").Value.Type is TextDataViewType); + + var dataview = _mlContext.Data.CreateTextLoader().Load(new MultiFileSource(null)); + + var pipeline = tensorFlowModel.ScoreTensorFlowModel( + inputColumnNames: new[] { "input1", "input2" }, + outputColumnNames: new[] { "string_merge" }); + var transformer = _mlContext.Model.CreatePredictionEngine(pipeline.Fit(dataview)); + + var input = new PrimitiveInput + { + input1 = "This is fine.", + input2 = "Thank you very much!." + }; + + var primitiveOutput = transformer.Predict(input); + + Assert.Equal("This is fine.Thank you very much!.", primitiveOutput.string_merge); + } + [TensorFlowFact] public void TensorFlowImageClassificationDefault() { diff --git a/test/Microsoft.ML.Tests/TensorFlowEstimatorTests.cs b/test/Microsoft.ML.Tests/TensorFlowEstimatorTests.cs index 8aba9b08a5..ff6dbd456f 100644 --- a/test/Microsoft.ML.Tests/TensorFlowEstimatorTests.cs +++ b/test/Microsoft.ML.Tests/TensorFlowEstimatorTests.cs @@ -184,6 +184,52 @@ public void TestTensorFlow() } } + [TensorFlowFact] + public void TreatOutputAsBatched() + { + var modelLocation = "cifar_model/frozen_model.pb"; + + var mlContext = new MLContext(seed: 1); + var imageHeight = 32; + var imageWidth = 32; + var dataFile = GetDataPath("images/images.tsv"); + var imageFolder = Path.GetDirectoryName(dataFile); + + var data = ML.Data.LoadFromTextFile(dataFile, new[] { + new TextLoader.Column("imagePath", DataKind.String, 0), + new TextLoader.Column("name", DataKind.String, 1) + }); + + // Note that CamelCase column names are there to match the TF graph node names. + // Check and make sure save/load work correctly for the new TreatOutputAsBatched value. + var pipe = ML.Transforms.LoadImages("Input", imageFolder, "imagePath") + .Append(ML.Transforms.ResizeImages("Input", imageHeight, imageWidth)) + .Append(ML.Transforms.ExtractPixels("Input", interleavePixelColors: true)) + .Append(ML.Model.LoadTensorFlowModel(modelLocation, false).ScoreTensorFlowModel("Output", "Input")); + + TestEstimatorCore(pipe, data); + var schema = pipe.Fit(data).Transform(data).Schema; + + // The dimensions of the output with treatOutputAsBatched set to false should be * 10 + // as the first dimension of -1 is treated as an unknown dimension. + Assert.Equal(new VectorDataViewType(NumberDataViewType.Single, 0, 10), schema["Output"].Type); + + // Note that CamelCase column names are there to match the TF graph node names. + // Test with TreatOutputAsBatched set to default value of true. + pipe = ML.Transforms.LoadImages("Input", imageFolder, "imagePath") + .Append(ML.Transforms.ResizeImages("Input", imageHeight, imageWidth)) + .Append(ML.Transforms.ExtractPixels("Input", interleavePixelColors: true)) + .Append(ML.Model.LoadTensorFlowModel(modelLocation).ScoreTensorFlowModel("Output", "Input")); + + TestEstimatorCore(pipe, data); + schema = pipe.Fit(data).Transform(data).Schema; + + // The dimensions of the output with treatOutputAsBatched set to true should be 10 + // as the first dimension of -1 is treated as the batch dimension. + Assert.Equal(new VectorDataViewType(NumberDataViewType.Single, 10), schema["Output"].Type); + + } + [TensorFlowFact] public void TestTensorFlowWithSchema() { diff --git a/test/Microsoft.ML.Tests/TrainerEstimators/LbfgsTests.cs b/test/Microsoft.ML.Tests/TrainerEstimators/LbfgsTests.cs index 81f9810b00..13461fec6b 100644 --- a/test/Microsoft.ML.Tests/TrainerEstimators/LbfgsTests.cs +++ b/test/Microsoft.ML.Tests/TrainerEstimators/LbfgsTests.cs @@ -202,7 +202,7 @@ public void TestMLRWithStats() CompareNumbersWithTolerance(stats.Deviance, 45.79, digitsOfPrecision: 2); CompareNumbersWithTolerance(stats.NullDeviance, 329.58, digitsOfPrecision: 2); #else - CompareNumbersWithTolerance(stats.Deviance, 45.35, digitsOfPrecision: 2); + CompareNumbersWithTolerance(stats.Deviance, 45.35, digitsOfPrecision: 0); CompareNumbersWithTolerance(stats.NullDeviance, 329.58, digitsOfPrecision: 2); #endif //Assert.Equal(14, stats.ParametersCount); diff --git a/test/Microsoft.ML.TimeSeries.Tests/TimeSeriesDirectApi.cs b/test/Microsoft.ML.TimeSeries.Tests/TimeSeriesDirectApi.cs index 1ffdf2ba96..1dcd2f52c3 100644 --- a/test/Microsoft.ML.TimeSeries.Tests/TimeSeriesDirectApi.cs +++ b/test/Microsoft.ML.TimeSeries.Tests/TimeSeriesDirectApi.cs @@ -4,7 +4,6 @@ using System; using System.Collections.Generic; -using System.Data; using System.IO; using System.Linq; using Microsoft.ML.Data; @@ -621,7 +620,7 @@ public void TestSrCnnBatchAnomalyDetector( // Do batch anomaly detection var outputDataView = ml.AnomalyDetection.DetectEntireAnomalyBySrCnn(dataView, outputColumnName, inputColumnName, - threshold: 0.35, batchSize: batchSize, sensitivity: 90.0, mode); + threshold: 0.35, batchSize: batchSize, sensitivity: 98.0, mode); // Getting the data of the newly created column as an IEnumerable of SrCnnAnomalyDetection. var predictionColumn = ml.Data.CreateEnumerable( @@ -694,7 +693,7 @@ public void TestSrCnnAnomalyDetectorWithSeasonalData( { Threshold = 0.3, BatchSize = -1, - Sensitivity = 53.0, + Sensitivity = 64.0, DetectMode = SrCnnDetectMode.AnomalyAndMargin, Period = 288, DeseasonalityMode = mode @@ -717,6 +716,61 @@ public void TestSrCnnAnomalyDetectorWithSeasonalData( } } + [Theory, CombinatorialData] + public void TestSrCnnAnomalyDetectorBigSpike( + [CombinatorialValues(SrCnnDetectMode.AnomalyOnly, SrCnnDetectMode.AnomalyAndExpectedValue, SrCnnDetectMode.AnomalyOnly)] SrCnnDetectMode mode + ) + { + var ml = new MLContext(1); + IDataView dataView; + List data; + + var dataPath = GetDataPath("Timeseries", "big_spike_data.csv"); + + // Load data from file into the dataView + dataView = ml.Data.LoadFromTextFile(dataPath, hasHeader: true); + data = ml.Data.CreateEnumerable(dataView, reuseRowObject: false).ToList(); + + // Setup the detection arguments + string outputColumnName = nameof(SrCnnAnomalyDetection.Prediction); + string inputColumnName = nameof(TimeSeriesDataDouble.Value); + + // Do batch anomaly detection + var options = new SrCnnEntireAnomalyDetectorOptions() + { + Threshold = 0.3, + BatchSize = -1, + Sensitivity = 80.0, + DetectMode = mode, + Period = 0, + DeseasonalityMode = SrCnnDeseasonalityMode.Stl + }; + + var outputDataView = ml.AnomalyDetection.DetectEntireAnomalyBySrCnn(dataView, outputColumnName, inputColumnName, options); + + // Getting the data of the newly created column as an IEnumerable of SrCnnAnomalyDetection. + var predictionColumn = ml.Data.CreateEnumerable( + outputDataView, reuseRowObject: false); + + var anomalyIndex = 26; + + int k = 0; + foreach (var prediction in predictionColumn) + { + if (anomalyIndex == k) + { + Assert.Equal(1, prediction.Prediction[0]); + } + else + { + Assert.Equal(0, prediction.Prediction[0]); + } + + ++k; + } + + } + [Theory, CombinatorialData] public void TestSrCnnAnomalyDetectorWithSeasonalAnomalyData( [CombinatorialValues(SrCnnDeseasonalityMode.Stl, SrCnnDeseasonalityMode.Mean, SrCnnDeseasonalityMode.Median)] SrCnnDeseasonalityMode mode @@ -741,7 +795,7 @@ public void TestSrCnnAnomalyDetectorWithSeasonalAnomalyData( { Threshold = 0.23, BatchSize = -1, - Sensitivity = 53.0, + Sensitivity = 63.0, DetectMode = SrCnnDetectMode.AnomalyAndMargin, Period = 288, DeseasonalityMode = mode @@ -776,6 +830,126 @@ public void TestSrCnnAnomalyDetectorWithSeasonalAnomalyData( } } + [Theory, CombinatorialData] + public void TestSrCnnAnomalyDetectorWithAnomalyAtBeginning( + [CombinatorialValues(SrCnnDeseasonalityMode.Stl, SrCnnDeseasonalityMode.Mean, SrCnnDeseasonalityMode.Median)] SrCnnDeseasonalityMode mode + ) + { + var ml = new MLContext(1); + IDataView dataView; + List data; + + var dataPath = GetDataPath("Timeseries", "anomaly_at_beginning.csv"); + + // Load data from file into the dataView + dataView = ml.Data.LoadFromTextFile(dataPath, hasHeader: true); + data = ml.Data.CreateEnumerable(dataView, reuseRowObject: false).ToList(); + + // Setup the detection arguments + string outputColumnName = nameof(SrCnnAnomalyDetection.Prediction); + string inputColumnName = nameof(TimeSeriesDataDouble.Value); + + // Do batch anomaly detection + var options = new SrCnnEntireAnomalyDetectorOptions() + { + Threshold = 0.30, + BatchSize = -1, + Sensitivity = 80.0, + DetectMode = SrCnnDetectMode.AnomalyAndMargin, + Period = 0, + DeseasonalityMode = mode + }; + + var outputDataView = ml.AnomalyDetection.DetectEntireAnomalyBySrCnn(dataView, outputColumnName, inputColumnName, options); + + // Getting the data of the newly created column as an IEnumerable of SrCnnAnomalyDetection. + var predictionColumn = ml.Data.CreateEnumerable( + outputDataView, reuseRowObject: false); + + var anomalyIndex = 1; + + int k = 0; + foreach (var prediction in predictionColumn) + { + Assert.Equal(7, prediction.Prediction.Length); + if (anomalyIndex == k) + { + Assert.Equal(1, prediction.Prediction[0]); + Assert.True(prediction.Prediction[6] > data[k].Value || data[k].Value > prediction.Prediction[5]); + } + else + { + Assert.Equal(0, prediction.Prediction[0]); + Assert.True(prediction.Prediction[6] <= data[k].Value); + Assert.True(data[k].Value <= prediction.Prediction[5]); + } + + ++k; + } + } + + [Theory, CombinatorialData] + public void TestSrcnnEntireDetectNonnegativeData( + [CombinatorialValues(true, false)] bool isPositive) + { + var ml = new MLContext(1); + IDataView dataView; + List data; + + // Load data from file into the dataView + var dataPath = GetDataPath("Timeseries", "non_negative_case.csv"); + + // Load data from file into the dataView + dataView = ml.Data.LoadFromTextFile(dataPath, hasHeader: true); + data = ml.Data.CreateEnumerable(dataView, reuseRowObject: false).ToList(); + + if (!isPositive) + { + for (int i = 0; i < data.Count; ++i) + { + data[i].Value = - data[i].Value; + } + } + + dataView = ml.Data.LoadFromEnumerable(data); + + // Setup the detection arguments + string outputColumnName = nameof(SrCnnAnomalyDetection.Prediction); + string inputColumnName = nameof(TimeSeriesDataDouble.Value); + + // Do batch anomaly detection + var options = new SrCnnEntireAnomalyDetectorOptions() + { + Threshold = 0.10, + BatchSize = -1, + Sensitivity = 99.0, + DetectMode = SrCnnDetectMode.AnomalyAndMargin, + Period = 0, + DeseasonalityMode = SrCnnDeseasonalityMode.Stl + }; + + var outputDataView = ml.AnomalyDetection.DetectEntireAnomalyBySrCnn(dataView, outputColumnName, inputColumnName, options); + + // Getting the data of the newly created column as an IEnumerable of SrCnnAnomalyDetection. + var predictionColumn = ml.Data.CreateEnumerable( + outputDataView, reuseRowObject: false); + + if (isPositive) + { + foreach (var prediction in predictionColumn) + { + Assert.True(prediction.Prediction[3] >= 0); + } + } + else + { + foreach (var prediction in predictionColumn) + { + Assert.True(prediction.Prediction[3] <= 0); + } + } + } + [Fact] public void RootCauseLocalization() { diff --git a/test/Microsoft.ML.TimeSeries.Tests/TimeSeriesSimpleApiTests.cs b/test/Microsoft.ML.TimeSeries.Tests/TimeSeriesSimpleApiTests.cs index aad10ccef2..7905bf6d89 100644 --- a/test/Microsoft.ML.TimeSeries.Tests/TimeSeriesSimpleApiTests.cs +++ b/test/Microsoft.ML.TimeSeries.Tests/TimeSeriesSimpleApiTests.cs @@ -48,7 +48,7 @@ public void ChangeDetection() data.Add(new Data((float)(5 + i * 1.1))); // Build the pipeline - var learningPipeline = ML.Transforms.DetectIidChangePoint("Data", "Value", 80, size); + var learningPipeline = ML.Transforms.DetectIidChangePoint("Data", "Value", 80.0d, size); // Train var detector = learningPipeline.Fit(dataView); @@ -92,7 +92,7 @@ public void ChangePointDetectionWithSeasonality() data.Add(new Data(i * 100)); // Build the pipeline - var learningPipeline = ML.Transforms.DetectChangePointBySsa("Data", "Value", 95, changeHistorySize, maxTrainingSize, seasonalitySize); + var learningPipeline = ML.Transforms.DetectChangePointBySsa("Data", "Value", 95.0d, changeHistorySize, maxTrainingSize, seasonalitySize); // Train var detector = learningPipeline.Fit(dataView); // Transform @@ -133,7 +133,7 @@ public void SpikeDetection() data.Add(new Data(5)); // Build the pipeline - var learningPipeline = ML.Transforms.DetectIidSpike("Data", "Value", 80, pvalHistoryLength); + var learningPipeline = ML.Transforms.DetectIidSpike("Data", "Value", 80.0d, pvalHistoryLength); // Train var detector = learningPipeline.Fit(dataView); // Transform @@ -185,7 +185,7 @@ public void SsaSpikeDetection() data.Add(new Data(5)); // Build the pipeline - var learningPipeline = ML.Transforms.DetectSpikeBySsa("Data", "Value", 80, changeHistoryLength, trainingWindowSize, seasonalityWindowSize); + var learningPipeline = ML.Transforms.DetectSpikeBySsa("Data", "Value", 80.0d, changeHistoryLength, trainingWindowSize, seasonalityWindowSize); // Train var detector = learningPipeline.Fit(dataView); // Transform diff --git a/test/TestFrameworkDependency.props b/test/TestFrameworkDependency.props index d71ebf2628..c815dd3166 100644 --- a/test/TestFrameworkDependency.props +++ b/test/TestFrameworkDependency.props @@ -1,6 +1,8 @@ - + + All + - + <_contractReferencePath Include="@(ReferencePath)" Condition="'%(FileName)' == '$(ContractName)'" />