From 510f0112d4fbb4d3ee233b9ca95c83fae1f9da91 Mon Sep 17 00:00:00 2001 From: Jon Wood Date: Mon, 4 Oct 2021 19:09:00 -0400 Subject: [PATCH] Run formatting on src projects (#5937) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: BigBigMiao Co-authored-by: Keren Fuentes Co-authored-by: yuyi@microsoft.com Co-authored-by: Justin Ormont Co-authored-by: Antonio Velazquez Co-authored-by: Frank Dong Co-authored-by: Mustafa Bal <5262061+mstfbl@users.noreply.github.com> 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: Michael Sharp Co-authored-by: Antonio Velázquez <38739674+antoniovs1029@users.noreply.github.com> Co-authored-by: Santiago Fernandez Madero Co-authored-by: Eric Erhardt Co-authored-by: Eric StJohn Co-authored-by: Jose Perez Rodriguez Co-authored-by: Günther Foidl 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: Rhys Parry Co-authored-by: daniel costea Co-authored-by: Ramon <56896136+RamonWill@users.noreply.github.com> Co-authored-by: Xiaoyun Zhang Co-authored-by: Keren Fuentes Co-authored-by: Yuanxiang Ying Co-authored-by: Piotr Telman Co-authored-by: Harish Kulkarni Co-authored-by: Jason DeBoever Co-authored-by: Leo Gaunt <36968548+LeoGaunt@users.noreply.github.com> Co-authored-by: Keren Fuentes 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: Robin Windey --- .../DataFrame.BinaryOperators.cs | 112 +- src/Microsoft.Data.Analysis/DataFrame.cs | 2 +- .../DataFrameColumn.BinaryOperators.cs | 2 +- ...imitiveColumnContainer.BinaryOperations.cs | 120 +- .../PrimitiveColumnContainer.cs | 2 +- ...imitiveDataFrameColumn.BinaryOperations.cs | 88 +- ...ataFrameColumn.ReversedBinaryOperations.cs | 8 +- .../PrimitiveDataFrameColumnArithmetic.cs | 1544 ++++++++--------- .../PrimitiveDataFrameColumnComputations.cs | 194 +-- .../StringDataFrameColumn.BinaryOperations.cs | 6 +- src/Microsoft.Extensions.ML/PoolLoader.cs | 2 +- .../PredictionEnginePool.cs | 2 +- .../PredictionEnginePoolOptions.cs | 2 +- .../PredictionEnginePoolPolicy.cs | 2 +- src/Microsoft.ML.AutoML/API/AutoCatalog.cs | 2 +- .../API/ColumnInference.cs | 2 +- .../API/ExperimentResults/ExperimentResult.cs | 2 +- .../API/MulticlassClassificationExperiment.cs | 4 +- .../API/RankingExperiment.cs | 2 +- src/Microsoft.ML.AutoML/Assembly.cs | 2 +- src/Microsoft.ML.AutoML/AutoMlUtils.cs | 2 +- .../ColumnGroupingInference.cs | 4 +- .../ColumnInference/ColumnTypeInference.cs | 2 +- .../ColumnInference/PurposeInference.cs | 2 +- .../ColumnInference/TextFileContents.cs | 16 +- .../ColumnInference/TextFileSample.cs | 2 +- .../Experiment/Experiment.cs | 2 +- .../MetricsAgents/MultiMetricsAgent.cs | 4 +- .../Experiment/RecipeInference.cs | 2 +- .../Experiment/Runners/IRunner.cs | 4 +- .../Experiment/Runners/RunnerUtil.cs | 2 +- .../Experiment/Runners/TrainValidateRunner.cs | 2 +- .../Experiment/SuggestedPipeline.cs | 2 +- .../Experiment/SuggestedPipelineBuilder.cs | 2 +- .../PipelineSuggesters/PipelineSuggester.cs | 4 +- src/Microsoft.ML.AutoML/Sweepers/ISweeper.cs | 2 +- .../Sweepers/Parameters.cs | 2 +- src/Microsoft.ML.AutoML/Sweepers/Random.cs | 2 +- .../Sweepers/SmacSweeper.cs | 2 +- .../Sweepers/SweeperBase.cs | 2 +- .../Sweepers/SweeperProbabilityUtils.cs | 2 +- .../Terminators/IterationBasedTerminator.cs | 2 +- .../MultiTrainerExtensions.cs | 2 +- .../RecommendationTrainerExtensions.cs | 2 +- .../RegressionTrainerExtensions.cs | 2 +- .../TransformInference/TransformInference.cs | 6 +- .../TransformPostTrainerInference.cs | 2 +- .../Utils/ColumnTypeExtensions.cs | 2 +- .../Utils/DatasetColumnInfo.cs | 2 +- src/Microsoft.ML.AutoML/Utils/Logger.cs | 2 +- src/Microsoft.ML.CodeGenerator/Assembly.cs | 2 +- .../AzureAttachModelCodeGenerator.cs | 3 +- .../CodeGenerator/CSharp/CSharpCodeFile.cs | 2 +- .../CodeGenerator/CSharp/CSharpProject.cs | 2 +- .../CodeGenerator/CSharp/CSharpProjectFile.cs | 2 +- .../CodeGenerator/CSharp/CSharpSolution.cs | 2 +- .../CodeGenerator/CSharp/CodeGenerator.cs | 10 +- .../CSharp/Interface/ICSharpFile.cs | 4 +- .../CSharp/Interface/IProjectGenerator.cs | 2 +- .../CSharp/TrainerGeneratorBase.cs | 2 +- .../CSharp/TrainerGeneratorFactory.cs | 2 +- .../CodeGenerator/CSharp/TrainerGenerators.cs | 2 +- .../CSharp/TransformGeneratorBase.cs | 2 +- .../CSharp/TransformGeneratorFactory.cs | 2 +- .../CSharp/TransformGenerators.cs | 2 +- src/Microsoft.ML.CodeGenerator/Utils.cs | 8 +- src/Microsoft.ML.Console/Console.cs | 2 +- .../CommandLine/ArgumentAttribute.cs | 4 +- .../CommandLine/CharCursor.cs | 2 +- src/Microsoft.ML.Core/CommandLine/CmdLexer.cs | 2 +- .../CommandLine/CmdParser.cs | 19 +- .../CommandLine/EnumValueDisplayAttribute.cs | 2 +- .../CommandLine/HideEnumValueAttribute.cs | 2 +- .../CommandLine/SpecialPurpose.cs | 2 +- .../ComponentModel/AssemblyLoadingUtils.cs | 2 +- .../ComponentModel/ComponentCatalog.cs | 2 +- .../ComponentModel/ComponentFactory.cs | 2 +- .../ComponentModel/ExtensionBaseAttribute.cs | 2 +- .../ComponentModel/LoadableClassAttribute.cs | 2 +- src/Microsoft.ML.Core/Data/AnnotationUtils.cs | 4 +- src/Microsoft.ML.Core/Data/DataKind.cs | 4 +- src/Microsoft.ML.Core/Data/ICommand.cs | 2 +- src/Microsoft.ML.Core/Data/IFileHandle.cs | 2 +- .../Data/IHostEnvironment.cs | 2 +- .../Data/IProgressChannel.cs | 4 +- .../Data/ISchemaBindableMapper.cs | 2 +- src/Microsoft.ML.Core/Data/IValueMapper.cs | 4 +- src/Microsoft.ML.Core/Data/InPredicate.cs | 2 +- .../Data/LinkedRootCursorBase.cs | 4 +- .../Data/LinkedRowFilterCursorBase.cs | 2 +- .../Data/LinkedRowRootCursorBase.cs | 4 +- src/Microsoft.ML.Core/Data/ModelHeader.cs | 2 +- .../Data/ModelLoadContext.cs | 2 +- src/Microsoft.ML.Core/Data/ModelLoading.cs | 4 +- .../Data/ModelSaveContext.cs | 4 +- src/Microsoft.ML.Core/Data/ModelSaving.cs | 4 +- .../Data/ProgressReporter.cs | 24 +- src/Microsoft.ML.Core/Data/Repository.cs | 4 +- .../Data/RoleMappedSchema.cs | 4 +- src/Microsoft.ML.Core/Data/RootCursorBase.cs | 4 +- src/Microsoft.ML.Core/Data/ServerChannel.cs | 2 +- .../Data/SynchronizedCursorBase.cs | 2 +- .../EntryPoints/EntryPointModuleAttribute.cs | 2 +- .../EntryPoints/EntryPointUtils.cs | 2 +- .../EntryPoints/ModuleArgs.cs | 2 +- .../EntryPoints/PredictorModel.cs | 4 +- .../EntryPoints/TransformModel.cs | 2 +- .../Environment/ConsoleEnvironment.cs | 4 +- .../Environment/HostEnvironmentBase.cs | 2 +- .../Environment/TelemetryMessage.cs | 2 +- .../Prediction/IPredictor.cs | 2 +- src/Microsoft.ML.Core/Prediction/ITrainer.cs | 2 +- src/Microsoft.ML.Core/Prediction/ITree.cs | 2 +- .../Properties/AssemblyInfo.cs | 2 +- src/Microsoft.ML.Core/Utilities/ArrayUtils.cs | 2 +- src/Microsoft.ML.Core/Utilities/BigArray.cs | 2 +- src/Microsoft.ML.Core/Utilities/BinFinder.cs | 2 +- src/Microsoft.ML.Core/Utilities/BitUtils.cs | 2 +- src/Microsoft.ML.Core/Utilities/CharUtils.cs | 2 +- .../Utilities/CmdIndenter.cs | 4 +- src/Microsoft.ML.Core/Utilities/Contracts.cs | 2 +- .../Utilities/DoubleParser.cs | 10 +- .../Utilities/FixedSizeQueue.cs | 2 +- src/Microsoft.ML.Core/Utilities/FloatUtils.cs | 2 +- src/Microsoft.ML.Core/Utilities/HashArray.cs | 4 +- src/Microsoft.ML.Core/Utilities/Hashing.cs | 2 +- src/Microsoft.ML.Core/Utilities/Heap.cs | 2 +- .../Utilities/HybridMemoryStream.cs | 2 +- .../Utilities/IndentedTextWriterExtensions.cs | 4 +- src/Microsoft.ML.Core/Utilities/LineParser.cs | 2 +- src/Microsoft.ML.Core/Utilities/MathUtils.cs | 2 +- .../Utilities/MatrixTransposeOps.cs | 2 +- src/Microsoft.ML.Core/Utilities/MinWaiter.cs | 2 +- src/Microsoft.ML.Core/Utilities/NormStr.cs | 2 +- src/Microsoft.ML.Core/Utilities/ObjectPool.cs | 2 +- .../Utilities/OrderedWaiter.cs | 2 +- .../Utilities/PlatformUtils.cs | 2 +- src/Microsoft.ML.Core/Utilities/Random.cs | 4 +- .../Utilities/ReservoirSampler.cs | 2 +- .../Utilities/ResourceManagerUtils.cs | 6 +- src/Microsoft.ML.Core/Utilities/Stats.cs | 2 +- src/Microsoft.ML.Core/Utilities/Stream.cs | 2 +- .../Utilities/SubsetStream.cs | 2 +- .../Utilities/SummaryStatistics.cs | 2 +- .../Utilities/SupervisedBinFinder.cs | 2 +- .../Utilities/TextReaderStream.cs | 4 +- .../Utilities/ThreadUtils.cs | 2 +- src/Microsoft.ML.Core/Utilities/Tree.cs | 2 +- src/Microsoft.ML.Core/Utilities/Utils.cs | 2 +- .../Utilities/VBufferUtils.cs | 2 +- src/Microsoft.ML.CpuMath/AlignedArray.cs | 4 +- src/Microsoft.ML.CpuMath/AlignedMatrix.cs | 4 +- .../CpuAligenedMathUtils.cs | 2 +- .../CpuMathUtils.netstandard.cs | 2 +- src/Microsoft.ML.CpuMath/EigenUtils.cs | 8 +- .../FactorizationMachine/AvxIntrinsics.cs | 10 +- .../FactorizationMachineInterface.cs | 4 +- ...actorizationMachineInterface.netcoreapp.cs | 2 +- src/Microsoft.ML.CpuMath/ICpuBuffer.cs | 4 +- src/Microsoft.ML.CpuMath/IntUtils.cs | 2 +- .../ProbabilityFunctions.cs | 2 +- src/Microsoft.ML.CpuMath/Thunk.cs | 2 +- .../Commands/CrossValidationCommand.cs | 2 +- src/Microsoft.ML.Data/Commands/DataCommand.cs | 4 +- .../Commands/DefaultColumnNames.cs | 2 +- .../Commands/EvaluateCommand.cs | 2 +- .../Commands/SaveDataCommand.cs | 4 +- .../Commands/SavePredictorCommand.cs | 4 +- .../Commands/ScoreCommand.cs | 4 +- .../Commands/ShowSchemaCommand.cs | 2 +- src/Microsoft.ML.Data/Commands/TestCommand.cs | 4 +- .../Commands/TrainCommand.cs | 2 +- .../Commands/TrainTestCommand.cs | 4 +- src/Microsoft.ML.Data/Data/BufferBuilder.cs | 6 +- src/Microsoft.ML.Data/Data/Combiner.cs | 4 +- src/Microsoft.ML.Data/Data/Conversion.cs | 6 +- .../Data/DataViewTypeManager.cs | 22 +- src/Microsoft.ML.Data/Data/DataViewUtils.cs | 46 +- .../Data/ILegacyDataLoader.cs | 2 +- src/Microsoft.ML.Data/Data/IRowSeekable.cs | 2 +- .../Data/ITransposeDataView.cs | 2 +- src/Microsoft.ML.Data/Data/RowCursorUtils.cs | 2 +- .../Data/SchemaDefinition.cs | 2 +- .../DataLoadSave/Binary/BinaryLoader.cs | 2 +- .../DataLoadSave/Binary/BinarySaver.cs | 2 +- .../DataLoadSave/Binary/BlockLookup.cs | 2 +- .../DataLoadSave/Binary/CodecFactory.cs | 2 +- .../DataLoadSave/Binary/Codecs.cs | 4 +- .../DataLoadSave/Binary/CompressionKind.cs | 2 +- .../DataLoadSave/Binary/Header.cs | 2 +- .../DataLoadSave/Binary/IValueCodec.cs | 2 +- .../DataLoadSave/Binary/MemoryStreamPool.cs | 2 +- .../DataLoadSave/Binary/UnsafeTypeOps.cs | 2 +- .../DataLoadSave/CompositeDataLoader.cs | 2 +- .../DataLoadSave/DataLoaderExtensions.cs | 2 +- .../DataLoadSave/DataOperationsCatalog.cs | 6 +- .../Database/DatabaseLoaderCatalog.cs | 2 +- .../DataLoadSave/Database/DbExtensions.cs | 84 +- .../DataLoadSave/EstimatorChain.cs | 2 +- .../DataLoadSave/LegacyCompositeDataLoader.cs | 2 +- .../DataLoadSave/MultiFileSource.cs | 2 +- .../DataLoadSave/Text/TextLoader.cs | 82 +- .../DataLoadSave/Text/TextLoaderCursor.cs | 10 +- .../DataLoadSave/Text/TextLoaderParser.cs | 12 +- .../Text/TextLoaderSaverCatalog.cs | 2 +- .../DataLoadSave/Text/TextSaver.cs | 62 +- .../DataLoadSave/Transpose/TransposeLoader.cs | 2 +- .../DataLoadSave/Transpose/TransposeSaver.cs | 2 +- .../DataView/AppendRowsDataView.cs | 6 +- .../DataView/ArrayDataViewBuilder.cs | 4 +- .../DataView/CacheDataView.cs | 2 +- .../DataView/CompositeRowToRowMapper.cs | 2 +- .../DataView/DataViewConstructionUtils.cs | 6 +- .../DataView/DataViewExtensions.cs | 4 +- .../DataView/EmptyDataView.cs | 4 +- .../DataView/InternalSchemaDefinition.cs | 2 +- .../DataView/LambdaColumnMapper.cs | 2 +- .../DataView/LambdaFilter.cs | 2 +- .../DataView/OpaqueDataView.cs | 4 +- .../DataView/RowToRowMapperTransform.cs | 2 +- src/Microsoft.ML.Data/DataView/SimpleRow.cs | 4 +- src/Microsoft.ML.Data/DataView/Transposer.cs | 6 +- src/Microsoft.ML.Data/DataView/TypedCursor.cs | 2 +- .../Depricated/Instances/HeaderSchema.cs | 4 +- .../Depricated/TGUIAttribute.cs | 2 +- .../Depricated/Vector/VBufferMathUtils.cs | 6 +- .../Depricated/Vector/VectorUtils.cs | 4 +- .../Dirty/ChooseColumnsByIndexTransform.cs | 2 +- src/Microsoft.ML.Data/Dirty/ILoss.cs | 2 +- src/Microsoft.ML.Data/Dirty/IniFileUtils.cs | 2 +- .../Dirty/ModelParametersBase.cs | 2 +- .../Dirty/PredictionUtils.cs | 38 +- .../Dirty/PredictorInterfaces.cs | 2 +- src/Microsoft.ML.Data/Dirty/PredictorUtils.cs | 4 +- .../EntryPoints/CommonOutputs.cs | 4 +- .../EntryPoints/EntryPointNode.cs | 2 +- .../EntryPoints/InputBase.cs | 2 +- .../EntryPoints/InputBuilder.cs | 2 +- .../EntryPoints/PredictorModelImpl.cs | 2 +- .../EntryPoints/SchemaManipulation.cs | 2 +- .../EntryPoints/SelectRows.cs | 2 +- .../EntryPoints/SummarizePredictor.cs | 2 +- .../EntryPoints/TransformModelImpl.cs | 2 +- .../Evaluators/AnomalyDetectionEvaluator.cs | 2 +- .../Evaluators/AucAggregator.cs | 2 +- .../Evaluators/BinaryClassifierEvaluator.cs | 4 +- .../Evaluators/ClusteringEvaluator.cs | 4 +- .../Evaluators/EvaluatorBase.cs | 2 +- .../Evaluators/EvaluatorUtils.cs | 6 +- .../Evaluators/MamlEvaluator.cs | 2 +- .../Metrics/BinaryClassificationMetrics.cs | 4 +- .../CalibratedBinaryClassificationMetrics.cs | 2 +- .../Evaluators/Metrics/ClusteringMetrics.cs | 4 +- .../Evaluators/Metrics/ConfusionMatrix.cs | 6 +- .../MulticlassClassificationMetrics.cs | 2 +- .../Evaluators/Metrics/RankingMetrics.cs | 2 +- .../Evaluators/Metrics/RegressionMetrics.cs | 4 +- .../MultiOutputRegressionEvaluator.cs | 2 +- .../MulticlassClassificationEvaluator.cs | 6 +- .../Evaluators/RankingEvaluator.cs | 4 +- .../Evaluators/RegressionEvaluatorBase.cs | 4 +- src/Microsoft.ML.Data/LoggingEventArgs.cs | 2 +- .../Model/Onnx/ICanSaveOnnx.cs | 4 +- .../Model/Onnx/OnnxContext.cs | 2 +- .../Model/Pfa/BoundPfaContext.cs | 2 +- .../Model/Pfa/ICanSavePfa.cs | 2 +- src/Microsoft.ML.Data/Model/Pfa/ModelUtils.cs | 2 +- src/Microsoft.ML.Data/Model/Pfa/PfaContext.cs | 2 +- src/Microsoft.ML.Data/Model/Pfa/PfaUtils.cs | 6 +- .../Model/Pfa/SavePfaCommand.cs | 2 +- .../Prediction/Calibrator.cs | 14 +- .../Prediction/IPredictionTransformer.cs | 2 +- .../Prediction/PredictionEngine.cs | 4 +- .../Properties/AssemblyInfo.cs | 2 +- .../Scorers/BinaryClassifierScorer.cs | 2 +- .../Scorers/ClusteringScorer.cs | 2 +- .../Scorers/FeatureContributionCalculation.cs | 2 +- .../Scorers/GenericScorer.cs | 4 +- .../Scorers/MulticlassClassificationScorer.cs | 2 +- .../Scorers/PredictedLabelScorerBase.cs | 4 +- .../Scorers/PredictionTransformer.cs | 10 +- .../Scorers/QuantileRegressionScorer.cs | 4 +- .../Scorers/RowToRowScorerBase.cs | 2 +- .../Scorers/SchemaBindablePredictorWrapper.cs | 2 +- .../Scorers/ScoreSchemaFactory.cs | 4 +- src/Microsoft.ML.Data/TrainCatalog.cs | 2 +- .../Training/TrainerInputBase.cs | 2 +- .../Training/TrainerUtils.cs | 2 +- .../Transforms/BindingsWrappedRowCursor.cs | 2 +- .../BootstrapSamplingTransformer.cs | 2 +- .../Transforms/CatalogUtils.cs | 2 +- .../Transforms/ColumnBindingsBase.cs | 4 +- .../ColumnConcatenatingTransformer.cs | 2 +- .../Transforms/ColumnCopying.cs | 2 +- .../Transforms/ColumnSelecting.cs | 2 +- .../ConversionsExtensionsCatalog.cs | 2 +- ...atureContributionCalculationTransformer.cs | 2 +- .../Transforms/GenerateNumberTransform.cs | 2 +- src/Microsoft.ML.Data/Transforms/Hashing.cs | 4 +- .../Transforms/InvertHashUtils.cs | 2 +- .../Transforms/KeyToValue.cs | 2 +- .../Transforms/KeyToVector.cs | 2 +- .../Transforms/LabelConvertTransform.cs | 2 +- .../Transforms/LabelIndicatorTransform.cs | 2 +- .../Transforms/MetadataDispatcher.cs | 2 +- src/Microsoft.ML.Data/Transforms/NAFilter.cs | 2 +- .../Transforms/NopTransform.cs | 4 +- .../Transforms/NormalizeColumn.cs | 4 +- .../Transforms/NormalizeColumnDbl.cs | 2 +- .../Transforms/NormalizeColumnSng.cs | 8 +- .../Transforms/NormalizeUtils.cs | 2 +- .../Transforms/Normalizer.cs | 2 +- .../Transforms/PerGroupTransformBase.cs | 2 +- .../Transforms/RangeFilter.cs | 2 +- .../Transforms/RowShufflingTransformer.cs | 2 +- .../Transforms/SkipTakeFilter.cs | 4 +- .../Transforms/SlotsDroppingTransformer.cs | 2 +- .../Transforms/TrainAndScoreTransformer.cs | 2 +- .../Transforms/TransformBase.cs | 2 +- .../Transforms/TransformInputBase.cs | 2 +- .../Transforms/TypeConverting.cs | 2 +- .../Transforms/ValueMapping.cs | 6 +- .../Transforms/ValueToKeyMappingEstimator.cs | 2 +- .../ValueToKeyMappingTransformer.cs | 2 +- .../Utilities/ApplyTransformUtils.cs | 2 +- .../Utilities/ComponentCreation.cs | 2 +- .../Utilities/LocalEnvironment.cs | 2 +- .../Utilities/ModelFileUtils.cs | 2 +- .../Utilities/SlotDropper.cs | 4 +- .../Utilities/StreamUtils.cs | 2 +- src/Microsoft.ML.Data/Utilities/TimerScope.cs | 2 +- .../Utilities/TypeParsingUtils.cs | 2 +- src/Microsoft.ML.Data/Utils/ApiUtils.cs | 2 +- src/Microsoft.ML.Data/Utils/LossFunctions.cs | 4 +- src/Microsoft.ML.Data/Utils/SequencePool.cs | 2 +- src/Microsoft.ML.DataView/Contracts.cs | 2 +- src/Microsoft.ML.DataView/DataViewRowId.cs | 2 +- src/Microsoft.ML.DataView/DataViewType.cs | 4 +- src/Microsoft.ML.DataView/Hashing.cs | 4 +- src/Microsoft.ML.DataView/IDataView.cs | 4 +- src/Microsoft.ML.DataView/KeyDataViewType.cs | 4 +- src/Microsoft.ML.DataView/VBuffer.cs | 4 +- src/Microsoft.ML.DataView/VectorType.cs | 4 +- .../Microsoft.ML.DnnAnalyzer/DnnAnalyzer.cs | 2 +- .../AlexNetExtension.cs | 4 +- .../ResNet101Extension.cs | 4 +- .../ResNet18Extension.cs | 4 +- .../ResNet50Extension.cs | 4 +- .../OutputCombiners/BaseStacking.cs | 18 +- .../OutputCombiners/IOutputCombiner.cs | 2 +- .../Properties/AssemblyInfo.cs | 2 +- src/Microsoft.ML.Ensemble/Subset.cs | 2 +- .../Trainer/Binary/EnsembleTrainer.cs | 2 +- .../Trainer/EnsembleModelParameters.cs | 2 +- src/Microsoft.ML.EntryPoints/CVSplit.cs | 2 +- .../CrossValidationMacro.cs | 34 +- .../FeatureCombiner.cs | 2 +- .../ImportTextData.cs | 2 +- .../JsonUtils/ExecuteGraphCommand.cs | 2 +- .../JsonUtils/GraphRunner.cs | 4 +- .../JsonUtils/JsonManifestUtils.cs | 2 +- src/Microsoft.ML.EntryPoints/MacroUtils.cs | 48 +- .../ModelOperations.cs | 2 +- .../OneVersusAllMacro.cs | 2 +- .../ScoreColumnSelector.cs | 2 +- src/Microsoft.ML.EntryPoints/ScoreModel.cs | 2 +- .../TrainTestMacro.cs | 2 +- .../TrainTestSplit.cs | 4 +- .../BinFile/BinFinder.cs | 2 +- src/Microsoft.ML.FastTree/BoostingFastTree.cs | 2 +- src/Microsoft.ML.FastTree/Dataset/Dataset.cs | 2 +- .../Dataset/DatasetUtils.cs | 4 +- .../Dataset/DenseIntArray.cs | 2 +- src/Microsoft.ML.FastTree/Dataset/Feature.cs | 2 +- .../Dataset/FeatureFlock.cs | 2 +- .../Dataset/FeatureHistogram.cs | 2 +- src/Microsoft.ML.FastTree/Dataset/IntArray.cs | 2 +- .../Dataset/NHotFeatureFlock.cs | 2 +- .../Dataset/OneHotFeatureFlock.cs | 2 +- .../Dataset/RepeatIntArray.cs | 2 +- .../Dataset/SegmentIntArray.cs | 8 +- .../Dataset/SingletonFeatureFlock.cs | 2 +- .../Dataset/SparseIntArray.cs | 5 +- src/Microsoft.ML.FastTree/FastTree.cs | 4 +- .../FastTreeArguments.cs | 16 +- .../FastTreeClassification.cs | 2 +- src/Microsoft.ML.FastTree/FastTreeRanking.cs | 2 +- .../FastTreeRegression.cs | 2 +- src/Microsoft.ML.FastTree/FastTreeTweedie.cs | 2 +- src/Microsoft.ML.FastTree/GamTrainer.cs | 2 +- src/Microsoft.ML.FastTree/RandomForest.cs | 2 +- .../RandomForestClassification.cs | 2 +- .../RandomForestRegression.cs | 2 +- .../Training/Applications/GradientWrappers.cs | 2 +- .../Applications/ObjectiveFunction.cs | 2 +- .../Training/BaggingProvider.cs | 2 +- .../Training/DcgCalculator.cs | 2 +- .../Training/DcgPermutationComparer.cs | 2 +- .../Training/DocumentPartitioning.cs | 2 +- .../Training/EarlyStoppingCriteria.cs | 9 +- .../LassoBasedEnsembleCompressor.cs | 2 +- .../Training/EnsembleCompression/LassoFit.cs | 2 +- .../AcceleratedGradientDescent.cs | 2 +- .../ConjugateGradientDescent.cs | 2 +- .../OptimizationAlgorithms/GradientDescent.cs | 2 +- .../NoOptimizationAlgorithm.cs | 2 +- .../OptimizationAlgorithm.cs | 2 +- .../Training/Parallel/IParallelTraining.cs | 2 +- .../Training/Parallel/SingleTrainer.cs | 2 +- .../Training/RegressionTreeNodeDocuments.cs | 2 +- .../Training/ScoreTracker.cs | 4 +- .../Training/StepSearch.cs | 4 +- src/Microsoft.ML.FastTree/Training/Test.cs | 2 +- .../FastForestLeastSquaresTreeLearner.cs | 2 +- .../LeastSquaresRegressionTreeLearner.cs | 2 +- .../Training/TreeLearners/TreeLearner.cs | 2 +- .../Training/WinLossCalculator.cs | 2 +- .../InternalQuantileRegressionTree.cs | 2 +- .../TreeEnsemble/InternalRegressionTree.cs | 2 +- .../TreeEnsemble/InternalTreeEnsemble.cs | 2 +- .../TreeEnsemble/TreeEnsembleCombiner.cs | 44 +- .../TreeEnsembleFeaturizationTransformer.cs | 18 +- .../TreeEnsembleFeaturizer.cs | 26 +- .../TreeTrainersCatalog.cs | 2 +- src/Microsoft.ML.FastTree/Utils/Algorithms.cs | 2 +- .../Utils/BlockingThreadPool.cs | 2 +- .../Utils/CompressUtils.cs | 2 +- .../Utils/LinqExtensions.cs | 2 +- .../Utils/MappedObjectPool.cs | 2 +- .../Utils/PseudorandomFunction.cs | 2 +- .../Utils/StreamExtensions.cs | 2 +- .../Utils/ThreadTaskManager.cs | 2 +- src/Microsoft.ML.FastTree/Utils/Timer.cs | 2 +- .../Utils/ToByteArrayExtensions.cs | 2 +- .../Utils/VectorUtils.cs | 2 +- .../Properties/AssemblyInfo.cs | 2 +- .../ImageLoader.cs | 8 +- src/Microsoft.ML.ImageAnalytics/ImageType.cs | 2 +- .../Properties/AssemblyInfo.cs | 2 +- .../KMeansModelParameters.cs | 4 +- .../KMeansPlusPlusTrainer.cs | 2 +- .../Properties/AssemblyInfo.cs | 2 +- .../LightGbmArguments.cs | 12 +- .../LightGbmBinaryTrainer.cs | 2 +- src/Microsoft.ML.LightGbm/LightGbmCatalog.cs | 2 +- .../LightGbmMulticlassTrainer.cs | 14 +- .../LightGbmRankingTrainer.cs | 4 +- .../LightGbmRegressionTrainer.cs | 18 +- .../Parallel/IParallel.cs | 12 +- .../Properties/AssemblyInfo.cs | 2 +- .../WrappedLightGbmInterface.cs | 8 +- src/Microsoft.ML.Maml/ChainCommand.cs | 2 +- src/Microsoft.ML.Maml/HelpCommand.cs | 2 +- src/Microsoft.ML.Maml/MAML.cs | 2 +- .../Properties/AssemblyInfo.cs | 2 +- src/Microsoft.ML.Maml/VersionCommand.cs | 2 +- .../MklComponentsCatalog.cs | 2 +- .../Properties/AssemblyInfo.cs | 2 +- .../SymSgdClassificationTrainer.cs | 2 +- .../VectorWhitening.cs | 2 +- .../OnnxContextImpl.cs | 2 +- .../OnnxExportExtensions.cs | 2 +- src/Microsoft.ML.OnnxConverter/OnnxUtils.cs | 4 +- .../SaveOnnxCommand.cs | 4 +- .../OnnxTransform.cs | 6 +- .../OnnxTypeParser.cs | 7 +- src/Microsoft.ML.OnnxTransformer/OnnxUtils.cs | 12 +- .../Properties/AssemblyInfo.cs | 2 +- src/Microsoft.ML.PCA/PcaTrainer.cs | 4 +- .../Properties/AssemblyInfo.cs | 2 +- src/Microsoft.ML.Parquet/ParquetLoader.cs | 2 +- .../Properties/AssemblyInfo.cs | 2 +- .../MatrixFactorizationPredictor.cs | 2 +- .../MatrixFactorizationTrainer.cs | 2 +- .../Properties/AssemblyInfo.cs | 2 +- .../RecommenderUtils.cs | 2 +- .../ResultProcessor.cs | 6 +- .../Optimizer/DifferentiableFunction.cs | 2 +- .../Optimizer/L1Optimizer.cs | 2 +- .../Optimizer/LineSearch.cs | 2 +- .../Optimizer/OptimizationMonitor.cs | 2 +- .../Optimizer/Optimizer.cs | 2 +- .../Optimizer/SgdOptimizer.cs | 2 +- .../Properties/AssemblyInfo.cs | 4 +- .../Standard/LinearModelParameters.cs | 6 +- .../Standard/LinearPredictorUtils.cs | 4 +- .../LogisticRegression/LbfgsPredictorBase.cs | 24 +- .../LogisticRegression/LogisticRegression.cs | 2 +- .../MulticlassLogisticRegression.cs | 2 +- .../Standard/ModelStatistics.cs | 2 +- .../MetaMulticlassTrainer.cs | 4 +- .../MulticlassNaiveBayesTrainer.cs | 4 +- .../OneVersusAllTrainer.cs | 4 +- .../PairwiseCouplingTrainer.cs | 2 +- .../Standard/Online/AveragedLinear.cs | 2 +- .../Standard/Online/AveragedPerceptron.cs | 2 +- .../Standard/Online/LinearSvm.cs | 2 +- .../Standard/Online/OnlineGradientDescent.cs | 4 +- .../Standard/Online/OnlineLinear.cs | 2 +- .../PoissonRegression/PoissonRegression.cs | 2 +- .../Standard/SdcaBinary.cs | 2 +- .../Standard/SdcaMulticlass.cs | 2 +- .../Standard/SdcaRegression.cs | 2 +- .../Standard/Simple/SimpleTrainers.cs | 2 +- .../StandardTrainersCatalog.cs | 2 +- src/Microsoft.ML.Sweeper/Algorithms/Grid.cs | 2 +- .../Algorithms/KdoSweeper.cs | 2 +- .../Algorithms/NelderMead.cs | 2 +- src/Microsoft.ML.Sweeper/Algorithms/Random.cs | 2 +- .../Algorithms/SmacSweeper.cs | 2 +- .../Algorithms/SweeperProbabilityUtils.cs | 2 +- src/Microsoft.ML.Sweeper/AsyncSweeper.cs | 2 +- src/Microsoft.ML.Sweeper/ISweeper.cs | 2 +- src/Microsoft.ML.Sweeper/Parameters.cs | 2 +- .../Properties/AssemblyInfo.cs | 2 +- src/Microsoft.ML.Sweeper/SweepCommand.cs | 2 +- .../SweepResultEvaluator.cs | 2 +- .../TensorFlowModel.cs | 4 +- .../TensorFlowSessionWrapper.cs | 2 +- .../TensorTypeExtensions.cs | 2 +- .../TensorflowTransform.cs | 6 +- src/Microsoft.ML.TimeSeries/EigenUtils.cs | 2 +- .../PercentileThresholdTransform.cs | 2 +- .../RootCauseAnalyzer.cs | 2 +- ...SequentialAnomalyDetectionTransformBase.cs | 14 +- .../SequentialForecastingTransformBase.cs | 2 +- .../SrCnnAnomalyDetectionBase.cs | 2 +- .../SrCnnEntireAnomalyDetector.cs | 12 +- .../SsaChangePointDetector.cs | 22 +- .../SsaForecastingBase.cs | 4 +- .../SsaSpikeDetector.cs | 20 +- .../CategoricalCatalog.cs | 2 +- .../CompositeTransformer.cs | 2 +- .../CountFeatureSelection.cs | 2 +- .../CustomMappingTransformer.cs | 2 +- .../Dracula/CMCountTable.cs | 2 +- .../Dracula/CountTable.cs | 2 +- .../Dracula/CountTableBuilder.cs | 2 +- .../Dracula/DictCountTable.cs | 2 +- .../Dracula/Featurizer.cs | 2 +- .../Dracula/MultiCountTable.cs | 2 +- .../EntryPoints/SelectFeatures.cs | 2 +- .../Expression/CodeGen.cs | 4 +- .../Expression/Error.cs | 2 +- .../Expression/IlGeneratorExtensions.cs | 2 +- .../Expression/KeyWordTable.cs | 2 +- .../Expression/LambdaBinder.cs | 2 +- .../Expression/Lexer.cs | 4 +- .../Expression/Node.cs | 2 +- .../Expression/Printer.cs | 2 +- .../Expression/TokKind.cs | 2 +- .../Expression/TokenCursor.cs | 2 +- .../Expression/Tokens.cs | 2 +- .../ExpressionTransformer.cs | 2 +- .../FourierDistributionSampler.cs | 2 +- src/Microsoft.ML.Transforms/GcnTransform.cs | 4 +- src/Microsoft.ML.Transforms/GroupTransform.cs | 2 +- .../HashJoiningTransform.cs | 2 +- .../KeyToVectorMapping.cs | 2 +- .../LambdaTransform.cs | 2 +- .../LearnerFeatureSelection.cs | 2 +- src/Microsoft.ML.Transforms/LoadTransform.cs | 4 +- .../MissingValueDroppingTransformer.cs | 4 +- .../MissingValueHandlingTransformer.cs | 2 +- .../MissingValueIndicatorTransform.cs | 2 +- .../MissingValueIndicatorTransformer.cs | 4 +- .../MissingValueReplacing.cs | 2 +- .../MissingValueReplacingUtils.cs | 12 +- .../MutualInformationFeatureSelection.cs | 2 +- src/Microsoft.ML.Transforms/NAHandling.cs | 2 +- .../NormalizerCatalog.cs | 2 +- src/Microsoft.ML.Transforms/OneHotEncoding.cs | 2 +- .../OneHotHashEncoding.cs | 2 +- .../OptionalColumnTransform.cs | 2 +- .../PermutationFeatureImportance.cs | 2 +- .../ProduceIdTransform.cs | 2 +- .../Properties/AssemblyInfo.cs | 2 +- .../StatefulFilterTransform.cs | 2 +- .../SvmLight/SvmLightLoaderSaverCatalog.cs | 8 +- .../Text/LdaTransform.cs | 2 +- .../Text/NgramTransform.cs | 2 +- .../Text/NgramUtils.cs | 2 +- .../Text/TextCatalog.cs | 2 +- .../Text/TextFeaturizingEstimator.cs | 18 +- .../Text/TokenizingByCharacters.cs | 2 +- .../Text/WordBagTransform.cs | 2 +- .../Text/WordEmbeddingsExtractor.cs | 2 +- .../Text/WordHashBagProducingTransform.cs | 2 +- .../Text/WordTokenizing.cs | 4 +- .../Text/WrappedTextTransformers.cs | 2 +- .../UngroupTransform.cs | 2 +- src/Microsoft.ML.Vision/AssemblyInfo.cs | 2 +- .../ImageClassificationTrainer.cs | 10 +- 593 files changed, 2209 insertions(+), 2172 deletions(-) diff --git a/src/Microsoft.Data.Analysis/DataFrame.BinaryOperators.cs b/src/Microsoft.Data.Analysis/DataFrame.BinaryOperators.cs index 395143a90b..7a23039532 100644 --- a/src/Microsoft.Data.Analysis/DataFrame.BinaryOperators.cs +++ b/src/Microsoft.Data.Analysis/DataFrame.BinaryOperators.cs @@ -12,12 +12,12 @@ namespace Microsoft.Data.Analysis { public partial class DataFrame { - #pragma warning disable 1591 +#pragma warning disable 1591 public static DataFrame operator +(DataFrame df, byte value) { return df.Add(value); } - + public static DataFrame operator +(byte value, DataFrame df) { return df.ReverseAdd(value); @@ -27,7 +27,7 @@ public partial class DataFrame { return df.Add(value); } - + public static DataFrame operator +(decimal value, DataFrame df) { return df.ReverseAdd(value); @@ -37,7 +37,7 @@ public partial class DataFrame { return df.Add(value); } - + public static DataFrame operator +(double value, DataFrame df) { return df.ReverseAdd(value); @@ -47,7 +47,7 @@ public partial class DataFrame { return df.Add(value); } - + public static DataFrame operator +(float value, DataFrame df) { return df.ReverseAdd(value); @@ -57,7 +57,7 @@ public partial class DataFrame { return df.Add(value); } - + public static DataFrame operator +(int value, DataFrame df) { return df.ReverseAdd(value); @@ -67,7 +67,7 @@ public partial class DataFrame { return df.Add(value); } - + public static DataFrame operator +(long value, DataFrame df) { return df.ReverseAdd(value); @@ -77,7 +77,7 @@ public partial class DataFrame { return df.Add(value); } - + public static DataFrame operator +(sbyte value, DataFrame df) { return df.ReverseAdd(value); @@ -87,7 +87,7 @@ public partial class DataFrame { return df.Add(value); } - + public static DataFrame operator +(short value, DataFrame df) { return df.ReverseAdd(value); @@ -97,7 +97,7 @@ public partial class DataFrame { return df.Add(value); } - + public static DataFrame operator +(uint value, DataFrame df) { return df.ReverseAdd(value); @@ -107,7 +107,7 @@ public partial class DataFrame { return df.Add(value); } - + public static DataFrame operator +(ulong value, DataFrame df) { return df.ReverseAdd(value); @@ -117,7 +117,7 @@ public partial class DataFrame { return df.Add(value); } - + public static DataFrame operator +(ushort value, DataFrame df) { return df.ReverseAdd(value); @@ -127,7 +127,7 @@ public partial class DataFrame { return df.Subtract(value); } - + public static DataFrame operator -(byte value, DataFrame df) { return df.ReverseSubtract(value); @@ -137,7 +137,7 @@ public partial class DataFrame { return df.Subtract(value); } - + public static DataFrame operator -(decimal value, DataFrame df) { return df.ReverseSubtract(value); @@ -147,7 +147,7 @@ public partial class DataFrame { return df.Subtract(value); } - + public static DataFrame operator -(double value, DataFrame df) { return df.ReverseSubtract(value); @@ -157,7 +157,7 @@ public partial class DataFrame { return df.Subtract(value); } - + public static DataFrame operator -(float value, DataFrame df) { return df.ReverseSubtract(value); @@ -167,7 +167,7 @@ public partial class DataFrame { return df.Subtract(value); } - + public static DataFrame operator -(int value, DataFrame df) { return df.ReverseSubtract(value); @@ -177,7 +177,7 @@ public partial class DataFrame { return df.Subtract(value); } - + public static DataFrame operator -(long value, DataFrame df) { return df.ReverseSubtract(value); @@ -187,7 +187,7 @@ public partial class DataFrame { return df.Subtract(value); } - + public static DataFrame operator -(sbyte value, DataFrame df) { return df.ReverseSubtract(value); @@ -197,7 +197,7 @@ public partial class DataFrame { return df.Subtract(value); } - + public static DataFrame operator -(short value, DataFrame df) { return df.ReverseSubtract(value); @@ -207,7 +207,7 @@ public partial class DataFrame { return df.Subtract(value); } - + public static DataFrame operator -(uint value, DataFrame df) { return df.ReverseSubtract(value); @@ -217,7 +217,7 @@ public partial class DataFrame { return df.Subtract(value); } - + public static DataFrame operator -(ulong value, DataFrame df) { return df.ReverseSubtract(value); @@ -227,7 +227,7 @@ public partial class DataFrame { return df.Subtract(value); } - + public static DataFrame operator -(ushort value, DataFrame df) { return df.ReverseSubtract(value); @@ -237,7 +237,7 @@ public partial class DataFrame { return df.Multiply(value); } - + public static DataFrame operator *(byte value, DataFrame df) { return df.ReverseMultiply(value); @@ -247,7 +247,7 @@ public partial class DataFrame { return df.Multiply(value); } - + public static DataFrame operator *(decimal value, DataFrame df) { return df.ReverseMultiply(value); @@ -257,7 +257,7 @@ public partial class DataFrame { return df.Multiply(value); } - + public static DataFrame operator *(double value, DataFrame df) { return df.ReverseMultiply(value); @@ -267,7 +267,7 @@ public partial class DataFrame { return df.Multiply(value); } - + public static DataFrame operator *(float value, DataFrame df) { return df.ReverseMultiply(value); @@ -277,7 +277,7 @@ public partial class DataFrame { return df.Multiply(value); } - + public static DataFrame operator *(int value, DataFrame df) { return df.ReverseMultiply(value); @@ -287,7 +287,7 @@ public partial class DataFrame { return df.Multiply(value); } - + public static DataFrame operator *(long value, DataFrame df) { return df.ReverseMultiply(value); @@ -297,7 +297,7 @@ public partial class DataFrame { return df.Multiply(value); } - + public static DataFrame operator *(sbyte value, DataFrame df) { return df.ReverseMultiply(value); @@ -307,7 +307,7 @@ public partial class DataFrame { return df.Multiply(value); } - + public static DataFrame operator *(short value, DataFrame df) { return df.ReverseMultiply(value); @@ -317,7 +317,7 @@ public partial class DataFrame { return df.Multiply(value); } - + public static DataFrame operator *(uint value, DataFrame df) { return df.ReverseMultiply(value); @@ -327,7 +327,7 @@ public partial class DataFrame { return df.Multiply(value); } - + public static DataFrame operator *(ulong value, DataFrame df) { return df.ReverseMultiply(value); @@ -337,7 +337,7 @@ public partial class DataFrame { return df.Multiply(value); } - + public static DataFrame operator *(ushort value, DataFrame df) { return df.ReverseMultiply(value); @@ -347,7 +347,7 @@ public partial class DataFrame { return df.Divide(value); } - + public static DataFrame operator /(byte value, DataFrame df) { return df.ReverseDivide(value); @@ -357,7 +357,7 @@ public partial class DataFrame { return df.Divide(value); } - + public static DataFrame operator /(decimal value, DataFrame df) { return df.ReverseDivide(value); @@ -367,7 +367,7 @@ public partial class DataFrame { return df.Divide(value); } - + public static DataFrame operator /(double value, DataFrame df) { return df.ReverseDivide(value); @@ -377,7 +377,7 @@ public partial class DataFrame { return df.Divide(value); } - + public static DataFrame operator /(float value, DataFrame df) { return df.ReverseDivide(value); @@ -387,7 +387,7 @@ public partial class DataFrame { return df.Divide(value); } - + public static DataFrame operator /(int value, DataFrame df) { return df.ReverseDivide(value); @@ -397,7 +397,7 @@ public partial class DataFrame { return df.Divide(value); } - + public static DataFrame operator /(long value, DataFrame df) { return df.ReverseDivide(value); @@ -407,7 +407,7 @@ public partial class DataFrame { return df.Divide(value); } - + public static DataFrame operator /(sbyte value, DataFrame df) { return df.ReverseDivide(value); @@ -417,7 +417,7 @@ public partial class DataFrame { return df.Divide(value); } - + public static DataFrame operator /(short value, DataFrame df) { return df.ReverseDivide(value); @@ -427,7 +427,7 @@ public partial class DataFrame { return df.Divide(value); } - + public static DataFrame operator /(uint value, DataFrame df) { return df.ReverseDivide(value); @@ -437,7 +437,7 @@ public partial class DataFrame { return df.Divide(value); } - + public static DataFrame operator /(ulong value, DataFrame df) { return df.ReverseDivide(value); @@ -447,7 +447,7 @@ public partial class DataFrame { return df.Divide(value); } - + public static DataFrame operator /(ushort value, DataFrame df) { return df.ReverseDivide(value); @@ -457,7 +457,7 @@ public partial class DataFrame { return df.Modulo(value); } - + public static DataFrame operator %(byte value, DataFrame df) { return df.ReverseModulo(value); @@ -467,7 +467,7 @@ public partial class DataFrame { return df.Modulo(value); } - + public static DataFrame operator %(decimal value, DataFrame df) { return df.ReverseModulo(value); @@ -477,7 +477,7 @@ public partial class DataFrame { return df.Modulo(value); } - + public static DataFrame operator %(double value, DataFrame df) { return df.ReverseModulo(value); @@ -487,7 +487,7 @@ public partial class DataFrame { return df.Modulo(value); } - + public static DataFrame operator %(float value, DataFrame df) { return df.ReverseModulo(value); @@ -497,7 +497,7 @@ public partial class DataFrame { return df.Modulo(value); } - + public static DataFrame operator %(int value, DataFrame df) { return df.ReverseModulo(value); @@ -507,7 +507,7 @@ public partial class DataFrame { return df.Modulo(value); } - + public static DataFrame operator %(long value, DataFrame df) { return df.ReverseModulo(value); @@ -517,7 +517,7 @@ public partial class DataFrame { return df.Modulo(value); } - + public static DataFrame operator %(sbyte value, DataFrame df) { return df.ReverseModulo(value); @@ -527,7 +527,7 @@ public partial class DataFrame { return df.Modulo(value); } - + public static DataFrame operator %(short value, DataFrame df) { return df.ReverseModulo(value); @@ -537,7 +537,7 @@ public partial class DataFrame { return df.Modulo(value); } - + public static DataFrame operator %(uint value, DataFrame df) { return df.ReverseModulo(value); @@ -547,7 +547,7 @@ public partial class DataFrame { return df.Modulo(value); } - + public static DataFrame operator %(ulong value, DataFrame df) { return df.ReverseModulo(value); @@ -557,7 +557,7 @@ public partial class DataFrame { return df.Modulo(value); } - + public static DataFrame operator %(ushort value, DataFrame df) { return df.ReverseModulo(value); diff --git a/src/Microsoft.Data.Analysis/DataFrame.cs b/src/Microsoft.Data.Analysis/DataFrame.cs index a63e9d24b4..b2ff955d9b 100644 --- a/src/Microsoft.Data.Analysis/DataFrame.cs +++ b/src/Microsoft.Data.Analysis/DataFrame.cs @@ -367,7 +367,7 @@ public GroupBy GroupBy(string columnName) DataFrameColumn column = _columnCollection[columnIndex]; return column.GroupBy(columnIndex, this); } - + /// /// Groups the rows of the by unique values in the column. /// diff --git a/src/Microsoft.Data.Analysis/DataFrameColumn.BinaryOperators.cs b/src/Microsoft.Data.Analysis/DataFrameColumn.BinaryOperators.cs index 6d1515bc5e..0fa803a636 100644 --- a/src/Microsoft.Data.Analysis/DataFrameColumn.BinaryOperators.cs +++ b/src/Microsoft.Data.Analysis/DataFrameColumn.BinaryOperators.cs @@ -12,7 +12,7 @@ namespace Microsoft.Data.Analysis { public abstract partial class DataFrameColumn { - #pragma warning disable 1591 +#pragma warning disable 1591 public static DataFrameColumn operator +(DataFrameColumn left, DataFrameColumn right) { return left.Add(right); diff --git a/src/Microsoft.Data.Analysis/PrimitiveColumnContainer.BinaryOperations.cs b/src/Microsoft.Data.Analysis/PrimitiveColumnContainer.BinaryOperations.cs index f8a8410a39..4020c6de7e 100644 --- a/src/Microsoft.Data.Analysis/PrimitiveColumnContainer.BinaryOperations.cs +++ b/src/Microsoft.Data.Analysis/PrimitiveColumnContainer.BinaryOperations.cs @@ -118,117 +118,117 @@ public PrimitiveColumnContainer RightShift(int value) return this; } - public PrimitiveColumnContainer ElementwiseEquals(PrimitiveColumnContainer right, PrimitiveColumnContainer ret) - { + public PrimitiveColumnContainer ElementwiseEquals(PrimitiveColumnContainer right, PrimitiveColumnContainer ret) + { PrimitiveDataFrameColumnArithmetic.Instance.ElementwiseEquals(this, right, ret); return this; - } + } - public PrimitiveColumnContainer ElementwiseEquals(T scalar, PrimitiveColumnContainer ret) - { + public PrimitiveColumnContainer ElementwiseEquals(T scalar, PrimitiveColumnContainer ret) + { PrimitiveDataFrameColumnArithmetic.Instance.ElementwiseEquals(this, scalar, ret); return this; - } + } - public PrimitiveColumnContainer ElementwiseNotEquals(PrimitiveColumnContainer right, PrimitiveColumnContainer ret) - { + public PrimitiveColumnContainer ElementwiseNotEquals(PrimitiveColumnContainer right, PrimitiveColumnContainer ret) + { PrimitiveDataFrameColumnArithmetic.Instance.ElementwiseNotEquals(this, right, ret); return this; - } + } - public PrimitiveColumnContainer ElementwiseNotEquals(T scalar, PrimitiveColumnContainer ret) - { + public PrimitiveColumnContainer ElementwiseNotEquals(T scalar, PrimitiveColumnContainer ret) + { PrimitiveDataFrameColumnArithmetic.Instance.ElementwiseNotEquals(this, scalar, ret); return this; - } + } - public PrimitiveColumnContainer ElementwiseGreaterThanOrEqual(PrimitiveColumnContainer right, PrimitiveColumnContainer ret) - { + public PrimitiveColumnContainer ElementwiseGreaterThanOrEqual(PrimitiveColumnContainer right, PrimitiveColumnContainer ret) + { PrimitiveDataFrameColumnArithmetic.Instance.ElementwiseGreaterThanOrEqual(this, right, ret); return this; - } + } - public PrimitiveColumnContainer ElementwiseGreaterThanOrEqual(T scalar, PrimitiveColumnContainer ret) - { + public PrimitiveColumnContainer ElementwiseGreaterThanOrEqual(T scalar, PrimitiveColumnContainer ret) + { PrimitiveDataFrameColumnArithmetic.Instance.ElementwiseGreaterThanOrEqual(this, scalar, ret); return this; - } + } - public PrimitiveColumnContainer ElementwiseLessThanOrEqual(PrimitiveColumnContainer right, PrimitiveColumnContainer ret) - { + public PrimitiveColumnContainer ElementwiseLessThanOrEqual(PrimitiveColumnContainer right, PrimitiveColumnContainer ret) + { PrimitiveDataFrameColumnArithmetic.Instance.ElementwiseLessThanOrEqual(this, right, ret); return this; - } + } - public PrimitiveColumnContainer ElementwiseLessThanOrEqual(T scalar, PrimitiveColumnContainer ret) - { + public PrimitiveColumnContainer ElementwiseLessThanOrEqual(T scalar, PrimitiveColumnContainer ret) + { PrimitiveDataFrameColumnArithmetic.Instance.ElementwiseLessThanOrEqual(this, scalar, ret); return this; - } + } - public PrimitiveColumnContainer ElementwiseGreaterThan(PrimitiveColumnContainer right, PrimitiveColumnContainer ret) - { + public PrimitiveColumnContainer ElementwiseGreaterThan(PrimitiveColumnContainer right, PrimitiveColumnContainer ret) + { PrimitiveDataFrameColumnArithmetic.Instance.ElementwiseGreaterThan(this, right, ret); return this; - } + } - public PrimitiveColumnContainer ElementwiseGreaterThan(T scalar, PrimitiveColumnContainer ret) - { + public PrimitiveColumnContainer ElementwiseGreaterThan(T scalar, PrimitiveColumnContainer ret) + { PrimitiveDataFrameColumnArithmetic.Instance.ElementwiseGreaterThan(this, scalar, ret); return this; - } + } - public PrimitiveColumnContainer ElementwiseLessThan(PrimitiveColumnContainer right, PrimitiveColumnContainer ret) - { + public PrimitiveColumnContainer ElementwiseLessThan(PrimitiveColumnContainer right, PrimitiveColumnContainer ret) + { PrimitiveDataFrameColumnArithmetic.Instance.ElementwiseLessThan(this, right, ret); return this; - } + } - public PrimitiveColumnContainer ElementwiseLessThan(T scalar, PrimitiveColumnContainer ret) - { + public PrimitiveColumnContainer ElementwiseLessThan(T scalar, PrimitiveColumnContainer ret) + { PrimitiveDataFrameColumnArithmetic.Instance.ElementwiseLessThan(this, scalar, ret); return this; - } + } - public PrimitiveColumnContainer ReverseAdd(T scalar) - { + public PrimitiveColumnContainer ReverseAdd(T scalar) + { PrimitiveDataFrameColumnArithmetic.Instance.Add(scalar, this); return this; - } - public PrimitiveColumnContainer ReverseSubtract(T scalar) - { + } + public PrimitiveColumnContainer ReverseSubtract(T scalar) + { PrimitiveDataFrameColumnArithmetic.Instance.Subtract(scalar, this); return this; - } - public PrimitiveColumnContainer ReverseMultiply(T scalar) - { + } + public PrimitiveColumnContainer ReverseMultiply(T scalar) + { PrimitiveDataFrameColumnArithmetic.Instance.Multiply(scalar, this); return this; - } - public PrimitiveColumnContainer ReverseDivide(T scalar) - { + } + public PrimitiveColumnContainer ReverseDivide(T scalar) + { PrimitiveDataFrameColumnArithmetic.Instance.Divide(scalar, this); return this; - } - public PrimitiveColumnContainer ReverseModulo(T scalar) - { + } + public PrimitiveColumnContainer ReverseModulo(T scalar) + { PrimitiveDataFrameColumnArithmetic.Instance.Modulo(scalar, this); return this; - } - public PrimitiveColumnContainer ReverseAnd(T scalar) - { + } + public PrimitiveColumnContainer ReverseAnd(T scalar) + { PrimitiveDataFrameColumnArithmetic.Instance.And(scalar, this); return this; - } - public PrimitiveColumnContainer ReverseOr(T scalar) - { + } + public PrimitiveColumnContainer ReverseOr(T scalar) + { PrimitiveDataFrameColumnArithmetic.Instance.Or(scalar, this); return this; - } - public PrimitiveColumnContainer ReverseXor(T scalar) - { + } + public PrimitiveColumnContainer ReverseXor(T scalar) + { PrimitiveDataFrameColumnArithmetic.Instance.Xor(scalar, this); return this; - } + } } } diff --git a/src/Microsoft.Data.Analysis/PrimitiveColumnContainer.cs b/src/Microsoft.Data.Analysis/PrimitiveColumnContainer.cs index 2e04f63fee..063a9b50af 100644 --- a/src/Microsoft.Data.Analysis/PrimitiveColumnContainer.cs +++ b/src/Microsoft.Data.Analysis/PrimitiveColumnContainer.cs @@ -103,7 +103,7 @@ public PrimitiveColumnContainer(ReadOnlyMemory buffer, ReadOnlyMemory(bitMap, bitMapBufferLength); } diff --git a/src/Microsoft.Data.Analysis/PrimitiveDataFrameColumn.BinaryOperations.cs b/src/Microsoft.Data.Analysis/PrimitiveDataFrameColumn.BinaryOperations.cs index 6ad8319edf..6a77e49ad4 100644 --- a/src/Microsoft.Data.Analysis/PrimitiveDataFrameColumn.BinaryOperations.cs +++ b/src/Microsoft.Data.Analysis/PrimitiveDataFrameColumn.BinaryOperations.cs @@ -664,7 +664,7 @@ internal DataFrameColumn AddImplementation(PrimitiveDataFrameColumn column newColumn._columnContainer.Add(column._columnContainer); return newColumn; } - else + else { if (inPlace) { @@ -697,7 +697,7 @@ internal DataFrameColumn AddImplementation(PrimitiveDataFrameColumn column newColumn._columnContainer.Add(column._columnContainer); return newColumn; } - else + else { if (inPlace) { @@ -739,7 +739,7 @@ internal DataFrameColumn AddImplementation(U value, bool inPlace) newColumn._columnContainer.Add(Unsafe.As(ref value)); return newColumn; } - else + else { if (inPlace) { @@ -772,7 +772,7 @@ internal DataFrameColumn AddImplementation(U value, bool inPlace) newColumn._columnContainer.Add(Unsafe.As(ref value)); return newColumn; } - else + else { if (inPlace) { @@ -819,7 +819,7 @@ internal DataFrameColumn SubtractImplementation(PrimitiveDataFrameColumn c newColumn._columnContainer.Subtract(column._columnContainer); return newColumn; } - else + else { if (inPlace) { @@ -852,7 +852,7 @@ internal DataFrameColumn SubtractImplementation(PrimitiveDataFrameColumn c newColumn._columnContainer.Subtract(column._columnContainer); return newColumn; } - else + else { if (inPlace) { @@ -894,7 +894,7 @@ internal DataFrameColumn SubtractImplementation(U value, bool inPlace) newColumn._columnContainer.Subtract(Unsafe.As(ref value)); return newColumn; } - else + else { if (inPlace) { @@ -927,7 +927,7 @@ internal DataFrameColumn SubtractImplementation(U value, bool inPlace) newColumn._columnContainer.Subtract(Unsafe.As(ref value)); return newColumn; } - else + else { if (inPlace) { @@ -974,7 +974,7 @@ internal DataFrameColumn MultiplyImplementation(PrimitiveDataFrameColumn c newColumn._columnContainer.Multiply(column._columnContainer); return newColumn; } - else + else { if (inPlace) { @@ -1007,7 +1007,7 @@ internal DataFrameColumn MultiplyImplementation(PrimitiveDataFrameColumn c newColumn._columnContainer.Multiply(column._columnContainer); return newColumn; } - else + else { if (inPlace) { @@ -1049,7 +1049,7 @@ internal DataFrameColumn MultiplyImplementation(U value, bool inPlace) newColumn._columnContainer.Multiply(Unsafe.As(ref value)); return newColumn; } - else + else { if (inPlace) { @@ -1082,7 +1082,7 @@ internal DataFrameColumn MultiplyImplementation(U value, bool inPlace) newColumn._columnContainer.Multiply(Unsafe.As(ref value)); return newColumn; } - else + else { if (inPlace) { @@ -1129,7 +1129,7 @@ internal DataFrameColumn DivideImplementation(PrimitiveDataFrameColumn col newColumn._columnContainer.Divide(column._columnContainer); return newColumn; } - else + else { if (inPlace) { @@ -1162,7 +1162,7 @@ internal DataFrameColumn DivideImplementation(PrimitiveDataFrameColumn col newColumn._columnContainer.Divide(column._columnContainer); return newColumn; } - else + else { if (inPlace) { @@ -1204,7 +1204,7 @@ internal DataFrameColumn DivideImplementation(U value, bool inPlace) newColumn._columnContainer.Divide(Unsafe.As(ref value)); return newColumn; } - else + else { if (inPlace) { @@ -1237,7 +1237,7 @@ internal DataFrameColumn DivideImplementation(U value, bool inPlace) newColumn._columnContainer.Divide(Unsafe.As(ref value)); return newColumn; } - else + else { if (inPlace) { @@ -1284,7 +1284,7 @@ internal DataFrameColumn ModuloImplementation(PrimitiveDataFrameColumn col newColumn._columnContainer.Modulo(column._columnContainer); return newColumn; } - else + else { if (inPlace) { @@ -1317,7 +1317,7 @@ internal DataFrameColumn ModuloImplementation(PrimitiveDataFrameColumn col newColumn._columnContainer.Modulo(column._columnContainer); return newColumn; } - else + else { if (inPlace) { @@ -1359,7 +1359,7 @@ internal DataFrameColumn ModuloImplementation(U value, bool inPlace) newColumn._columnContainer.Modulo(Unsafe.As(ref value)); return newColumn; } - else + else { if (inPlace) { @@ -1392,7 +1392,7 @@ internal DataFrameColumn ModuloImplementation(U value, bool inPlace) newColumn._columnContainer.Modulo(Unsafe.As(ref value)); return newColumn; } - else + else { if (inPlace) { @@ -1756,7 +1756,7 @@ internal PrimitiveDataFrameColumn ElementwiseEqualsImplementation(Primi primitiveColumn._columnContainer.ElementwiseEquals(column._columnContainer, newColumn._columnContainer); return newColumn; } - else + else { PrimitiveDataFrameColumn newColumn = CloneAsBooleanColumn(); PrimitiveDataFrameColumn decimalColumn = CloneAsDecimalColumn(); @@ -1786,7 +1786,7 @@ internal PrimitiveDataFrameColumn ElementwiseEqualsImplementation(Primi primitiveColumn._columnContainer.ElementwiseEquals(column._columnContainer, newColumn._columnContainer); return newColumn; } - else + else { if (typeof(U) == typeof(decimal)) { @@ -1832,7 +1832,7 @@ internal PrimitiveDataFrameColumn ElementwiseEqualsImplementation(U val primitiveColumn._columnContainer.ElementwiseEquals(Unsafe.As(ref value), newColumn._columnContainer); return newColumn; } - else + else { PrimitiveDataFrameColumn newColumn = CloneAsBooleanColumn(); PrimitiveDataFrameColumn decimalColumn = CloneAsDecimalColumn(); @@ -1862,7 +1862,7 @@ internal PrimitiveDataFrameColumn ElementwiseEqualsImplementation(U val primitiveColumn._columnContainer.ElementwiseEquals(Unsafe.As(ref value), newColumn._columnContainer); return newColumn; } - else + else { if (typeof(U) == typeof(decimal)) { @@ -1913,7 +1913,7 @@ internal PrimitiveDataFrameColumn ElementwiseNotEqualsImplementation(Pr primitiveColumn._columnContainer.ElementwiseNotEquals(column._columnContainer, newColumn._columnContainer); return newColumn; } - else + else { PrimitiveDataFrameColumn newColumn = CloneAsBooleanColumn(); PrimitiveDataFrameColumn decimalColumn = CloneAsDecimalColumn(); @@ -1943,7 +1943,7 @@ internal PrimitiveDataFrameColumn ElementwiseNotEqualsImplementation(Pr primitiveColumn._columnContainer.ElementwiseNotEquals(column._columnContainer, newColumn._columnContainer); return newColumn; } - else + else { if (typeof(U) == typeof(decimal)) { @@ -1989,7 +1989,7 @@ internal PrimitiveDataFrameColumn ElementwiseNotEqualsImplementation(U primitiveColumn._columnContainer.ElementwiseNotEquals(Unsafe.As(ref value), newColumn._columnContainer); return newColumn; } - else + else { PrimitiveDataFrameColumn newColumn = CloneAsBooleanColumn(); PrimitiveDataFrameColumn decimalColumn = CloneAsDecimalColumn(); @@ -2019,7 +2019,7 @@ internal PrimitiveDataFrameColumn ElementwiseNotEqualsImplementation(U primitiveColumn._columnContainer.ElementwiseNotEquals(Unsafe.As(ref value), newColumn._columnContainer); return newColumn; } - else + else { if (typeof(U) == typeof(decimal)) { @@ -2064,7 +2064,7 @@ internal PrimitiveDataFrameColumn ElementwiseGreaterThanOrEqualImplementat primitiveColumn._columnContainer.ElementwiseGreaterThanOrEqual(column._columnContainer, newColumn._columnContainer); return newColumn; } - else + else { PrimitiveDataFrameColumn newColumn = CloneAsBooleanColumn(); PrimitiveDataFrameColumn decimalColumn = CloneAsDecimalColumn(); @@ -2094,7 +2094,7 @@ internal PrimitiveDataFrameColumn ElementwiseGreaterThanOrEqualImplementat primitiveColumn._columnContainer.ElementwiseGreaterThanOrEqual(column._columnContainer, newColumn._columnContainer); return newColumn; } - else + else { if (typeof(U) == typeof(decimal)) { @@ -2134,7 +2134,7 @@ internal PrimitiveDataFrameColumn ElementwiseGreaterThanOrEqualImplementat primitiveColumn._columnContainer.ElementwiseGreaterThanOrEqual(Unsafe.As(ref value), newColumn._columnContainer); return newColumn; } - else + else { PrimitiveDataFrameColumn newColumn = CloneAsBooleanColumn(); PrimitiveDataFrameColumn decimalColumn = CloneAsDecimalColumn(); @@ -2164,7 +2164,7 @@ internal PrimitiveDataFrameColumn ElementwiseGreaterThanOrEqualImplementat primitiveColumn._columnContainer.ElementwiseGreaterThanOrEqual(Unsafe.As(ref value), newColumn._columnContainer); return newColumn; } - else + else { if (typeof(U) == typeof(decimal)) { @@ -2209,7 +2209,7 @@ internal PrimitiveDataFrameColumn ElementwiseLessThanOrEqualImplementation primitiveColumn._columnContainer.ElementwiseLessThanOrEqual(column._columnContainer, newColumn._columnContainer); return newColumn; } - else + else { PrimitiveDataFrameColumn newColumn = CloneAsBooleanColumn(); PrimitiveDataFrameColumn decimalColumn = CloneAsDecimalColumn(); @@ -2239,7 +2239,7 @@ internal PrimitiveDataFrameColumn ElementwiseLessThanOrEqualImplementation primitiveColumn._columnContainer.ElementwiseLessThanOrEqual(column._columnContainer, newColumn._columnContainer); return newColumn; } - else + else { if (typeof(U) == typeof(decimal)) { @@ -2279,7 +2279,7 @@ internal PrimitiveDataFrameColumn ElementwiseLessThanOrEqualImplementation primitiveColumn._columnContainer.ElementwiseLessThanOrEqual(Unsafe.As(ref value), newColumn._columnContainer); return newColumn; } - else + else { PrimitiveDataFrameColumn newColumn = CloneAsBooleanColumn(); PrimitiveDataFrameColumn decimalColumn = CloneAsDecimalColumn(); @@ -2309,7 +2309,7 @@ internal PrimitiveDataFrameColumn ElementwiseLessThanOrEqualImplementation primitiveColumn._columnContainer.ElementwiseLessThanOrEqual(Unsafe.As(ref value), newColumn._columnContainer); return newColumn; } - else + else { if (typeof(U) == typeof(decimal)) { @@ -2354,7 +2354,7 @@ internal PrimitiveDataFrameColumn ElementwiseGreaterThanImplementation( primitiveColumn._columnContainer.ElementwiseGreaterThan(column._columnContainer, newColumn._columnContainer); return newColumn; } - else + else { PrimitiveDataFrameColumn newColumn = CloneAsBooleanColumn(); PrimitiveDataFrameColumn decimalColumn = CloneAsDecimalColumn(); @@ -2384,7 +2384,7 @@ internal PrimitiveDataFrameColumn ElementwiseGreaterThanImplementation( primitiveColumn._columnContainer.ElementwiseGreaterThan(column._columnContainer, newColumn._columnContainer); return newColumn; } - else + else { if (typeof(U) == typeof(decimal)) { @@ -2424,7 +2424,7 @@ internal PrimitiveDataFrameColumn ElementwiseGreaterThanImplementation( primitiveColumn._columnContainer.ElementwiseGreaterThan(Unsafe.As(ref value), newColumn._columnContainer); return newColumn; } - else + else { PrimitiveDataFrameColumn newColumn = CloneAsBooleanColumn(); PrimitiveDataFrameColumn decimalColumn = CloneAsDecimalColumn(); @@ -2454,7 +2454,7 @@ internal PrimitiveDataFrameColumn ElementwiseGreaterThanImplementation( primitiveColumn._columnContainer.ElementwiseGreaterThan(Unsafe.As(ref value), newColumn._columnContainer); return newColumn; } - else + else { if (typeof(U) == typeof(decimal)) { @@ -2499,7 +2499,7 @@ internal PrimitiveDataFrameColumn ElementwiseLessThanImplementation(Pri primitiveColumn._columnContainer.ElementwiseLessThan(column._columnContainer, newColumn._columnContainer); return newColumn; } - else + else { PrimitiveDataFrameColumn newColumn = CloneAsBooleanColumn(); PrimitiveDataFrameColumn decimalColumn = CloneAsDecimalColumn(); @@ -2529,7 +2529,7 @@ internal PrimitiveDataFrameColumn ElementwiseLessThanImplementation(Pri primitiveColumn._columnContainer.ElementwiseLessThan(column._columnContainer, newColumn._columnContainer); return newColumn; } - else + else { if (typeof(U) == typeof(decimal)) { @@ -2569,7 +2569,7 @@ internal PrimitiveDataFrameColumn ElementwiseLessThanImplementation(U v primitiveColumn._columnContainer.ElementwiseLessThan(Unsafe.As(ref value), newColumn._columnContainer); return newColumn; } - else + else { PrimitiveDataFrameColumn newColumn = CloneAsBooleanColumn(); PrimitiveDataFrameColumn decimalColumn = CloneAsDecimalColumn(); @@ -2599,7 +2599,7 @@ internal PrimitiveDataFrameColumn ElementwiseLessThanImplementation(U v primitiveColumn._columnContainer.ElementwiseLessThan(Unsafe.As(ref value), newColumn._columnContainer); return newColumn; } - else + else { if (typeof(U) == typeof(decimal)) { diff --git a/src/Microsoft.Data.Analysis/PrimitiveDataFrameColumn.ReversedBinaryOperations.cs b/src/Microsoft.Data.Analysis/PrimitiveDataFrameColumn.ReversedBinaryOperations.cs index ba04893e7e..80f003cd68 100644 --- a/src/Microsoft.Data.Analysis/PrimitiveDataFrameColumn.ReversedBinaryOperations.cs +++ b/src/Microsoft.Data.Analysis/PrimitiveDataFrameColumn.ReversedBinaryOperations.cs @@ -396,7 +396,7 @@ public override PrimitiveDataFrameColumn ReverseAnd(bool value, bool inPla return retColumn; default: throw new NotSupportedException(); - + } } /// @@ -410,7 +410,7 @@ public override PrimitiveDataFrameColumn ReverseOr(bool value, bool inPlac return retColumn; default: throw new NotSupportedException(); - + } } /// @@ -424,10 +424,10 @@ public override PrimitiveDataFrameColumn ReverseXor(bool value, bool inPla return retColumn; default: throw new NotSupportedException(); - + } } - + } } diff --git a/src/Microsoft.Data.Analysis/PrimitiveDataFrameColumnArithmetic.cs b/src/Microsoft.Data.Analysis/PrimitiveDataFrameColumnArithmetic.cs index c4129026a1..84dd3bdec4 100644 --- a/src/Microsoft.Data.Analysis/PrimitiveDataFrameColumnArithmetic.cs +++ b/src/Microsoft.Data.Analysis/PrimitiveDataFrameColumnArithmetic.cs @@ -13,44 +13,44 @@ 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); + 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 @@ -130,10 +130,10 @@ public void Add(PrimitiveColumnContainer column, bool scalar) { throw new NotSupportedException(); } - + public void Add(bool scalar, PrimitiveColumnContainer column) { - throw new NotSupportedException(); + throw new NotSupportedException(); } public void Subtract(PrimitiveColumnContainer left, PrimitiveColumnContainer right) { @@ -143,10 +143,10 @@ public void Subtract(PrimitiveColumnContainer column, bool scalar) { throw new NotSupportedException(); } - + public void Subtract(bool scalar, PrimitiveColumnContainer column) { - throw new NotSupportedException(); + throw new NotSupportedException(); } public void Multiply(PrimitiveColumnContainer left, PrimitiveColumnContainer right) { @@ -156,10 +156,10 @@ public void Multiply(PrimitiveColumnContainer column, bool scalar) { throw new NotSupportedException(); } - + public void Multiply(bool scalar, PrimitiveColumnContainer column) { - throw new NotSupportedException(); + throw new NotSupportedException(); } public void Divide(PrimitiveColumnContainer left, PrimitiveColumnContainer right) { @@ -169,10 +169,10 @@ public void Divide(PrimitiveColumnContainer column, bool scalar) { throw new NotSupportedException(); } - + public void Divide(bool scalar, PrimitiveColumnContainer column) { - throw new NotSupportedException(); + throw new NotSupportedException(); } public void Modulo(PrimitiveColumnContainer left, PrimitiveColumnContainer right) { @@ -182,14 +182,14 @@ public void Modulo(PrimitiveColumnContainer column, bool scalar) { throw new NotSupportedException(); } - + public void Modulo(bool scalar, PrimitiveColumnContainer column) { - throw new NotSupportedException(); + throw new NotSupportedException(); } public void And(PrimitiveColumnContainer left, PrimitiveColumnContainer right) { - for (int b = 0 ; b < left.Buffers.Count; b++) + for (int b = 0; b < left.Buffers.Count; b++) { var buffer = left.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -204,7 +204,7 @@ public void And(PrimitiveColumnContainer left, PrimitiveColumnContainer column, bool scalar) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -216,16 +216,16 @@ public void And(PrimitiveColumnContainer column, bool scalar) } } } - + public void And(bool scalar, PrimitiveColumnContainer column) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { - var buffer = column.Buffers[b]; + var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); column.Buffers[b] = mutableBuffer; var span = mutableBuffer.Span; - for (int i = 0; i < span.Length; i++) + for (int i = 0; i < span.Length; i++) { span[i] = (bool)(scalar & span[i]); } @@ -233,7 +233,7 @@ public void And(bool scalar, PrimitiveColumnContainer column) } public void Or(PrimitiveColumnContainer left, PrimitiveColumnContainer right) { - for (int b = 0 ; b < left.Buffers.Count; b++) + for (int b = 0; b < left.Buffers.Count; b++) { var buffer = left.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -248,7 +248,7 @@ public void Or(PrimitiveColumnContainer left, PrimitiveColumnContainer column, bool scalar) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -260,16 +260,16 @@ public void Or(PrimitiveColumnContainer column, bool scalar) } } } - + public void Or(bool scalar, PrimitiveColumnContainer column) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { - var buffer = column.Buffers[b]; + var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); column.Buffers[b] = mutableBuffer; var span = mutableBuffer.Span; - for (int i = 0; i < span.Length; i++) + for (int i = 0; i < span.Length; i++) { span[i] = (bool)(scalar | span[i]); } @@ -277,7 +277,7 @@ public void Or(bool scalar, PrimitiveColumnContainer column) } public void Xor(PrimitiveColumnContainer left, PrimitiveColumnContainer right) { - for (int b = 0 ; b < left.Buffers.Count; b++) + for (int b = 0; b < left.Buffers.Count; b++) { var buffer = left.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -292,7 +292,7 @@ public void Xor(PrimitiveColumnContainer left, PrimitiveColumnContainer column, bool scalar) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -304,16 +304,16 @@ public void Xor(PrimitiveColumnContainer column, bool scalar) } } } - + public void Xor(bool scalar, PrimitiveColumnContainer column) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { - var buffer = column.Buffers[b]; + var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); column.Buffers[b] = mutableBuffer; var span = mutableBuffer.Span; - for (int i = 0; i < span.Length; i++) + for (int i = 0; i < span.Length; i++) { span[i] = (bool)(scalar ^ span[i]); } @@ -329,7 +329,7 @@ public void RightShift(PrimitiveColumnContainer column, int value) } public void ElementwiseEquals(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) { - for (int b = 0 ; b < left.Buffers.Count; b++) + for (int b = 0; b < left.Buffers.Count; b++) { var buffer = left.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -344,7 +344,7 @@ public void ElementwiseEquals(PrimitiveColumnContainer left, PrimitiveColu } public void ElementwiseEquals(PrimitiveColumnContainer column, bool scalar, PrimitiveColumnContainer ret) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -358,7 +358,7 @@ public void ElementwiseEquals(PrimitiveColumnContainer column, bool scalar } public void ElementwiseNotEquals(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) { - for (int b = 0 ; b < left.Buffers.Count; b++) + for (int b = 0; b < left.Buffers.Count; b++) { var buffer = left.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -373,7 +373,7 @@ public void ElementwiseNotEquals(PrimitiveColumnContainer left, PrimitiveC } public void ElementwiseNotEquals(PrimitiveColumnContainer column, bool scalar, PrimitiveColumnContainer ret) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -422,7 +422,7 @@ internal class ByteArithmetic : IPrimitiveDataFrameColumnArithmetic { public void Add(PrimitiveColumnContainer left, PrimitiveColumnContainer right) { - for (int b = 0 ; b < left.Buffers.Count; b++) + for (int b = 0; b < left.Buffers.Count; b++) { var buffer = left.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -437,7 +437,7 @@ public void Add(PrimitiveColumnContainer left, PrimitiveColumnContainer column, byte scalar) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -449,16 +449,16 @@ public void Add(PrimitiveColumnContainer column, byte scalar) } } } - + public void Add(byte scalar, PrimitiveColumnContainer column) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { - var buffer = column.Buffers[b]; + var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); column.Buffers[b] = mutableBuffer; var span = mutableBuffer.Span; - for (int i = 0; i < span.Length; i++) + for (int i = 0; i < span.Length; i++) { span[i] = (byte)(scalar + span[i]); } @@ -466,7 +466,7 @@ public void Add(byte scalar, PrimitiveColumnContainer column) } public void Subtract(PrimitiveColumnContainer left, PrimitiveColumnContainer right) { - for (int b = 0 ; b < left.Buffers.Count; b++) + for (int b = 0; b < left.Buffers.Count; b++) { var buffer = left.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -481,7 +481,7 @@ public void Subtract(PrimitiveColumnContainer left, PrimitiveColumnContain } public void Subtract(PrimitiveColumnContainer column, byte scalar) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -493,16 +493,16 @@ public void Subtract(PrimitiveColumnContainer column, byte scalar) } } } - + public void Subtract(byte scalar, PrimitiveColumnContainer column) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { - var buffer = column.Buffers[b]; + var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); column.Buffers[b] = mutableBuffer; var span = mutableBuffer.Span; - for (int i = 0; i < span.Length; i++) + for (int i = 0; i < span.Length; i++) { span[i] = (byte)(scalar - span[i]); } @@ -510,7 +510,7 @@ public void Subtract(byte scalar, PrimitiveColumnContainer column) } public void Multiply(PrimitiveColumnContainer left, PrimitiveColumnContainer right) { - for (int b = 0 ; b < left.Buffers.Count; b++) + for (int b = 0; b < left.Buffers.Count; b++) { var buffer = left.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -525,7 +525,7 @@ public void Multiply(PrimitiveColumnContainer left, PrimitiveColumnContain } public void Multiply(PrimitiveColumnContainer column, byte scalar) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -537,16 +537,16 @@ public void Multiply(PrimitiveColumnContainer column, byte scalar) } } } - + public void Multiply(byte scalar, PrimitiveColumnContainer column) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { - var buffer = column.Buffers[b]; + var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); column.Buffers[b] = mutableBuffer; var span = mutableBuffer.Span; - for (int i = 0; i < span.Length; i++) + for (int i = 0; i < span.Length; i++) { span[i] = (byte)(scalar * span[i]); } @@ -554,7 +554,7 @@ public void Multiply(byte scalar, PrimitiveColumnContainer column) } public void Divide(PrimitiveColumnContainer left, PrimitiveColumnContainer right) { - for (int b = 0 ; b < left.Buffers.Count; b++) + for (int b = 0; b < left.Buffers.Count; b++) { var buffer = left.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -569,7 +569,7 @@ public void Divide(PrimitiveColumnContainer left, PrimitiveColumnContainer } public void Divide(PrimitiveColumnContainer column, byte scalar) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -581,16 +581,16 @@ public void Divide(PrimitiveColumnContainer column, byte scalar) } } } - + public void Divide(byte scalar, PrimitiveColumnContainer column) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { - var buffer = column.Buffers[b]; + var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); column.Buffers[b] = mutableBuffer; var span = mutableBuffer.Span; - for (int i = 0; i < span.Length; i++) + for (int i = 0; i < span.Length; i++) { span[i] = (byte)(scalar / span[i]); } @@ -598,7 +598,7 @@ public void Divide(byte scalar, PrimitiveColumnContainer column) } public void Modulo(PrimitiveColumnContainer left, PrimitiveColumnContainer right) { - for (int b = 0 ; b < left.Buffers.Count; b++) + for (int b = 0; b < left.Buffers.Count; b++) { var buffer = left.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -613,7 +613,7 @@ public void Modulo(PrimitiveColumnContainer left, PrimitiveColumnContainer } public void Modulo(PrimitiveColumnContainer column, byte scalar) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -625,16 +625,16 @@ public void Modulo(PrimitiveColumnContainer column, byte scalar) } } } - + public void Modulo(byte scalar, PrimitiveColumnContainer column) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { - var buffer = column.Buffers[b]; + var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); column.Buffers[b] = mutableBuffer; var span = mutableBuffer.Span; - for (int i = 0; i < span.Length; i++) + for (int i = 0; i < span.Length; i++) { span[i] = (byte)(scalar % span[i]); } @@ -642,7 +642,7 @@ public void Modulo(byte scalar, PrimitiveColumnContainer column) } public void And(PrimitiveColumnContainer left, PrimitiveColumnContainer right) { - for (int b = 0 ; b < left.Buffers.Count; b++) + for (int b = 0; b < left.Buffers.Count; b++) { var buffer = left.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -657,7 +657,7 @@ public void And(PrimitiveColumnContainer left, PrimitiveColumnContainer column, byte scalar) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -669,16 +669,16 @@ public void And(PrimitiveColumnContainer column, byte scalar) } } } - + public void And(byte scalar, PrimitiveColumnContainer column) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { - var buffer = column.Buffers[b]; + var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); column.Buffers[b] = mutableBuffer; var span = mutableBuffer.Span; - for (int i = 0; i < span.Length; i++) + for (int i = 0; i < span.Length; i++) { span[i] = (byte)(scalar & span[i]); } @@ -686,7 +686,7 @@ public void And(byte scalar, PrimitiveColumnContainer column) } public void Or(PrimitiveColumnContainer left, PrimitiveColumnContainer right) { - for (int b = 0 ; b < left.Buffers.Count; b++) + for (int b = 0; b < left.Buffers.Count; b++) { var buffer = left.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -701,7 +701,7 @@ public void Or(PrimitiveColumnContainer left, PrimitiveColumnContainer column, byte scalar) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -713,16 +713,16 @@ public void Or(PrimitiveColumnContainer column, byte scalar) } } } - + public void Or(byte scalar, PrimitiveColumnContainer column) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { - var buffer = column.Buffers[b]; + var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); column.Buffers[b] = mutableBuffer; var span = mutableBuffer.Span; - for (int i = 0; i < span.Length; i++) + for (int i = 0; i < span.Length; i++) { span[i] = (byte)(scalar | span[i]); } @@ -730,7 +730,7 @@ public void Or(byte scalar, PrimitiveColumnContainer column) } public void Xor(PrimitiveColumnContainer left, PrimitiveColumnContainer right) { - for (int b = 0 ; b < left.Buffers.Count; b++) + for (int b = 0; b < left.Buffers.Count; b++) { var buffer = left.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -745,7 +745,7 @@ public void Xor(PrimitiveColumnContainer left, PrimitiveColumnContainer column, byte scalar) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -757,16 +757,16 @@ public void Xor(PrimitiveColumnContainer column, byte scalar) } } } - + public void Xor(byte scalar, PrimitiveColumnContainer column) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { - var buffer = column.Buffers[b]; + var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); column.Buffers[b] = mutableBuffer; var span = mutableBuffer.Span; - for (int i = 0; i < span.Length; i++) + for (int i = 0; i < span.Length; i++) { span[i] = (byte)(scalar ^ span[i]); } @@ -774,7 +774,7 @@ public void Xor(byte scalar, PrimitiveColumnContainer column) } public void LeftShift(PrimitiveColumnContainer column, int value) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -788,7 +788,7 @@ public void LeftShift(PrimitiveColumnContainer column, int value) } public void RightShift(PrimitiveColumnContainer column, int value) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -802,7 +802,7 @@ public void RightShift(PrimitiveColumnContainer column, int value) } public void ElementwiseEquals(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) { - for (int b = 0 ; b < left.Buffers.Count; b++) + for (int b = 0; b < left.Buffers.Count; b++) { var buffer = left.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -817,7 +817,7 @@ public void ElementwiseEquals(PrimitiveColumnContainer left, PrimitiveColu } public void ElementwiseEquals(PrimitiveColumnContainer column, byte scalar, PrimitiveColumnContainer ret) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -831,7 +831,7 @@ public void ElementwiseEquals(PrimitiveColumnContainer column, byte scalar } public void ElementwiseNotEquals(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) { - for (int b = 0 ; b < left.Buffers.Count; b++) + for (int b = 0; b < left.Buffers.Count; b++) { var buffer = left.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -846,7 +846,7 @@ public void ElementwiseNotEquals(PrimitiveColumnContainer left, PrimitiveC } public void ElementwiseNotEquals(PrimitiveColumnContainer column, byte scalar, PrimitiveColumnContainer ret) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -860,7 +860,7 @@ public void ElementwiseNotEquals(PrimitiveColumnContainer column, byte sca } public void ElementwiseGreaterThanOrEqual(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) { - for (int b = 0 ; b < left.Buffers.Count; b++) + for (int b = 0; b < left.Buffers.Count; b++) { var buffer = left.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -875,7 +875,7 @@ public void ElementwiseGreaterThanOrEqual(PrimitiveColumnContainer left, P } public void ElementwiseGreaterThanOrEqual(PrimitiveColumnContainer column, byte scalar, PrimitiveColumnContainer ret) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -889,7 +889,7 @@ public void ElementwiseGreaterThanOrEqual(PrimitiveColumnContainer column, } public void ElementwiseLessThanOrEqual(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) { - for (int b = 0 ; b < left.Buffers.Count; b++) + for (int b = 0; b < left.Buffers.Count; b++) { var buffer = left.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -904,7 +904,7 @@ public void ElementwiseLessThanOrEqual(PrimitiveColumnContainer left, Prim } public void ElementwiseLessThanOrEqual(PrimitiveColumnContainer column, byte scalar, PrimitiveColumnContainer ret) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -918,7 +918,7 @@ public void ElementwiseLessThanOrEqual(PrimitiveColumnContainer column, by } public void ElementwiseGreaterThan(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) { - for (int b = 0 ; b < left.Buffers.Count; b++) + for (int b = 0; b < left.Buffers.Count; b++) { var buffer = left.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -933,7 +933,7 @@ public void ElementwiseGreaterThan(PrimitiveColumnContainer left, Primitiv } public void ElementwiseGreaterThan(PrimitiveColumnContainer column, byte scalar, PrimitiveColumnContainer ret) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -947,7 +947,7 @@ public void ElementwiseGreaterThan(PrimitiveColumnContainer column, byte s } public void ElementwiseLessThan(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) { - for (int b = 0 ; b < left.Buffers.Count; b++) + for (int b = 0; b < left.Buffers.Count; b++) { var buffer = left.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -962,7 +962,7 @@ public void ElementwiseLessThan(PrimitiveColumnContainer left, PrimitiveCo } public void ElementwiseLessThan(PrimitiveColumnContainer column, byte scalar, PrimitiveColumnContainer ret) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -979,7 +979,7 @@ internal class CharArithmetic : IPrimitiveDataFrameColumnArithmetic { public void Add(PrimitiveColumnContainer left, PrimitiveColumnContainer right) { - for (int b = 0 ; b < left.Buffers.Count; b++) + for (int b = 0; b < left.Buffers.Count; b++) { var buffer = left.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -994,7 +994,7 @@ public void Add(PrimitiveColumnContainer left, PrimitiveColumnContainer column, char scalar) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -1006,16 +1006,16 @@ public void Add(PrimitiveColumnContainer column, char scalar) } } } - + public void Add(char scalar, PrimitiveColumnContainer column) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { - var buffer = column.Buffers[b]; + var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); column.Buffers[b] = mutableBuffer; var span = mutableBuffer.Span; - for (int i = 0; i < span.Length; i++) + for (int i = 0; i < span.Length; i++) { span[i] = (char)(scalar + span[i]); } @@ -1023,7 +1023,7 @@ public void Add(char scalar, PrimitiveColumnContainer column) } public void Subtract(PrimitiveColumnContainer left, PrimitiveColumnContainer right) { - for (int b = 0 ; b < left.Buffers.Count; b++) + for (int b = 0; b < left.Buffers.Count; b++) { var buffer = left.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -1038,7 +1038,7 @@ public void Subtract(PrimitiveColumnContainer left, PrimitiveColumnContain } public void Subtract(PrimitiveColumnContainer column, char scalar) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -1050,16 +1050,16 @@ public void Subtract(PrimitiveColumnContainer column, char scalar) } } } - + public void Subtract(char scalar, PrimitiveColumnContainer column) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { - var buffer = column.Buffers[b]; + var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); column.Buffers[b] = mutableBuffer; var span = mutableBuffer.Span; - for (int i = 0; i < span.Length; i++) + for (int i = 0; i < span.Length; i++) { span[i] = (char)(scalar - span[i]); } @@ -1067,7 +1067,7 @@ public void Subtract(char scalar, PrimitiveColumnContainer column) } public void Multiply(PrimitiveColumnContainer left, PrimitiveColumnContainer right) { - for (int b = 0 ; b < left.Buffers.Count; b++) + for (int b = 0; b < left.Buffers.Count; b++) { var buffer = left.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -1082,7 +1082,7 @@ public void Multiply(PrimitiveColumnContainer left, PrimitiveColumnContain } public void Multiply(PrimitiveColumnContainer column, char scalar) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -1094,16 +1094,16 @@ public void Multiply(PrimitiveColumnContainer column, char scalar) } } } - + public void Multiply(char scalar, PrimitiveColumnContainer column) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { - var buffer = column.Buffers[b]; + var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); column.Buffers[b] = mutableBuffer; var span = mutableBuffer.Span; - for (int i = 0; i < span.Length; i++) + for (int i = 0; i < span.Length; i++) { span[i] = (char)(scalar * span[i]); } @@ -1111,7 +1111,7 @@ public void Multiply(char scalar, PrimitiveColumnContainer column) } public void Divide(PrimitiveColumnContainer left, PrimitiveColumnContainer right) { - for (int b = 0 ; b < left.Buffers.Count; b++) + for (int b = 0; b < left.Buffers.Count; b++) { var buffer = left.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -1126,7 +1126,7 @@ public void Divide(PrimitiveColumnContainer left, PrimitiveColumnContainer } public void Divide(PrimitiveColumnContainer column, char scalar) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -1138,16 +1138,16 @@ public void Divide(PrimitiveColumnContainer column, char scalar) } } } - + public void Divide(char scalar, PrimitiveColumnContainer column) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { - var buffer = column.Buffers[b]; + var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); column.Buffers[b] = mutableBuffer; var span = mutableBuffer.Span; - for (int i = 0; i < span.Length; i++) + for (int i = 0; i < span.Length; i++) { span[i] = (char)(scalar / span[i]); } @@ -1155,7 +1155,7 @@ public void Divide(char scalar, PrimitiveColumnContainer column) } public void Modulo(PrimitiveColumnContainer left, PrimitiveColumnContainer right) { - for (int b = 0 ; b < left.Buffers.Count; b++) + for (int b = 0; b < left.Buffers.Count; b++) { var buffer = left.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -1170,7 +1170,7 @@ public void Modulo(PrimitiveColumnContainer left, PrimitiveColumnContainer } public void Modulo(PrimitiveColumnContainer column, char scalar) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -1182,16 +1182,16 @@ public void Modulo(PrimitiveColumnContainer column, char scalar) } } } - + public void Modulo(char scalar, PrimitiveColumnContainer column) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { - var buffer = column.Buffers[b]; + var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); column.Buffers[b] = mutableBuffer; var span = mutableBuffer.Span; - for (int i = 0; i < span.Length; i++) + for (int i = 0; i < span.Length; i++) { span[i] = (char)(scalar % span[i]); } @@ -1199,7 +1199,7 @@ public void Modulo(char scalar, PrimitiveColumnContainer column) } public void And(PrimitiveColumnContainer left, PrimitiveColumnContainer right) { - for (int b = 0 ; b < left.Buffers.Count; b++) + for (int b = 0; b < left.Buffers.Count; b++) { var buffer = left.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -1214,7 +1214,7 @@ public void And(PrimitiveColumnContainer left, PrimitiveColumnContainer column, char scalar) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -1226,16 +1226,16 @@ public void And(PrimitiveColumnContainer column, char scalar) } } } - + public void And(char scalar, PrimitiveColumnContainer column) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { - var buffer = column.Buffers[b]; + var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); column.Buffers[b] = mutableBuffer; var span = mutableBuffer.Span; - for (int i = 0; i < span.Length; i++) + for (int i = 0; i < span.Length; i++) { span[i] = (char)(scalar & span[i]); } @@ -1243,7 +1243,7 @@ public void And(char scalar, PrimitiveColumnContainer column) } public void Or(PrimitiveColumnContainer left, PrimitiveColumnContainer right) { - for (int b = 0 ; b < left.Buffers.Count; b++) + for (int b = 0; b < left.Buffers.Count; b++) { var buffer = left.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -1258,7 +1258,7 @@ public void Or(PrimitiveColumnContainer left, PrimitiveColumnContainer column, char scalar) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -1270,16 +1270,16 @@ public void Or(PrimitiveColumnContainer column, char scalar) } } } - + public void Or(char scalar, PrimitiveColumnContainer column) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { - var buffer = column.Buffers[b]; + var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); column.Buffers[b] = mutableBuffer; var span = mutableBuffer.Span; - for (int i = 0; i < span.Length; i++) + for (int i = 0; i < span.Length; i++) { span[i] = (char)(scalar | span[i]); } @@ -1287,7 +1287,7 @@ public void Or(char scalar, PrimitiveColumnContainer column) } public void Xor(PrimitiveColumnContainer left, PrimitiveColumnContainer right) { - for (int b = 0 ; b < left.Buffers.Count; b++) + for (int b = 0; b < left.Buffers.Count; b++) { var buffer = left.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -1302,7 +1302,7 @@ public void Xor(PrimitiveColumnContainer left, PrimitiveColumnContainer column, char scalar) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -1314,16 +1314,16 @@ public void Xor(PrimitiveColumnContainer column, char scalar) } } } - + public void Xor(char scalar, PrimitiveColumnContainer column) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { - var buffer = column.Buffers[b]; + var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); column.Buffers[b] = mutableBuffer; var span = mutableBuffer.Span; - for (int i = 0; i < span.Length; i++) + for (int i = 0; i < span.Length; i++) { span[i] = (char)(scalar ^ span[i]); } @@ -1331,7 +1331,7 @@ public void Xor(char scalar, PrimitiveColumnContainer column) } public void LeftShift(PrimitiveColumnContainer column, int value) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -1345,7 +1345,7 @@ public void LeftShift(PrimitiveColumnContainer column, int value) } public void RightShift(PrimitiveColumnContainer column, int value) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -1359,7 +1359,7 @@ public void RightShift(PrimitiveColumnContainer column, int value) } public void ElementwiseEquals(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) { - for (int b = 0 ; b < left.Buffers.Count; b++) + for (int b = 0; b < left.Buffers.Count; b++) { var buffer = left.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -1374,7 +1374,7 @@ public void ElementwiseEquals(PrimitiveColumnContainer left, PrimitiveColu } public void ElementwiseEquals(PrimitiveColumnContainer column, char scalar, PrimitiveColumnContainer ret) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -1388,7 +1388,7 @@ public void ElementwiseEquals(PrimitiveColumnContainer column, char scalar } public void ElementwiseNotEquals(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) { - for (int b = 0 ; b < left.Buffers.Count; b++) + for (int b = 0; b < left.Buffers.Count; b++) { var buffer = left.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -1403,7 +1403,7 @@ public void ElementwiseNotEquals(PrimitiveColumnContainer left, PrimitiveC } public void ElementwiseNotEquals(PrimitiveColumnContainer column, char scalar, PrimitiveColumnContainer ret) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -1417,7 +1417,7 @@ public void ElementwiseNotEquals(PrimitiveColumnContainer column, char sca } public void ElementwiseGreaterThanOrEqual(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) { - for (int b = 0 ; b < left.Buffers.Count; b++) + for (int b = 0; b < left.Buffers.Count; b++) { var buffer = left.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -1432,7 +1432,7 @@ public void ElementwiseGreaterThanOrEqual(PrimitiveColumnContainer left, P } public void ElementwiseGreaterThanOrEqual(PrimitiveColumnContainer column, char scalar, PrimitiveColumnContainer ret) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -1446,7 +1446,7 @@ public void ElementwiseGreaterThanOrEqual(PrimitiveColumnContainer column, } public void ElementwiseLessThanOrEqual(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) { - for (int b = 0 ; b < left.Buffers.Count; b++) + for (int b = 0; b < left.Buffers.Count; b++) { var buffer = left.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -1461,7 +1461,7 @@ public void ElementwiseLessThanOrEqual(PrimitiveColumnContainer left, Prim } public void ElementwiseLessThanOrEqual(PrimitiveColumnContainer column, char scalar, PrimitiveColumnContainer ret) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -1475,7 +1475,7 @@ public void ElementwiseLessThanOrEqual(PrimitiveColumnContainer column, ch } public void ElementwiseGreaterThan(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) { - for (int b = 0 ; b < left.Buffers.Count; b++) + for (int b = 0; b < left.Buffers.Count; b++) { var buffer = left.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -1490,7 +1490,7 @@ public void ElementwiseGreaterThan(PrimitiveColumnContainer left, Primitiv } public void ElementwiseGreaterThan(PrimitiveColumnContainer column, char scalar, PrimitiveColumnContainer ret) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -1504,7 +1504,7 @@ public void ElementwiseGreaterThan(PrimitiveColumnContainer column, char s } public void ElementwiseLessThan(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) { - for (int b = 0 ; b < left.Buffers.Count; b++) + for (int b = 0; b < left.Buffers.Count; b++) { var buffer = left.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -1519,7 +1519,7 @@ public void ElementwiseLessThan(PrimitiveColumnContainer left, PrimitiveCo } public void ElementwiseLessThan(PrimitiveColumnContainer column, char scalar, PrimitiveColumnContainer ret) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -1536,7 +1536,7 @@ internal class DecimalArithmetic : IPrimitiveDataFrameColumnArithmetic { public void Add(PrimitiveColumnContainer left, PrimitiveColumnContainer right) { - for (int b = 0 ; b < left.Buffers.Count; b++) + for (int b = 0; b < left.Buffers.Count; b++) { var buffer = left.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -1551,7 +1551,7 @@ public void Add(PrimitiveColumnContainer left, PrimitiveColumnContainer } public void Add(PrimitiveColumnContainer column, decimal scalar) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -1563,16 +1563,16 @@ public void Add(PrimitiveColumnContainer column, decimal scalar) } } } - + public void Add(decimal scalar, PrimitiveColumnContainer column) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { - var buffer = column.Buffers[b]; + var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); column.Buffers[b] = mutableBuffer; var span = mutableBuffer.Span; - for (int i = 0; i < span.Length; i++) + for (int i = 0; i < span.Length; i++) { span[i] = (decimal)(scalar + span[i]); } @@ -1580,7 +1580,7 @@ public void Add(decimal scalar, PrimitiveColumnContainer column) } public void Subtract(PrimitiveColumnContainer left, PrimitiveColumnContainer right) { - for (int b = 0 ; b < left.Buffers.Count; b++) + for (int b = 0; b < left.Buffers.Count; b++) { var buffer = left.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -1595,7 +1595,7 @@ public void Subtract(PrimitiveColumnContainer left, PrimitiveColumnCont } public void Subtract(PrimitiveColumnContainer column, decimal scalar) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -1607,16 +1607,16 @@ public void Subtract(PrimitiveColumnContainer column, decimal scalar) } } } - + public void Subtract(decimal scalar, PrimitiveColumnContainer column) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { - var buffer = column.Buffers[b]; + var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); column.Buffers[b] = mutableBuffer; var span = mutableBuffer.Span; - for (int i = 0; i < span.Length; i++) + for (int i = 0; i < span.Length; i++) { span[i] = (decimal)(scalar - span[i]); } @@ -1624,7 +1624,7 @@ public void Subtract(decimal scalar, PrimitiveColumnContainer column) } public void Multiply(PrimitiveColumnContainer left, PrimitiveColumnContainer right) { - for (int b = 0 ; b < left.Buffers.Count; b++) + for (int b = 0; b < left.Buffers.Count; b++) { var buffer = left.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -1639,7 +1639,7 @@ public void Multiply(PrimitiveColumnContainer left, PrimitiveColumnCont } public void Multiply(PrimitiveColumnContainer column, decimal scalar) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -1651,16 +1651,16 @@ public void Multiply(PrimitiveColumnContainer column, decimal scalar) } } } - + public void Multiply(decimal scalar, PrimitiveColumnContainer column) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { - var buffer = column.Buffers[b]; + var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); column.Buffers[b] = mutableBuffer; var span = mutableBuffer.Span; - for (int i = 0; i < span.Length; i++) + for (int i = 0; i < span.Length; i++) { span[i] = (decimal)(scalar * span[i]); } @@ -1668,7 +1668,7 @@ public void Multiply(decimal scalar, PrimitiveColumnContainer column) } public void Divide(PrimitiveColumnContainer left, PrimitiveColumnContainer right) { - for (int b = 0 ; b < left.Buffers.Count; b++) + for (int b = 0; b < left.Buffers.Count; b++) { var buffer = left.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -1683,7 +1683,7 @@ public void Divide(PrimitiveColumnContainer left, PrimitiveColumnContai } public void Divide(PrimitiveColumnContainer column, decimal scalar) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -1695,16 +1695,16 @@ public void Divide(PrimitiveColumnContainer column, decimal scalar) } } } - + public void Divide(decimal scalar, PrimitiveColumnContainer column) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { - var buffer = column.Buffers[b]; + var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); column.Buffers[b] = mutableBuffer; var span = mutableBuffer.Span; - for (int i = 0; i < span.Length; i++) + for (int i = 0; i < span.Length; i++) { span[i] = (decimal)(scalar / span[i]); } @@ -1712,7 +1712,7 @@ public void Divide(decimal scalar, PrimitiveColumnContainer column) } public void Modulo(PrimitiveColumnContainer left, PrimitiveColumnContainer right) { - for (int b = 0 ; b < left.Buffers.Count; b++) + for (int b = 0; b < left.Buffers.Count; b++) { var buffer = left.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -1727,7 +1727,7 @@ public void Modulo(PrimitiveColumnContainer left, PrimitiveColumnContai } public void Modulo(PrimitiveColumnContainer column, decimal scalar) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -1739,16 +1739,16 @@ public void Modulo(PrimitiveColumnContainer column, decimal scalar) } } } - + public void Modulo(decimal scalar, PrimitiveColumnContainer column) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { - var buffer = column.Buffers[b]; + var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); column.Buffers[b] = mutableBuffer; var span = mutableBuffer.Span; - for (int i = 0; i < span.Length; i++) + for (int i = 0; i < span.Length; i++) { span[i] = (decimal)(scalar % span[i]); } @@ -1762,10 +1762,10 @@ public void And(PrimitiveColumnContainer column, decimal scalar) { throw new NotSupportedException(); } - + public void And(decimal scalar, PrimitiveColumnContainer column) { - throw new NotSupportedException(); + throw new NotSupportedException(); } public void Or(PrimitiveColumnContainer left, PrimitiveColumnContainer right) { @@ -1775,10 +1775,10 @@ public void Or(PrimitiveColumnContainer column, decimal scalar) { throw new NotSupportedException(); } - + public void Or(decimal scalar, PrimitiveColumnContainer column) { - throw new NotSupportedException(); + throw new NotSupportedException(); } public void Xor(PrimitiveColumnContainer left, PrimitiveColumnContainer right) { @@ -1788,10 +1788,10 @@ public void Xor(PrimitiveColumnContainer column, decimal scalar) { throw new NotSupportedException(); } - + public void Xor(decimal scalar, PrimitiveColumnContainer column) { - throw new NotSupportedException(); + throw new NotSupportedException(); } public void LeftShift(PrimitiveColumnContainer column, int value) { @@ -1803,7 +1803,7 @@ public void RightShift(PrimitiveColumnContainer column, int value) } public void ElementwiseEquals(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) { - for (int b = 0 ; b < left.Buffers.Count; b++) + for (int b = 0; b < left.Buffers.Count; b++) { var buffer = left.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -1818,7 +1818,7 @@ public void ElementwiseEquals(PrimitiveColumnContainer left, PrimitiveC } public void ElementwiseEquals(PrimitiveColumnContainer column, decimal scalar, PrimitiveColumnContainer ret) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -1832,7 +1832,7 @@ public void ElementwiseEquals(PrimitiveColumnContainer column, decimal } public void ElementwiseNotEquals(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) { - for (int b = 0 ; b < left.Buffers.Count; b++) + for (int b = 0; b < left.Buffers.Count; b++) { var buffer = left.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -1847,7 +1847,7 @@ public void ElementwiseNotEquals(PrimitiveColumnContainer left, Primiti } public void ElementwiseNotEquals(PrimitiveColumnContainer column, decimal scalar, PrimitiveColumnContainer ret) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -1861,7 +1861,7 @@ public void ElementwiseNotEquals(PrimitiveColumnContainer column, decim } public void ElementwiseGreaterThanOrEqual(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) { - for (int b = 0 ; b < left.Buffers.Count; b++) + for (int b = 0; b < left.Buffers.Count; b++) { var buffer = left.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -1876,7 +1876,7 @@ public void ElementwiseGreaterThanOrEqual(PrimitiveColumnContainer left } public void ElementwiseGreaterThanOrEqual(PrimitiveColumnContainer column, decimal scalar, PrimitiveColumnContainer ret) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -1890,7 +1890,7 @@ public void ElementwiseGreaterThanOrEqual(PrimitiveColumnContainer colu } public void ElementwiseLessThanOrEqual(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) { - for (int b = 0 ; b < left.Buffers.Count; b++) + for (int b = 0; b < left.Buffers.Count; b++) { var buffer = left.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -1905,7 +1905,7 @@ public void ElementwiseLessThanOrEqual(PrimitiveColumnContainer left, P } public void ElementwiseLessThanOrEqual(PrimitiveColumnContainer column, decimal scalar, PrimitiveColumnContainer ret) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -1919,7 +1919,7 @@ public void ElementwiseLessThanOrEqual(PrimitiveColumnContainer column, } public void ElementwiseGreaterThan(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) { - for (int b = 0 ; b < left.Buffers.Count; b++) + for (int b = 0; b < left.Buffers.Count; b++) { var buffer = left.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -1934,7 +1934,7 @@ public void ElementwiseGreaterThan(PrimitiveColumnContainer left, Primi } public void ElementwiseGreaterThan(PrimitiveColumnContainer column, decimal scalar, PrimitiveColumnContainer ret) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -1948,7 +1948,7 @@ public void ElementwiseGreaterThan(PrimitiveColumnContainer column, dec } public void ElementwiseLessThan(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) { - for (int b = 0 ; b < left.Buffers.Count; b++) + for (int b = 0; b < left.Buffers.Count; b++) { var buffer = left.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -1963,7 +1963,7 @@ public void ElementwiseLessThan(PrimitiveColumnContainer left, Primitiv } public void ElementwiseLessThan(PrimitiveColumnContainer column, decimal scalar, PrimitiveColumnContainer ret) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -1980,7 +1980,7 @@ internal class DoubleArithmetic : IPrimitiveDataFrameColumnArithmetic { public void Add(PrimitiveColumnContainer left, PrimitiveColumnContainer right) { - for (int b = 0 ; b < left.Buffers.Count; b++) + for (int b = 0; b < left.Buffers.Count; b++) { var buffer = left.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -1995,7 +1995,7 @@ public void Add(PrimitiveColumnContainer left, PrimitiveColumnContainer< } public void Add(PrimitiveColumnContainer column, double scalar) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -2007,16 +2007,16 @@ public void Add(PrimitiveColumnContainer column, double scalar) } } } - + public void Add(double scalar, PrimitiveColumnContainer column) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { - var buffer = column.Buffers[b]; + var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); column.Buffers[b] = mutableBuffer; var span = mutableBuffer.Span; - for (int i = 0; i < span.Length; i++) + for (int i = 0; i < span.Length; i++) { span[i] = (double)(scalar + span[i]); } @@ -2024,7 +2024,7 @@ public void Add(double scalar, PrimitiveColumnContainer column) } public void Subtract(PrimitiveColumnContainer left, PrimitiveColumnContainer right) { - for (int b = 0 ; b < left.Buffers.Count; b++) + for (int b = 0; b < left.Buffers.Count; b++) { var buffer = left.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -2039,7 +2039,7 @@ public void Subtract(PrimitiveColumnContainer left, PrimitiveColumnConta } public void Subtract(PrimitiveColumnContainer column, double scalar) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -2051,16 +2051,16 @@ public void Subtract(PrimitiveColumnContainer column, double scalar) } } } - + public void Subtract(double scalar, PrimitiveColumnContainer column) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { - var buffer = column.Buffers[b]; + var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); column.Buffers[b] = mutableBuffer; var span = mutableBuffer.Span; - for (int i = 0; i < span.Length; i++) + for (int i = 0; i < span.Length; i++) { span[i] = (double)(scalar - span[i]); } @@ -2068,7 +2068,7 @@ public void Subtract(double scalar, PrimitiveColumnContainer column) } public void Multiply(PrimitiveColumnContainer left, PrimitiveColumnContainer right) { - for (int b = 0 ; b < left.Buffers.Count; b++) + for (int b = 0; b < left.Buffers.Count; b++) { var buffer = left.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -2083,7 +2083,7 @@ public void Multiply(PrimitiveColumnContainer left, PrimitiveColumnConta } public void Multiply(PrimitiveColumnContainer column, double scalar) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -2095,16 +2095,16 @@ public void Multiply(PrimitiveColumnContainer column, double scalar) } } } - + public void Multiply(double scalar, PrimitiveColumnContainer column) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { - var buffer = column.Buffers[b]; + var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); column.Buffers[b] = mutableBuffer; var span = mutableBuffer.Span; - for (int i = 0; i < span.Length; i++) + for (int i = 0; i < span.Length; i++) { span[i] = (double)(scalar * span[i]); } @@ -2112,7 +2112,7 @@ public void Multiply(double scalar, PrimitiveColumnContainer column) } public void Divide(PrimitiveColumnContainer left, PrimitiveColumnContainer right) { - for (int b = 0 ; b < left.Buffers.Count; b++) + for (int b = 0; b < left.Buffers.Count; b++) { var buffer = left.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -2127,7 +2127,7 @@ public void Divide(PrimitiveColumnContainer left, PrimitiveColumnContain } public void Divide(PrimitiveColumnContainer column, double scalar) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -2139,16 +2139,16 @@ public void Divide(PrimitiveColumnContainer column, double scalar) } } } - + public void Divide(double scalar, PrimitiveColumnContainer column) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { - var buffer = column.Buffers[b]; + var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); column.Buffers[b] = mutableBuffer; var span = mutableBuffer.Span; - for (int i = 0; i < span.Length; i++) + for (int i = 0; i < span.Length; i++) { span[i] = (double)(scalar / span[i]); } @@ -2156,7 +2156,7 @@ public void Divide(double scalar, PrimitiveColumnContainer column) } public void Modulo(PrimitiveColumnContainer left, PrimitiveColumnContainer right) { - for (int b = 0 ; b < left.Buffers.Count; b++) + for (int b = 0; b < left.Buffers.Count; b++) { var buffer = left.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -2171,7 +2171,7 @@ public void Modulo(PrimitiveColumnContainer left, PrimitiveColumnContain } public void Modulo(PrimitiveColumnContainer column, double scalar) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -2183,16 +2183,16 @@ public void Modulo(PrimitiveColumnContainer column, double scalar) } } } - + public void Modulo(double scalar, PrimitiveColumnContainer column) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { - var buffer = column.Buffers[b]; + var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); column.Buffers[b] = mutableBuffer; var span = mutableBuffer.Span; - for (int i = 0; i < span.Length; i++) + for (int i = 0; i < span.Length; i++) { span[i] = (double)(scalar % span[i]); } @@ -2206,10 +2206,10 @@ public void And(PrimitiveColumnContainer column, double scalar) { throw new NotSupportedException(); } - + public void And(double scalar, PrimitiveColumnContainer column) { - throw new NotSupportedException(); + throw new NotSupportedException(); } public void Or(PrimitiveColumnContainer left, PrimitiveColumnContainer right) { @@ -2219,10 +2219,10 @@ public void Or(PrimitiveColumnContainer column, double scalar) { throw new NotSupportedException(); } - + public void Or(double scalar, PrimitiveColumnContainer column) { - throw new NotSupportedException(); + throw new NotSupportedException(); } public void Xor(PrimitiveColumnContainer left, PrimitiveColumnContainer right) { @@ -2232,10 +2232,10 @@ public void Xor(PrimitiveColumnContainer column, double scalar) { throw new NotSupportedException(); } - + public void Xor(double scalar, PrimitiveColumnContainer column) { - throw new NotSupportedException(); + throw new NotSupportedException(); } public void LeftShift(PrimitiveColumnContainer column, int value) { @@ -2247,7 +2247,7 @@ public void RightShift(PrimitiveColumnContainer column, int value) } public void ElementwiseEquals(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) { - for (int b = 0 ; b < left.Buffers.Count; b++) + for (int b = 0; b < left.Buffers.Count; b++) { var buffer = left.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -2262,7 +2262,7 @@ public void ElementwiseEquals(PrimitiveColumnContainer left, PrimitiveCo } public void ElementwiseEquals(PrimitiveColumnContainer column, double scalar, PrimitiveColumnContainer ret) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -2276,7 +2276,7 @@ public void ElementwiseEquals(PrimitiveColumnContainer column, double sc } public void ElementwiseNotEquals(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) { - for (int b = 0 ; b < left.Buffers.Count; b++) + for (int b = 0; b < left.Buffers.Count; b++) { var buffer = left.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -2291,7 +2291,7 @@ public void ElementwiseNotEquals(PrimitiveColumnContainer left, Primitiv } public void ElementwiseNotEquals(PrimitiveColumnContainer column, double scalar, PrimitiveColumnContainer ret) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -2305,7 +2305,7 @@ public void ElementwiseNotEquals(PrimitiveColumnContainer column, double } public void ElementwiseGreaterThanOrEqual(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) { - for (int b = 0 ; b < left.Buffers.Count; b++) + for (int b = 0; b < left.Buffers.Count; b++) { var buffer = left.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -2320,7 +2320,7 @@ public void ElementwiseGreaterThanOrEqual(PrimitiveColumnContainer left, } public void ElementwiseGreaterThanOrEqual(PrimitiveColumnContainer column, double scalar, PrimitiveColumnContainer ret) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -2334,7 +2334,7 @@ public void ElementwiseGreaterThanOrEqual(PrimitiveColumnContainer colum } public void ElementwiseLessThanOrEqual(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) { - for (int b = 0 ; b < left.Buffers.Count; b++) + for (int b = 0; b < left.Buffers.Count; b++) { var buffer = left.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -2349,7 +2349,7 @@ public void ElementwiseLessThanOrEqual(PrimitiveColumnContainer left, Pr } public void ElementwiseLessThanOrEqual(PrimitiveColumnContainer column, double scalar, PrimitiveColumnContainer ret) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -2363,7 +2363,7 @@ public void ElementwiseLessThanOrEqual(PrimitiveColumnContainer column, } public void ElementwiseGreaterThan(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) { - for (int b = 0 ; b < left.Buffers.Count; b++) + for (int b = 0; b < left.Buffers.Count; b++) { var buffer = left.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -2378,7 +2378,7 @@ public void ElementwiseGreaterThan(PrimitiveColumnContainer left, Primit } public void ElementwiseGreaterThan(PrimitiveColumnContainer column, double scalar, PrimitiveColumnContainer ret) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -2392,7 +2392,7 @@ public void ElementwiseGreaterThan(PrimitiveColumnContainer column, doub } public void ElementwiseLessThan(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) { - for (int b = 0 ; b < left.Buffers.Count; b++) + for (int b = 0; b < left.Buffers.Count; b++) { var buffer = left.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -2407,7 +2407,7 @@ public void ElementwiseLessThan(PrimitiveColumnContainer left, Primitive } public void ElementwiseLessThan(PrimitiveColumnContainer column, double scalar, PrimitiveColumnContainer ret) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -2424,7 +2424,7 @@ internal class FloatArithmetic : IPrimitiveDataFrameColumnArithmetic { public void Add(PrimitiveColumnContainer left, PrimitiveColumnContainer right) { - for (int b = 0 ; b < left.Buffers.Count; b++) + for (int b = 0; b < left.Buffers.Count; b++) { var buffer = left.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -2439,7 +2439,7 @@ public void Add(PrimitiveColumnContainer left, PrimitiveColumnContainer column, float scalar) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -2451,16 +2451,16 @@ public void Add(PrimitiveColumnContainer column, float scalar) } } } - + public void Add(float scalar, PrimitiveColumnContainer column) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { - var buffer = column.Buffers[b]; + var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); column.Buffers[b] = mutableBuffer; var span = mutableBuffer.Span; - for (int i = 0; i < span.Length; i++) + for (int i = 0; i < span.Length; i++) { span[i] = (float)(scalar + span[i]); } @@ -2468,7 +2468,7 @@ public void Add(float scalar, PrimitiveColumnContainer column) } public void Subtract(PrimitiveColumnContainer left, PrimitiveColumnContainer right) { - for (int b = 0 ; b < left.Buffers.Count; b++) + for (int b = 0; b < left.Buffers.Count; b++) { var buffer = left.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -2483,7 +2483,7 @@ public void Subtract(PrimitiveColumnContainer left, PrimitiveColumnContai } public void Subtract(PrimitiveColumnContainer column, float scalar) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -2495,16 +2495,16 @@ public void Subtract(PrimitiveColumnContainer column, float scalar) } } } - + public void Subtract(float scalar, PrimitiveColumnContainer column) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { - var buffer = column.Buffers[b]; + var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); column.Buffers[b] = mutableBuffer; var span = mutableBuffer.Span; - for (int i = 0; i < span.Length; i++) + for (int i = 0; i < span.Length; i++) { span[i] = (float)(scalar - span[i]); } @@ -2512,7 +2512,7 @@ public void Subtract(float scalar, PrimitiveColumnContainer column) } public void Multiply(PrimitiveColumnContainer left, PrimitiveColumnContainer right) { - for (int b = 0 ; b < left.Buffers.Count; b++) + for (int b = 0; b < left.Buffers.Count; b++) { var buffer = left.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -2527,7 +2527,7 @@ public void Multiply(PrimitiveColumnContainer left, PrimitiveColumnContai } public void Multiply(PrimitiveColumnContainer column, float scalar) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -2539,16 +2539,16 @@ public void Multiply(PrimitiveColumnContainer column, float scalar) } } } - + public void Multiply(float scalar, PrimitiveColumnContainer column) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { - var buffer = column.Buffers[b]; + var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); column.Buffers[b] = mutableBuffer; var span = mutableBuffer.Span; - for (int i = 0; i < span.Length; i++) + for (int i = 0; i < span.Length; i++) { span[i] = (float)(scalar * span[i]); } @@ -2556,7 +2556,7 @@ public void Multiply(float scalar, PrimitiveColumnContainer column) } public void Divide(PrimitiveColumnContainer left, PrimitiveColumnContainer right) { - for (int b = 0 ; b < left.Buffers.Count; b++) + for (int b = 0; b < left.Buffers.Count; b++) { var buffer = left.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -2571,7 +2571,7 @@ public void Divide(PrimitiveColumnContainer left, PrimitiveColumnContaine } public void Divide(PrimitiveColumnContainer column, float scalar) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -2583,16 +2583,16 @@ public void Divide(PrimitiveColumnContainer column, float scalar) } } } - + public void Divide(float scalar, PrimitiveColumnContainer column) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { - var buffer = column.Buffers[b]; + var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); column.Buffers[b] = mutableBuffer; var span = mutableBuffer.Span; - for (int i = 0; i < span.Length; i++) + for (int i = 0; i < span.Length; i++) { span[i] = (float)(scalar / span[i]); } @@ -2600,7 +2600,7 @@ public void Divide(float scalar, PrimitiveColumnContainer column) } public void Modulo(PrimitiveColumnContainer left, PrimitiveColumnContainer right) { - for (int b = 0 ; b < left.Buffers.Count; b++) + for (int b = 0; b < left.Buffers.Count; b++) { var buffer = left.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -2615,7 +2615,7 @@ public void Modulo(PrimitiveColumnContainer left, PrimitiveColumnContaine } public void Modulo(PrimitiveColumnContainer column, float scalar) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -2627,16 +2627,16 @@ public void Modulo(PrimitiveColumnContainer column, float scalar) } } } - + public void Modulo(float scalar, PrimitiveColumnContainer column) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { - var buffer = column.Buffers[b]; + var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); column.Buffers[b] = mutableBuffer; var span = mutableBuffer.Span; - for (int i = 0; i < span.Length; i++) + for (int i = 0; i < span.Length; i++) { span[i] = (float)(scalar % span[i]); } @@ -2650,10 +2650,10 @@ public void And(PrimitiveColumnContainer column, float scalar) { throw new NotSupportedException(); } - + public void And(float scalar, PrimitiveColumnContainer column) { - throw new NotSupportedException(); + throw new NotSupportedException(); } public void Or(PrimitiveColumnContainer left, PrimitiveColumnContainer right) { @@ -2663,10 +2663,10 @@ public void Or(PrimitiveColumnContainer column, float scalar) { throw new NotSupportedException(); } - + public void Or(float scalar, PrimitiveColumnContainer column) { - throw new NotSupportedException(); + throw new NotSupportedException(); } public void Xor(PrimitiveColumnContainer left, PrimitiveColumnContainer right) { @@ -2676,10 +2676,10 @@ public void Xor(PrimitiveColumnContainer column, float scalar) { throw new NotSupportedException(); } - + public void Xor(float scalar, PrimitiveColumnContainer column) { - throw new NotSupportedException(); + throw new NotSupportedException(); } public void LeftShift(PrimitiveColumnContainer column, int value) { @@ -2691,7 +2691,7 @@ public void RightShift(PrimitiveColumnContainer column, int value) } public void ElementwiseEquals(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) { - for (int b = 0 ; b < left.Buffers.Count; b++) + for (int b = 0; b < left.Buffers.Count; b++) { var buffer = left.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -2706,7 +2706,7 @@ public void ElementwiseEquals(PrimitiveColumnContainer left, PrimitiveCol } public void ElementwiseEquals(PrimitiveColumnContainer column, float scalar, PrimitiveColumnContainer ret) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -2720,7 +2720,7 @@ public void ElementwiseEquals(PrimitiveColumnContainer column, float scal } public void ElementwiseNotEquals(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) { - for (int b = 0 ; b < left.Buffers.Count; b++) + for (int b = 0; b < left.Buffers.Count; b++) { var buffer = left.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -2735,7 +2735,7 @@ public void ElementwiseNotEquals(PrimitiveColumnContainer left, Primitive } public void ElementwiseNotEquals(PrimitiveColumnContainer column, float scalar, PrimitiveColumnContainer ret) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -2749,7 +2749,7 @@ public void ElementwiseNotEquals(PrimitiveColumnContainer column, float s } public void ElementwiseGreaterThanOrEqual(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) { - for (int b = 0 ; b < left.Buffers.Count; b++) + for (int b = 0; b < left.Buffers.Count; b++) { var buffer = left.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -2764,7 +2764,7 @@ public void ElementwiseGreaterThanOrEqual(PrimitiveColumnContainer left, } public void ElementwiseGreaterThanOrEqual(PrimitiveColumnContainer column, float scalar, PrimitiveColumnContainer ret) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -2778,7 +2778,7 @@ public void ElementwiseGreaterThanOrEqual(PrimitiveColumnContainer column } public void ElementwiseLessThanOrEqual(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) { - for (int b = 0 ; b < left.Buffers.Count; b++) + for (int b = 0; b < left.Buffers.Count; b++) { var buffer = left.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -2793,7 +2793,7 @@ public void ElementwiseLessThanOrEqual(PrimitiveColumnContainer left, Pri } public void ElementwiseLessThanOrEqual(PrimitiveColumnContainer column, float scalar, PrimitiveColumnContainer ret) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -2807,7 +2807,7 @@ public void ElementwiseLessThanOrEqual(PrimitiveColumnContainer column, f } public void ElementwiseGreaterThan(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) { - for (int b = 0 ; b < left.Buffers.Count; b++) + for (int b = 0; b < left.Buffers.Count; b++) { var buffer = left.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -2822,7 +2822,7 @@ public void ElementwiseGreaterThan(PrimitiveColumnContainer left, Primiti } public void ElementwiseGreaterThan(PrimitiveColumnContainer column, float scalar, PrimitiveColumnContainer ret) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -2836,7 +2836,7 @@ public void ElementwiseGreaterThan(PrimitiveColumnContainer column, float } public void ElementwiseLessThan(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) { - for (int b = 0 ; b < left.Buffers.Count; b++) + for (int b = 0; b < left.Buffers.Count; b++) { var buffer = left.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -2851,7 +2851,7 @@ public void ElementwiseLessThan(PrimitiveColumnContainer left, PrimitiveC } public void ElementwiseLessThan(PrimitiveColumnContainer column, float scalar, PrimitiveColumnContainer ret) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -2868,7 +2868,7 @@ internal class IntArithmetic : IPrimitiveDataFrameColumnArithmetic { public void Add(PrimitiveColumnContainer left, PrimitiveColumnContainer right) { - for (int b = 0 ; b < left.Buffers.Count; b++) + for (int b = 0; b < left.Buffers.Count; b++) { var buffer = left.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -2883,7 +2883,7 @@ public void Add(PrimitiveColumnContainer left, PrimitiveColumnContainer column, int scalar) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -2895,16 +2895,16 @@ public void Add(PrimitiveColumnContainer column, int scalar) } } } - + public void Add(int scalar, PrimitiveColumnContainer column) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { - var buffer = column.Buffers[b]; + var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); column.Buffers[b] = mutableBuffer; var span = mutableBuffer.Span; - for (int i = 0; i < span.Length; i++) + for (int i = 0; i < span.Length; i++) { span[i] = (int)(scalar + span[i]); } @@ -2912,7 +2912,7 @@ public void Add(int scalar, PrimitiveColumnContainer column) } public void Subtract(PrimitiveColumnContainer left, PrimitiveColumnContainer right) { - for (int b = 0 ; b < left.Buffers.Count; b++) + for (int b = 0; b < left.Buffers.Count; b++) { var buffer = left.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -2927,7 +2927,7 @@ public void Subtract(PrimitiveColumnContainer left, PrimitiveColumnContaine } public void Subtract(PrimitiveColumnContainer column, int scalar) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -2939,16 +2939,16 @@ public void Subtract(PrimitiveColumnContainer column, int scalar) } } } - + public void Subtract(int scalar, PrimitiveColumnContainer column) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { - var buffer = column.Buffers[b]; + var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); column.Buffers[b] = mutableBuffer; var span = mutableBuffer.Span; - for (int i = 0; i < span.Length; i++) + for (int i = 0; i < span.Length; i++) { span[i] = (int)(scalar - span[i]); } @@ -2956,7 +2956,7 @@ public void Subtract(int scalar, PrimitiveColumnContainer column) } public void Multiply(PrimitiveColumnContainer left, PrimitiveColumnContainer right) { - for (int b = 0 ; b < left.Buffers.Count; b++) + for (int b = 0; b < left.Buffers.Count; b++) { var buffer = left.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -2971,7 +2971,7 @@ public void Multiply(PrimitiveColumnContainer left, PrimitiveColumnContaine } public void Multiply(PrimitiveColumnContainer column, int scalar) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -2983,16 +2983,16 @@ public void Multiply(PrimitiveColumnContainer column, int scalar) } } } - + public void Multiply(int scalar, PrimitiveColumnContainer column) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { - var buffer = column.Buffers[b]; + var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); column.Buffers[b] = mutableBuffer; var span = mutableBuffer.Span; - for (int i = 0; i < span.Length; i++) + for (int i = 0; i < span.Length; i++) { span[i] = (int)(scalar * span[i]); } @@ -3000,7 +3000,7 @@ public void Multiply(int scalar, PrimitiveColumnContainer column) } public void Divide(PrimitiveColumnContainer left, PrimitiveColumnContainer right) { - for (int b = 0 ; b < left.Buffers.Count; b++) + for (int b = 0; b < left.Buffers.Count; b++) { var buffer = left.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -3015,7 +3015,7 @@ public void Divide(PrimitiveColumnContainer left, PrimitiveColumnContainer< } public void Divide(PrimitiveColumnContainer column, int scalar) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -3027,16 +3027,16 @@ public void Divide(PrimitiveColumnContainer column, int scalar) } } } - + public void Divide(int scalar, PrimitiveColumnContainer column) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { - var buffer = column.Buffers[b]; + var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); column.Buffers[b] = mutableBuffer; var span = mutableBuffer.Span; - for (int i = 0; i < span.Length; i++) + for (int i = 0; i < span.Length; i++) { span[i] = (int)(scalar / span[i]); } @@ -3044,7 +3044,7 @@ public void Divide(int scalar, PrimitiveColumnContainer column) } public void Modulo(PrimitiveColumnContainer left, PrimitiveColumnContainer right) { - for (int b = 0 ; b < left.Buffers.Count; b++) + for (int b = 0; b < left.Buffers.Count; b++) { var buffer = left.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -3059,7 +3059,7 @@ public void Modulo(PrimitiveColumnContainer left, PrimitiveColumnContainer< } public void Modulo(PrimitiveColumnContainer column, int scalar) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -3071,16 +3071,16 @@ public void Modulo(PrimitiveColumnContainer column, int scalar) } } } - + public void Modulo(int scalar, PrimitiveColumnContainer column) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { - var buffer = column.Buffers[b]; + var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); column.Buffers[b] = mutableBuffer; var span = mutableBuffer.Span; - for (int i = 0; i < span.Length; i++) + for (int i = 0; i < span.Length; i++) { span[i] = (int)(scalar % span[i]); } @@ -3088,7 +3088,7 @@ public void Modulo(int scalar, PrimitiveColumnContainer column) } public void And(PrimitiveColumnContainer left, PrimitiveColumnContainer right) { - for (int b = 0 ; b < left.Buffers.Count; b++) + for (int b = 0; b < left.Buffers.Count; b++) { var buffer = left.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -3103,7 +3103,7 @@ public void And(PrimitiveColumnContainer left, PrimitiveColumnContainer column, int scalar) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -3115,16 +3115,16 @@ public void And(PrimitiveColumnContainer column, int scalar) } } } - + public void And(int scalar, PrimitiveColumnContainer column) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { - var buffer = column.Buffers[b]; + var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); column.Buffers[b] = mutableBuffer; var span = mutableBuffer.Span; - for (int i = 0; i < span.Length; i++) + for (int i = 0; i < span.Length; i++) { span[i] = (int)(scalar & span[i]); } @@ -3132,7 +3132,7 @@ public void And(int scalar, PrimitiveColumnContainer column) } public void Or(PrimitiveColumnContainer left, PrimitiveColumnContainer right) { - for (int b = 0 ; b < left.Buffers.Count; b++) + for (int b = 0; b < left.Buffers.Count; b++) { var buffer = left.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -3147,7 +3147,7 @@ public void Or(PrimitiveColumnContainer left, PrimitiveColumnContainer } public void Or(PrimitiveColumnContainer column, int scalar) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -3159,16 +3159,16 @@ public void Or(PrimitiveColumnContainer column, int scalar) } } } - + public void Or(int scalar, PrimitiveColumnContainer column) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { - var buffer = column.Buffers[b]; + var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); column.Buffers[b] = mutableBuffer; var span = mutableBuffer.Span; - for (int i = 0; i < span.Length; i++) + for (int i = 0; i < span.Length; i++) { span[i] = (int)(scalar | span[i]); } @@ -3176,7 +3176,7 @@ public void Or(int scalar, PrimitiveColumnContainer column) } public void Xor(PrimitiveColumnContainer left, PrimitiveColumnContainer right) { - for (int b = 0 ; b < left.Buffers.Count; b++) + for (int b = 0; b < left.Buffers.Count; b++) { var buffer = left.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -3191,7 +3191,7 @@ public void Xor(PrimitiveColumnContainer left, PrimitiveColumnContainer column, int scalar) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -3203,16 +3203,16 @@ public void Xor(PrimitiveColumnContainer column, int scalar) } } } - + public void Xor(int scalar, PrimitiveColumnContainer column) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { - var buffer = column.Buffers[b]; + var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); column.Buffers[b] = mutableBuffer; var span = mutableBuffer.Span; - for (int i = 0; i < span.Length; i++) + for (int i = 0; i < span.Length; i++) { span[i] = (int)(scalar ^ span[i]); } @@ -3220,7 +3220,7 @@ public void Xor(int scalar, PrimitiveColumnContainer column) } public void LeftShift(PrimitiveColumnContainer column, int value) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -3234,7 +3234,7 @@ public void LeftShift(PrimitiveColumnContainer column, int value) } public void RightShift(PrimitiveColumnContainer column, int value) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -3248,7 +3248,7 @@ public void RightShift(PrimitiveColumnContainer column, int value) } public void ElementwiseEquals(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) { - for (int b = 0 ; b < left.Buffers.Count; b++) + for (int b = 0; b < left.Buffers.Count; b++) { var buffer = left.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -3263,7 +3263,7 @@ public void ElementwiseEquals(PrimitiveColumnContainer left, PrimitiveColum } public void ElementwiseEquals(PrimitiveColumnContainer column, int scalar, PrimitiveColumnContainer ret) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -3277,7 +3277,7 @@ public void ElementwiseEquals(PrimitiveColumnContainer column, int scalar, } public void ElementwiseNotEquals(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) { - for (int b = 0 ; b < left.Buffers.Count; b++) + for (int b = 0; b < left.Buffers.Count; b++) { var buffer = left.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -3292,7 +3292,7 @@ public void ElementwiseNotEquals(PrimitiveColumnContainer left, PrimitiveCo } public void ElementwiseNotEquals(PrimitiveColumnContainer column, int scalar, PrimitiveColumnContainer ret) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -3306,7 +3306,7 @@ public void ElementwiseNotEquals(PrimitiveColumnContainer column, int scala } public void ElementwiseGreaterThanOrEqual(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) { - for (int b = 0 ; b < left.Buffers.Count; b++) + for (int b = 0; b < left.Buffers.Count; b++) { var buffer = left.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -3321,7 +3321,7 @@ public void ElementwiseGreaterThanOrEqual(PrimitiveColumnContainer left, Pr } public void ElementwiseGreaterThanOrEqual(PrimitiveColumnContainer column, int scalar, PrimitiveColumnContainer ret) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -3335,7 +3335,7 @@ public void ElementwiseGreaterThanOrEqual(PrimitiveColumnContainer column, } public void ElementwiseLessThanOrEqual(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) { - for (int b = 0 ; b < left.Buffers.Count; b++) + for (int b = 0; b < left.Buffers.Count; b++) { var buffer = left.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -3350,7 +3350,7 @@ public void ElementwiseLessThanOrEqual(PrimitiveColumnContainer left, Primi } public void ElementwiseLessThanOrEqual(PrimitiveColumnContainer column, int scalar, PrimitiveColumnContainer ret) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -3364,7 +3364,7 @@ public void ElementwiseLessThanOrEqual(PrimitiveColumnContainer column, int } public void ElementwiseGreaterThan(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) { - for (int b = 0 ; b < left.Buffers.Count; b++) + for (int b = 0; b < left.Buffers.Count; b++) { var buffer = left.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -3379,7 +3379,7 @@ public void ElementwiseGreaterThan(PrimitiveColumnContainer left, Primitive } public void ElementwiseGreaterThan(PrimitiveColumnContainer column, int scalar, PrimitiveColumnContainer ret) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -3393,7 +3393,7 @@ public void ElementwiseGreaterThan(PrimitiveColumnContainer column, int sca } public void ElementwiseLessThan(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) { - for (int b = 0 ; b < left.Buffers.Count; b++) + for (int b = 0; b < left.Buffers.Count; b++) { var buffer = left.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -3408,7 +3408,7 @@ public void ElementwiseLessThan(PrimitiveColumnContainer left, PrimitiveCol } public void ElementwiseLessThan(PrimitiveColumnContainer column, int scalar, PrimitiveColumnContainer ret) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -3425,7 +3425,7 @@ internal class LongArithmetic : IPrimitiveDataFrameColumnArithmetic { public void Add(PrimitiveColumnContainer left, PrimitiveColumnContainer right) { - for (int b = 0 ; b < left.Buffers.Count; b++) + for (int b = 0; b < left.Buffers.Count; b++) { var buffer = left.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -3440,7 +3440,7 @@ public void Add(PrimitiveColumnContainer left, PrimitiveColumnContainer column, long scalar) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -3452,16 +3452,16 @@ public void Add(PrimitiveColumnContainer column, long scalar) } } } - + public void Add(long scalar, PrimitiveColumnContainer column) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { - var buffer = column.Buffers[b]; + var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); column.Buffers[b] = mutableBuffer; var span = mutableBuffer.Span; - for (int i = 0; i < span.Length; i++) + for (int i = 0; i < span.Length; i++) { span[i] = (long)(scalar + span[i]); } @@ -3469,7 +3469,7 @@ public void Add(long scalar, PrimitiveColumnContainer column) } public void Subtract(PrimitiveColumnContainer left, PrimitiveColumnContainer right) { - for (int b = 0 ; b < left.Buffers.Count; b++) + for (int b = 0; b < left.Buffers.Count; b++) { var buffer = left.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -3484,7 +3484,7 @@ public void Subtract(PrimitiveColumnContainer left, PrimitiveColumnContain } public void Subtract(PrimitiveColumnContainer column, long scalar) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -3496,16 +3496,16 @@ public void Subtract(PrimitiveColumnContainer column, long scalar) } } } - + public void Subtract(long scalar, PrimitiveColumnContainer column) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { - var buffer = column.Buffers[b]; + var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); column.Buffers[b] = mutableBuffer; var span = mutableBuffer.Span; - for (int i = 0; i < span.Length; i++) + for (int i = 0; i < span.Length; i++) { span[i] = (long)(scalar - span[i]); } @@ -3513,7 +3513,7 @@ public void Subtract(long scalar, PrimitiveColumnContainer column) } public void Multiply(PrimitiveColumnContainer left, PrimitiveColumnContainer right) { - for (int b = 0 ; b < left.Buffers.Count; b++) + for (int b = 0; b < left.Buffers.Count; b++) { var buffer = left.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -3528,7 +3528,7 @@ public void Multiply(PrimitiveColumnContainer left, PrimitiveColumnContain } public void Multiply(PrimitiveColumnContainer column, long scalar) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -3540,16 +3540,16 @@ public void Multiply(PrimitiveColumnContainer column, long scalar) } } } - + public void Multiply(long scalar, PrimitiveColumnContainer column) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { - var buffer = column.Buffers[b]; + var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); column.Buffers[b] = mutableBuffer; var span = mutableBuffer.Span; - for (int i = 0; i < span.Length; i++) + for (int i = 0; i < span.Length; i++) { span[i] = (long)(scalar * span[i]); } @@ -3557,7 +3557,7 @@ public void Multiply(long scalar, PrimitiveColumnContainer column) } public void Divide(PrimitiveColumnContainer left, PrimitiveColumnContainer right) { - for (int b = 0 ; b < left.Buffers.Count; b++) + for (int b = 0; b < left.Buffers.Count; b++) { var buffer = left.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -3572,7 +3572,7 @@ public void Divide(PrimitiveColumnContainer left, PrimitiveColumnContainer } public void Divide(PrimitiveColumnContainer column, long scalar) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -3584,16 +3584,16 @@ public void Divide(PrimitiveColumnContainer column, long scalar) } } } - + public void Divide(long scalar, PrimitiveColumnContainer column) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { - var buffer = column.Buffers[b]; + var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); column.Buffers[b] = mutableBuffer; var span = mutableBuffer.Span; - for (int i = 0; i < span.Length; i++) + for (int i = 0; i < span.Length; i++) { span[i] = (long)(scalar / span[i]); } @@ -3601,7 +3601,7 @@ public void Divide(long scalar, PrimitiveColumnContainer column) } public void Modulo(PrimitiveColumnContainer left, PrimitiveColumnContainer right) { - for (int b = 0 ; b < left.Buffers.Count; b++) + for (int b = 0; b < left.Buffers.Count; b++) { var buffer = left.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -3616,7 +3616,7 @@ public void Modulo(PrimitiveColumnContainer left, PrimitiveColumnContainer } public void Modulo(PrimitiveColumnContainer column, long scalar) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -3628,16 +3628,16 @@ public void Modulo(PrimitiveColumnContainer column, long scalar) } } } - + public void Modulo(long scalar, PrimitiveColumnContainer column) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { - var buffer = column.Buffers[b]; + var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); column.Buffers[b] = mutableBuffer; var span = mutableBuffer.Span; - for (int i = 0; i < span.Length; i++) + for (int i = 0; i < span.Length; i++) { span[i] = (long)(scalar % span[i]); } @@ -3645,7 +3645,7 @@ public void Modulo(long scalar, PrimitiveColumnContainer column) } public void And(PrimitiveColumnContainer left, PrimitiveColumnContainer right) { - for (int b = 0 ; b < left.Buffers.Count; b++) + for (int b = 0; b < left.Buffers.Count; b++) { var buffer = left.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -3660,7 +3660,7 @@ public void And(PrimitiveColumnContainer left, PrimitiveColumnContainer column, long scalar) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -3672,16 +3672,16 @@ public void And(PrimitiveColumnContainer column, long scalar) } } } - + public void And(long scalar, PrimitiveColumnContainer column) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { - var buffer = column.Buffers[b]; + var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); column.Buffers[b] = mutableBuffer; var span = mutableBuffer.Span; - for (int i = 0; i < span.Length; i++) + for (int i = 0; i < span.Length; i++) { span[i] = (long)(scalar & span[i]); } @@ -3689,7 +3689,7 @@ public void And(long scalar, PrimitiveColumnContainer column) } public void Or(PrimitiveColumnContainer left, PrimitiveColumnContainer right) { - for (int b = 0 ; b < left.Buffers.Count; b++) + for (int b = 0; b < left.Buffers.Count; b++) { var buffer = left.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -3704,7 +3704,7 @@ public void Or(PrimitiveColumnContainer left, PrimitiveColumnContainer column, long scalar) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -3716,16 +3716,16 @@ public void Or(PrimitiveColumnContainer column, long scalar) } } } - + public void Or(long scalar, PrimitiveColumnContainer column) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { - var buffer = column.Buffers[b]; + var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); column.Buffers[b] = mutableBuffer; var span = mutableBuffer.Span; - for (int i = 0; i < span.Length; i++) + for (int i = 0; i < span.Length; i++) { span[i] = (long)(scalar | span[i]); } @@ -3733,7 +3733,7 @@ public void Or(long scalar, PrimitiveColumnContainer column) } public void Xor(PrimitiveColumnContainer left, PrimitiveColumnContainer right) { - for (int b = 0 ; b < left.Buffers.Count; b++) + for (int b = 0; b < left.Buffers.Count; b++) { var buffer = left.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -3748,7 +3748,7 @@ public void Xor(PrimitiveColumnContainer left, PrimitiveColumnContainer column, long scalar) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -3760,16 +3760,16 @@ public void Xor(PrimitiveColumnContainer column, long scalar) } } } - + public void Xor(long scalar, PrimitiveColumnContainer column) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { - var buffer = column.Buffers[b]; + var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); column.Buffers[b] = mutableBuffer; var span = mutableBuffer.Span; - for (int i = 0; i < span.Length; i++) + for (int i = 0; i < span.Length; i++) { span[i] = (long)(scalar ^ span[i]); } @@ -3777,7 +3777,7 @@ public void Xor(long scalar, PrimitiveColumnContainer column) } public void LeftShift(PrimitiveColumnContainer column, int value) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -3791,7 +3791,7 @@ public void LeftShift(PrimitiveColumnContainer column, int value) } public void RightShift(PrimitiveColumnContainer column, int value) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -3805,7 +3805,7 @@ public void RightShift(PrimitiveColumnContainer column, int value) } public void ElementwiseEquals(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) { - for (int b = 0 ; b < left.Buffers.Count; b++) + for (int b = 0; b < left.Buffers.Count; b++) { var buffer = left.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -3820,7 +3820,7 @@ public void ElementwiseEquals(PrimitiveColumnContainer left, PrimitiveColu } public void ElementwiseEquals(PrimitiveColumnContainer column, long scalar, PrimitiveColumnContainer ret) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -3834,7 +3834,7 @@ public void ElementwiseEquals(PrimitiveColumnContainer column, long scalar } public void ElementwiseNotEquals(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) { - for (int b = 0 ; b < left.Buffers.Count; b++) + for (int b = 0; b < left.Buffers.Count; b++) { var buffer = left.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -3849,7 +3849,7 @@ public void ElementwiseNotEquals(PrimitiveColumnContainer left, PrimitiveC } public void ElementwiseNotEquals(PrimitiveColumnContainer column, long scalar, PrimitiveColumnContainer ret) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -3863,7 +3863,7 @@ public void ElementwiseNotEquals(PrimitiveColumnContainer column, long sca } public void ElementwiseGreaterThanOrEqual(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) { - for (int b = 0 ; b < left.Buffers.Count; b++) + for (int b = 0; b < left.Buffers.Count; b++) { var buffer = left.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -3878,7 +3878,7 @@ public void ElementwiseGreaterThanOrEqual(PrimitiveColumnContainer left, P } public void ElementwiseGreaterThanOrEqual(PrimitiveColumnContainer column, long scalar, PrimitiveColumnContainer ret) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -3892,7 +3892,7 @@ public void ElementwiseGreaterThanOrEqual(PrimitiveColumnContainer column, } public void ElementwiseLessThanOrEqual(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) { - for (int b = 0 ; b < left.Buffers.Count; b++) + for (int b = 0; b < left.Buffers.Count; b++) { var buffer = left.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -3907,7 +3907,7 @@ public void ElementwiseLessThanOrEqual(PrimitiveColumnContainer left, Prim } public void ElementwiseLessThanOrEqual(PrimitiveColumnContainer column, long scalar, PrimitiveColumnContainer ret) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -3921,7 +3921,7 @@ public void ElementwiseLessThanOrEqual(PrimitiveColumnContainer column, lo } public void ElementwiseGreaterThan(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) { - for (int b = 0 ; b < left.Buffers.Count; b++) + for (int b = 0; b < left.Buffers.Count; b++) { var buffer = left.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -3936,7 +3936,7 @@ public void ElementwiseGreaterThan(PrimitiveColumnContainer left, Primitiv } public void ElementwiseGreaterThan(PrimitiveColumnContainer column, long scalar, PrimitiveColumnContainer ret) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -3950,7 +3950,7 @@ public void ElementwiseGreaterThan(PrimitiveColumnContainer column, long s } public void ElementwiseLessThan(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) { - for (int b = 0 ; b < left.Buffers.Count; b++) + for (int b = 0; b < left.Buffers.Count; b++) { var buffer = left.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -3965,7 +3965,7 @@ public void ElementwiseLessThan(PrimitiveColumnContainer left, PrimitiveCo } public void ElementwiseLessThan(PrimitiveColumnContainer column, long scalar, PrimitiveColumnContainer ret) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -3982,7 +3982,7 @@ internal class SByteArithmetic : IPrimitiveDataFrameColumnArithmetic { public void Add(PrimitiveColumnContainer left, PrimitiveColumnContainer right) { - for (int b = 0 ; b < left.Buffers.Count; b++) + for (int b = 0; b < left.Buffers.Count; b++) { var buffer = left.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -3997,7 +3997,7 @@ public void Add(PrimitiveColumnContainer left, PrimitiveColumnContainer column, sbyte scalar) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -4009,16 +4009,16 @@ public void Add(PrimitiveColumnContainer column, sbyte scalar) } } } - + public void Add(sbyte scalar, PrimitiveColumnContainer column) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { - var buffer = column.Buffers[b]; + var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); column.Buffers[b] = mutableBuffer; var span = mutableBuffer.Span; - for (int i = 0; i < span.Length; i++) + for (int i = 0; i < span.Length; i++) { span[i] = (sbyte)(scalar + span[i]); } @@ -4026,7 +4026,7 @@ public void Add(sbyte scalar, PrimitiveColumnContainer column) } public void Subtract(PrimitiveColumnContainer left, PrimitiveColumnContainer right) { - for (int b = 0 ; b < left.Buffers.Count; b++) + for (int b = 0; b < left.Buffers.Count; b++) { var buffer = left.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -4041,7 +4041,7 @@ public void Subtract(PrimitiveColumnContainer left, PrimitiveColumnContai } public void Subtract(PrimitiveColumnContainer column, sbyte scalar) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -4053,16 +4053,16 @@ public void Subtract(PrimitiveColumnContainer column, sbyte scalar) } } } - + public void Subtract(sbyte scalar, PrimitiveColumnContainer column) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { - var buffer = column.Buffers[b]; + var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); column.Buffers[b] = mutableBuffer; var span = mutableBuffer.Span; - for (int i = 0; i < span.Length; i++) + for (int i = 0; i < span.Length; i++) { span[i] = (sbyte)(scalar - span[i]); } @@ -4070,7 +4070,7 @@ public void Subtract(sbyte scalar, PrimitiveColumnContainer column) } public void Multiply(PrimitiveColumnContainer left, PrimitiveColumnContainer right) { - for (int b = 0 ; b < left.Buffers.Count; b++) + for (int b = 0; b < left.Buffers.Count; b++) { var buffer = left.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -4085,7 +4085,7 @@ public void Multiply(PrimitiveColumnContainer left, PrimitiveColumnContai } public void Multiply(PrimitiveColumnContainer column, sbyte scalar) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -4097,16 +4097,16 @@ public void Multiply(PrimitiveColumnContainer column, sbyte scalar) } } } - + public void Multiply(sbyte scalar, PrimitiveColumnContainer column) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { - var buffer = column.Buffers[b]; + var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); column.Buffers[b] = mutableBuffer; var span = mutableBuffer.Span; - for (int i = 0; i < span.Length; i++) + for (int i = 0; i < span.Length; i++) { span[i] = (sbyte)(scalar * span[i]); } @@ -4114,7 +4114,7 @@ public void Multiply(sbyte scalar, PrimitiveColumnContainer column) } public void Divide(PrimitiveColumnContainer left, PrimitiveColumnContainer right) { - for (int b = 0 ; b < left.Buffers.Count; b++) + for (int b = 0; b < left.Buffers.Count; b++) { var buffer = left.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -4129,7 +4129,7 @@ public void Divide(PrimitiveColumnContainer left, PrimitiveColumnContaine } public void Divide(PrimitiveColumnContainer column, sbyte scalar) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -4141,16 +4141,16 @@ public void Divide(PrimitiveColumnContainer column, sbyte scalar) } } } - + public void Divide(sbyte scalar, PrimitiveColumnContainer column) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { - var buffer = column.Buffers[b]; + var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); column.Buffers[b] = mutableBuffer; var span = mutableBuffer.Span; - for (int i = 0; i < span.Length; i++) + for (int i = 0; i < span.Length; i++) { span[i] = (sbyte)(scalar / span[i]); } @@ -4158,7 +4158,7 @@ public void Divide(sbyte scalar, PrimitiveColumnContainer column) } public void Modulo(PrimitiveColumnContainer left, PrimitiveColumnContainer right) { - for (int b = 0 ; b < left.Buffers.Count; b++) + for (int b = 0; b < left.Buffers.Count; b++) { var buffer = left.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -4173,7 +4173,7 @@ public void Modulo(PrimitiveColumnContainer left, PrimitiveColumnContaine } public void Modulo(PrimitiveColumnContainer column, sbyte scalar) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -4185,16 +4185,16 @@ public void Modulo(PrimitiveColumnContainer column, sbyte scalar) } } } - + public void Modulo(sbyte scalar, PrimitiveColumnContainer column) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { - var buffer = column.Buffers[b]; + var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); column.Buffers[b] = mutableBuffer; var span = mutableBuffer.Span; - for (int i = 0; i < span.Length; i++) + for (int i = 0; i < span.Length; i++) { span[i] = (sbyte)(scalar % span[i]); } @@ -4202,7 +4202,7 @@ public void Modulo(sbyte scalar, PrimitiveColumnContainer column) } public void And(PrimitiveColumnContainer left, PrimitiveColumnContainer right) { - for (int b = 0 ; b < left.Buffers.Count; b++) + for (int b = 0; b < left.Buffers.Count; b++) { var buffer = left.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -4217,7 +4217,7 @@ public void And(PrimitiveColumnContainer left, PrimitiveColumnContainer column, sbyte scalar) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -4229,16 +4229,16 @@ public void And(PrimitiveColumnContainer column, sbyte scalar) } } } - + public void And(sbyte scalar, PrimitiveColumnContainer column) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { - var buffer = column.Buffers[b]; + var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); column.Buffers[b] = mutableBuffer; var span = mutableBuffer.Span; - for (int i = 0; i < span.Length; i++) + for (int i = 0; i < span.Length; i++) { span[i] = (sbyte)(scalar & span[i]); } @@ -4246,7 +4246,7 @@ public void And(sbyte scalar, PrimitiveColumnContainer column) } public void Or(PrimitiveColumnContainer left, PrimitiveColumnContainer right) { - for (int b = 0 ; b < left.Buffers.Count; b++) + for (int b = 0; b < left.Buffers.Count; b++) { var buffer = left.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -4261,7 +4261,7 @@ public void Or(PrimitiveColumnContainer left, PrimitiveColumnContainer column, sbyte scalar) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -4273,16 +4273,16 @@ public void Or(PrimitiveColumnContainer column, sbyte scalar) } } } - + public void Or(sbyte scalar, PrimitiveColumnContainer column) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { - var buffer = column.Buffers[b]; + var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); column.Buffers[b] = mutableBuffer; var span = mutableBuffer.Span; - for (int i = 0; i < span.Length; i++) + for (int i = 0; i < span.Length; i++) { span[i] = (sbyte)(scalar | span[i]); } @@ -4290,7 +4290,7 @@ public void Or(sbyte scalar, PrimitiveColumnContainer column) } public void Xor(PrimitiveColumnContainer left, PrimitiveColumnContainer right) { - for (int b = 0 ; b < left.Buffers.Count; b++) + for (int b = 0; b < left.Buffers.Count; b++) { var buffer = left.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -4305,7 +4305,7 @@ public void Xor(PrimitiveColumnContainer left, PrimitiveColumnContainer column, sbyte scalar) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -4317,16 +4317,16 @@ public void Xor(PrimitiveColumnContainer column, sbyte scalar) } } } - + public void Xor(sbyte scalar, PrimitiveColumnContainer column) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { - var buffer = column.Buffers[b]; + var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); column.Buffers[b] = mutableBuffer; var span = mutableBuffer.Span; - for (int i = 0; i < span.Length; i++) + for (int i = 0; i < span.Length; i++) { span[i] = (sbyte)(scalar ^ span[i]); } @@ -4334,7 +4334,7 @@ public void Xor(sbyte scalar, PrimitiveColumnContainer column) } public void LeftShift(PrimitiveColumnContainer column, int value) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -4348,7 +4348,7 @@ public void LeftShift(PrimitiveColumnContainer column, int value) } public void RightShift(PrimitiveColumnContainer column, int value) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -4362,7 +4362,7 @@ public void RightShift(PrimitiveColumnContainer column, int value) } public void ElementwiseEquals(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) { - for (int b = 0 ; b < left.Buffers.Count; b++) + for (int b = 0; b < left.Buffers.Count; b++) { var buffer = left.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -4377,7 +4377,7 @@ public void ElementwiseEquals(PrimitiveColumnContainer left, PrimitiveCol } public void ElementwiseEquals(PrimitiveColumnContainer column, sbyte scalar, PrimitiveColumnContainer ret) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -4391,7 +4391,7 @@ public void ElementwiseEquals(PrimitiveColumnContainer column, sbyte scal } public void ElementwiseNotEquals(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) { - for (int b = 0 ; b < left.Buffers.Count; b++) + for (int b = 0; b < left.Buffers.Count; b++) { var buffer = left.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -4406,7 +4406,7 @@ public void ElementwiseNotEquals(PrimitiveColumnContainer left, Primitive } public void ElementwiseNotEquals(PrimitiveColumnContainer column, sbyte scalar, PrimitiveColumnContainer ret) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -4420,7 +4420,7 @@ public void ElementwiseNotEquals(PrimitiveColumnContainer column, sbyte s } public void ElementwiseGreaterThanOrEqual(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) { - for (int b = 0 ; b < left.Buffers.Count; b++) + for (int b = 0; b < left.Buffers.Count; b++) { var buffer = left.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -4435,7 +4435,7 @@ public void ElementwiseGreaterThanOrEqual(PrimitiveColumnContainer left, } public void ElementwiseGreaterThanOrEqual(PrimitiveColumnContainer column, sbyte scalar, PrimitiveColumnContainer ret) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -4449,7 +4449,7 @@ public void ElementwiseGreaterThanOrEqual(PrimitiveColumnContainer column } public void ElementwiseLessThanOrEqual(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) { - for (int b = 0 ; b < left.Buffers.Count; b++) + for (int b = 0; b < left.Buffers.Count; b++) { var buffer = left.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -4464,7 +4464,7 @@ public void ElementwiseLessThanOrEqual(PrimitiveColumnContainer left, Pri } public void ElementwiseLessThanOrEqual(PrimitiveColumnContainer column, sbyte scalar, PrimitiveColumnContainer ret) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -4478,7 +4478,7 @@ public void ElementwiseLessThanOrEqual(PrimitiveColumnContainer column, s } public void ElementwiseGreaterThan(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) { - for (int b = 0 ; b < left.Buffers.Count; b++) + for (int b = 0; b < left.Buffers.Count; b++) { var buffer = left.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -4493,7 +4493,7 @@ public void ElementwiseGreaterThan(PrimitiveColumnContainer left, Primiti } public void ElementwiseGreaterThan(PrimitiveColumnContainer column, sbyte scalar, PrimitiveColumnContainer ret) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -4507,7 +4507,7 @@ public void ElementwiseGreaterThan(PrimitiveColumnContainer column, sbyte } public void ElementwiseLessThan(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) { - for (int b = 0 ; b < left.Buffers.Count; b++) + for (int b = 0; b < left.Buffers.Count; b++) { var buffer = left.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -4522,7 +4522,7 @@ public void ElementwiseLessThan(PrimitiveColumnContainer left, PrimitiveC } public void ElementwiseLessThan(PrimitiveColumnContainer column, sbyte scalar, PrimitiveColumnContainer ret) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -4539,7 +4539,7 @@ internal class ShortArithmetic : IPrimitiveDataFrameColumnArithmetic { public void Add(PrimitiveColumnContainer left, PrimitiveColumnContainer right) { - for (int b = 0 ; b < left.Buffers.Count; b++) + for (int b = 0; b < left.Buffers.Count; b++) { var buffer = left.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -4554,7 +4554,7 @@ public void Add(PrimitiveColumnContainer left, PrimitiveColumnContainer column, short scalar) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -4566,16 +4566,16 @@ public void Add(PrimitiveColumnContainer column, short scalar) } } } - + public void Add(short scalar, PrimitiveColumnContainer column) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { - var buffer = column.Buffers[b]; + var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); column.Buffers[b] = mutableBuffer; var span = mutableBuffer.Span; - for (int i = 0; i < span.Length; i++) + for (int i = 0; i < span.Length; i++) { span[i] = (short)(scalar + span[i]); } @@ -4583,7 +4583,7 @@ public void Add(short scalar, PrimitiveColumnContainer column) } public void Subtract(PrimitiveColumnContainer left, PrimitiveColumnContainer right) { - for (int b = 0 ; b < left.Buffers.Count; b++) + for (int b = 0; b < left.Buffers.Count; b++) { var buffer = left.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -4598,7 +4598,7 @@ public void Subtract(PrimitiveColumnContainer left, PrimitiveColumnContai } public void Subtract(PrimitiveColumnContainer column, short scalar) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -4610,16 +4610,16 @@ public void Subtract(PrimitiveColumnContainer column, short scalar) } } } - + public void Subtract(short scalar, PrimitiveColumnContainer column) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { - var buffer = column.Buffers[b]; + var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); column.Buffers[b] = mutableBuffer; var span = mutableBuffer.Span; - for (int i = 0; i < span.Length; i++) + for (int i = 0; i < span.Length; i++) { span[i] = (short)(scalar - span[i]); } @@ -4627,7 +4627,7 @@ public void Subtract(short scalar, PrimitiveColumnContainer column) } public void Multiply(PrimitiveColumnContainer left, PrimitiveColumnContainer right) { - for (int b = 0 ; b < left.Buffers.Count; b++) + for (int b = 0; b < left.Buffers.Count; b++) { var buffer = left.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -4642,7 +4642,7 @@ public void Multiply(PrimitiveColumnContainer left, PrimitiveColumnContai } public void Multiply(PrimitiveColumnContainer column, short scalar) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -4654,16 +4654,16 @@ public void Multiply(PrimitiveColumnContainer column, short scalar) } } } - + public void Multiply(short scalar, PrimitiveColumnContainer column) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { - var buffer = column.Buffers[b]; + var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); column.Buffers[b] = mutableBuffer; var span = mutableBuffer.Span; - for (int i = 0; i < span.Length; i++) + for (int i = 0; i < span.Length; i++) { span[i] = (short)(scalar * span[i]); } @@ -4671,7 +4671,7 @@ public void Multiply(short scalar, PrimitiveColumnContainer column) } public void Divide(PrimitiveColumnContainer left, PrimitiveColumnContainer right) { - for (int b = 0 ; b < left.Buffers.Count; b++) + for (int b = 0; b < left.Buffers.Count; b++) { var buffer = left.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -4686,7 +4686,7 @@ public void Divide(PrimitiveColumnContainer left, PrimitiveColumnContaine } public void Divide(PrimitiveColumnContainer column, short scalar) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -4698,16 +4698,16 @@ public void Divide(PrimitiveColumnContainer column, short scalar) } } } - + public void Divide(short scalar, PrimitiveColumnContainer column) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { - var buffer = column.Buffers[b]; + var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); column.Buffers[b] = mutableBuffer; var span = mutableBuffer.Span; - for (int i = 0; i < span.Length; i++) + for (int i = 0; i < span.Length; i++) { span[i] = (short)(scalar / span[i]); } @@ -4715,7 +4715,7 @@ public void Divide(short scalar, PrimitiveColumnContainer column) } public void Modulo(PrimitiveColumnContainer left, PrimitiveColumnContainer right) { - for (int b = 0 ; b < left.Buffers.Count; b++) + for (int b = 0; b < left.Buffers.Count; b++) { var buffer = left.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -4730,7 +4730,7 @@ public void Modulo(PrimitiveColumnContainer left, PrimitiveColumnContaine } public void Modulo(PrimitiveColumnContainer column, short scalar) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -4742,16 +4742,16 @@ public void Modulo(PrimitiveColumnContainer column, short scalar) } } } - + public void Modulo(short scalar, PrimitiveColumnContainer column) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { - var buffer = column.Buffers[b]; + var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); column.Buffers[b] = mutableBuffer; var span = mutableBuffer.Span; - for (int i = 0; i < span.Length; i++) + for (int i = 0; i < span.Length; i++) { span[i] = (short)(scalar % span[i]); } @@ -4759,7 +4759,7 @@ public void Modulo(short scalar, PrimitiveColumnContainer column) } public void And(PrimitiveColumnContainer left, PrimitiveColumnContainer right) { - for (int b = 0 ; b < left.Buffers.Count; b++) + for (int b = 0; b < left.Buffers.Count; b++) { var buffer = left.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -4774,7 +4774,7 @@ public void And(PrimitiveColumnContainer left, PrimitiveColumnContainer column, short scalar) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -4786,16 +4786,16 @@ public void And(PrimitiveColumnContainer column, short scalar) } } } - + public void And(short scalar, PrimitiveColumnContainer column) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { - var buffer = column.Buffers[b]; + var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); column.Buffers[b] = mutableBuffer; var span = mutableBuffer.Span; - for (int i = 0; i < span.Length; i++) + for (int i = 0; i < span.Length; i++) { span[i] = (short)(scalar & span[i]); } @@ -4803,7 +4803,7 @@ public void And(short scalar, PrimitiveColumnContainer column) } public void Or(PrimitiveColumnContainer left, PrimitiveColumnContainer right) { - for (int b = 0 ; b < left.Buffers.Count; b++) + for (int b = 0; b < left.Buffers.Count; b++) { var buffer = left.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -4818,7 +4818,7 @@ public void Or(PrimitiveColumnContainer left, PrimitiveColumnContainer column, short scalar) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -4830,16 +4830,16 @@ public void Or(PrimitiveColumnContainer column, short scalar) } } } - + public void Or(short scalar, PrimitiveColumnContainer column) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { - var buffer = column.Buffers[b]; + var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); column.Buffers[b] = mutableBuffer; var span = mutableBuffer.Span; - for (int i = 0; i < span.Length; i++) + for (int i = 0; i < span.Length; i++) { span[i] = (short)(scalar | span[i]); } @@ -4847,7 +4847,7 @@ public void Or(short scalar, PrimitiveColumnContainer column) } public void Xor(PrimitiveColumnContainer left, PrimitiveColumnContainer right) { - for (int b = 0 ; b < left.Buffers.Count; b++) + for (int b = 0; b < left.Buffers.Count; b++) { var buffer = left.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -4862,7 +4862,7 @@ public void Xor(PrimitiveColumnContainer left, PrimitiveColumnContainer column, short scalar) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -4874,16 +4874,16 @@ public void Xor(PrimitiveColumnContainer column, short scalar) } } } - + public void Xor(short scalar, PrimitiveColumnContainer column) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { - var buffer = column.Buffers[b]; + var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); column.Buffers[b] = mutableBuffer; var span = mutableBuffer.Span; - for (int i = 0; i < span.Length; i++) + for (int i = 0; i < span.Length; i++) { span[i] = (short)(scalar ^ span[i]); } @@ -4891,7 +4891,7 @@ public void Xor(short scalar, PrimitiveColumnContainer column) } public void LeftShift(PrimitiveColumnContainer column, int value) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -4905,7 +4905,7 @@ public void LeftShift(PrimitiveColumnContainer column, int value) } public void RightShift(PrimitiveColumnContainer column, int value) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -4919,7 +4919,7 @@ public void RightShift(PrimitiveColumnContainer column, int value) } public void ElementwiseEquals(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) { - for (int b = 0 ; b < left.Buffers.Count; b++) + for (int b = 0; b < left.Buffers.Count; b++) { var buffer = left.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -4934,7 +4934,7 @@ public void ElementwiseEquals(PrimitiveColumnContainer left, PrimitiveCol } public void ElementwiseEquals(PrimitiveColumnContainer column, short scalar, PrimitiveColumnContainer ret) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -4948,7 +4948,7 @@ public void ElementwiseEquals(PrimitiveColumnContainer column, short scal } public void ElementwiseNotEquals(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) { - for (int b = 0 ; b < left.Buffers.Count; b++) + for (int b = 0; b < left.Buffers.Count; b++) { var buffer = left.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -4963,7 +4963,7 @@ public void ElementwiseNotEquals(PrimitiveColumnContainer left, Primitive } public void ElementwiseNotEquals(PrimitiveColumnContainer column, short scalar, PrimitiveColumnContainer ret) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -4977,7 +4977,7 @@ public void ElementwiseNotEquals(PrimitiveColumnContainer column, short s } public void ElementwiseGreaterThanOrEqual(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) { - for (int b = 0 ; b < left.Buffers.Count; b++) + for (int b = 0; b < left.Buffers.Count; b++) { var buffer = left.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -4992,7 +4992,7 @@ public void ElementwiseGreaterThanOrEqual(PrimitiveColumnContainer left, } public void ElementwiseGreaterThanOrEqual(PrimitiveColumnContainer column, short scalar, PrimitiveColumnContainer ret) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -5006,7 +5006,7 @@ public void ElementwiseGreaterThanOrEqual(PrimitiveColumnContainer column } public void ElementwiseLessThanOrEqual(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) { - for (int b = 0 ; b < left.Buffers.Count; b++) + for (int b = 0; b < left.Buffers.Count; b++) { var buffer = left.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -5021,7 +5021,7 @@ public void ElementwiseLessThanOrEqual(PrimitiveColumnContainer left, Pri } public void ElementwiseLessThanOrEqual(PrimitiveColumnContainer column, short scalar, PrimitiveColumnContainer ret) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -5035,7 +5035,7 @@ public void ElementwiseLessThanOrEqual(PrimitiveColumnContainer column, s } public void ElementwiseGreaterThan(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) { - for (int b = 0 ; b < left.Buffers.Count; b++) + for (int b = 0; b < left.Buffers.Count; b++) { var buffer = left.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -5050,7 +5050,7 @@ public void ElementwiseGreaterThan(PrimitiveColumnContainer left, Primiti } public void ElementwiseGreaterThan(PrimitiveColumnContainer column, short scalar, PrimitiveColumnContainer ret) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -5064,7 +5064,7 @@ public void ElementwiseGreaterThan(PrimitiveColumnContainer column, short } public void ElementwiseLessThan(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) { - for (int b = 0 ; b < left.Buffers.Count; b++) + for (int b = 0; b < left.Buffers.Count; b++) { var buffer = left.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -5079,7 +5079,7 @@ public void ElementwiseLessThan(PrimitiveColumnContainer left, PrimitiveC } public void ElementwiseLessThan(PrimitiveColumnContainer column, short scalar, PrimitiveColumnContainer ret) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -5096,7 +5096,7 @@ internal class UIntArithmetic : IPrimitiveDataFrameColumnArithmetic { public void Add(PrimitiveColumnContainer left, PrimitiveColumnContainer right) { - for (int b = 0 ; b < left.Buffers.Count; b++) + for (int b = 0; b < left.Buffers.Count; b++) { var buffer = left.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -5111,7 +5111,7 @@ public void Add(PrimitiveColumnContainer left, PrimitiveColumnContainer column, uint scalar) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -5123,16 +5123,16 @@ public void Add(PrimitiveColumnContainer column, uint scalar) } } } - + public void Add(uint scalar, PrimitiveColumnContainer column) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { - var buffer = column.Buffers[b]; + var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); column.Buffers[b] = mutableBuffer; var span = mutableBuffer.Span; - for (int i = 0; i < span.Length; i++) + for (int i = 0; i < span.Length; i++) { span[i] = (uint)(scalar + span[i]); } @@ -5140,7 +5140,7 @@ public void Add(uint scalar, PrimitiveColumnContainer column) } public void Subtract(PrimitiveColumnContainer left, PrimitiveColumnContainer right) { - for (int b = 0 ; b < left.Buffers.Count; b++) + for (int b = 0; b < left.Buffers.Count; b++) { var buffer = left.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -5155,7 +5155,7 @@ public void Subtract(PrimitiveColumnContainer left, PrimitiveColumnContain } public void Subtract(PrimitiveColumnContainer column, uint scalar) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -5167,16 +5167,16 @@ public void Subtract(PrimitiveColumnContainer column, uint scalar) } } } - + public void Subtract(uint scalar, PrimitiveColumnContainer column) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { - var buffer = column.Buffers[b]; + var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); column.Buffers[b] = mutableBuffer; var span = mutableBuffer.Span; - for (int i = 0; i < span.Length; i++) + for (int i = 0; i < span.Length; i++) { span[i] = (uint)(scalar - span[i]); } @@ -5184,7 +5184,7 @@ public void Subtract(uint scalar, PrimitiveColumnContainer column) } public void Multiply(PrimitiveColumnContainer left, PrimitiveColumnContainer right) { - for (int b = 0 ; b < left.Buffers.Count; b++) + for (int b = 0; b < left.Buffers.Count; b++) { var buffer = left.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -5199,7 +5199,7 @@ public void Multiply(PrimitiveColumnContainer left, PrimitiveColumnContain } public void Multiply(PrimitiveColumnContainer column, uint scalar) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -5211,16 +5211,16 @@ public void Multiply(PrimitiveColumnContainer column, uint scalar) } } } - + public void Multiply(uint scalar, PrimitiveColumnContainer column) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { - var buffer = column.Buffers[b]; + var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); column.Buffers[b] = mutableBuffer; var span = mutableBuffer.Span; - for (int i = 0; i < span.Length; i++) + for (int i = 0; i < span.Length; i++) { span[i] = (uint)(scalar * span[i]); } @@ -5228,7 +5228,7 @@ public void Multiply(uint scalar, PrimitiveColumnContainer column) } public void Divide(PrimitiveColumnContainer left, PrimitiveColumnContainer right) { - for (int b = 0 ; b < left.Buffers.Count; b++) + for (int b = 0; b < left.Buffers.Count; b++) { var buffer = left.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -5243,7 +5243,7 @@ public void Divide(PrimitiveColumnContainer left, PrimitiveColumnContainer } public void Divide(PrimitiveColumnContainer column, uint scalar) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -5255,16 +5255,16 @@ public void Divide(PrimitiveColumnContainer column, uint scalar) } } } - + public void Divide(uint scalar, PrimitiveColumnContainer column) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { - var buffer = column.Buffers[b]; + var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); column.Buffers[b] = mutableBuffer; var span = mutableBuffer.Span; - for (int i = 0; i < span.Length; i++) + for (int i = 0; i < span.Length; i++) { span[i] = (uint)(scalar / span[i]); } @@ -5272,7 +5272,7 @@ public void Divide(uint scalar, PrimitiveColumnContainer column) } public void Modulo(PrimitiveColumnContainer left, PrimitiveColumnContainer right) { - for (int b = 0 ; b < left.Buffers.Count; b++) + for (int b = 0; b < left.Buffers.Count; b++) { var buffer = left.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -5287,7 +5287,7 @@ public void Modulo(PrimitiveColumnContainer left, PrimitiveColumnContainer } public void Modulo(PrimitiveColumnContainer column, uint scalar) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -5299,16 +5299,16 @@ public void Modulo(PrimitiveColumnContainer column, uint scalar) } } } - + public void Modulo(uint scalar, PrimitiveColumnContainer column) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { - var buffer = column.Buffers[b]; + var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); column.Buffers[b] = mutableBuffer; var span = mutableBuffer.Span; - for (int i = 0; i < span.Length; i++) + for (int i = 0; i < span.Length; i++) { span[i] = (uint)(scalar % span[i]); } @@ -5316,7 +5316,7 @@ public void Modulo(uint scalar, PrimitiveColumnContainer column) } public void And(PrimitiveColumnContainer left, PrimitiveColumnContainer right) { - for (int b = 0 ; b < left.Buffers.Count; b++) + for (int b = 0; b < left.Buffers.Count; b++) { var buffer = left.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -5331,7 +5331,7 @@ public void And(PrimitiveColumnContainer left, PrimitiveColumnContainer column, uint scalar) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -5343,16 +5343,16 @@ public void And(PrimitiveColumnContainer column, uint scalar) } } } - + public void And(uint scalar, PrimitiveColumnContainer column) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { - var buffer = column.Buffers[b]; + var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); column.Buffers[b] = mutableBuffer; var span = mutableBuffer.Span; - for (int i = 0; i < span.Length; i++) + for (int i = 0; i < span.Length; i++) { span[i] = (uint)(scalar & span[i]); } @@ -5360,7 +5360,7 @@ public void And(uint scalar, PrimitiveColumnContainer column) } public void Or(PrimitiveColumnContainer left, PrimitiveColumnContainer right) { - for (int b = 0 ; b < left.Buffers.Count; b++) + for (int b = 0; b < left.Buffers.Count; b++) { var buffer = left.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -5375,7 +5375,7 @@ public void Or(PrimitiveColumnContainer left, PrimitiveColumnContainer column, uint scalar) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -5387,16 +5387,16 @@ public void Or(PrimitiveColumnContainer column, uint scalar) } } } - + public void Or(uint scalar, PrimitiveColumnContainer column) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { - var buffer = column.Buffers[b]; + var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); column.Buffers[b] = mutableBuffer; var span = mutableBuffer.Span; - for (int i = 0; i < span.Length; i++) + for (int i = 0; i < span.Length; i++) { span[i] = (uint)(scalar | span[i]); } @@ -5404,7 +5404,7 @@ public void Or(uint scalar, PrimitiveColumnContainer column) } public void Xor(PrimitiveColumnContainer left, PrimitiveColumnContainer right) { - for (int b = 0 ; b < left.Buffers.Count; b++) + for (int b = 0; b < left.Buffers.Count; b++) { var buffer = left.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -5419,7 +5419,7 @@ public void Xor(PrimitiveColumnContainer left, PrimitiveColumnContainer column, uint scalar) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -5431,16 +5431,16 @@ public void Xor(PrimitiveColumnContainer column, uint scalar) } } } - + public void Xor(uint scalar, PrimitiveColumnContainer column) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { - var buffer = column.Buffers[b]; + var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); column.Buffers[b] = mutableBuffer; var span = mutableBuffer.Span; - for (int i = 0; i < span.Length; i++) + for (int i = 0; i < span.Length; i++) { span[i] = (uint)(scalar ^ span[i]); } @@ -5448,7 +5448,7 @@ public void Xor(uint scalar, PrimitiveColumnContainer column) } public void LeftShift(PrimitiveColumnContainer column, int value) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -5462,7 +5462,7 @@ public void LeftShift(PrimitiveColumnContainer column, int value) } public void RightShift(PrimitiveColumnContainer column, int value) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -5476,7 +5476,7 @@ public void RightShift(PrimitiveColumnContainer column, int value) } public void ElementwiseEquals(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) { - for (int b = 0 ; b < left.Buffers.Count; b++) + for (int b = 0; b < left.Buffers.Count; b++) { var buffer = left.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -5491,7 +5491,7 @@ public void ElementwiseEquals(PrimitiveColumnContainer left, PrimitiveColu } public void ElementwiseEquals(PrimitiveColumnContainer column, uint scalar, PrimitiveColumnContainer ret) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -5505,7 +5505,7 @@ public void ElementwiseEquals(PrimitiveColumnContainer column, uint scalar } public void ElementwiseNotEquals(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) { - for (int b = 0 ; b < left.Buffers.Count; b++) + for (int b = 0; b < left.Buffers.Count; b++) { var buffer = left.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -5520,7 +5520,7 @@ public void ElementwiseNotEquals(PrimitiveColumnContainer left, PrimitiveC } public void ElementwiseNotEquals(PrimitiveColumnContainer column, uint scalar, PrimitiveColumnContainer ret) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -5534,7 +5534,7 @@ public void ElementwiseNotEquals(PrimitiveColumnContainer column, uint sca } public void ElementwiseGreaterThanOrEqual(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) { - for (int b = 0 ; b < left.Buffers.Count; b++) + for (int b = 0; b < left.Buffers.Count; b++) { var buffer = left.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -5549,7 +5549,7 @@ public void ElementwiseGreaterThanOrEqual(PrimitiveColumnContainer left, P } public void ElementwiseGreaterThanOrEqual(PrimitiveColumnContainer column, uint scalar, PrimitiveColumnContainer ret) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -5563,7 +5563,7 @@ public void ElementwiseGreaterThanOrEqual(PrimitiveColumnContainer column, } public void ElementwiseLessThanOrEqual(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) { - for (int b = 0 ; b < left.Buffers.Count; b++) + for (int b = 0; b < left.Buffers.Count; b++) { var buffer = left.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -5578,7 +5578,7 @@ public void ElementwiseLessThanOrEqual(PrimitiveColumnContainer left, Prim } public void ElementwiseLessThanOrEqual(PrimitiveColumnContainer column, uint scalar, PrimitiveColumnContainer ret) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -5592,7 +5592,7 @@ public void ElementwiseLessThanOrEqual(PrimitiveColumnContainer column, ui } public void ElementwiseGreaterThan(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) { - for (int b = 0 ; b < left.Buffers.Count; b++) + for (int b = 0; b < left.Buffers.Count; b++) { var buffer = left.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -5607,7 +5607,7 @@ public void ElementwiseGreaterThan(PrimitiveColumnContainer left, Primitiv } public void ElementwiseGreaterThan(PrimitiveColumnContainer column, uint scalar, PrimitiveColumnContainer ret) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -5621,7 +5621,7 @@ public void ElementwiseGreaterThan(PrimitiveColumnContainer column, uint s } public void ElementwiseLessThan(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) { - for (int b = 0 ; b < left.Buffers.Count; b++) + for (int b = 0; b < left.Buffers.Count; b++) { var buffer = left.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -5636,7 +5636,7 @@ public void ElementwiseLessThan(PrimitiveColumnContainer left, PrimitiveCo } public void ElementwiseLessThan(PrimitiveColumnContainer column, uint scalar, PrimitiveColumnContainer ret) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -5653,7 +5653,7 @@ internal class ULongArithmetic : IPrimitiveDataFrameColumnArithmetic { public void Add(PrimitiveColumnContainer left, PrimitiveColumnContainer right) { - for (int b = 0 ; b < left.Buffers.Count; b++) + for (int b = 0; b < left.Buffers.Count; b++) { var buffer = left.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -5668,7 +5668,7 @@ public void Add(PrimitiveColumnContainer left, PrimitiveColumnContainer column, ulong scalar) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -5680,16 +5680,16 @@ public void Add(PrimitiveColumnContainer column, ulong scalar) } } } - + public void Add(ulong scalar, PrimitiveColumnContainer column) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { - var buffer = column.Buffers[b]; + var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); column.Buffers[b] = mutableBuffer; var span = mutableBuffer.Span; - for (int i = 0; i < span.Length; i++) + for (int i = 0; i < span.Length; i++) { span[i] = (ulong)(scalar + span[i]); } @@ -5697,7 +5697,7 @@ public void Add(ulong scalar, PrimitiveColumnContainer column) } public void Subtract(PrimitiveColumnContainer left, PrimitiveColumnContainer right) { - for (int b = 0 ; b < left.Buffers.Count; b++) + for (int b = 0; b < left.Buffers.Count; b++) { var buffer = left.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -5712,7 +5712,7 @@ public void Subtract(PrimitiveColumnContainer left, PrimitiveColumnContai } public void Subtract(PrimitiveColumnContainer column, ulong scalar) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -5724,16 +5724,16 @@ public void Subtract(PrimitiveColumnContainer column, ulong scalar) } } } - + public void Subtract(ulong scalar, PrimitiveColumnContainer column) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { - var buffer = column.Buffers[b]; + var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); column.Buffers[b] = mutableBuffer; var span = mutableBuffer.Span; - for (int i = 0; i < span.Length; i++) + for (int i = 0; i < span.Length; i++) { span[i] = (ulong)(scalar - span[i]); } @@ -5741,7 +5741,7 @@ public void Subtract(ulong scalar, PrimitiveColumnContainer column) } public void Multiply(PrimitiveColumnContainer left, PrimitiveColumnContainer right) { - for (int b = 0 ; b < left.Buffers.Count; b++) + for (int b = 0; b < left.Buffers.Count; b++) { var buffer = left.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -5756,7 +5756,7 @@ public void Multiply(PrimitiveColumnContainer left, PrimitiveColumnContai } public void Multiply(PrimitiveColumnContainer column, ulong scalar) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -5768,16 +5768,16 @@ public void Multiply(PrimitiveColumnContainer column, ulong scalar) } } } - + public void Multiply(ulong scalar, PrimitiveColumnContainer column) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { - var buffer = column.Buffers[b]; + var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); column.Buffers[b] = mutableBuffer; var span = mutableBuffer.Span; - for (int i = 0; i < span.Length; i++) + for (int i = 0; i < span.Length; i++) { span[i] = (ulong)(scalar * span[i]); } @@ -5785,7 +5785,7 @@ public void Multiply(ulong scalar, PrimitiveColumnContainer column) } public void Divide(PrimitiveColumnContainer left, PrimitiveColumnContainer right) { - for (int b = 0 ; b < left.Buffers.Count; b++) + for (int b = 0; b < left.Buffers.Count; b++) { var buffer = left.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -5800,7 +5800,7 @@ public void Divide(PrimitiveColumnContainer left, PrimitiveColumnContaine } public void Divide(PrimitiveColumnContainer column, ulong scalar) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -5812,16 +5812,16 @@ public void Divide(PrimitiveColumnContainer column, ulong scalar) } } } - + public void Divide(ulong scalar, PrimitiveColumnContainer column) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { - var buffer = column.Buffers[b]; + var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); column.Buffers[b] = mutableBuffer; var span = mutableBuffer.Span; - for (int i = 0; i < span.Length; i++) + for (int i = 0; i < span.Length; i++) { span[i] = (ulong)(scalar / span[i]); } @@ -5829,7 +5829,7 @@ public void Divide(ulong scalar, PrimitiveColumnContainer column) } public void Modulo(PrimitiveColumnContainer left, PrimitiveColumnContainer right) { - for (int b = 0 ; b < left.Buffers.Count; b++) + for (int b = 0; b < left.Buffers.Count; b++) { var buffer = left.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -5844,7 +5844,7 @@ public void Modulo(PrimitiveColumnContainer left, PrimitiveColumnContaine } public void Modulo(PrimitiveColumnContainer column, ulong scalar) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -5856,16 +5856,16 @@ public void Modulo(PrimitiveColumnContainer column, ulong scalar) } } } - + public void Modulo(ulong scalar, PrimitiveColumnContainer column) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { - var buffer = column.Buffers[b]; + var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); column.Buffers[b] = mutableBuffer; var span = mutableBuffer.Span; - for (int i = 0; i < span.Length; i++) + for (int i = 0; i < span.Length; i++) { span[i] = (ulong)(scalar % span[i]); } @@ -5873,7 +5873,7 @@ public void Modulo(ulong scalar, PrimitiveColumnContainer column) } public void And(PrimitiveColumnContainer left, PrimitiveColumnContainer right) { - for (int b = 0 ; b < left.Buffers.Count; b++) + for (int b = 0; b < left.Buffers.Count; b++) { var buffer = left.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -5888,7 +5888,7 @@ public void And(PrimitiveColumnContainer left, PrimitiveColumnContainer column, ulong scalar) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -5900,16 +5900,16 @@ public void And(PrimitiveColumnContainer column, ulong scalar) } } } - + public void And(ulong scalar, PrimitiveColumnContainer column) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { - var buffer = column.Buffers[b]; + var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); column.Buffers[b] = mutableBuffer; var span = mutableBuffer.Span; - for (int i = 0; i < span.Length; i++) + for (int i = 0; i < span.Length; i++) { span[i] = (ulong)(scalar & span[i]); } @@ -5917,7 +5917,7 @@ public void And(ulong scalar, PrimitiveColumnContainer column) } public void Or(PrimitiveColumnContainer left, PrimitiveColumnContainer right) { - for (int b = 0 ; b < left.Buffers.Count; b++) + for (int b = 0; b < left.Buffers.Count; b++) { var buffer = left.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -5932,7 +5932,7 @@ public void Or(PrimitiveColumnContainer left, PrimitiveColumnContainer
    column, ulong scalar) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -5944,16 +5944,16 @@ public void Or(PrimitiveColumnContainer column, ulong scalar) } } } - + public void Or(ulong scalar, PrimitiveColumnContainer column) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { - var buffer = column.Buffers[b]; + var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); column.Buffers[b] = mutableBuffer; var span = mutableBuffer.Span; - for (int i = 0; i < span.Length; i++) + for (int i = 0; i < span.Length; i++) { span[i] = (ulong)(scalar | span[i]); } @@ -5961,7 +5961,7 @@ public void Or(ulong scalar, PrimitiveColumnContainer column) } public void Xor(PrimitiveColumnContainer left, PrimitiveColumnContainer right) { - for (int b = 0 ; b < left.Buffers.Count; b++) + for (int b = 0; b < left.Buffers.Count; b++) { var buffer = left.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -5976,7 +5976,7 @@ public void Xor(PrimitiveColumnContainer left, PrimitiveColumnContainer column, ulong scalar) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -5988,16 +5988,16 @@ public void Xor(PrimitiveColumnContainer column, ulong scalar) } } } - + public void Xor(ulong scalar, PrimitiveColumnContainer column) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { - var buffer = column.Buffers[b]; + var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); column.Buffers[b] = mutableBuffer; var span = mutableBuffer.Span; - for (int i = 0; i < span.Length; i++) + for (int i = 0; i < span.Length; i++) { span[i] = (ulong)(scalar ^ span[i]); } @@ -6005,7 +6005,7 @@ public void Xor(ulong scalar, PrimitiveColumnContainer column) } public void LeftShift(PrimitiveColumnContainer column, int value) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -6019,7 +6019,7 @@ public void LeftShift(PrimitiveColumnContainer column, int value) } public void RightShift(PrimitiveColumnContainer column, int value) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -6033,7 +6033,7 @@ public void RightShift(PrimitiveColumnContainer column, int value) } public void ElementwiseEquals(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) { - for (int b = 0 ; b < left.Buffers.Count; b++) + for (int b = 0; b < left.Buffers.Count; b++) { var buffer = left.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -6048,7 +6048,7 @@ public void ElementwiseEquals(PrimitiveColumnContainer left, PrimitiveCol } public void ElementwiseEquals(PrimitiveColumnContainer column, ulong scalar, PrimitiveColumnContainer ret) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -6062,7 +6062,7 @@ public void ElementwiseEquals(PrimitiveColumnContainer column, ulong scal } public void ElementwiseNotEquals(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) { - for (int b = 0 ; b < left.Buffers.Count; b++) + for (int b = 0; b < left.Buffers.Count; b++) { var buffer = left.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -6077,7 +6077,7 @@ public void ElementwiseNotEquals(PrimitiveColumnContainer left, Primitive } public void ElementwiseNotEquals(PrimitiveColumnContainer column, ulong scalar, PrimitiveColumnContainer ret) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -6091,7 +6091,7 @@ public void ElementwiseNotEquals(PrimitiveColumnContainer column, ulong s } public void ElementwiseGreaterThanOrEqual(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) { - for (int b = 0 ; b < left.Buffers.Count; b++) + for (int b = 0; b < left.Buffers.Count; b++) { var buffer = left.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -6106,7 +6106,7 @@ public void ElementwiseGreaterThanOrEqual(PrimitiveColumnContainer left, } public void ElementwiseGreaterThanOrEqual(PrimitiveColumnContainer column, ulong scalar, PrimitiveColumnContainer ret) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -6120,7 +6120,7 @@ public void ElementwiseGreaterThanOrEqual(PrimitiveColumnContainer column } public void ElementwiseLessThanOrEqual(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) { - for (int b = 0 ; b < left.Buffers.Count; b++) + for (int b = 0; b < left.Buffers.Count; b++) { var buffer = left.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -6135,7 +6135,7 @@ public void ElementwiseLessThanOrEqual(PrimitiveColumnContainer left, Pri } public void ElementwiseLessThanOrEqual(PrimitiveColumnContainer column, ulong scalar, PrimitiveColumnContainer ret) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -6149,7 +6149,7 @@ public void ElementwiseLessThanOrEqual(PrimitiveColumnContainer column, u } public void ElementwiseGreaterThan(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) { - for (int b = 0 ; b < left.Buffers.Count; b++) + for (int b = 0; b < left.Buffers.Count; b++) { var buffer = left.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -6164,7 +6164,7 @@ public void ElementwiseGreaterThan(PrimitiveColumnContainer left, Primiti } public void ElementwiseGreaterThan(PrimitiveColumnContainer column, ulong scalar, PrimitiveColumnContainer ret) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -6178,7 +6178,7 @@ public void ElementwiseGreaterThan(PrimitiveColumnContainer column, ulong } public void ElementwiseLessThan(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) { - for (int b = 0 ; b < left.Buffers.Count; b++) + for (int b = 0; b < left.Buffers.Count; b++) { var buffer = left.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -6193,7 +6193,7 @@ public void ElementwiseLessThan(PrimitiveColumnContainer left, PrimitiveC } public void ElementwiseLessThan(PrimitiveColumnContainer column, ulong scalar, PrimitiveColumnContainer ret) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -6210,7 +6210,7 @@ internal class UShortArithmetic : IPrimitiveDataFrameColumnArithmetic { public void Add(PrimitiveColumnContainer left, PrimitiveColumnContainer right) { - for (int b = 0 ; b < left.Buffers.Count; b++) + for (int b = 0; b < left.Buffers.Count; b++) { var buffer = left.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -6225,7 +6225,7 @@ public void Add(PrimitiveColumnContainer left, PrimitiveColumnContainer< } public void Add(PrimitiveColumnContainer column, ushort scalar) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -6237,16 +6237,16 @@ public void Add(PrimitiveColumnContainer column, ushort scalar) } } } - + public void Add(ushort scalar, PrimitiveColumnContainer column) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { - var buffer = column.Buffers[b]; + var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); column.Buffers[b] = mutableBuffer; var span = mutableBuffer.Span; - for (int i = 0; i < span.Length; i++) + for (int i = 0; i < span.Length; i++) { span[i] = (ushort)(scalar + span[i]); } @@ -6254,7 +6254,7 @@ public void Add(ushort scalar, PrimitiveColumnContainer column) } public void Subtract(PrimitiveColumnContainer left, PrimitiveColumnContainer right) { - for (int b = 0 ; b < left.Buffers.Count; b++) + for (int b = 0; b < left.Buffers.Count; b++) { var buffer = left.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -6269,7 +6269,7 @@ public void Subtract(PrimitiveColumnContainer left, PrimitiveColumnConta } public void Subtract(PrimitiveColumnContainer column, ushort scalar) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -6281,16 +6281,16 @@ public void Subtract(PrimitiveColumnContainer column, ushort scalar) } } } - + public void Subtract(ushort scalar, PrimitiveColumnContainer column) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { - var buffer = column.Buffers[b]; + var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); column.Buffers[b] = mutableBuffer; var span = mutableBuffer.Span; - for (int i = 0; i < span.Length; i++) + for (int i = 0; i < span.Length; i++) { span[i] = (ushort)(scalar - span[i]); } @@ -6298,7 +6298,7 @@ public void Subtract(ushort scalar, PrimitiveColumnContainer column) } public void Multiply(PrimitiveColumnContainer left, PrimitiveColumnContainer right) { - for (int b = 0 ; b < left.Buffers.Count; b++) + for (int b = 0; b < left.Buffers.Count; b++) { var buffer = left.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -6313,7 +6313,7 @@ public void Multiply(PrimitiveColumnContainer left, PrimitiveColumnConta } public void Multiply(PrimitiveColumnContainer column, ushort scalar) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -6325,16 +6325,16 @@ public void Multiply(PrimitiveColumnContainer column, ushort scalar) } } } - + public void Multiply(ushort scalar, PrimitiveColumnContainer column) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { - var buffer = column.Buffers[b]; + var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); column.Buffers[b] = mutableBuffer; var span = mutableBuffer.Span; - for (int i = 0; i < span.Length; i++) + for (int i = 0; i < span.Length; i++) { span[i] = (ushort)(scalar * span[i]); } @@ -6342,7 +6342,7 @@ public void Multiply(ushort scalar, PrimitiveColumnContainer column) } public void Divide(PrimitiveColumnContainer left, PrimitiveColumnContainer right) { - for (int b = 0 ; b < left.Buffers.Count; b++) + for (int b = 0; b < left.Buffers.Count; b++) { var buffer = left.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -6357,7 +6357,7 @@ public void Divide(PrimitiveColumnContainer left, PrimitiveColumnContain } public void Divide(PrimitiveColumnContainer column, ushort scalar) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -6369,16 +6369,16 @@ public void Divide(PrimitiveColumnContainer column, ushort scalar) } } } - + public void Divide(ushort scalar, PrimitiveColumnContainer column) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { - var buffer = column.Buffers[b]; + var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); column.Buffers[b] = mutableBuffer; var span = mutableBuffer.Span; - for (int i = 0; i < span.Length; i++) + for (int i = 0; i < span.Length; i++) { span[i] = (ushort)(scalar / span[i]); } @@ -6386,7 +6386,7 @@ public void Divide(ushort scalar, PrimitiveColumnContainer column) } public void Modulo(PrimitiveColumnContainer left, PrimitiveColumnContainer right) { - for (int b = 0 ; b < left.Buffers.Count; b++) + for (int b = 0; b < left.Buffers.Count; b++) { var buffer = left.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -6401,7 +6401,7 @@ public void Modulo(PrimitiveColumnContainer left, PrimitiveColumnContain } public void Modulo(PrimitiveColumnContainer column, ushort scalar) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -6413,16 +6413,16 @@ public void Modulo(PrimitiveColumnContainer column, ushort scalar) } } } - + public void Modulo(ushort scalar, PrimitiveColumnContainer column) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { - var buffer = column.Buffers[b]; + var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); column.Buffers[b] = mutableBuffer; var span = mutableBuffer.Span; - for (int i = 0; i < span.Length; i++) + for (int i = 0; i < span.Length; i++) { span[i] = (ushort)(scalar % span[i]); } @@ -6430,7 +6430,7 @@ public void Modulo(ushort scalar, PrimitiveColumnContainer column) } public void And(PrimitiveColumnContainer left, PrimitiveColumnContainer right) { - for (int b = 0 ; b < left.Buffers.Count; b++) + for (int b = 0; b < left.Buffers.Count; b++) { var buffer = left.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -6445,7 +6445,7 @@ public void And(PrimitiveColumnContainer left, PrimitiveColumnContainer< } public void And(PrimitiveColumnContainer column, ushort scalar) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -6457,16 +6457,16 @@ public void And(PrimitiveColumnContainer column, ushort scalar) } } } - + public void And(ushort scalar, PrimitiveColumnContainer column) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { - var buffer = column.Buffers[b]; + var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); column.Buffers[b] = mutableBuffer; var span = mutableBuffer.Span; - for (int i = 0; i < span.Length; i++) + for (int i = 0; i < span.Length; i++) { span[i] = (ushort)(scalar & span[i]); } @@ -6474,7 +6474,7 @@ public void And(ushort scalar, PrimitiveColumnContainer column) } public void Or(PrimitiveColumnContainer left, PrimitiveColumnContainer right) { - for (int b = 0 ; b < left.Buffers.Count; b++) + for (int b = 0; b < left.Buffers.Count; b++) { var buffer = left.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -6489,7 +6489,7 @@ public void Or(PrimitiveColumnContainer left, PrimitiveColumnContainer column, ushort scalar) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -6501,16 +6501,16 @@ public void Or(PrimitiveColumnContainer column, ushort scalar) } } } - + public void Or(ushort scalar, PrimitiveColumnContainer column) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { - var buffer = column.Buffers[b]; + var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); column.Buffers[b] = mutableBuffer; var span = mutableBuffer.Span; - for (int i = 0; i < span.Length; i++) + for (int i = 0; i < span.Length; i++) { span[i] = (ushort)(scalar | span[i]); } @@ -6518,7 +6518,7 @@ public void Or(ushort scalar, PrimitiveColumnContainer column) } public void Xor(PrimitiveColumnContainer left, PrimitiveColumnContainer right) { - for (int b = 0 ; b < left.Buffers.Count; b++) + for (int b = 0; b < left.Buffers.Count; b++) { var buffer = left.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -6533,7 +6533,7 @@ public void Xor(PrimitiveColumnContainer left, PrimitiveColumnContainer< } public void Xor(PrimitiveColumnContainer column, ushort scalar) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -6545,16 +6545,16 @@ public void Xor(PrimitiveColumnContainer column, ushort scalar) } } } - + public void Xor(ushort scalar, PrimitiveColumnContainer column) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { - var buffer = column.Buffers[b]; + var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); column.Buffers[b] = mutableBuffer; var span = mutableBuffer.Span; - for (int i = 0; i < span.Length; i++) + for (int i = 0; i < span.Length; i++) { span[i] = (ushort)(scalar ^ span[i]); } @@ -6562,7 +6562,7 @@ public void Xor(ushort scalar, PrimitiveColumnContainer column) } public void LeftShift(PrimitiveColumnContainer column, int value) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -6576,7 +6576,7 @@ public void LeftShift(PrimitiveColumnContainer column, int value) } public void RightShift(PrimitiveColumnContainer column, int value) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -6590,7 +6590,7 @@ public void RightShift(PrimitiveColumnContainer column, int value) } public void ElementwiseEquals(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) { - for (int b = 0 ; b < left.Buffers.Count; b++) + for (int b = 0; b < left.Buffers.Count; b++) { var buffer = left.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -6605,7 +6605,7 @@ public void ElementwiseEquals(PrimitiveColumnContainer left, PrimitiveCo } public void ElementwiseEquals(PrimitiveColumnContainer column, ushort scalar, PrimitiveColumnContainer ret) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -6619,7 +6619,7 @@ public void ElementwiseEquals(PrimitiveColumnContainer column, ushort sc } public void ElementwiseNotEquals(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) { - for (int b = 0 ; b < left.Buffers.Count; b++) + for (int b = 0; b < left.Buffers.Count; b++) { var buffer = left.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -6634,7 +6634,7 @@ public void ElementwiseNotEquals(PrimitiveColumnContainer left, Primitiv } public void ElementwiseNotEquals(PrimitiveColumnContainer column, ushort scalar, PrimitiveColumnContainer ret) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -6648,7 +6648,7 @@ public void ElementwiseNotEquals(PrimitiveColumnContainer column, ushort } public void ElementwiseGreaterThanOrEqual(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) { - for (int b = 0 ; b < left.Buffers.Count; b++) + for (int b = 0; b < left.Buffers.Count; b++) { var buffer = left.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -6663,7 +6663,7 @@ public void ElementwiseGreaterThanOrEqual(PrimitiveColumnContainer left, } public void ElementwiseGreaterThanOrEqual(PrimitiveColumnContainer column, ushort scalar, PrimitiveColumnContainer ret) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -6677,7 +6677,7 @@ public void ElementwiseGreaterThanOrEqual(PrimitiveColumnContainer colum } public void ElementwiseLessThanOrEqual(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) { - for (int b = 0 ; b < left.Buffers.Count; b++) + for (int b = 0; b < left.Buffers.Count; b++) { var buffer = left.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -6692,7 +6692,7 @@ public void ElementwiseLessThanOrEqual(PrimitiveColumnContainer left, Pr } public void ElementwiseLessThanOrEqual(PrimitiveColumnContainer column, ushort scalar, PrimitiveColumnContainer ret) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -6706,7 +6706,7 @@ public void ElementwiseLessThanOrEqual(PrimitiveColumnContainer column, } public void ElementwiseGreaterThan(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) { - for (int b = 0 ; b < left.Buffers.Count; b++) + for (int b = 0; b < left.Buffers.Count; b++) { var buffer = left.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -6721,7 +6721,7 @@ public void ElementwiseGreaterThan(PrimitiveColumnContainer left, Primit } public void ElementwiseGreaterThan(PrimitiveColumnContainer column, ushort scalar, PrimitiveColumnContainer ret) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -6735,7 +6735,7 @@ public void ElementwiseGreaterThan(PrimitiveColumnContainer column, usho } public void ElementwiseLessThan(PrimitiveColumnContainer left, PrimitiveColumnContainer right, PrimitiveColumnContainer ret) { - for (int b = 0 ; b < left.Buffers.Count; b++) + for (int b = 0; b < left.Buffers.Count; b++) { var buffer = left.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -6750,7 +6750,7 @@ public void ElementwiseLessThan(PrimitiveColumnContainer left, Primitive } public void ElementwiseLessThan(PrimitiveColumnContainer column, ushort scalar, PrimitiveColumnContainer ret) { - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); diff --git a/src/Microsoft.Data.Analysis/PrimitiveDataFrameColumnComputations.cs b/src/Microsoft.Data.Analysis/PrimitiveDataFrameColumnComputations.cs index fd93fd231e..d26f8e9c91 100644 --- a/src/Microsoft.Data.Analysis/PrimitiveDataFrameColumnComputations.cs +++ b/src/Microsoft.Data.Analysis/PrimitiveDataFrameColumnComputations.cs @@ -99,7 +99,7 @@ public static IPrimitiveColumnComputation GetComputation() { return (IPrimitiveColumnComputation)new UShortComputation(); } - else if (typeof(T) == typeof(DateTime)) + else if (typeof(T) == typeof(DateTime)) { return (IPrimitiveColumnComputation)new DateTimeComputation(); } @@ -267,7 +267,7 @@ public void Any(PrimitiveColumnContainer column, out bool ret) public void CumulativeMax(PrimitiveColumnContainer column) { var ret = column.Buffers[0].ReadOnlySpan[0]; - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -326,7 +326,7 @@ public void CumulativeMax(PrimitiveColumnContainer column, IEnumerable column) { var ret = column.Buffers[0].ReadOnlySpan[0]; - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -385,7 +385,7 @@ public void CumulativeMin(PrimitiveColumnContainer column, IEnumerable column) { var ret = (byte)1; - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -444,7 +444,7 @@ public void CumulativeProduct(PrimitiveColumnContainer column, IEnumerable public void CumulativeSum(PrimitiveColumnContainer column) { var ret = (byte)0; - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -503,7 +503,7 @@ public void CumulativeSum(PrimitiveColumnContainer column, IEnumerable column, out byte ret) { ret = column.Buffers[0].ReadOnlySpan[0]; - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var readOnlySpan = buffer.ReadOnlySpan; @@ -540,7 +540,7 @@ public void Max(PrimitiveColumnContainer column, IEnumerable rows, o public void Min(PrimitiveColumnContainer column, out byte ret) { ret = column.Buffers[0].ReadOnlySpan[0]; - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var readOnlySpan = buffer.ReadOnlySpan; @@ -577,7 +577,7 @@ public void Min(PrimitiveColumnContainer column, IEnumerable rows, o public void Product(PrimitiveColumnContainer column, out byte ret) { ret = (byte)1; - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var readOnlySpan = buffer.ReadOnlySpan; @@ -614,7 +614,7 @@ public void Product(PrimitiveColumnContainer column, IEnumerable row public void Sum(PrimitiveColumnContainer column, out byte ret) { ret = (byte)0; - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var readOnlySpan = buffer.ReadOnlySpan; @@ -694,7 +694,7 @@ public void Any(PrimitiveColumnContainer column, out bool ret) public void CumulativeMax(PrimitiveColumnContainer column) { var ret = column.Buffers[0].ReadOnlySpan[0]; - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -753,7 +753,7 @@ public void CumulativeMax(PrimitiveColumnContainer column, IEnumerable column) { var ret = column.Buffers[0].ReadOnlySpan[0]; - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -812,7 +812,7 @@ public void CumulativeMin(PrimitiveColumnContainer column, IEnumerable column) { var ret = (char)1; - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -871,7 +871,7 @@ public void CumulativeProduct(PrimitiveColumnContainer column, IEnumerable public void CumulativeSum(PrimitiveColumnContainer column) { var ret = (char)0; - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -930,7 +930,7 @@ public void CumulativeSum(PrimitiveColumnContainer column, IEnumerable column, out char ret) { ret = column.Buffers[0].ReadOnlySpan[0]; - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var readOnlySpan = buffer.ReadOnlySpan; @@ -967,7 +967,7 @@ public void Max(PrimitiveColumnContainer column, IEnumerable rows, o public void Min(PrimitiveColumnContainer column, out char ret) { ret = column.Buffers[0].ReadOnlySpan[0]; - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var readOnlySpan = buffer.ReadOnlySpan; @@ -1004,7 +1004,7 @@ public void Min(PrimitiveColumnContainer column, IEnumerable rows, o public void Product(PrimitiveColumnContainer column, out char ret) { ret = (char)1; - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var readOnlySpan = buffer.ReadOnlySpan; @@ -1041,7 +1041,7 @@ public void Product(PrimitiveColumnContainer column, IEnumerable row public void Sum(PrimitiveColumnContainer column, out char ret) { ret = (char)0; - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var readOnlySpan = buffer.ReadOnlySpan; @@ -1121,7 +1121,7 @@ public void Any(PrimitiveColumnContainer column, out bool ret) public void CumulativeMax(PrimitiveColumnContainer column) { var ret = column.Buffers[0].ReadOnlySpan[0]; - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -1180,7 +1180,7 @@ public void CumulativeMax(PrimitiveColumnContainer column, IEnumerable< public void CumulativeMin(PrimitiveColumnContainer column) { var ret = column.Buffers[0].ReadOnlySpan[0]; - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -1239,7 +1239,7 @@ public void CumulativeMin(PrimitiveColumnContainer column, IEnumerable< public void CumulativeProduct(PrimitiveColumnContainer column) { var ret = (decimal)1; - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -1298,7 +1298,7 @@ public void CumulativeProduct(PrimitiveColumnContainer column, IEnumera public void CumulativeSum(PrimitiveColumnContainer column) { var ret = (decimal)0; - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -1357,7 +1357,7 @@ public void CumulativeSum(PrimitiveColumnContainer column, IEnumerable< public void Max(PrimitiveColumnContainer column, out decimal ret) { ret = column.Buffers[0].ReadOnlySpan[0]; - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var readOnlySpan = buffer.ReadOnlySpan; @@ -1394,7 +1394,7 @@ public void Max(PrimitiveColumnContainer column, IEnumerable rows public void Min(PrimitiveColumnContainer column, out decimal ret) { ret = column.Buffers[0].ReadOnlySpan[0]; - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var readOnlySpan = buffer.ReadOnlySpan; @@ -1431,7 +1431,7 @@ public void Min(PrimitiveColumnContainer column, IEnumerable rows public void Product(PrimitiveColumnContainer column, out decimal ret) { ret = (decimal)1; - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var readOnlySpan = buffer.ReadOnlySpan; @@ -1468,7 +1468,7 @@ public void Product(PrimitiveColumnContainer column, IEnumerable public void Sum(PrimitiveColumnContainer column, out decimal ret) { ret = (decimal)0; - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var readOnlySpan = buffer.ReadOnlySpan; @@ -1548,7 +1548,7 @@ public void Any(PrimitiveColumnContainer column, out bool ret) public void CumulativeMax(PrimitiveColumnContainer column) { var ret = column.Buffers[0].ReadOnlySpan[0]; - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -1607,7 +1607,7 @@ public void CumulativeMax(PrimitiveColumnContainer column, IEnumerable column) { var ret = column.Buffers[0].ReadOnlySpan[0]; - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -1666,7 +1666,7 @@ public void CumulativeMin(PrimitiveColumnContainer column, IEnumerable column) { var ret = (double)1; - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -1725,7 +1725,7 @@ public void CumulativeProduct(PrimitiveColumnContainer column, IEnumerab public void CumulativeSum(PrimitiveColumnContainer column) { var ret = (double)0; - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -1784,7 +1784,7 @@ public void CumulativeSum(PrimitiveColumnContainer column, IEnumerable column, out double ret) { ret = column.Buffers[0].ReadOnlySpan[0]; - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var readOnlySpan = buffer.ReadOnlySpan; @@ -1821,7 +1821,7 @@ public void Max(PrimitiveColumnContainer column, IEnumerable rows, public void Min(PrimitiveColumnContainer column, out double ret) { ret = column.Buffers[0].ReadOnlySpan[0]; - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var readOnlySpan = buffer.ReadOnlySpan; @@ -1858,7 +1858,7 @@ public void Min(PrimitiveColumnContainer column, IEnumerable rows, public void Product(PrimitiveColumnContainer column, out double ret) { ret = (double)1; - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var readOnlySpan = buffer.ReadOnlySpan; @@ -1895,7 +1895,7 @@ public void Product(PrimitiveColumnContainer column, IEnumerable r public void Sum(PrimitiveColumnContainer column, out double ret) { ret = (double)0; - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var readOnlySpan = buffer.ReadOnlySpan; @@ -1975,7 +1975,7 @@ public void Any(PrimitiveColumnContainer column, out bool ret) public void CumulativeMax(PrimitiveColumnContainer column) { var ret = column.Buffers[0].ReadOnlySpan[0]; - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -2034,7 +2034,7 @@ public void CumulativeMax(PrimitiveColumnContainer column, IEnumerable column) { var ret = column.Buffers[0].ReadOnlySpan[0]; - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -2093,7 +2093,7 @@ public void CumulativeMin(PrimitiveColumnContainer column, IEnumerable column) { var ret = (float)1; - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -2152,7 +2152,7 @@ public void CumulativeProduct(PrimitiveColumnContainer column, IEnumerabl public void CumulativeSum(PrimitiveColumnContainer column) { var ret = (float)0; - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -2211,7 +2211,7 @@ public void CumulativeSum(PrimitiveColumnContainer column, IEnumerable column, out float ret) { ret = column.Buffers[0].ReadOnlySpan[0]; - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var readOnlySpan = buffer.ReadOnlySpan; @@ -2248,7 +2248,7 @@ public void Max(PrimitiveColumnContainer column, IEnumerable rows, public void Min(PrimitiveColumnContainer column, out float ret) { ret = column.Buffers[0].ReadOnlySpan[0]; - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var readOnlySpan = buffer.ReadOnlySpan; @@ -2285,7 +2285,7 @@ public void Min(PrimitiveColumnContainer column, IEnumerable rows, public void Product(PrimitiveColumnContainer column, out float ret) { ret = (float)1; - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var readOnlySpan = buffer.ReadOnlySpan; @@ -2322,7 +2322,7 @@ public void Product(PrimitiveColumnContainer column, IEnumerable ro public void Sum(PrimitiveColumnContainer column, out float ret) { ret = (float)0; - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var readOnlySpan = buffer.ReadOnlySpan; @@ -2402,7 +2402,7 @@ public void Any(PrimitiveColumnContainer column, out bool ret) public void CumulativeMax(PrimitiveColumnContainer column) { var ret = column.Buffers[0].ReadOnlySpan[0]; - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -2461,7 +2461,7 @@ public void CumulativeMax(PrimitiveColumnContainer column, IEnumerable column) { var ret = column.Buffers[0].ReadOnlySpan[0]; - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -2520,7 +2520,7 @@ public void CumulativeMin(PrimitiveColumnContainer column, IEnumerable column) { var ret = (int)1; - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -2579,7 +2579,7 @@ public void CumulativeProduct(PrimitiveColumnContainer column, IEnumerable< public void CumulativeSum(PrimitiveColumnContainer column) { var ret = (int)0; - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -2638,7 +2638,7 @@ public void CumulativeSum(PrimitiveColumnContainer column, IEnumerable column, out int ret) { ret = column.Buffers[0].ReadOnlySpan[0]; - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var readOnlySpan = buffer.ReadOnlySpan; @@ -2675,7 +2675,7 @@ public void Max(PrimitiveColumnContainer column, IEnumerable rows, ou public void Min(PrimitiveColumnContainer column, out int ret) { ret = column.Buffers[0].ReadOnlySpan[0]; - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var readOnlySpan = buffer.ReadOnlySpan; @@ -2712,7 +2712,7 @@ public void Min(PrimitiveColumnContainer column, IEnumerable rows, ou public void Product(PrimitiveColumnContainer column, out int ret) { ret = (int)1; - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var readOnlySpan = buffer.ReadOnlySpan; @@ -2749,7 +2749,7 @@ public void Product(PrimitiveColumnContainer column, IEnumerable rows public void Sum(PrimitiveColumnContainer column, out int ret) { ret = (int)0; - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var readOnlySpan = buffer.ReadOnlySpan; @@ -2829,7 +2829,7 @@ public void Any(PrimitiveColumnContainer column, out bool ret) public void CumulativeMax(PrimitiveColumnContainer column) { var ret = column.Buffers[0].ReadOnlySpan[0]; - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -2888,7 +2888,7 @@ public void CumulativeMax(PrimitiveColumnContainer column, IEnumerable column) { var ret = column.Buffers[0].ReadOnlySpan[0]; - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -2947,7 +2947,7 @@ public void CumulativeMin(PrimitiveColumnContainer column, IEnumerable column) { var ret = (long)1; - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -3006,7 +3006,7 @@ public void CumulativeProduct(PrimitiveColumnContainer column, IEnumerable public void CumulativeSum(PrimitiveColumnContainer column) { var ret = (long)0; - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -3065,7 +3065,7 @@ public void CumulativeSum(PrimitiveColumnContainer column, IEnumerable column, out long ret) { ret = column.Buffers[0].ReadOnlySpan[0]; - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var readOnlySpan = buffer.ReadOnlySpan; @@ -3102,7 +3102,7 @@ public void Max(PrimitiveColumnContainer column, IEnumerable rows, o public void Min(PrimitiveColumnContainer column, out long ret) { ret = column.Buffers[0].ReadOnlySpan[0]; - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var readOnlySpan = buffer.ReadOnlySpan; @@ -3139,7 +3139,7 @@ public void Min(PrimitiveColumnContainer column, IEnumerable rows, o public void Product(PrimitiveColumnContainer column, out long ret) { ret = (long)1; - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var readOnlySpan = buffer.ReadOnlySpan; @@ -3176,7 +3176,7 @@ public void Product(PrimitiveColumnContainer column, IEnumerable row public void Sum(PrimitiveColumnContainer column, out long ret) { ret = (long)0; - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var readOnlySpan = buffer.ReadOnlySpan; @@ -3256,7 +3256,7 @@ public void Any(PrimitiveColumnContainer column, out bool ret) public void CumulativeMax(PrimitiveColumnContainer column) { var ret = column.Buffers[0].ReadOnlySpan[0]; - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -3315,7 +3315,7 @@ public void CumulativeMax(PrimitiveColumnContainer column, IEnumerable column) { var ret = column.Buffers[0].ReadOnlySpan[0]; - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -3374,7 +3374,7 @@ public void CumulativeMin(PrimitiveColumnContainer column, IEnumerable column) { var ret = (sbyte)1; - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -3433,7 +3433,7 @@ public void CumulativeProduct(PrimitiveColumnContainer column, IEnumerabl public void CumulativeSum(PrimitiveColumnContainer column) { var ret = (sbyte)0; - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -3492,7 +3492,7 @@ public void CumulativeSum(PrimitiveColumnContainer column, IEnumerable column, out sbyte ret) { ret = column.Buffers[0].ReadOnlySpan[0]; - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var readOnlySpan = buffer.ReadOnlySpan; @@ -3529,7 +3529,7 @@ public void Max(PrimitiveColumnContainer column, IEnumerable rows, public void Min(PrimitiveColumnContainer column, out sbyte ret) { ret = column.Buffers[0].ReadOnlySpan[0]; - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var readOnlySpan = buffer.ReadOnlySpan; @@ -3566,7 +3566,7 @@ public void Min(PrimitiveColumnContainer column, IEnumerable rows, public void Product(PrimitiveColumnContainer column, out sbyte ret) { ret = (sbyte)1; - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var readOnlySpan = buffer.ReadOnlySpan; @@ -3603,7 +3603,7 @@ public void Product(PrimitiveColumnContainer column, IEnumerable ro public void Sum(PrimitiveColumnContainer column, out sbyte ret) { ret = (sbyte)0; - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var readOnlySpan = buffer.ReadOnlySpan; @@ -3683,7 +3683,7 @@ public void Any(PrimitiveColumnContainer column, out bool ret) public void CumulativeMax(PrimitiveColumnContainer column) { var ret = column.Buffers[0].ReadOnlySpan[0]; - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -3742,7 +3742,7 @@ public void CumulativeMax(PrimitiveColumnContainer column, IEnumerable column) { var ret = column.Buffers[0].ReadOnlySpan[0]; - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -3801,7 +3801,7 @@ public void CumulativeMin(PrimitiveColumnContainer column, IEnumerable column) { var ret = (short)1; - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -3860,7 +3860,7 @@ public void CumulativeProduct(PrimitiveColumnContainer column, IEnumerabl public void CumulativeSum(PrimitiveColumnContainer column) { var ret = (short)0; - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -3919,7 +3919,7 @@ public void CumulativeSum(PrimitiveColumnContainer column, IEnumerable column, out short ret) { ret = column.Buffers[0].ReadOnlySpan[0]; - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var readOnlySpan = buffer.ReadOnlySpan; @@ -3956,7 +3956,7 @@ public void Max(PrimitiveColumnContainer column, IEnumerable rows, public void Min(PrimitiveColumnContainer column, out short ret) { ret = column.Buffers[0].ReadOnlySpan[0]; - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var readOnlySpan = buffer.ReadOnlySpan; @@ -3993,7 +3993,7 @@ public void Min(PrimitiveColumnContainer column, IEnumerable rows, public void Product(PrimitiveColumnContainer column, out short ret) { ret = (short)1; - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var readOnlySpan = buffer.ReadOnlySpan; @@ -4030,7 +4030,7 @@ public void Product(PrimitiveColumnContainer column, IEnumerable ro public void Sum(PrimitiveColumnContainer column, out short ret) { ret = (short)0; - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var readOnlySpan = buffer.ReadOnlySpan; @@ -4110,7 +4110,7 @@ public void Any(PrimitiveColumnContainer column, out bool ret) public void CumulativeMax(PrimitiveColumnContainer column) { var ret = column.Buffers[0].ReadOnlySpan[0]; - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -4169,7 +4169,7 @@ public void CumulativeMax(PrimitiveColumnContainer column, IEnumerable column) { var ret = column.Buffers[0].ReadOnlySpan[0]; - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -4228,7 +4228,7 @@ public void CumulativeMin(PrimitiveColumnContainer column, IEnumerable column) { var ret = (uint)1; - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -4287,7 +4287,7 @@ public void CumulativeProduct(PrimitiveColumnContainer column, IEnumerable public void CumulativeSum(PrimitiveColumnContainer column) { var ret = (uint)0; - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -4346,7 +4346,7 @@ public void CumulativeSum(PrimitiveColumnContainer column, IEnumerable column, out uint ret) { ret = column.Buffers[0].ReadOnlySpan[0]; - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var readOnlySpan = buffer.ReadOnlySpan; @@ -4383,7 +4383,7 @@ public void Max(PrimitiveColumnContainer column, IEnumerable rows, o public void Min(PrimitiveColumnContainer column, out uint ret) { ret = column.Buffers[0].ReadOnlySpan[0]; - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var readOnlySpan = buffer.ReadOnlySpan; @@ -4420,7 +4420,7 @@ public void Min(PrimitiveColumnContainer column, IEnumerable rows, o public void Product(PrimitiveColumnContainer column, out uint ret) { ret = (uint)1; - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var readOnlySpan = buffer.ReadOnlySpan; @@ -4457,7 +4457,7 @@ public void Product(PrimitiveColumnContainer column, IEnumerable row public void Sum(PrimitiveColumnContainer column, out uint ret) { ret = (uint)0; - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var readOnlySpan = buffer.ReadOnlySpan; @@ -4537,7 +4537,7 @@ public void Any(PrimitiveColumnContainer column, out bool ret) public void CumulativeMax(PrimitiveColumnContainer column) { var ret = column.Buffers[0].ReadOnlySpan[0]; - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -4596,7 +4596,7 @@ public void CumulativeMax(PrimitiveColumnContainer column, IEnumerable column) { var ret = column.Buffers[0].ReadOnlySpan[0]; - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -4655,7 +4655,7 @@ public void CumulativeMin(PrimitiveColumnContainer column, IEnumerable column) { var ret = (ulong)1; - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -4714,7 +4714,7 @@ public void CumulativeProduct(PrimitiveColumnContainer column, IEnumerabl public void CumulativeSum(PrimitiveColumnContainer column) { var ret = (ulong)0; - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -4773,7 +4773,7 @@ public void CumulativeSum(PrimitiveColumnContainer column, IEnumerable column, out ulong ret) { ret = column.Buffers[0].ReadOnlySpan[0]; - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var readOnlySpan = buffer.ReadOnlySpan; @@ -4810,7 +4810,7 @@ public void Max(PrimitiveColumnContainer column, IEnumerable rows, public void Min(PrimitiveColumnContainer column, out ulong ret) { ret = column.Buffers[0].ReadOnlySpan[0]; - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var readOnlySpan = buffer.ReadOnlySpan; @@ -4847,7 +4847,7 @@ public void Min(PrimitiveColumnContainer column, IEnumerable rows, public void Product(PrimitiveColumnContainer column, out ulong ret) { ret = (ulong)1; - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var readOnlySpan = buffer.ReadOnlySpan; @@ -4884,7 +4884,7 @@ public void Product(PrimitiveColumnContainer column, IEnumerable ro public void Sum(PrimitiveColumnContainer column, out ulong ret) { ret = (ulong)0; - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var readOnlySpan = buffer.ReadOnlySpan; @@ -4964,7 +4964,7 @@ public void Any(PrimitiveColumnContainer column, out bool ret) public void CumulativeMax(PrimitiveColumnContainer column) { var ret = column.Buffers[0].ReadOnlySpan[0]; - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -5023,7 +5023,7 @@ public void CumulativeMax(PrimitiveColumnContainer column, IEnumerable column) { var ret = column.Buffers[0].ReadOnlySpan[0]; - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -5082,7 +5082,7 @@ public void CumulativeMin(PrimitiveColumnContainer column, IEnumerable column) { var ret = (ushort)1; - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -5141,7 +5141,7 @@ public void CumulativeProduct(PrimitiveColumnContainer column, IEnumerab public void CumulativeSum(PrimitiveColumnContainer column) { var ret = (ushort)0; - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var mutableBuffer = DataFrameBuffer.GetMutableBuffer(buffer); @@ -5200,7 +5200,7 @@ public void CumulativeSum(PrimitiveColumnContainer column, IEnumerable column, out ushort ret) { ret = column.Buffers[0].ReadOnlySpan[0]; - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var readOnlySpan = buffer.ReadOnlySpan; @@ -5237,7 +5237,7 @@ public void Max(PrimitiveColumnContainer column, IEnumerable rows, public void Min(PrimitiveColumnContainer column, out ushort ret) { ret = column.Buffers[0].ReadOnlySpan[0]; - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var readOnlySpan = buffer.ReadOnlySpan; @@ -5274,7 +5274,7 @@ public void Min(PrimitiveColumnContainer column, IEnumerable rows, public void Product(PrimitiveColumnContainer column, out ushort ret) { ret = (ushort)1; - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var readOnlySpan = buffer.ReadOnlySpan; @@ -5311,7 +5311,7 @@ public void Product(PrimitiveColumnContainer column, IEnumerable r public void Sum(PrimitiveColumnContainer column, out ushort ret) { ret = (ushort)0; - for (int b = 0 ; b < column.Buffers.Count; b++) + for (int b = 0; b < column.Buffers.Count; b++) { var buffer = column.Buffers[b]; var readOnlySpan = buffer.ReadOnlySpan; diff --git a/src/Microsoft.Data.Analysis/StringDataFrameColumn.BinaryOperations.cs b/src/Microsoft.Data.Analysis/StringDataFrameColumn.BinaryOperations.cs index f4faa20ad0..0bfbd3b6bc 100644 --- a/src/Microsoft.Data.Analysis/StringDataFrameColumn.BinaryOperations.cs +++ b/src/Microsoft.Data.Analysis/StringDataFrameColumn.BinaryOperations.cs @@ -27,12 +27,12 @@ public override DataFrameColumn Add(DataFrameColumn column, bool inPlace = false return ret; } - public static StringDataFrameColumn operator+(StringDataFrameColumn column, string value) + public static StringDataFrameColumn operator +(StringDataFrameColumn column, string value) { return column.Add(value); } - public static StringDataFrameColumn operator+(string value, StringDataFrameColumn column) + public static StringDataFrameColumn operator +(string value, StringDataFrameColumn column) { return Add(value, column); } @@ -85,7 +85,7 @@ internal static PrimitiveDataFrameColumn ElementwiseEqualsImplementation(D ret[i] = (string)left[i] == right[i]?.ToString(); } return ret; - + } /// diff --git a/src/Microsoft.Extensions.ML/PoolLoader.cs b/src/Microsoft.Extensions.ML/PoolLoader.cs index 42c2817b68..de394d563a 100644 --- a/src/Microsoft.Extensions.ML/PoolLoader.cs +++ b/src/Microsoft.Extensions.ML/PoolLoader.cs @@ -15,7 +15,7 @@ namespace Microsoft.Extensions.ML /// /// Encapsulates the data and logic required for loading and reloading PredictionEngine object pools. /// - internal class PoolLoader: IDisposable + internal class PoolLoader : IDisposable where TData : class where TPrediction : class, new() { diff --git a/src/Microsoft.Extensions.ML/PredictionEnginePool.cs b/src/Microsoft.Extensions.ML/PredictionEnginePool.cs index ce501d46b2..db97d97fde 100644 --- a/src/Microsoft.Extensions.ML/PredictionEnginePool.cs +++ b/src/Microsoft.Extensions.ML/PredictionEnginePool.cs @@ -21,7 +21,7 @@ public class PredictionEnginePool private readonly MLOptions _mlContextOptions; private readonly IOptionsFactory> _predictionEngineOptions; private readonly IServiceProvider _serviceProvider; - private readonly PoolLoader _defaultEnginePool; + private readonly PoolLoader _defaultEnginePool; private readonly ConcurrentDictionary> _namedPools; public PredictionEnginePool(IServiceProvider serviceProvider, diff --git a/src/Microsoft.Extensions.ML/PredictionEnginePoolOptions.cs b/src/Microsoft.Extensions.ML/PredictionEnginePoolOptions.cs index 894037e986..6488242500 100644 --- a/src/Microsoft.Extensions.ML/PredictionEnginePoolOptions.cs +++ b/src/Microsoft.Extensions.ML/PredictionEnginePoolOptions.cs @@ -17,4 +17,4 @@ public class PredictionEnginePoolOptions /// public ModelLoader ModelLoader { get; set; } } -} \ No newline at end of file +} diff --git a/src/Microsoft.Extensions.ML/PredictionEnginePoolPolicy.cs b/src/Microsoft.Extensions.ML/PredictionEnginePoolPolicy.cs index 7804af5158..e0557ada71 100644 --- a/src/Microsoft.Extensions.ML/PredictionEnginePoolPolicy.cs +++ b/src/Microsoft.Extensions.ML/PredictionEnginePoolPolicy.cs @@ -39,4 +39,4 @@ public override PredictionEngine Create() => /// public override bool Return(PredictionEngine obj) => true; } -} \ No newline at end of file +} diff --git a/src/Microsoft.ML.AutoML/API/AutoCatalog.cs b/src/Microsoft.ML.AutoML/API/AutoCatalog.cs index 71941a7015..d623c16602 100644 --- a/src/Microsoft.ML.AutoML/API/AutoCatalog.cs +++ b/src/Microsoft.ML.AutoML/API/AutoCatalog.cs @@ -1,4 +1,4 @@ -// Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.AutoML/API/ColumnInference.cs b/src/Microsoft.ML.AutoML/API/ColumnInference.cs index a2d697da98..d3dc5b0df4 100644 --- a/src/Microsoft.ML.AutoML/API/ColumnInference.cs +++ b/src/Microsoft.ML.AutoML/API/ColumnInference.cs @@ -134,4 +134,4 @@ public ColumnInformation() ImagePathColumnNames = new Collection(); } } -} \ No newline at end of file +} diff --git a/src/Microsoft.ML.AutoML/API/ExperimentResults/ExperimentResult.cs b/src/Microsoft.ML.AutoML/API/ExperimentResults/ExperimentResult.cs index 85eecfdb7f..d2ce912f5d 100644 --- a/src/Microsoft.ML.AutoML/API/ExperimentResults/ExperimentResult.cs +++ b/src/Microsoft.ML.AutoML/API/ExperimentResults/ExperimentResult.cs @@ -37,4 +37,4 @@ internal ExperimentResult(IEnumerable> runDetails, BestRun = bestRun; } } -} \ No newline at end of file +} diff --git a/src/Microsoft.ML.AutoML/API/MulticlassClassificationExperiment.cs b/src/Microsoft.ML.AutoML/API/MulticlassClassificationExperiment.cs index 6f45e6f54a..5b7cb1126c 100644 --- a/src/Microsoft.ML.AutoML/API/MulticlassClassificationExperiment.cs +++ b/src/Microsoft.ML.AutoML/API/MulticlassClassificationExperiment.cs @@ -1,4 +1,4 @@ -// Foundation under one or more agreements. +// 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. @@ -159,4 +159,4 @@ private protected override RunDetail GetBestRun return BestResultUtil.GetBestRun(results, MetricsAgent, OptimizingMetricInfo.IsMaximizing); } } -} \ No newline at end of file +} diff --git a/src/Microsoft.ML.AutoML/API/RankingExperiment.cs b/src/Microsoft.ML.AutoML/API/RankingExperiment.cs index 8709c122b0..f575fb6ca3 100644 --- a/src/Microsoft.ML.AutoML/API/RankingExperiment.cs +++ b/src/Microsoft.ML.AutoML/API/RankingExperiment.cs @@ -136,4 +136,4 @@ private protected override RunDetail GetBestRun(IEnumerable where TRunDetail : RunDetail { (SuggestedPipelineRunDetail suggestedPipelineRunDetail, TRunDetail runDetail) - Run (SuggestedPipeline pipeline, DirectoryInfo modelDirectory, int iterationNum); + Run(SuggestedPipeline pipeline, DirectoryInfo modelDirectory, int iterationNum); } -} \ No newline at end of file +} diff --git a/src/Microsoft.ML.AutoML/Experiment/Runners/RunnerUtil.cs b/src/Microsoft.ML.AutoML/Experiment/Runners/RunnerUtil.cs index 95f8acf980..6aa2346001 100644 --- a/src/Microsoft.ML.AutoML/Experiment/Runners/RunnerUtil.cs +++ b/src/Microsoft.ML.AutoML/Experiment/Runners/RunnerUtil.cs @@ -58,4 +58,4 @@ public static FileInfo GetModelFileInfo(DirectoryInfo modelDirectory, int iterat new FileInfo(Path.Combine(modelDirectory.FullName, $"Model{iterationNum}_{foldNum}.zip")); } } -} \ No newline at end of file +} diff --git a/src/Microsoft.ML.AutoML/Experiment/Runners/TrainValidateRunner.cs b/src/Microsoft.ML.AutoML/Experiment/Runners/TrainValidateRunner.cs index 79f7f404fb..f9554e0ed5 100644 --- a/src/Microsoft.ML.AutoML/Experiment/Runners/TrainValidateRunner.cs +++ b/src/Microsoft.ML.AutoML/Experiment/Runners/TrainValidateRunner.cs @@ -66,4 +66,4 @@ private static FileInfo GetModelFileInfo(DirectoryInfo modelDirectory, int itera new FileInfo(Path.Combine(modelDirectory.FullName, $"Model{iterationNum}.zip")); } } -} \ No newline at end of file +} diff --git a/src/Microsoft.ML.AutoML/Experiment/SuggestedPipeline.cs b/src/Microsoft.ML.AutoML/Experiment/SuggestedPipeline.cs index aeaa72a4de..5c1f23bcf9 100644 --- a/src/Microsoft.ML.AutoML/Experiment/SuggestedPipeline.cs +++ b/src/Microsoft.ML.AutoML/Experiment/SuggestedPipeline.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.AutoML/Experiment/SuggestedPipelineBuilder.cs b/src/Microsoft.ML.AutoML/Experiment/SuggestedPipelineBuilder.cs index ddbf49a364..3a52574c42 100644 --- a/src/Microsoft.ML.AutoML/Experiment/SuggestedPipelineBuilder.cs +++ b/src/Microsoft.ML.AutoML/Experiment/SuggestedPipelineBuilder.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.AutoML/PipelineSuggesters/PipelineSuggester.cs b/src/Microsoft.ML.AutoML/PipelineSuggesters/PipelineSuggester.cs index 711c7bd3ef..fece093026 100644 --- a/src/Microsoft.ML.AutoML/PipelineSuggesters/PipelineSuggester.cs +++ b/src/Microsoft.ML.AutoML/PipelineSuggesters/PipelineSuggester.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. @@ -230,4 +230,4 @@ private static bool SampleHyperparameters(MLContext context, SuggestedTrainer tr } } } -} \ No newline at end of file +} diff --git a/src/Microsoft.ML.AutoML/Sweepers/ISweeper.cs b/src/Microsoft.ML.AutoML/Sweepers/ISweeper.cs index 7c15230a3d..d5e34d35b6 100644 --- a/src/Microsoft.ML.AutoML/Sweepers/ISweeper.cs +++ b/src/Microsoft.ML.AutoML/Sweepers/ISweeper.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.AutoML/Sweepers/Parameters.cs b/src/Microsoft.ML.AutoML/Sweepers/Parameters.cs index 54765684d0..480b87c844 100644 --- a/src/Microsoft.ML.AutoML/Sweepers/Parameters.cs +++ b/src/Microsoft.ML.AutoML/Sweepers/Parameters.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.AutoML/Sweepers/Random.cs b/src/Microsoft.ML.AutoML/Sweepers/Random.cs index c045436b23..79470970a2 100644 --- a/src/Microsoft.ML.AutoML/Sweepers/Random.cs +++ b/src/Microsoft.ML.AutoML/Sweepers/Random.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.AutoML/Sweepers/SmacSweeper.cs b/src/Microsoft.ML.AutoML/Sweepers/SmacSweeper.cs index de42196a35..8b953a9544 100644 --- a/src/Microsoft.ML.AutoML/Sweepers/SmacSweeper.cs +++ b/src/Microsoft.ML.AutoML/Sweepers/SmacSweeper.cs @@ -433,4 +433,4 @@ private double[] ComputeEIs(double bestVal, double[][] forestStatistics, bool is return eis; } } -} \ No newline at end of file +} diff --git a/src/Microsoft.ML.AutoML/Sweepers/SweeperBase.cs b/src/Microsoft.ML.AutoML/Sweepers/SweeperBase.cs index 0d7b9aa5c9..b9cb1c8ee3 100644 --- a/src/Microsoft.ML.AutoML/Sweepers/SweeperBase.cs +++ b/src/Microsoft.ML.AutoML/Sweepers/SweeperBase.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.AutoML/Sweepers/SweeperProbabilityUtils.cs b/src/Microsoft.ML.AutoML/Sweepers/SweeperProbabilityUtils.cs index 89c13c152f..9ce004683f 100644 --- a/src/Microsoft.ML.AutoML/Sweepers/SweeperProbabilityUtils.cs +++ b/src/Microsoft.ML.AutoML/Sweepers/SweeperProbabilityUtils.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.AutoML/Terminators/IterationBasedTerminator.cs b/src/Microsoft.ML.AutoML/Terminators/IterationBasedTerminator.cs index 16741a65d2..11db1b930e 100644 --- a/src/Microsoft.ML.AutoML/Terminators/IterationBasedTerminator.cs +++ b/src/Microsoft.ML.AutoML/Terminators/IterationBasedTerminator.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.AutoML/TrainerExtensions/MultiTrainerExtensions.cs b/src/Microsoft.ML.AutoML/TrainerExtensions/MultiTrainerExtensions.cs index 42d1d7f2e1..d5643f79ff 100644 --- a/src/Microsoft.ML.AutoML/TrainerExtensions/MultiTrainerExtensions.cs +++ b/src/Microsoft.ML.AutoML/TrainerExtensions/MultiTrainerExtensions.cs @@ -249,4 +249,4 @@ public PipelineNode CreatePipelineNode(IEnumerable sweepParams, columnInfo.LabelColumnName, null); } } -} \ No newline at end of file +} diff --git a/src/Microsoft.ML.AutoML/TrainerExtensions/RecommendationTrainerExtensions.cs b/src/Microsoft.ML.AutoML/TrainerExtensions/RecommendationTrainerExtensions.cs index fa59a84594..bb8720ba78 100644 --- a/src/Microsoft.ML.AutoML/TrainerExtensions/RecommendationTrainerExtensions.cs +++ b/src/Microsoft.ML.AutoML/TrainerExtensions/RecommendationTrainerExtensions.cs @@ -27,7 +27,7 @@ public PipelineNode CreatePipelineNode(IEnumerable sweepParams, var property = new Dictionary(); property.Add(nameof(MatrixFactorizationTrainer.Options.MatrixColumnIndexColumnName), columnInfo.UserIdColumnName); property.Add(nameof(MatrixFactorizationTrainer.Options.MatrixRowIndexColumnName), columnInfo.ItemIdColumnName); - return TrainerExtensionUtil.BuildPipelineNode(TrainerExtensionCatalog.GetTrainerName(this), sweepParams, columnInfo.LabelColumnName, additionalProperties:property); + return TrainerExtensionUtil.BuildPipelineNode(TrainerExtensionCatalog.GetTrainerName(this), sweepParams, columnInfo.LabelColumnName, additionalProperties: property); } public IEnumerable GetHyperparamSweepRanges() diff --git a/src/Microsoft.ML.AutoML/TrainerExtensions/RegressionTrainerExtensions.cs b/src/Microsoft.ML.AutoML/TrainerExtensions/RegressionTrainerExtensions.cs index febfac7bad..1f064da5e4 100644 --- a/src/Microsoft.ML.AutoML/TrainerExtensions/RegressionTrainerExtensions.cs +++ b/src/Microsoft.ML.AutoML/TrainerExtensions/RegressionTrainerExtensions.cs @@ -184,4 +184,4 @@ public PipelineNode CreatePipelineNode(IEnumerable sweepParams, columnInfo.LabelColumnName); } } -} \ No newline at end of file +} diff --git a/src/Microsoft.ML.AutoML/TransformInference/TransformInference.cs b/src/Microsoft.ML.AutoML/TransformInference/TransformInference.cs index 2275e0712b..1d3384dd54 100644 --- a/src/Microsoft.ML.AutoML/TransformInference/TransformInference.cs +++ b/src/Microsoft.ML.AutoML/TransformInference/TransformInference.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. @@ -433,7 +433,7 @@ private static SuggestedTransform BuildFinalFeaturesConcatTransform(MLContext co } // include all numeric columns of type R4 - foreach(var intermediateCol in intermediateCols) + foreach (var intermediateCol in intermediateCols) { if (intermediateCol.Purpose == ColumnPurpose.NumericFeature && intermediateCol.Type.GetItemType() == NumberDataViewType.Single) @@ -486,7 +486,7 @@ private static IEnumerable GetNewColumnNames(IEnumerable desired continue; } - for(var i = 0; ; i++) + for (var i = 0; ; i++) { var newColName = $"{desiredColName}{i}"; if (!existingColNames.Contains(newColName)) diff --git a/src/Microsoft.ML.AutoML/TransformInference/TransformPostTrainerInference.cs b/src/Microsoft.ML.AutoML/TransformInference/TransformPostTrainerInference.cs index ca98152e6d..e38bb96d9c 100644 --- a/src/Microsoft.ML.AutoML/TransformInference/TransformPostTrainerInference.cs +++ b/src/Microsoft.ML.AutoML/TransformInference/TransformPostTrainerInference.cs @@ -40,4 +40,4 @@ private static IEnumerable InferLabelTransforms(MLContext co return inferredTransforms; } } -} \ No newline at end of file +} diff --git a/src/Microsoft.ML.AutoML/Utils/ColumnTypeExtensions.cs b/src/Microsoft.ML.AutoML/Utils/ColumnTypeExtensions.cs index f05419d6d9..05fa1a2447 100644 --- a/src/Microsoft.ML.AutoML/Utils/ColumnTypeExtensions.cs +++ b/src/Microsoft.ML.AutoML/Utils/ColumnTypeExtensions.cs @@ -33,4 +33,4 @@ public static bool IsKey(this DataViewType columnType) return columnType is KeyDataViewType; } } -} \ No newline at end of file +} diff --git a/src/Microsoft.ML.AutoML/Utils/DatasetColumnInfo.cs b/src/Microsoft.ML.AutoML/Utils/DatasetColumnInfo.cs index f43cb5828d..2c4a6394ae 100644 --- a/src/Microsoft.ML.AutoML/Utils/DatasetColumnInfo.cs +++ b/src/Microsoft.ML.AutoML/Utils/DatasetColumnInfo.cs @@ -38,4 +38,4 @@ public static DatasetColumnInfo[] GetDatasetColumnInfo(MLContext context, IDataV return cols; } } -} \ No newline at end of file +} diff --git a/src/Microsoft.ML.AutoML/Utils/Logger.cs b/src/Microsoft.ML.AutoML/Utils/Logger.cs index 749c5b7cc6..0b76c47511 100644 --- a/src/Microsoft.ML.AutoML/Utils/Logger.cs +++ b/src/Microsoft.ML.AutoML/Utils/Logger.cs @@ -27,4 +27,4 @@ public void Error(string message) _channel.Error(MessageSensitivity.None, message); } } -} \ No newline at end of file +} diff --git a/src/Microsoft.ML.CodeGenerator/Assembly.cs b/src/Microsoft.ML.CodeGenerator/Assembly.cs index 71b6b77d88..e087cb2674 100644 --- a/src/Microsoft.ML.CodeGenerator/Assembly.cs +++ b/src/Microsoft.ML.CodeGenerator/Assembly.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.CodeGenerator/CodeGenerator/CSharp/AzureCodeGenerator/AzureAttachModelCodeGenerator.cs b/src/Microsoft.ML.CodeGenerator/CodeGenerator/CSharp/AzureCodeGenerator/AzureAttachModelCodeGenerator.cs index 1ac25c2f48..d2f7e1393b 100644 --- a/src/Microsoft.ML.CodeGenerator/CodeGenerator/CSharp/AzureCodeGenerator/AzureAttachModelCodeGenerator.cs +++ b/src/Microsoft.ML.CodeGenerator/CodeGenerator/CSharp/AzureCodeGenerator/AzureAttachModelCodeGenerator.cs @@ -125,7 +125,8 @@ public ICSharpProject ToProject() ConsumeModel, ModelProject, }; - } else if(_settings.IsObjectDetection) + } + else if (_settings.IsObjectDetection) { project = new CSharpProject() { diff --git a/src/Microsoft.ML.CodeGenerator/CodeGenerator/CSharp/CSharpCodeFile.cs b/src/Microsoft.ML.CodeGenerator/CodeGenerator/CSharp/CSharpCodeFile.cs index 8d43024dcb..ec57903628 100644 --- a/src/Microsoft.ML.CodeGenerator/CodeGenerator/CSharp/CSharpCodeFile.cs +++ b/src/Microsoft.ML.CodeGenerator/CodeGenerator/CSharp/CSharpCodeFile.cs @@ -40,4 +40,4 @@ public void WriteToDisk(string location) Utilities.Utils.WriteOutputToFiles(File, Name, location); } } -} \ No newline at end of file +} diff --git a/src/Microsoft.ML.CodeGenerator/CodeGenerator/CSharp/CSharpProject.cs b/src/Microsoft.ML.CodeGenerator/CodeGenerator/CSharp/CSharpProject.cs index f6bef92567..b9179de329 100644 --- a/src/Microsoft.ML.CodeGenerator/CodeGenerator/CSharp/CSharpProject.cs +++ b/src/Microsoft.ML.CodeGenerator/CodeGenerator/CSharp/CSharpProject.cs @@ -19,7 +19,7 @@ internal class CSharpProject : List, ICSharpProject /// full path of destinate directory public void WriteToDisk(string location) { - foreach ( var file in this) + foreach (var file in this) { file.WriteToDisk(location); } diff --git a/src/Microsoft.ML.CodeGenerator/CodeGenerator/CSharp/CSharpProjectFile.cs b/src/Microsoft.ML.CodeGenerator/CodeGenerator/CSharp/CSharpProjectFile.cs index 053f32ba35..235f9cd42b 100644 --- a/src/Microsoft.ML.CodeGenerator/CodeGenerator/CSharp/CSharpProjectFile.cs +++ b/src/Microsoft.ML.CodeGenerator/CodeGenerator/CSharp/CSharpProjectFile.cs @@ -40,4 +40,4 @@ public void WriteToDisk(string location) Utilities.Utils.WriteOutputToFiles(File, Name, location); } } -} \ No newline at end of file +} diff --git a/src/Microsoft.ML.CodeGenerator/CodeGenerator/CSharp/CSharpSolution.cs b/src/Microsoft.ML.CodeGenerator/CodeGenerator/CSharp/CSharpSolution.cs index 0a160e2003..44c5a10c3d 100644 --- a/src/Microsoft.ML.CodeGenerator/CodeGenerator/CSharp/CSharpSolution.cs +++ b/src/Microsoft.ML.CodeGenerator/CodeGenerator/CSharp/CSharpSolution.cs @@ -18,7 +18,7 @@ internal class CSharpSolution : List, ICSharpSolution public void WriteToDisk(string folder) { - foreach ( var project in this) + foreach (var project in this) { project.WriteToDisk(Path.Combine(folder, project.Name)); } diff --git a/src/Microsoft.ML.CodeGenerator/CodeGenerator/CSharp/CodeGenerator.cs b/src/Microsoft.ML.CodeGenerator/CodeGenerator/CSharp/CodeGenerator.cs index 8744264a05..a9033ad5ff 100644 --- a/src/Microsoft.ML.CodeGenerator/CodeGenerator/CSharp/CodeGenerator.cs +++ b/src/Microsoft.ML.CodeGenerator/CodeGenerator/CSharp/CodeGenerator.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. @@ -139,7 +139,7 @@ private void SetRequiredNugetPackages(IEnumerable trainerNodes, re string modelBuilderCSFileContent) GenerateConsoleAppProjectContents(string namespaceValue, Type labelTypeCsharp, bool includeLightGbmPackage, bool includeMklComponentsPackage, bool includeFastTreePackage, bool includeImageTransformerPackage, - bool includeImageClassificationPackage, bool includeRecommenderPackage, bool includeOnnxPackage = false , bool includeResNet18Package = false) + bool includeImageClassificationPackage, bool includeRecommenderPackage, bool includeOnnxPackage = false, bool includeResNet18Package = false) { var predictProgramCSFileContent = GeneratePredictProgramCSFileContent(namespaceValue); predictProgramCSFileContent = Utils.FormatCode(predictProgramCSFileContent); @@ -294,7 +294,8 @@ private string GenerateModelProjectFileContent(bool includeLightGbmPackage, private string GenerateModelOutputCSFileContent(string predictionLabelType, string namespaceValue) { - ModelOutputClass modelOutputClass = new ModelOutputClass() { + ModelOutputClass modelOutputClass = new ModelOutputClass() + { TaskType = _settings.MlTask.ToString(), PredictionLabelType = predictionLabelType, Namespace = namespaceValue, @@ -305,7 +306,8 @@ private string GenerateModelOutputCSFileContent(string predictionLabelType, stri private string GenerateModelInputCSFileContent(string namespaceValue, IList classLabels) { - ModelInputClass modelInputClass = new ModelInputClass() { + ModelInputClass modelInputClass = new ModelInputClass() + { Namespace = namespaceValue, ClassLabels = classLabels, Target = _settings.Target, diff --git a/src/Microsoft.ML.CodeGenerator/CodeGenerator/CSharp/Interface/ICSharpFile.cs b/src/Microsoft.ML.CodeGenerator/CodeGenerator/CSharp/Interface/ICSharpFile.cs index 780488094f..4ab297a35e 100644 --- a/src/Microsoft.ML.CodeGenerator/CodeGenerator/CSharp/Interface/ICSharpFile.cs +++ b/src/Microsoft.ML.CodeGenerator/CodeGenerator/CSharp/Interface/ICSharpFile.cs @@ -6,10 +6,10 @@ namespace Microsoft.ML.CodeGenerator { - public interface ICSharpFile: IWritable + public interface ICSharpFile : IWritable { public string Name { get; set; } public string File { get; set; } } -} \ No newline at end of file +} diff --git a/src/Microsoft.ML.CodeGenerator/CodeGenerator/CSharp/Interface/IProjectGenerator.cs b/src/Microsoft.ML.CodeGenerator/CodeGenerator/CSharp/Interface/IProjectGenerator.cs index 5bb6c0d5cc..f91e37a543 100644 --- a/src/Microsoft.ML.CodeGenerator/CodeGenerator/CSharp/Interface/IProjectGenerator.cs +++ b/src/Microsoft.ML.CodeGenerator/CodeGenerator/CSharp/Interface/IProjectGenerator.cs @@ -10,4 +10,4 @@ internal interface IProjectGenerator { void GenerateOutput(); } -} \ No newline at end of file +} diff --git a/src/Microsoft.ML.CodeGenerator/CodeGenerator/CSharp/TrainerGeneratorBase.cs b/src/Microsoft.ML.CodeGenerator/CodeGenerator/CSharp/TrainerGeneratorBase.cs index eabb1f6ebf..0a3fcfa7ea 100644 --- a/src/Microsoft.ML.CodeGenerator/CodeGenerator/CSharp/TrainerGeneratorBase.cs +++ b/src/Microsoft.ML.CodeGenerator/CodeGenerator/CSharp/TrainerGeneratorBase.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.CodeGenerator/CodeGenerator/CSharp/TrainerGeneratorFactory.cs b/src/Microsoft.ML.CodeGenerator/CodeGenerator/CSharp/TrainerGeneratorFactory.cs index ab9dbd323b..d291363f13 100644 --- a/src/Microsoft.ML.CodeGenerator/CodeGenerator/CSharp/TrainerGeneratorFactory.cs +++ b/src/Microsoft.ML.CodeGenerator/CodeGenerator/CSharp/TrainerGeneratorFactory.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.CodeGenerator/CodeGenerator/CSharp/TrainerGenerators.cs b/src/Microsoft.ML.CodeGenerator/CodeGenerator/CSharp/TrainerGenerators.cs index f51ac222a5..20b9847968 100644 --- a/src/Microsoft.ML.CodeGenerator/CodeGenerator/CSharp/TrainerGenerators.cs +++ b/src/Microsoft.ML.CodeGenerator/CodeGenerator/CSharp/TrainerGenerators.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.CodeGenerator/CodeGenerator/CSharp/TransformGeneratorBase.cs b/src/Microsoft.ML.CodeGenerator/CodeGenerator/CSharp/TransformGeneratorBase.cs index 12899e02f5..0725fd5841 100644 --- a/src/Microsoft.ML.CodeGenerator/CodeGenerator/CSharp/TransformGeneratorBase.cs +++ b/src/Microsoft.ML.CodeGenerator/CodeGenerator/CSharp/TransformGeneratorBase.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.CodeGenerator/CodeGenerator/CSharp/TransformGeneratorFactory.cs b/src/Microsoft.ML.CodeGenerator/CodeGenerator/CSharp/TransformGeneratorFactory.cs index ddf8bf07eb..f7f85c2961 100644 --- a/src/Microsoft.ML.CodeGenerator/CodeGenerator/CSharp/TransformGeneratorFactory.cs +++ b/src/Microsoft.ML.CodeGenerator/CodeGenerator/CSharp/TransformGeneratorFactory.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.CodeGenerator/CodeGenerator/CSharp/TransformGenerators.cs b/src/Microsoft.ML.CodeGenerator/CodeGenerator/CSharp/TransformGenerators.cs index 5fdb83bd97..c1fa04c376 100644 --- a/src/Microsoft.ML.CodeGenerator/CodeGenerator/CSharp/TransformGenerators.cs +++ b/src/Microsoft.ML.CodeGenerator/CodeGenerator/CSharp/TransformGenerators.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.CodeGenerator/Utils.cs b/src/Microsoft.ML.CodeGenerator/Utils.cs index bfc1c74522..b5b955a00e 100644 --- a/src/Microsoft.ML.CodeGenerator/Utils.cs +++ b/src/Microsoft.ML.CodeGenerator/Utils.cs @@ -60,7 +60,7 @@ internal static IDictionary GenerateSampleData(IDataView dataVie // Get normalized and unique column names. If there are duplicate column names, the // differentiator suffix '_col_x' will be added to each column name, where 'x' is // the load order for a given column. - List normalizedColumnNames= GenerateColumnNames(featureColumns.Select(column => column.Name).ToList()); + List normalizedColumnNames = GenerateColumnNames(featureColumns.Select(column => column.Name).ToList()); foreach (string columnName in normalizedColumnNames) sampleData[columnName] = null; if (rowCursor.MoveNext()) @@ -71,7 +71,7 @@ internal static IDictionary GenerateSampleData(IDataView dataVie // as there may exist duplicate column names. In this case, sampleData // column names may have the differentiator suffix of '_col_x' added, // which requires access to each column name in through its index. - for(int i = 0; i < featureColumns.Count(); i++) + for (int i = 0; i < featureColumns.Count(); i++) { var getGenericGetGetterMethod = getGetGetterMethod.MakeGenericMethod(featureColumns[i].Type.RawType); string val = getGenericGetGetterMethod.Invoke(null, new object[] { rowCursor, featureColumns[i] }) as string; @@ -305,10 +305,10 @@ internal static IList GenerateClassLabels(ColumnInferenceResults columnI // differentiator suffix '_col_x' will be added to each column name, where 'x' is // the load order for a given column. List normalizedColumnNames = GenerateColumnNames(columnNames); - for (int i = 1; i < result.Count; i+=3) + for (int i = 1; i < result.Count; i += 3) { // Get normalized column name for correctly typed class property name - result[i] += normalizedColumnNames[i/3]; + result[i] += normalizedColumnNames[i / 3]; result[i] += "{get; set;}"; } return result; diff --git a/src/Microsoft.ML.Console/Console.cs b/src/Microsoft.ML.Console/Console.cs index 549f222de7..85aef87c25 100644 --- a/src/Microsoft.ML.Console/Console.cs +++ b/src/Microsoft.ML.Console/Console.cs @@ -8,4 +8,4 @@ public static class Console { public static int Main(string[] args) => Maml.Main(args); } -} \ No newline at end of file +} diff --git a/src/Microsoft.ML.Core/CommandLine/ArgumentAttribute.cs b/src/Microsoft.ML.Core/CommandLine/ArgumentAttribute.cs index 7cd4f9d178..773edf6b80 100644 --- a/src/Microsoft.ML.Core/CommandLine/ArgumentAttribute.cs +++ b/src/Microsoft.ML.Core/CommandLine/ArgumentAttribute.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. @@ -100,4 +100,4 @@ public string[] Aliases public Type SignatureType { get; set; } } -} \ No newline at end of file +} diff --git a/src/Microsoft.ML.Core/CommandLine/CharCursor.cs b/src/Microsoft.ML.Core/CommandLine/CharCursor.cs index 319cc1b367..456058f385 100644 --- a/src/Microsoft.ML.Core/CommandLine/CharCursor.cs +++ b/src/Microsoft.ML.Core/CommandLine/CharCursor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.Core/CommandLine/CmdLexer.cs b/src/Microsoft.ML.Core/CommandLine/CmdLexer.cs index 8136b9ec51..5c8efe9a43 100644 --- a/src/Microsoft.ML.Core/CommandLine/CmdLexer.cs +++ b/src/Microsoft.ML.Core/CommandLine/CmdLexer.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.Core/CommandLine/CmdParser.cs b/src/Microsoft.ML.Core/CommandLine/CmdParser.cs index 07e7c39d60..fc97810663 100644 --- a/src/Microsoft.ML.Core/CommandLine/CmdParser.cs +++ b/src/Microsoft.ML.Core/CommandLine/CmdParser.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. @@ -1235,7 +1235,8 @@ public sealed class Arg // Used for help and composing settings strings. public object DefaultValue { get { return _arg.DefaultValue; } } - public bool IsRequired { + public bool IsRequired + { get { return ArgumentType.Required == (Kind & ArgumentType.Required); } } @@ -2239,15 +2240,18 @@ public string GetSyntaxHelp() return bldr.ToString(); } - public bool IsRequired { + public bool IsRequired + { get { return 0 != (Kind & ArgumentType.Required); } } - public bool AllowMultiple { + public bool AllowMultiple + { get { return 0 != (Kind & ArgumentType.Multiple); } } - public bool Unique { + public bool Unique + { get { return 0 != (Kind & ArgumentType.Unique); } } @@ -2261,7 +2265,8 @@ public bool IsMultiComponentFactory get { return IsComponentFactory && Field.FieldType.IsArray; } } - public bool IsCustomItemType { + public bool IsCustomItemType + { get { return _infoCustom != null; } } } @@ -2438,4 +2443,4 @@ public TComponent CreateComponent(IHostEnvironment env, TArg1 argument1, TArg2 a } } } -} \ No newline at end of file +} diff --git a/src/Microsoft.ML.Core/CommandLine/EnumValueDisplayAttribute.cs b/src/Microsoft.ML.Core/CommandLine/EnumValueDisplayAttribute.cs index b29af2eeaf..b21733c7f3 100644 --- a/src/Microsoft.ML.Core/CommandLine/EnumValueDisplayAttribute.cs +++ b/src/Microsoft.ML.Core/CommandLine/EnumValueDisplayAttribute.cs @@ -20,4 +20,4 @@ public EnumValueDisplayAttribute(string name) Name = name; } } -} \ No newline at end of file +} diff --git a/src/Microsoft.ML.Core/CommandLine/HideEnumValueAttribute.cs b/src/Microsoft.ML.Core/CommandLine/HideEnumValueAttribute.cs index 020ca76b45..806774d30b 100644 --- a/src/Microsoft.ML.Core/CommandLine/HideEnumValueAttribute.cs +++ b/src/Microsoft.ML.Core/CommandLine/HideEnumValueAttribute.cs @@ -17,4 +17,4 @@ public HideEnumValueAttribute() { } } -} \ No newline at end of file +} diff --git a/src/Microsoft.ML.Core/CommandLine/SpecialPurpose.cs b/src/Microsoft.ML.Core/CommandLine/SpecialPurpose.cs index 491ef4b21c..057dbb0228 100644 --- a/src/Microsoft.ML.Core/CommandLine/SpecialPurpose.cs +++ b/src/Microsoft.ML.Core/CommandLine/SpecialPurpose.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.Core/ComponentModel/AssemblyLoadingUtils.cs b/src/Microsoft.ML.Core/ComponentModel/AssemblyLoadingUtils.cs index 249ee23f73..3c0d2609fe 100644 --- a/src/Microsoft.ML.Core/ComponentModel/AssemblyLoadingUtils.cs +++ b/src/Microsoft.ML.Core/ComponentModel/AssemblyLoadingUtils.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.Core/ComponentModel/ComponentCatalog.cs b/src/Microsoft.ML.Core/ComponentModel/ComponentCatalog.cs index f5bd505ce0..fcddce4cc9 100644 --- a/src/Microsoft.ML.Core/ComponentModel/ComponentCatalog.cs +++ b/src/Microsoft.ML.Core/ComponentModel/ComponentCatalog.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.Core/ComponentModel/ComponentFactory.cs b/src/Microsoft.ML.Core/ComponentModel/ComponentFactory.cs index 25165f62c9..d04df9a80a 100644 --- a/src/Microsoft.ML.Core/ComponentModel/ComponentFactory.cs +++ b/src/Microsoft.ML.Core/ComponentModel/ComponentFactory.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.Core/ComponentModel/ExtensionBaseAttribute.cs b/src/Microsoft.ML.Core/ComponentModel/ExtensionBaseAttribute.cs index 7d8d00a252..66e0860310 100644 --- a/src/Microsoft.ML.Core/ComponentModel/ExtensionBaseAttribute.cs +++ b/src/Microsoft.ML.Core/ComponentModel/ExtensionBaseAttribute.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.Core/ComponentModel/LoadableClassAttribute.cs b/src/Microsoft.ML.Core/ComponentModel/LoadableClassAttribute.cs index f29c8b206e..a61ddff719 100644 --- a/src/Microsoft.ML.Core/ComponentModel/LoadableClassAttribute.cs +++ b/src/Microsoft.ML.Core/ComponentModel/LoadableClassAttribute.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.Core/Data/AnnotationUtils.cs b/src/Microsoft.ML.Core/Data/AnnotationUtils.cs index 6810fa3959..f942e4755e 100644 --- a/src/Microsoft.ML.Core/Data/AnnotationUtils.cs +++ b/src/Microsoft.ML.Core/Data/AnnotationUtils.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. @@ -498,4 +498,4 @@ internal static DataViewRow AnnotationsAsRow(DataViewSchema.Annotations annotati return new AnnotationRow(annotations); } } -} \ No newline at end of file +} diff --git a/src/Microsoft.ML.Core/Data/DataKind.cs b/src/Microsoft.ML.Core/Data/DataKind.cs index fe3e69b5b1..3baf7b5511 100644 --- a/src/Microsoft.ML.Core/Data/DataKind.cs +++ b/src/Microsoft.ML.Core/Data/DataKind.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. @@ -380,4 +380,4 @@ public static string GetString(this InternalDataKind kind) return ""; } } -} \ No newline at end of file +} diff --git a/src/Microsoft.ML.Core/Data/ICommand.cs b/src/Microsoft.ML.Core/Data/ICommand.cs index 4c68218436..7d52222647 100644 --- a/src/Microsoft.ML.Core/Data/ICommand.cs +++ b/src/Microsoft.ML.Core/Data/ICommand.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.Core/Data/IFileHandle.cs b/src/Microsoft.ML.Core/Data/IFileHandle.cs index fcb5bdf070..5afef22fee 100644 --- a/src/Microsoft.ML.Core/Data/IFileHandle.cs +++ b/src/Microsoft.ML.Core/Data/IFileHandle.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.Core/Data/IHostEnvironment.cs b/src/Microsoft.ML.Core/Data/IHostEnvironment.cs index 1bfd5c3230..64759308e2 100644 --- a/src/Microsoft.ML.Core/Data/IHostEnvironment.cs +++ b/src/Microsoft.ML.Core/Data/IHostEnvironment.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.Core/Data/IProgressChannel.cs b/src/Microsoft.ML.Core/Data/IProgressChannel.cs index 43c847943e..1cff123f69 100644 --- a/src/Microsoft.ML.Core/Data/IProgressChannel.cs +++ b/src/Microsoft.ML.Core/Data/IProgressChannel.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. @@ -141,4 +141,4 @@ public interface IProgressEntry void SetMetric(int index, Double value); } -} \ No newline at end of file +} diff --git a/src/Microsoft.ML.Core/Data/ISchemaBindableMapper.cs b/src/Microsoft.ML.Core/Data/ISchemaBindableMapper.cs index 5f10ceeaf4..2396966a6c 100644 --- a/src/Microsoft.ML.Core/Data/ISchemaBindableMapper.cs +++ b/src/Microsoft.ML.Core/Data/ISchemaBindableMapper.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.Core/Data/IValueMapper.cs b/src/Microsoft.ML.Core/Data/IValueMapper.cs index 801db0ffb8..6dfea747ca 100644 --- a/src/Microsoft.ML.Core/Data/IValueMapper.cs +++ b/src/Microsoft.ML.Core/Data/IValueMapper.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. @@ -55,4 +55,4 @@ internal interface IValueMapperDist : IValueMapper /// ValueMapper GetMapper(); } -} \ No newline at end of file +} diff --git a/src/Microsoft.ML.Core/Data/InPredicate.cs b/src/Microsoft.ML.Core/Data/InPredicate.cs index 86d716356a..8e0c27e070 100644 --- a/src/Microsoft.ML.Core/Data/InPredicate.cs +++ b/src/Microsoft.ML.Core/Data/InPredicate.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.Core/Data/LinkedRootCursorBase.cs b/src/Microsoft.ML.Core/Data/LinkedRootCursorBase.cs index 9bd0647232..319dbbbbb8 100644 --- a/src/Microsoft.ML.Core/Data/LinkedRootCursorBase.cs +++ b/src/Microsoft.ML.Core/Data/LinkedRootCursorBase.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. @@ -50,4 +50,4 @@ protected override void Dispose(bool disposing) base.Dispose(disposing); } } -} \ No newline at end of file +} diff --git a/src/Microsoft.ML.Core/Data/LinkedRowFilterCursorBase.cs b/src/Microsoft.ML.Core/Data/LinkedRowFilterCursorBase.cs index 12e79c622d..670f37ffe7 100644 --- a/src/Microsoft.ML.Core/Data/LinkedRowFilterCursorBase.cs +++ b/src/Microsoft.ML.Core/Data/LinkedRowFilterCursorBase.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.Core/Data/LinkedRowRootCursorBase.cs b/src/Microsoft.ML.Core/Data/LinkedRowRootCursorBase.cs index 4899526931..e1bca40a1a 100644 --- a/src/Microsoft.ML.Core/Data/LinkedRowRootCursorBase.cs +++ b/src/Microsoft.ML.Core/Data/LinkedRowRootCursorBase.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. @@ -50,4 +50,4 @@ public override ValueGetter GetGetter(DataViewSchema.Column colu return Input.GetGetter(column); } } -} \ No newline at end of file +} diff --git a/src/Microsoft.ML.Core/Data/ModelHeader.cs b/src/Microsoft.ML.Core/Data/ModelHeader.cs index 19850d3f0e..385fb6d068 100644 --- a/src/Microsoft.ML.Core/Data/ModelHeader.cs +++ b/src/Microsoft.ML.Core/Data/ModelHeader.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.Core/Data/ModelLoadContext.cs b/src/Microsoft.ML.Core/Data/ModelLoadContext.cs index 301e0f7a93..50897fcce8 100644 --- a/src/Microsoft.ML.Core/Data/ModelLoadContext.cs +++ b/src/Microsoft.ML.Core/Data/ModelLoadContext.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.Core/Data/ModelLoading.cs b/src/Microsoft.ML.Core/Data/ModelLoading.cs index dfced6e610..c186e91bfe 100644 --- a/src/Microsoft.ML.Core/Data/ModelLoading.cs +++ b/src/Microsoft.ML.Core/Data/ModelLoading.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. @@ -362,4 +362,4 @@ public bool TryLoadTextStream(string name, Action action) return true; } } -} \ No newline at end of file +} diff --git a/src/Microsoft.ML.Core/Data/ModelSaveContext.cs b/src/Microsoft.ML.Core/Data/ModelSaveContext.cs index 14f133bef9..245e788702 100644 --- a/src/Microsoft.ML.Core/Data/ModelSaveContext.cs +++ b/src/Microsoft.ML.Core/Data/ModelSaveContext.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. @@ -257,4 +257,4 @@ public void Dispose() } } } -} \ No newline at end of file +} diff --git a/src/Microsoft.ML.Core/Data/ModelSaving.cs b/src/Microsoft.ML.Core/Data/ModelSaving.cs index 51e0073079..e0f80965dd 100644 --- a/src/Microsoft.ML.Core/Data/ModelSaving.cs +++ b/src/Microsoft.ML.Core/Data/ModelSaving.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. @@ -88,4 +88,4 @@ internal void SaveSubModel(string dir, Action fn) } } } -} \ No newline at end of file +} diff --git a/src/Microsoft.ML.Core/Data/ProgressReporter.cs b/src/Microsoft.ML.Core/Data/ProgressReporter.cs index d5be2a4197..e00dd2183d 100644 --- a/src/Microsoft.ML.Core/Data/ProgressReporter.cs +++ b/src/Microsoft.ML.Core/Data/ProgressReporter.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. @@ -407,17 +407,17 @@ public void Log(ProgressChannel source, ProgressEvent.EventKind kind, ProgressEn } switch (kind) { - case ProgressEvent.EventKind.Stop: - _ectx.Assert(entry == null); - info.IsFinished = true; - _pendingEvents.Enqueue(new ProgressEvent(info.Index, info.Name, info.StartTime, ProgressEvent.EventKind.Stop)); - break; - default: - _ectx.Assert(entry != null); - _ectx.Assert(kind == ProgressEvent.EventKind.Progress); - _ectx.Assert(!info.IsFinished); - _pendingEvents.Enqueue(new ProgressEvent(info.Index, info.Name, info.StartTime, entry)); - break; + case ProgressEvent.EventKind.Stop: + _ectx.Assert(entry == null); + info.IsFinished = true; + _pendingEvents.Enqueue(new ProgressEvent(info.Index, info.Name, info.StartTime, ProgressEvent.EventKind.Stop)); + break; + default: + _ectx.Assert(entry != null); + _ectx.Assert(kind == ProgressEvent.EventKind.Progress); + _ectx.Assert(!info.IsFinished); + _pendingEvents.Enqueue(new ProgressEvent(info.Index, info.Name, info.StartTime, entry)); + break; } } diff --git a/src/Microsoft.ML.Core/Data/Repository.cs b/src/Microsoft.ML.Core/Data/Repository.cs index 35f20b598d..977e97a429 100644 --- a/src/Microsoft.ML.Core/Data/Repository.cs +++ b/src/Microsoft.ML.Core/Data/Repository.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. @@ -491,7 +491,7 @@ public Entry OpenEntryOrNull(string dir, string name) if (!_entries.TryGetValue(pathEnt, out entry)) { //Read old zip file that use backslash in filename - var pathEntTmp = pathEnt.Replace("/","\\"); + var pathEntTmp = pathEnt.Replace("/", "\\"); if (!_entries.TryGetValue(pathEntTmp, out entry)) { return null; diff --git a/src/Microsoft.ML.Core/Data/RoleMappedSchema.cs b/src/Microsoft.ML.Core/Data/RoleMappedSchema.cs index d8a12d90cd..32b5e7107a 100644 --- a/src/Microsoft.ML.Core/Data/RoleMappedSchema.cs +++ b/src/Microsoft.ML.Core/Data/RoleMappedSchema.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. @@ -486,4 +486,4 @@ public RoleMappedData(IDataView data, string label, string feature, Contracts.CheckValueOrNull(custom); } } -} \ No newline at end of file +} diff --git a/src/Microsoft.ML.Core/Data/RootCursorBase.cs b/src/Microsoft.ML.Core/Data/RootCursorBase.cs index fda909fc66..000c43fc6d 100644 --- a/src/Microsoft.ML.Core/Data/RootCursorBase.cs +++ b/src/Microsoft.ML.Core/Data/RootCursorBase.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. @@ -78,4 +78,4 @@ public sealed override bool MoveNext() /// protected abstract bool MoveNextCore(); } -} \ No newline at end of file +} diff --git a/src/Microsoft.ML.Core/Data/ServerChannel.cs b/src/Microsoft.ML.Core/Data/ServerChannel.cs index 5165febd75..306c19e654 100644 --- a/src/Microsoft.ML.Core/Data/ServerChannel.cs +++ b/src/Microsoft.ML.Core/Data/ServerChannel.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.Core/Data/SynchronizedCursorBase.cs b/src/Microsoft.ML.Core/Data/SynchronizedCursorBase.cs index 4af9e8dee9..26799aa1b8 100644 --- a/src/Microsoft.ML.Core/Data/SynchronizedCursorBase.cs +++ b/src/Microsoft.ML.Core/Data/SynchronizedCursorBase.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.Core/EntryPoints/EntryPointModuleAttribute.cs b/src/Microsoft.ML.Core/EntryPoints/EntryPointModuleAttribute.cs index dc3eb7e6ab..1dcfd675c1 100644 --- a/src/Microsoft.ML.Core/EntryPoints/EntryPointModuleAttribute.cs +++ b/src/Microsoft.ML.Core/EntryPoints/EntryPointModuleAttribute.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.Core/EntryPoints/EntryPointUtils.cs b/src/Microsoft.ML.Core/EntryPoints/EntryPointUtils.cs index 52325dc6c1..3cf2e81016 100644 --- a/src/Microsoft.ML.Core/EntryPoints/EntryPointUtils.cs +++ b/src/Microsoft.ML.Core/EntryPoints/EntryPointUtils.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.Core/EntryPoints/ModuleArgs.cs b/src/Microsoft.ML.Core/EntryPoints/ModuleArgs.cs index d8a48cb8d1..867df0a648 100644 --- a/src/Microsoft.ML.Core/EntryPoints/ModuleArgs.cs +++ b/src/Microsoft.ML.Core/EntryPoints/ModuleArgs.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.Core/EntryPoints/PredictorModel.cs b/src/Microsoft.ML.Core/EntryPoints/PredictorModel.cs index 95c19b4b3d..aef1b8a298 100644 --- a/src/Microsoft.ML.Core/EntryPoints/PredictorModel.cs +++ b/src/Microsoft.ML.Core/EntryPoints/PredictorModel.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. @@ -66,4 +66,4 @@ private protected PredictorModel() [BestFriend] internal abstract RoleMappedSchema GetTrainingSchema(IHostEnvironment env); } -} \ No newline at end of file +} diff --git a/src/Microsoft.ML.Core/EntryPoints/TransformModel.cs b/src/Microsoft.ML.Core/EntryPoints/TransformModel.cs index 56da40c02b..8e2ddb7e66 100644 --- a/src/Microsoft.ML.Core/EntryPoints/TransformModel.cs +++ b/src/Microsoft.ML.Core/EntryPoints/TransformModel.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.Core/Environment/ConsoleEnvironment.cs b/src/Microsoft.ML.Core/Environment/ConsoleEnvironment.cs index 27efcc185d..255c198161 100644 --- a/src/Microsoft.ML.Core/Environment/ConsoleEnvironment.cs +++ b/src/Microsoft.ML.Core/Environment/ConsoleEnvironment.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. @@ -338,7 +338,7 @@ public Channel(ConsoleEnvironment root, ChannelProviderBase parent, string short protected override void Dispose(bool disposing) { - if(disposing) + if (disposing) { Watch.Stop(); Root._consoleWriter.ChannelDisposed(this); diff --git a/src/Microsoft.ML.Core/Environment/HostEnvironmentBase.cs b/src/Microsoft.ML.Core/Environment/HostEnvironmentBase.cs index 37eebc4322..4161e81f2b 100644 --- a/src/Microsoft.ML.Core/Environment/HostEnvironmentBase.cs +++ b/src/Microsoft.ML.Core/Environment/HostEnvironmentBase.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.Core/Environment/TelemetryMessage.cs b/src/Microsoft.ML.Core/Environment/TelemetryMessage.cs index 677b26bc64..a6b9a22481 100644 --- a/src/Microsoft.ML.Core/Environment/TelemetryMessage.cs +++ b/src/Microsoft.ML.Core/Environment/TelemetryMessage.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.Core/Prediction/IPredictor.cs b/src/Microsoft.ML.Core/Prediction/IPredictor.cs index 5b2f689ef3..75d7f48dc2 100644 --- a/src/Microsoft.ML.Core/Prediction/IPredictor.cs +++ b/src/Microsoft.ML.Core/Prediction/IPredictor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.Core/Prediction/ITrainer.cs b/src/Microsoft.ML.Core/Prediction/ITrainer.cs index 92ab5bf885..a6622a5269 100644 --- a/src/Microsoft.ML.Core/Prediction/ITrainer.cs +++ b/src/Microsoft.ML.Core/Prediction/ITrainer.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.Core/Prediction/ITree.cs b/src/Microsoft.ML.Core/Prediction/ITree.cs index 9b07acdef7..5371b8c6c3 100644 --- a/src/Microsoft.ML.Core/Prediction/ITree.cs +++ b/src/Microsoft.ML.Core/Prediction/ITree.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.Core/Properties/AssemblyInfo.cs b/src/Microsoft.ML.Core/Properties/AssemblyInfo.cs index 32200eeef4..f55fb41166 100644 --- a/src/Microsoft.ML.Core/Properties/AssemblyInfo.cs +++ b/src/Microsoft.ML.Core/Properties/AssemblyInfo.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.Core/Utilities/ArrayUtils.cs b/src/Microsoft.ML.Core/Utilities/ArrayUtils.cs index 765f752b31..4c23831917 100644 --- a/src/Microsoft.ML.Core/Utilities/ArrayUtils.cs +++ b/src/Microsoft.ML.Core/Utilities/ArrayUtils.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.Core/Utilities/BigArray.cs b/src/Microsoft.ML.Core/Utilities/BigArray.cs index e68697a1a5..35964998ec 100644 --- a/src/Microsoft.ML.Core/Utilities/BigArray.cs +++ b/src/Microsoft.ML.Core/Utilities/BigArray.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.Core/Utilities/BinFinder.cs b/src/Microsoft.ML.Core/Utilities/BinFinder.cs index 81b1d01dc8..ed516fe8ff 100644 --- a/src/Microsoft.ML.Core/Utilities/BinFinder.cs +++ b/src/Microsoft.ML.Core/Utilities/BinFinder.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.Core/Utilities/BitUtils.cs b/src/Microsoft.ML.Core/Utilities/BitUtils.cs index e138d1f148..fc3e4a37e1 100644 --- a/src/Microsoft.ML.Core/Utilities/BitUtils.cs +++ b/src/Microsoft.ML.Core/Utilities/BitUtils.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.Core/Utilities/CharUtils.cs b/src/Microsoft.ML.Core/Utilities/CharUtils.cs index 6c175e3e33..52ede611af 100644 --- a/src/Microsoft.ML.Core/Utilities/CharUtils.cs +++ b/src/Microsoft.ML.Core/Utilities/CharUtils.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.Core/Utilities/CmdIndenter.cs b/src/Microsoft.ML.Core/Utilities/CmdIndenter.cs index da6e8b821f..8f5eb02ce5 100644 --- a/src/Microsoft.ML.Core/Utilities/CmdIndenter.cs +++ b/src/Microsoft.ML.Core/Utilities/CmdIndenter.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. @@ -37,7 +37,7 @@ private static bool TryProduceIndentString(string text, IndentedTextWriter itw) string[] tokens; if (!CmdParser.LexString(text, out tokens)) return false; - for (var i = 0; i < tokens.Length; ) + for (var i = 0; i < tokens.Length;) { //We in last token, or next token don't equal to '='. if (i + 1 == tokens.Length || tokens[i + 1] != "=") diff --git a/src/Microsoft.ML.Core/Utilities/Contracts.cs b/src/Microsoft.ML.Core/Utilities/Contracts.cs index d597713d4d..58ed5c96ac 100644 --- a/src/Microsoft.ML.Core/Utilities/Contracts.cs +++ b/src/Microsoft.ML.Core/Utilities/Contracts.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.Core/Utilities/DoubleParser.cs b/src/Microsoft.ML.Core/Utilities/DoubleParser.cs index d8b59afd52..53b885a518 100644 --- a/src/Microsoft.ML.Core/Utilities/DoubleParser.cs +++ b/src/Microsoft.ML.Core/Utilities/DoubleParser.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. @@ -265,7 +265,7 @@ public static bool TryParse(ReadOnlySpan span, out Single value, out int i res *= tmp; value = (Single)res; - LDone: +LDone: if (neg) value = -value; @@ -449,7 +449,7 @@ public static bool TryParse(ReadOnlySpan span, out Double value, out int i mul = (ulong)e2 << 52; unsafe { value *= *(Double*)&mul; } - LDone: +LDone: if (neg) value = -value; @@ -634,7 +634,7 @@ private static bool TryParseCore(ReadOnlySpan span, ref int ich, ref bool if (span[i] != decimalMarker) goto LAfterDigits; - LPoint: +LPoint: Contracts.Assert(i < span.Length); Contracts.Assert(span[i] == decimalMarker); @@ -660,7 +660,7 @@ private static bool TryParseCore(ReadOnlySpan span, ref int ich, ref bool } } - LAfterDigits: +LAfterDigits: Contracts.Assert(i < span.Length); if (!digits) return false; diff --git a/src/Microsoft.ML.Core/Utilities/FixedSizeQueue.cs b/src/Microsoft.ML.Core/Utilities/FixedSizeQueue.cs index c4b510d18d..99c6d982d0 100644 --- a/src/Microsoft.ML.Core/Utilities/FixedSizeQueue.cs +++ b/src/Microsoft.ML.Core/Utilities/FixedSizeQueue.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.Core/Utilities/FloatUtils.cs b/src/Microsoft.ML.Core/Utilities/FloatUtils.cs index eaf36000fe..8498ac8a79 100644 --- a/src/Microsoft.ML.Core/Utilities/FloatUtils.cs +++ b/src/Microsoft.ML.Core/Utilities/FloatUtils.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.Core/Utilities/HashArray.cs b/src/Microsoft.ML.Core/Utilities/HashArray.cs index 087de56e4c..a75eaa305f 100644 --- a/src/Microsoft.ML.Core/Utilities/HashArray.cs +++ b/src/Microsoft.ML.Core/Utilities/HashArray.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. @@ -286,4 +286,4 @@ public static int ExpandPrime(int oldSize) } } } -} \ No newline at end of file +} diff --git a/src/Microsoft.ML.Core/Utilities/Hashing.cs b/src/Microsoft.ML.Core/Utilities/Hashing.cs index 6215a9bbcd..2d9d63a48c 100644 --- a/src/Microsoft.ML.Core/Utilities/Hashing.cs +++ b/src/Microsoft.ML.Core/Utilities/Hashing.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.Core/Utilities/Heap.cs b/src/Microsoft.ML.Core/Utilities/Heap.cs index 3d54f7fda3..9744248956 100644 --- a/src/Microsoft.ML.Core/Utilities/Heap.cs +++ b/src/Microsoft.ML.Core/Utilities/Heap.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.Core/Utilities/HybridMemoryStream.cs b/src/Microsoft.ML.Core/Utilities/HybridMemoryStream.cs index 7f334a47f2..6683cacc20 100644 --- a/src/Microsoft.ML.Core/Utilities/HybridMemoryStream.cs +++ b/src/Microsoft.ML.Core/Utilities/HybridMemoryStream.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.Core/Utilities/IndentedTextWriterExtensions.cs b/src/Microsoft.ML.Core/Utilities/IndentedTextWriterExtensions.cs index fd733dc60c..6735d424d6 100644 --- a/src/Microsoft.ML.Core/Utilities/IndentedTextWriterExtensions.cs +++ b/src/Microsoft.ML.Core/Utilities/IndentedTextWriterExtensions.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. @@ -45,4 +45,4 @@ public static void WriteLineNoTabs(this IndentedTextWriter writer) writer.WriteLineNoTabs(string.Empty); } } -} \ No newline at end of file +} diff --git a/src/Microsoft.ML.Core/Utilities/LineParser.cs b/src/Microsoft.ML.Core/Utilities/LineParser.cs index e9532cbb06..6f147f505d 100644 --- a/src/Microsoft.ML.Core/Utilities/LineParser.cs +++ b/src/Microsoft.ML.Core/Utilities/LineParser.cs @@ -65,4 +65,4 @@ private static float[] AllocateFixedSizeArrayToStoreParsedValues(ReadOnlySpan DownloadFromUrlWithRetryAsync(IHostEnvironment env, I { downloadResult += $"DownloadFailed with exception {ex.Message}" + @"\n"; // ignore any Exception and retrying download - ch.Warning($"{i+1} - th try: Dowload {fileName} from {url} fail with exception {ex.Message}"); + ch.Warning($"{i + 1} - th try: Dowload {fileName} from {url} fail with exception {ex.Message}"); } } @@ -292,7 +292,7 @@ private Exception DownloadResource(IHostEnvironment env, IChannel ch, WebClient task.Wait(); int count = task.Result; - if(count <= 0) + if (count <= 0) { break; } diff --git a/src/Microsoft.ML.Core/Utilities/Stats.cs b/src/Microsoft.ML.Core/Utilities/Stats.cs index eba00885aa..d4fc33c626 100644 --- a/src/Microsoft.ML.Core/Utilities/Stats.cs +++ b/src/Microsoft.ML.Core/Utilities/Stats.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.Core/Utilities/Stream.cs b/src/Microsoft.ML.Core/Utilities/Stream.cs index 218ceb5962..93af2a167b 100644 --- a/src/Microsoft.ML.Core/Utilities/Stream.cs +++ b/src/Microsoft.ML.Core/Utilities/Stream.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.Core/Utilities/SubsetStream.cs b/src/Microsoft.ML.Core/Utilities/SubsetStream.cs index 9b33ba182e..1a8335ca38 100644 --- a/src/Microsoft.ML.Core/Utilities/SubsetStream.cs +++ b/src/Microsoft.ML.Core/Utilities/SubsetStream.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.Core/Utilities/SummaryStatistics.cs b/src/Microsoft.ML.Core/Utilities/SummaryStatistics.cs index 075ff02c04..a85e71749b 100644 --- a/src/Microsoft.ML.Core/Utilities/SummaryStatistics.cs +++ b/src/Microsoft.ML.Core/Utilities/SummaryStatistics.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.Core/Utilities/SupervisedBinFinder.cs b/src/Microsoft.ML.Core/Utilities/SupervisedBinFinder.cs index a94983057c..95deda4944 100644 --- a/src/Microsoft.ML.Core/Utilities/SupervisedBinFinder.cs +++ b/src/Microsoft.ML.Core/Utilities/SupervisedBinFinder.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.Core/Utilities/TextReaderStream.cs b/src/Microsoft.ML.Core/Utilities/TextReaderStream.cs index d647170943..beef79eca6 100644 --- a/src/Microsoft.ML.Core/Utilities/TextReaderStream.cs +++ b/src/Microsoft.ML.Core/Utilities/TextReaderStream.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. @@ -184,4 +184,4 @@ public override void Write(byte[] buffer, int offset, int count) public override void SetLength(long value) => throw Contracts.ExceptNotSupp("Stream is not writable."); } -} \ No newline at end of file +} diff --git a/src/Microsoft.ML.Core/Utilities/ThreadUtils.cs b/src/Microsoft.ML.Core/Utilities/ThreadUtils.cs index 6ad2730e2f..0cfe9fc976 100644 --- a/src/Microsoft.ML.Core/Utilities/ThreadUtils.cs +++ b/src/Microsoft.ML.Core/Utilities/ThreadUtils.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.Core/Utilities/Tree.cs b/src/Microsoft.ML.Core/Utilities/Tree.cs index 8aecd2be7a..73bc44ffe4 100644 --- a/src/Microsoft.ML.Core/Utilities/Tree.cs +++ b/src/Microsoft.ML.Core/Utilities/Tree.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.Core/Utilities/Utils.cs b/src/Microsoft.ML.Core/Utilities/Utils.cs index 6cc8dcc1c1..b734f2bd85 100644 --- a/src/Microsoft.ML.Core/Utilities/Utils.cs +++ b/src/Microsoft.ML.Core/Utilities/Utils.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.Core/Utilities/VBufferUtils.cs b/src/Microsoft.ML.Core/Utilities/VBufferUtils.cs index cde6e4ec24..03fc8c3c1c 100644 --- a/src/Microsoft.ML.Core/Utilities/VBufferUtils.cs +++ b/src/Microsoft.ML.Core/Utilities/VBufferUtils.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.CpuMath/AlignedArray.cs b/src/Microsoft.ML.CpuMath/AlignedArray.cs index 6687022e8f..71e9db2e4c 100644 --- a/src/Microsoft.ML.CpuMath/AlignedArray.cs +++ b/src/Microsoft.ML.CpuMath/AlignedArray.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. @@ -206,4 +206,4 @@ public void GetRawBuffer(out float[] items, out int offset) offset = _base; } } -} \ No newline at end of file +} diff --git a/src/Microsoft.ML.CpuMath/AlignedMatrix.cs b/src/Microsoft.ML.CpuMath/AlignedMatrix.cs index 05a8764edb..956b2c8fbc 100644 --- a/src/Microsoft.ML.CpuMath/AlignedMatrix.cs +++ b/src/Microsoft.ML.CpuMath/AlignedMatrix.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. @@ -676,4 +676,4 @@ IEnumerator IEnumerable.GetEnumerator() return GetEnumerator(); } } -} \ No newline at end of file +} diff --git a/src/Microsoft.ML.CpuMath/CpuAligenedMathUtils.cs b/src/Microsoft.ML.CpuMath/CpuAligenedMathUtils.cs index 64709c0aa6..b13a3be47f 100644 --- a/src/Microsoft.ML.CpuMath/CpuAligenedMathUtils.cs +++ b/src/Microsoft.ML.CpuMath/CpuAligenedMathUtils.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.CpuMath/CpuMathUtils.netstandard.cs b/src/Microsoft.ML.CpuMath/CpuMathUtils.netstandard.cs index deed03ba3e..e9f3f40f0e 100644 --- a/src/Microsoft.ML.CpuMath/CpuMathUtils.netstandard.cs +++ b/src/Microsoft.ML.CpuMath/CpuMathUtils.netstandard.cs @@ -445,4 +445,4 @@ public static void SdcaL1UpdateSparse(float primalUpdate, int count, ReadOnlySpa } } } -} \ No newline at end of file +} diff --git a/src/Microsoft.ML.CpuMath/EigenUtils.cs b/src/Microsoft.ML.CpuMath/EigenUtils.cs index 9b12e4e58b..e776217d06 100644 --- a/src/Microsoft.ML.CpuMath/EigenUtils.cs +++ b/src/Microsoft.ML.CpuMath/EigenUtils.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. @@ -114,7 +114,7 @@ private static void Tred(float[] a, float[] d, float[] e, float[] z, int n) return; } // .......... for i=n step -1 until 2 do -- .......... - for (i = n; i-- > 1; ) + for (i = n; i-- > 1;) { l = i - 1; h = 0; @@ -150,7 +150,7 @@ private static void Tred(float[] a, float[] d, float[] e, float[] z, int n) } for (k = 0; k < i; ++k) { - d[k] = (float) (d[k]/scale); + d[k] = (float)(d[k] / scale); h += d[k] * d[k]; } @@ -441,4 +441,4 @@ private static int Imtql(float[] d, float[] e, float[] z, int n) return 0; } } -} \ No newline at end of file +} diff --git a/src/Microsoft.ML.CpuMath/FactorizationMachine/AvxIntrinsics.cs b/src/Microsoft.ML.CpuMath/FactorizationMachine/AvxIntrinsics.cs index e97f28b461..539682659f 100644 --- a/src/Microsoft.ML.CpuMath/FactorizationMachine/AvxIntrinsics.cs +++ b/src/Microsoft.ML.CpuMath/FactorizationMachine/AvxIntrinsics.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. @@ -64,7 +64,7 @@ public static unsafe void CalculateIntermediateVariables(int* fieldIndices, int* float linearResponse = 0; float latentResponse = 0; - Unsafe.InitBlock(pq, 0, (uint)(m*m*d*sizeof(float))); + Unsafe.InitBlock(pq, 0, (uint)(m * m * d * sizeof(float))); Vector256 y = Vector256.Zero; Vector256 tmp = Vector256.Zero; @@ -165,7 +165,7 @@ public static unsafe void CalculateGradientAndUpdate(int* fieldIndices, int* fea float* phv = latentAccumulatedSquaredGrads; Vector256 wei = Vector256.Create(weight); - Vector256 s= Vector256.Create(slope); + Vector256 s = Vector256.Create(slope); Vector256 lr = Vector256.Create(learningRate); Vector256 lambdav = Vector256.Create(lambdaLatent); @@ -205,7 +205,7 @@ public static unsafe void CalculateGradientAndUpdate(int* fieldIndices, int* fea // Calculate loss function's gradient. if (fprime == f) - tmp = MultiplyAddNegated(v, x, q); + tmp = MultiplyAddNegated(v, x, q); gLatent = MultiplyAdd(sx, tmp, gLatent); gLatent = Avx.Multiply(wei, gLatent); @@ -221,4 +221,4 @@ public static unsafe void CalculateGradientAndUpdate(int* fieldIndices, int* fea } } } -} \ No newline at end of file +} diff --git a/src/Microsoft.ML.CpuMath/FactorizationMachine/FactorizationMachineInterface.cs b/src/Microsoft.ML.CpuMath/FactorizationMachine/FactorizationMachineInterface.cs index a82a4ca71f..2c94d42175 100644 --- a/src/Microsoft.ML.CpuMath/FactorizationMachine/FactorizationMachineInterface.cs +++ b/src/Microsoft.ML.CpuMath/FactorizationMachine/FactorizationMachineInterface.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. @@ -37,4 +37,4 @@ private static extern void CalculateGradientAndUpdateNative(float lambdaLinear, int count, int* /*const*/ fieldIndices, int* /*const*/ featureIndices, float* /*const*/ featureValues, float* /*const*/ latentSum, float slope, float* linearWeights, float* latentWeights, float* linearAccumulatedSquaredGrads, float* latentAccumulatedSquaredGrads); } -} \ No newline at end of file +} diff --git a/src/Microsoft.ML.CpuMath/FactorizationMachine/FactorizationMachineInterface.netcoreapp.cs b/src/Microsoft.ML.CpuMath/FactorizationMachine/FactorizationMachineInterface.netcoreapp.cs index f940cb19ab..5bca2a8c8a 100644 --- a/src/Microsoft.ML.CpuMath/FactorizationMachine/FactorizationMachineInterface.netcoreapp.cs +++ b/src/Microsoft.ML.CpuMath/FactorizationMachine/FactorizationMachineInterface.netcoreapp.cs @@ -72,4 +72,4 @@ public static void CalculateGradientAndUpdate(float lambdaLinear, float lambdaLa } } } -} \ No newline at end of file +} diff --git a/src/Microsoft.ML.CpuMath/ICpuBuffer.cs b/src/Microsoft.ML.CpuMath/ICpuBuffer.cs index 5194a4bb42..c7f02ba029 100644 --- a/src/Microsoft.ML.CpuMath/ICpuBuffer.cs +++ b/src/Microsoft.ML.CpuMath/ICpuBuffer.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. @@ -84,4 +84,4 @@ internal interface ICpuFullMatrix : ICpuMatrix /// void ZeroItems(int[] indices); } -} \ No newline at end of file +} diff --git a/src/Microsoft.ML.CpuMath/IntUtils.cs b/src/Microsoft.ML.CpuMath/IntUtils.cs index c920624597..27f0a2c631 100644 --- a/src/Microsoft.ML.CpuMath/IntUtils.cs +++ b/src/Microsoft.ML.CpuMath/IntUtils.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.CpuMath/ProbabilityFunctions.cs b/src/Microsoft.ML.CpuMath/ProbabilityFunctions.cs index 45040f4fc5..47704ffe50 100644 --- a/src/Microsoft.ML.CpuMath/ProbabilityFunctions.cs +++ b/src/Microsoft.ML.CpuMath/ProbabilityFunctions.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.CpuMath/Thunk.cs b/src/Microsoft.ML.CpuMath/Thunk.cs index bd0931bd55..eb5eb22c8e 100644 --- a/src/Microsoft.ML.CpuMath/Thunk.cs +++ b/src/Microsoft.ML.CpuMath/Thunk.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.Data/Commands/CrossValidationCommand.cs b/src/Microsoft.ML.Data/Commands/CrossValidationCommand.cs index 9b40b3e150..7a3901205b 100644 --- a/src/Microsoft.ML.Data/Commands/CrossValidationCommand.cs +++ b/src/Microsoft.ML.Data/Commands/CrossValidationCommand.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.Data/Commands/DataCommand.cs b/src/Microsoft.ML.Data/Commands/DataCommand.cs index 3989662653..b9c9b00431 100644 --- a/src/Microsoft.ML.Data/Commands/DataCommand.cs +++ b/src/Microsoft.ML.Data/Commands/DataCommand.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. @@ -55,7 +55,7 @@ public abstract class ArgumentsBase public int? Parallel; [Argument(ArgumentType.Multiple, Visibility = ArgumentAttribute.VisibilityType.CmdLineOnly, - HelpText = "Transform", Name ="Transform", ShortName = "xf", SignatureType = typeof(SignatureDataTransform))] + HelpText = "Transform", Name = "Transform", ShortName = "xf", SignatureType = typeof(SignatureDataTransform))] public KeyValuePair>[] Transforms; } diff --git a/src/Microsoft.ML.Data/Commands/DefaultColumnNames.cs b/src/Microsoft.ML.Data/Commands/DefaultColumnNames.cs index 994880ef13..6e9178b05b 100644 --- a/src/Microsoft.ML.Data/Commands/DefaultColumnNames.cs +++ b/src/Microsoft.ML.Data/Commands/DefaultColumnNames.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.Data/Commands/EvaluateCommand.cs b/src/Microsoft.ML.Data/Commands/EvaluateCommand.cs index 50ea4ff9bc..30b33a9243 100644 --- a/src/Microsoft.ML.Data/Commands/EvaluateCommand.cs +++ b/src/Microsoft.ML.Data/Commands/EvaluateCommand.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.Data/Commands/SaveDataCommand.cs b/src/Microsoft.ML.Data/Commands/SaveDataCommand.cs index a998a0beff..647664ab09 100644 --- a/src/Microsoft.ML.Data/Commands/SaveDataCommand.cs +++ b/src/Microsoft.ML.Data/Commands/SaveDataCommand.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. @@ -220,4 +220,4 @@ public static void SaveDataView(IChannel ch, IDataSaver saver, IDataView view, S saver.SaveData(stream, view, cols.ToArray()); } } -} \ No newline at end of file +} diff --git a/src/Microsoft.ML.Data/Commands/SavePredictorCommand.cs b/src/Microsoft.ML.Data/Commands/SavePredictorCommand.cs index 82c25a2f7f..62680da8e2 100644 --- a/src/Microsoft.ML.Data/Commands/SavePredictorCommand.cs +++ b/src/Microsoft.ML.Data/Commands/SavePredictorCommand.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. @@ -232,4 +232,4 @@ public static void LoadModel(IHostEnvironment env, Stream modelStream, bool load } } } -} \ No newline at end of file +} diff --git a/src/Microsoft.ML.Data/Commands/ScoreCommand.cs b/src/Microsoft.ML.Data/Commands/ScoreCommand.cs index be31d17713..d6491ad6db 100644 --- a/src/Microsoft.ML.Data/Commands/ScoreCommand.cs +++ b/src/Microsoft.ML.Data/Commands/ScoreCommand.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. @@ -402,4 +402,4 @@ private static bool TryCreateBindableFromScorer(IHostEnvironment env, IPredictor env, out bindable, scorerSettings.Name, scorerSettings.GetSettingsString(), predictor); } } -} \ No newline at end of file +} diff --git a/src/Microsoft.ML.Data/Commands/ShowSchemaCommand.cs b/src/Microsoft.ML.Data/Commands/ShowSchemaCommand.cs index bd9485d92d..77e17afb8b 100644 --- a/src/Microsoft.ML.Data/Commands/ShowSchemaCommand.cs +++ b/src/Microsoft.ML.Data/Commands/ShowSchemaCommand.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.Data/Commands/TestCommand.cs b/src/Microsoft.ML.Data/Commands/TestCommand.cs index cf9f9210d2..d05667cb48 100644 --- a/src/Microsoft.ML.Data/Commands/TestCommand.cs +++ b/src/Microsoft.ML.Data/Commands/TestCommand.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. @@ -138,4 +138,4 @@ private void RunCore(IChannel ch) } } } -} \ No newline at end of file +} diff --git a/src/Microsoft.ML.Data/Commands/TrainCommand.cs b/src/Microsoft.ML.Data/Commands/TrainCommand.cs index c56126cca9..985b80d7cc 100644 --- a/src/Microsoft.ML.Data/Commands/TrainCommand.cs +++ b/src/Microsoft.ML.Data/Commands/TrainCommand.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.Data/Commands/TrainTestCommand.cs b/src/Microsoft.ML.Data/Commands/TrainTestCommand.cs index 3291a5f4d7..5f36f31f61 100644 --- a/src/Microsoft.ML.Data/Commands/TrainTestCommand.cs +++ b/src/Microsoft.ML.Data/Commands/TrainTestCommand.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. @@ -228,4 +228,4 @@ private void RunCore(IChannel ch, string cmd) } } } -} \ No newline at end of file +} diff --git a/src/Microsoft.ML.Data/Data/BufferBuilder.cs b/src/Microsoft.ML.Data/Data/BufferBuilder.cs index fce56d89a5..fd0c3a2896 100644 --- a/src/Microsoft.ML.Data/Data/BufferBuilder.cs +++ b/src/Microsoft.ML.Data/Data/BufferBuilder.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. @@ -222,7 +222,7 @@ public void AddFeature(int index, T value) // Insert this one. Find the right place. // REVIEW: Should we ever use binary search? int ivDst = _count; - for (;;) + for (; ; ) { if (--ivDst < 0) break; @@ -268,7 +268,7 @@ private void SortAndSumDups() int ivSrc = 0; int ivDst = 0; - for (;;) + for (; ; ) { if (ivSrc >= _count) { diff --git a/src/Microsoft.ML.Data/Data/Combiner.cs b/src/Microsoft.ML.Data/Data/Combiner.cs index 0523b45357..c7684cad1f 100644 --- a/src/Microsoft.ML.Data/Data/Combiner.cs +++ b/src/Microsoft.ML.Data/Data/Combiner.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. @@ -130,4 +130,4 @@ private U4Adder() public override bool IsDefault(uint value) { return value == 0; } public override void Combine(ref uint dst, uint src) { dst += src; } } -} \ No newline at end of file +} diff --git a/src/Microsoft.ML.Data/Data/Conversion.cs b/src/Microsoft.ML.Data/Data/Conversion.cs index a338735a0e..99da124f03 100644 --- a/src/Microsoft.ML.Data/Data/Conversion.cs +++ b/src/Microsoft.ML.Data/Data/Conversion.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. @@ -1205,7 +1205,7 @@ private bool TryParseCore(ReadOnlySpan span, out ulong dst) dst = res; return true; - LFail: +LFail: dst = 0; return false; } @@ -1312,7 +1312,7 @@ private bool TryParseNonNegative(ReadOnlySpan span, out long result) result = res; return true; - LFail: +LFail: result = 0; return false; } diff --git a/src/Microsoft.ML.Data/Data/DataViewTypeManager.cs b/src/Microsoft.ML.Data/Data/DataViewTypeManager.cs index 467738de5b..1517c33128 100644 --- a/src/Microsoft.ML.Data/Data/DataViewTypeManager.cs +++ b/src/Microsoft.ML.Data/Data/DataViewTypeManager.cs @@ -55,7 +55,7 @@ internal static DataViewType GetDataViewType(Type type, IEnumerable t { //Filter attributes as we only care about DataViewTypeAttribute DataViewTypeAttribute typeAttr = null; - if(typeAttributes != null) + if (typeAttributes != null) { typeAttributes = typeAttributes.Where(attr => attr.GetType().IsSubclassOf(typeof(DataViewTypeAttribute))); if (typeAttributes.Count() > 1) @@ -90,7 +90,7 @@ internal static bool Knows(Type type, IEnumerable typeAttributes = nu { //Filter attributes as we only care about DataViewTypeAttribute DataViewTypeAttribute typeAttr = null; - if(typeAttributes != null) + if (typeAttributes != null) { typeAttributes = typeAttributes.Where(attr => attr.GetType().IsSubclassOf(typeof(DataViewTypeAttribute))); if (typeAttributes.Count() > 1) @@ -149,7 +149,7 @@ public static void Register(DataViewType dataViewType, Type type, IEnumerable 1) { - throw Contracts.ExceptParam(nameof(type), $"Type {type} has too many attributes."); + throw Contracts.ExceptParam(nameof(type), $"Type {type} has too many attributes."); } else if (typeAttributes.Count() == 1) { @@ -166,14 +166,14 @@ public static void Register(DataViewType dataViewType, Type type, IEnumerable - /// This function tells that should be representation of data in in - /// ML.NET's type system. The registered must be a standard C# object's type. - /// - /// Native type in C#. - /// The corresponding type of in ML.NET's type system. - /// The attached to . - public static void Register(DataViewType dataViewType, Type type, DataViewTypeAttribute typeAttribute = null) + /// + /// This function tells that should be representation of data in in + /// ML.NET's type system. The registered must be a standard C# object's type. + /// + /// Native type in C#. + /// The corresponding type of in ML.NET's type system. + /// The attached to . + public static void Register(DataViewType dataViewType, Type type, DataViewTypeAttribute typeAttribute = null) { lock (_lock) { diff --git a/src/Microsoft.ML.Data/Data/DataViewUtils.cs b/src/Microsoft.ML.Data/Data/DataViewUtils.cs index c639186c4e..a353925a86 100644 --- a/src/Microsoft.ML.Data/Data/DataViewUtils.cs +++ b/src/Microsoft.ML.Data/Data/DataViewUtils.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. @@ -375,11 +375,11 @@ private static DataViewRowCursor ConsolidateCore(IChannelProvider provider, Data // so they all handle their disposal internal to the thread. workers[t] = Utils.RunOnBackgroundThreadAsync(() => { - // This will be the last batch sent in the finally. If iteration proceeds without - // error, it will remain null, and be sent as a sentinel. If iteration results in - // an exception that we catch, the exception catching block will set this to an - // exception bearing block, and that will be passed along as the last block instead. - Batch lastBatch = null; + // This will be the last batch sent in the finally. If iteration proceeds without + // error, it will remain null, and be sent as a sentinel. If iteration results in + // an exception that we catch, the exception catching block will set this to an + // exception bearing block, and that will be passed along as the last block instead. + Batch lastBatch = null; try { using (localCursor) @@ -391,9 +391,9 @@ private static DataViewRowCursor ConsolidateCore(IChannelProvider provider, Data long oldBatch = 0; int count = 0; - // This event is used to synchronize ourselves using a MinWaiter - // so that we add batches to the consumer queue at the appropriate time. - ManualResetEventSlim waiterEvent = null; + // This event is used to synchronize ourselves using a MinWaiter + // so that we add batches to the consumer queue at the appropriate time. + ManualResetEventSlim waiterEvent = null; Action pushBatch = () => { @@ -402,26 +402,26 @@ private static DataViewRowCursor ConsolidateCore(IChannelProvider provider, Data var batchColumns = batchColumnPool.Get(); for (int i = 0; i < inPipes.Length; ++i) batchColumns[i] = inPipes[i].GetBatchColumnAndReset(); - // REVIEW: Is it worth not allocating new Batch object for each batch? - var batch = new Batch(batchColumnPool, batchColumns, count, oldBatch); + // REVIEW: Is it worth not allocating new Batch object for each batch? + var batch = new Batch(batchColumnPool, batchColumns, count, oldBatch); count = 0; - // The waiter event should never be null since this is only - // called after a point where waiter.Register has been called. - ch.AssertValue(waiterEvent); + // The waiter event should never be null since this is only + // called after a point where waiter.Register has been called. + ch.AssertValue(waiterEvent); waiterEvent.Wait(); waiterEvent = null; toConsume.Add(batch); } }; - // Handle the first one separately, then go into the main loop. - if (localCursor.MoveNext() && !done) + // Handle the first one separately, then go into the main loop. + if (localCursor.MoveNext() && !done) { oldBatch = localCursor.Batch; foreach (var pipe in inPipes) pipe.Fill(); count++; - // Register with the min waiter that we want to wait on this batch number. - waiterEvent = waiter.Register(oldBatch); + // Register with the min waiter that we want to wait on this batch number. + waiterEvent = waiter.Register(oldBatch); while (localCursor.MoveNext() && !done) { @@ -442,8 +442,8 @@ private static DataViewRowCursor ConsolidateCore(IChannelProvider provider, Data } catch (Exception ex) { - // Whoops, we won't be sending null as the sentinel now. - lastBatch = new Batch(ex); + // Whoops, we won't be sending null as the sentinel now. + lastBatch = new Batch(ex); toConsume.Add(new Batch(ex)); } finally @@ -452,9 +452,9 @@ private static DataViewRowCursor ConsolidateCore(IChannelProvider provider, Data { if (lastBatch == null) { - // If it wasn't null, this already sent along an exception bearing batch, in which - // case sending the sentinel is unnecessary and unhelpful. - toConsume.Add(null); + // If it wasn't null, this already sent along an exception bearing batch, in which + // case sending the sentinel is unnecessary and unhelpful. + toConsume.Add(null); } toConsume.CompleteAdding(); } diff --git a/src/Microsoft.ML.Data/Data/ILegacyDataLoader.cs b/src/Microsoft.ML.Data/Data/ILegacyDataLoader.cs index 847d43a2d6..5adedc81bd 100644 --- a/src/Microsoft.ML.Data/Data/ILegacyDataLoader.cs +++ b/src/Microsoft.ML.Data/Data/ILegacyDataLoader.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.Data/Data/IRowSeekable.cs b/src/Microsoft.ML.Data/Data/IRowSeekable.cs index 542ed888d3..d0d29f96db 100644 --- a/src/Microsoft.ML.Data/Data/IRowSeekable.cs +++ b/src/Microsoft.ML.Data/Data/IRowSeekable.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.Data/Data/ITransposeDataView.cs b/src/Microsoft.ML.Data/Data/ITransposeDataView.cs index 74431646b3..94783bcf67 100644 --- a/src/Microsoft.ML.Data/Data/ITransposeDataView.cs +++ b/src/Microsoft.ML.Data/Data/ITransposeDataView.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.Data/Data/RowCursorUtils.cs b/src/Microsoft.ML.Data/Data/RowCursorUtils.cs index 7c5cd1e28d..66574ad583 100644 --- a/src/Microsoft.ML.Data/Data/RowCursorUtils.cs +++ b/src/Microsoft.ML.Data/Data/RowCursorUtils.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.Data/Data/SchemaDefinition.cs b/src/Microsoft.ML.Data/Data/SchemaDefinition.cs index df47f535e9..3f1fad8fed 100644 --- a/src/Microsoft.ML.Data/Data/SchemaDefinition.cs +++ b/src/Microsoft.ML.Data/Data/SchemaDefinition.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.Data/DataLoadSave/Binary/BinaryLoader.cs b/src/Microsoft.ML.Data/DataLoadSave/Binary/BinaryLoader.cs index ec9703efb6..e235825736 100644 --- a/src/Microsoft.ML.Data/DataLoadSave/Binary/BinaryLoader.cs +++ b/src/Microsoft.ML.Data/DataLoadSave/Binary/BinaryLoader.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.Data/DataLoadSave/Binary/BinarySaver.cs b/src/Microsoft.ML.Data/DataLoadSave/Binary/BinarySaver.cs index b488fd5eb0..70f27303ea 100644 --- a/src/Microsoft.ML.Data/DataLoadSave/Binary/BinarySaver.cs +++ b/src/Microsoft.ML.Data/DataLoadSave/Binary/BinarySaver.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.Data/DataLoadSave/Binary/BlockLookup.cs b/src/Microsoft.ML.Data/DataLoadSave/Binary/BlockLookup.cs index ff5edd2014..b0b329033b 100644 --- a/src/Microsoft.ML.Data/DataLoadSave/Binary/BlockLookup.cs +++ b/src/Microsoft.ML.Data/DataLoadSave/Binary/BlockLookup.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.Data/DataLoadSave/Binary/CodecFactory.cs b/src/Microsoft.ML.Data/DataLoadSave/Binary/CodecFactory.cs index ef5b30b324..0a52b9a1aa 100644 --- a/src/Microsoft.ML.Data/DataLoadSave/Binary/CodecFactory.cs +++ b/src/Microsoft.ML.Data/DataLoadSave/Binary/CodecFactory.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.Data/DataLoadSave/Binary/Codecs.cs b/src/Microsoft.ML.Data/DataLoadSave/Binary/Codecs.cs index 4c8d99ee32..5c9be86b3a 100644 --- a/src/Microsoft.ML.Data/DataLoadSave/Binary/Codecs.cs +++ b/src/Microsoft.ML.Data/DataLoadSave/Binary/Codecs.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. @@ -159,7 +159,7 @@ private sealed class UnsafeTypeCodec : SimpleCodec where T : struct // Throws an exception if T is neither a TimeSpan nor a NumberType. private static DataViewType UnsafeColumnType(Type type) { - return type == typeof(TimeSpan) ? TimeSpanDataViewType.Instance : + return type == typeof(TimeSpan) ? TimeSpanDataViewType.Instance : type == typeof(DataViewRowId) ? (DataViewType)RowIdDataViewType.Instance : ColumnTypeExtensions.NumberTypeFromType(type); } diff --git a/src/Microsoft.ML.Data/DataLoadSave/Binary/CompressionKind.cs b/src/Microsoft.ML.Data/DataLoadSave/Binary/CompressionKind.cs index d15fbab15e..f20e39ba90 100644 --- a/src/Microsoft.ML.Data/DataLoadSave/Binary/CompressionKind.cs +++ b/src/Microsoft.ML.Data/DataLoadSave/Binary/CompressionKind.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.Data/DataLoadSave/Binary/Header.cs b/src/Microsoft.ML.Data/DataLoadSave/Binary/Header.cs index 75abdaef8c..021575f0a4 100644 --- a/src/Microsoft.ML.Data/DataLoadSave/Binary/Header.cs +++ b/src/Microsoft.ML.Data/DataLoadSave/Binary/Header.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.Data/DataLoadSave/Binary/IValueCodec.cs b/src/Microsoft.ML.Data/DataLoadSave/Binary/IValueCodec.cs index 299c45c98f..133a7106a6 100644 --- a/src/Microsoft.ML.Data/DataLoadSave/Binary/IValueCodec.cs +++ b/src/Microsoft.ML.Data/DataLoadSave/Binary/IValueCodec.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.Data/DataLoadSave/Binary/MemoryStreamPool.cs b/src/Microsoft.ML.Data/DataLoadSave/Binary/MemoryStreamPool.cs index cb5034c7af..7077325958 100644 --- a/src/Microsoft.ML.Data/DataLoadSave/Binary/MemoryStreamPool.cs +++ b/src/Microsoft.ML.Data/DataLoadSave/Binary/MemoryStreamPool.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.Data/DataLoadSave/Binary/UnsafeTypeOps.cs b/src/Microsoft.ML.Data/DataLoadSave/Binary/UnsafeTypeOps.cs index d56fe5bf32..1e0757af09 100644 --- a/src/Microsoft.ML.Data/DataLoadSave/Binary/UnsafeTypeOps.cs +++ b/src/Microsoft.ML.Data/DataLoadSave/Binary/UnsafeTypeOps.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.Data/DataLoadSave/CompositeDataLoader.cs b/src/Microsoft.ML.Data/DataLoadSave/CompositeDataLoader.cs index 3fccbebd20..2bf3f29351 100644 --- a/src/Microsoft.ML.Data/DataLoadSave/CompositeDataLoader.cs +++ b/src/Microsoft.ML.Data/DataLoadSave/CompositeDataLoader.cs @@ -120,7 +120,7 @@ public void Dispose() if (_disposed) return; - Transformer.Dispose(); + Transformer.Dispose(); _disposed = true; } diff --git a/src/Microsoft.ML.Data/DataLoadSave/DataLoaderExtensions.cs b/src/Microsoft.ML.Data/DataLoadSave/DataLoaderExtensions.cs index dde94416a8..ba52cd24b2 100644 --- a/src/Microsoft.ML.Data/DataLoadSave/DataLoaderExtensions.cs +++ b/src/Microsoft.ML.Data/DataLoadSave/DataLoaderExtensions.cs @@ -27,4 +27,4 @@ public static class DataLoaderExtensions public static IDataView Load(this IDataLoader loader, params string[] path) => loader.Load(new MultiFileSource(path)); } -} \ No newline at end of file +} diff --git a/src/Microsoft.ML.Data/DataLoadSave/DataOperationsCatalog.cs b/src/Microsoft.ML.Data/DataLoadSave/DataOperationsCatalog.cs index e7dbc556d4..72d3e07009 100644 --- a/src/Microsoft.ML.Data/DataLoadSave/DataOperationsCatalog.cs +++ b/src/Microsoft.ML.Data/DataLoadSave/DataOperationsCatalog.cs @@ -482,7 +482,7 @@ internal static IEnumerable CrossValidationSplit(IHostEnvironment Column = splitColumn, Min = (double)fold / numberOfFolds, Max = (double)(fold + 1) / numberOfFolds, - Complement=true, + Complement = true, IncludeMin = true, IncludeMax = true, }, data); @@ -528,11 +528,11 @@ internal static string CreateSplitColumn(IHostEnvironment env, ref IDataView dat var splitColumnName = data.Schema.GetTempColumnName("SplitColumn"); int? seedToUse; - if(seed.HasValue) + if (seed.HasValue) { seedToUse = seed.Value; } - else if(fallbackInEnvSeed) + else if (fallbackInEnvSeed) { IHostEnvironmentInternal seededEnv = (IHostEnvironmentInternal)env; seedToUse = seededEnv.Seed; diff --git a/src/Microsoft.ML.Data/DataLoadSave/Database/DatabaseLoaderCatalog.cs b/src/Microsoft.ML.Data/DataLoadSave/Database/DatabaseLoaderCatalog.cs index 011bd39612..675f3f39ab 100644 --- a/src/Microsoft.ML.Data/DataLoadSave/Database/DatabaseLoaderCatalog.cs +++ b/src/Microsoft.ML.Data/DataLoadSave/Database/DatabaseLoaderCatalog.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.Data/DataLoadSave/Database/DbExtensions.cs b/src/Microsoft.ML.Data/DataLoadSave/Database/DbExtensions.cs index 7a01d89232..f2ed7617e6 100644 --- a/src/Microsoft.ML.Data/DataLoadSave/Database/DbExtensions.cs +++ b/src/Microsoft.ML.Data/DataLoadSave/Database/DbExtensions.cs @@ -73,74 +73,74 @@ public static DbType ToDbType(this InternalDataKind dataKind) switch (dataKind) { case InternalDataKind.I1: - { - return DbType.SByte; - } + { + return DbType.SByte; + } case InternalDataKind.U1: - { - return DbType.Byte; - } + { + return DbType.Byte; + } case InternalDataKind.I2: - { - return DbType.Int16; - } + { + return DbType.Int16; + } case InternalDataKind.U2: - { - return DbType.UInt16; - } + { + return DbType.UInt16; + } case InternalDataKind.I4: - { - return DbType.Int32; - } + { + return DbType.Int32; + } case InternalDataKind.U4: - { - return DbType.UInt32; - } + { + return DbType.UInt32; + } case InternalDataKind.I8: - { - return DbType.Int64; - } + { + return DbType.Int64; + } case InternalDataKind.U8: - { - return DbType.UInt64; - } + { + return DbType.UInt64; + } case InternalDataKind.R4: - { - return DbType.Single; - } + { + return DbType.Single; + } case InternalDataKind.R8: - { - return DbType.Double; - } + { + return DbType.Double; + } case InternalDataKind.TX: - { - return DbType.String; - } + { + return DbType.String; + } case InternalDataKind.BL: - { - return DbType.Boolean; - } + { + return DbType.Boolean; + } case InternalDataKind.DT: - { - return DbType.DateTime; - } + { + return DbType.DateTime; + } default: - { - throw new NotSupportedException(); - } + { + throw new NotSupportedException(); + } } } } diff --git a/src/Microsoft.ML.Data/DataLoadSave/EstimatorChain.cs b/src/Microsoft.ML.Data/DataLoadSave/EstimatorChain.cs index b470bf464c..05afb8d9eb 100644 --- a/src/Microsoft.ML.Data/DataLoadSave/EstimatorChain.cs +++ b/src/Microsoft.ML.Data/DataLoadSave/EstimatorChain.cs @@ -109,7 +109,7 @@ public EstimatorChain AppendCacheCheckpoint(IHostEnvironment e { Contracts.CheckValue(env, nameof(env)); - if(_estimators.Length == 0) + if (_estimators.Length == 0) throw new InvalidOperationException("Current estimator chain has no estimator, can't append cache checkpoint."); if (_needCacheAfter.Last()) diff --git a/src/Microsoft.ML.Data/DataLoadSave/LegacyCompositeDataLoader.cs b/src/Microsoft.ML.Data/DataLoadSave/LegacyCompositeDataLoader.cs index 82ff23aa2f..ede65e9846 100644 --- a/src/Microsoft.ML.Data/DataLoadSave/LegacyCompositeDataLoader.cs +++ b/src/Microsoft.ML.Data/DataLoadSave/LegacyCompositeDataLoader.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.Data/DataLoadSave/MultiFileSource.cs b/src/Microsoft.ML.Data/DataLoadSave/MultiFileSource.cs index 3399978f9c..afb99cab8f 100644 --- a/src/Microsoft.ML.Data/DataLoadSave/MultiFileSource.cs +++ b/src/Microsoft.ML.Data/DataLoadSave/MultiFileSource.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.Data/DataLoadSave/Text/TextLoader.cs b/src/Microsoft.ML.Data/DataLoadSave/Text/TextLoader.cs index 551e99bbbc..e438ed5b84 100644 --- a/src/Microsoft.ML.Data/DataLoadSave/Text/TextLoader.cs +++ b/src/Microsoft.ML.Data/DataLoadSave/Text/TextLoader.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. @@ -1246,7 +1246,7 @@ internal TextLoader(IHostEnvironment env, Options options = null, IMultiStreamSo throw _host.ExceptUserArg(nameof(Options.AllowQuoting), "Quoting must be allowed if decimal marker and separator are the ',' character."); _decimalMarker = options.DecimalMarker; _escapeChar = options.EscapeChar; - if(_separators.Contains(_escapeChar)) + if (_separators.Contains(_escapeChar)) throw _host.ExceptUserArg(nameof(Options.EscapeChar), "EscapeChar '{0}' can't be used both as EscapeChar and separator", _escapeChar); _bindings = new Bindings(this, cols, headerFile, dataSample); @@ -1257,31 +1257,31 @@ private char NormalizeSeparator(string sep) { switch (sep) { - case "space": - case " ": - return ' '; - case "tab": - case "\t": - return '\t'; - case "comma": - case ",": - return ','; - case "colon": - case ":": - _host.CheckUserArg((_flags & OptionFlags.AllowSparse) == 0, nameof(Options.Separator), - "When the separator is colon, turn off allowSparse"); - return ':'; - case "semicolon": - case ";": - return ';'; - case "bar": - case "|": - return '|'; - default: - char ch = sep[0]; - if (sep.Length != 1 || ch < ' ' || '0' <= ch && ch <= '9' || ch == '"') - throw _host.ExceptUserArg(nameof(Options.Separator), "Illegal separator: '{0}'", sep); - return sep[0]; + case "space": + case " ": + return ' '; + case "tab": + case "\t": + return '\t'; + case "comma": + case ",": + return ','; + case "colon": + case ":": + _host.CheckUserArg((_flags & OptionFlags.AllowSparse) == 0, nameof(Options.Separator), + "When the separator is colon, turn off allowSparse"); + return ':'; + case "semicolon": + case ";": + return ';'; + case "bar": + case "|": + return '|'; + default: + char ch = sep[0]; + if (sep.Length != 1 || ch < ' ' || '0' <= ch && ch <= '9' || ch == '"') + throw _host.ExceptUserArg(nameof(Options.Separator), "Illegal separator: '{0}'", sep); + return sep[0]; } } @@ -1375,7 +1375,7 @@ private static bool TryParseSchema(IHost host, IMultiStreamSource files, error = false; options = optionsNew; - LDone: +LDone: return !error; } } @@ -1428,11 +1428,11 @@ private TextLoader(IHost host, ModelLoadContext ctx) acceptableFlags |= OptionFlags.AllowSparse; // Flags added on later versions of TextLoader: - if(ctx.Header.ModelVerWritten >= 0x0001000C) + if (ctx.Header.ModelVerWritten >= 0x0001000C) { acceptableFlags |= OptionFlags.ReadMultilines; } - if(ctx.Header.ModelVerWritten >= 0x0001000E) + if (ctx.Header.ModelVerWritten >= 0x0001000E) { acceptableFlags |= OptionFlags.MissingRealsAsNaNs; } @@ -1608,20 +1608,20 @@ internal static TextLoader CreateTextLoader(IHostEnvironment host, InternalDataKind dk; switch (memberInfo) { - case FieldInfo field: - if (!InternalDataKindExtensions.TryGetDataKind(field.FieldType.IsArray ? field.FieldType.GetElementType() : field.FieldType, out dk)) - throw Contracts.Except($"Field {memberInfo.Name} is of unsupported type."); + case FieldInfo field: + if (!InternalDataKindExtensions.TryGetDataKind(field.FieldType.IsArray ? field.FieldType.GetElementType() : field.FieldType, out dk)) + throw Contracts.Except($"Field {memberInfo.Name} is of unsupported type."); - break; + break; - case PropertyInfo property: - if (!InternalDataKindExtensions.TryGetDataKind(property.PropertyType.IsArray ? property.PropertyType.GetElementType() : property.PropertyType, out dk)) - throw Contracts.Except($"Property {memberInfo.Name} is of unsupported type."); - break; + case PropertyInfo property: + if (!InternalDataKindExtensions.TryGetDataKind(property.PropertyType.IsArray ? property.PropertyType.GetElementType() : property.PropertyType, out dk)) + throw Contracts.Except($"Property {memberInfo.Name} is of unsupported type."); + break; - default: - Contracts.Assert(false); - throw Contracts.ExceptNotSupp("Expected a FieldInfo or a PropertyInfo"); + default: + Contracts.Assert(false); + throw Contracts.ExceptNotSupp("Expected a FieldInfo or a PropertyInfo"); } column.Type = dk; diff --git a/src/Microsoft.ML.Data/DataLoadSave/Text/TextLoaderCursor.cs b/src/Microsoft.ML.Data/DataLoadSave/Text/TextLoaderCursor.cs index caa77bdccb..0c0aa146d4 100644 --- a/src/Microsoft.ML.Data/DataLoadSave/Text/TextLoaderCursor.cs +++ b/src/Microsoft.ML.Data/DataLoadSave/Text/TextLoaderCursor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. @@ -557,7 +557,7 @@ public bool LastFieldIncludesNewLine(string line, bool startsInsideQuoted = fals while (ichCur < ichLim) { ret = FieldIncludesNewLine(ref line, ref ichCur, ichLim, ref quotingError, false); - if(quotingError) + if (quotingError) return false; // Skip empty fields @@ -581,7 +581,7 @@ private bool FieldIncludesNewLine(ref string line, ref int ichCur, int ichLim, if (ichCur >= ichLim) // if there were only leading spaces on the line return startsInsideQuoted; - if(startsInsideQuoted || line[ichCur] == '"') + if (startsInsideQuoted || line[ichCur] == '"') { // Quoted Field Case @@ -662,7 +662,7 @@ private bool FieldIncludesNewLine(ref string line, ref int ichCur, int ichLim, // Unquoted field case. // An unquoted field shouldn't contain new lines - while(ichCur < ichLim && !IsSep(line[ichCur])) + while (ichCur < ichLim && !IsSep(line[ichCur])) { ichCur++; } @@ -780,7 +780,7 @@ private void ThreadProc() } } - LNext: +LNext: ; } } diff --git a/src/Microsoft.ML.Data/DataLoadSave/Text/TextLoaderParser.cs b/src/Microsoft.ML.Data/DataLoadSave/Text/TextLoaderParser.cs index 23e382c5e3..241b40ea72 100644 --- a/src/Microsoft.ML.Data/DataLoadSave/Text/TextLoaderParser.cs +++ b/src/Microsoft.ML.Data/DataLoadSave/Text/TextLoaderParser.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. @@ -253,7 +253,7 @@ private sealed class PrimitivePipe : ColumnPipe public override bool HasNA { get; } - public override bool IsReal { get; } + public override bool IsReal { get; } public PrimitivePipe(RowSet rows, PrimitiveDataViewType type, TryParseMapper conv) : base(rows) @@ -387,7 +387,7 @@ public bool Consume(int index, ref ReadOnlyMemory text) Array.Clear(_values, _count, _values.Length - _count); Array.Resize(ref _values, _size); } - for (int ii = _count; --ii >= 0; ) + for (int ii = _count; --ii >= 0;) { int i = _indices[ii]; Contracts.Assert(ii <= i); @@ -999,7 +999,7 @@ public int GatherFields(ReadOnlyMemory lineSpan, ReadOnlySpan span, Fields.Spans[Fields.Count] = scan.Span; Fields.Indices[Fields.Count++] = src; } - else if(_keepEmpty) + else if (_keepEmpty) { Fields.EnsureSpace(); Fields.Spans[Fields.Count] = _blank; @@ -1437,7 +1437,7 @@ private void ProcessVec(int srcLim, FieldSet fields, ColInfo info, ColumnPipe v, } } - if(_missingRealsAsNaNs && isrc >= fields.Count && v.IsReal) + if (_missingRealsAsNaNs && isrc >= fields.Count && v.IsReal) { // If the user has set the MissingRealsAsNaNs option to true, // And there are missing columns on a given row, @@ -1471,7 +1471,7 @@ private void ProcessOne(FieldSet vs, ColInfo info, ColumnPipe v, int irow, long v.Rows.Stats.LogBadValue(line, info.Name); } } - else if(_missingRealsAsNaNs && v.IsReal) + else if (_missingRealsAsNaNs && v.IsReal) { // If the user has set the MissingRealsAsNaNs option to true, // And there are missing columns on a given row, diff --git a/src/Microsoft.ML.Data/DataLoadSave/Text/TextLoaderSaverCatalog.cs b/src/Microsoft.ML.Data/DataLoadSave/Text/TextLoaderSaverCatalog.cs index cddd2e3a22..474405b5cc 100644 --- a/src/Microsoft.ML.Data/DataLoadSave/Text/TextLoaderSaverCatalog.cs +++ b/src/Microsoft.ML.Data/DataLoadSave/Text/TextLoaderSaverCatalog.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.Data/DataLoadSave/Text/TextSaver.cs b/src/Microsoft.ML.Data/DataLoadSave/Text/TextSaver.cs index 14ce35c5a5..d0b212f8d8 100644 --- a/src/Microsoft.ML.Data/DataLoadSave/Text/TextSaver.cs +++ b/src/Microsoft.ML.Data/DataLoadSave/Text/TextSaver.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. @@ -280,23 +280,23 @@ private static char SepStrToChar(string sep) sep = sep.ToLowerInvariant(); switch (sep) { - case "space": - case " ": - return ' '; - case "tab": - case "\t": - return '\t'; - case "comma": - case ",": - return ','; - case "semicolon": - case ";": - return ';'; - case "bar": - case "|": - return '|'; - default: - throw Contracts.ExceptUserArg(nameof(Arguments.Separator), "Invalid separator - must be: space, tab, comma, semicolon, or bar"); + case "space": + case " ": + return ' '; + case "tab": + case "\t": + return '\t'; + case "comma": + case ",": + return ','; + case "semicolon": + case ";": + return ';'; + case "bar": + case "|": + return '|'; + default: + throw Contracts.ExceptUserArg(nameof(Arguments.Separator), "Invalid separator - must be: space, tab, comma, semicolon, or bar"); } } @@ -307,19 +307,19 @@ public static string SeparatorCharToString(char separator) { switch (separator) { - case ' ': - return "space"; - case '\t': - return "tab"; - case ',': - return "comma"; - case ';': - return "semicolon"; - case '|': - return "bar"; - - default: - return separator.ToString(); + case ' ': + return "space"; + case '\t': + return "tab"; + case ',': + return "comma"; + case ';': + return "semicolon"; + case '|': + return "bar"; + + default: + return separator.ToString(); } } diff --git a/src/Microsoft.ML.Data/DataLoadSave/Transpose/TransposeLoader.cs b/src/Microsoft.ML.Data/DataLoadSave/Transpose/TransposeLoader.cs index e6da0bd083..732b7d9e29 100644 --- a/src/Microsoft.ML.Data/DataLoadSave/Transpose/TransposeLoader.cs +++ b/src/Microsoft.ML.Data/DataLoadSave/Transpose/TransposeLoader.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.Data/DataLoadSave/Transpose/TransposeSaver.cs b/src/Microsoft.ML.Data/DataLoadSave/Transpose/TransposeSaver.cs index 26592d3bbd..278fa6e280 100644 --- a/src/Microsoft.ML.Data/DataLoadSave/Transpose/TransposeSaver.cs +++ b/src/Microsoft.ML.Data/DataLoadSave/Transpose/TransposeSaver.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.Data/DataView/AppendRowsDataView.cs b/src/Microsoft.ML.Data/DataView/AppendRowsDataView.cs index 793b2eba13..3afaaf58f8 100644 --- a/src/Microsoft.ML.Data/DataView/AppendRowsDataView.cs +++ b/src/Microsoft.ML.Data/DataView/AppendRowsDataView.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. @@ -225,7 +225,7 @@ public Cursor(AppendRowsDataView parent, IEnumerable colu _currentCursor = Sources[_currentSourceIndex].GetRowCursor(columnsNeeded); _currentIdGetter = _currentCursor.GetIdGetter(); - foreach(var col in columnsNeeded) + foreach (var col in columnsNeeded) Getters[col.Index] = CreateGetter(col.Index); } @@ -327,7 +327,7 @@ public RandCursor(AppendRowsDataView parent, IEnumerable _sampler = new MultinomialWithoutReplacementSampler(Ch, counts, rand); _currentSourceIndex = -1; - foreach(var col in columnsNeeded) + foreach (var col in columnsNeeded) Getters[col.Index] = CreateGetter(col.Index); } diff --git a/src/Microsoft.ML.Data/DataView/ArrayDataViewBuilder.cs b/src/Microsoft.ML.Data/DataView/ArrayDataViewBuilder.cs index b008310805..ef0498f92c 100644 --- a/src/Microsoft.ML.Data/DataView/ArrayDataViewBuilder.cs +++ b/src/Microsoft.ML.Data/DataView/ArrayDataViewBuilder.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. @@ -216,7 +216,7 @@ public DataView(IHostEnvironment env, ArrayDataViewBuilder builder, int rowCount _columns = builder._columns.ToArray(); var schemaBuilder = new DataViewSchema.Builder(); - for(int i=0; i< _columns.Length; i++) + for (int i = 0; i < _columns.Length; i++) { var meta = new DataViewSchema.Annotations.Builder(); diff --git a/src/Microsoft.ML.Data/DataView/CacheDataView.cs b/src/Microsoft.ML.Data/DataView/CacheDataView.cs index 41efc71760..4c2491e09a 100644 --- a/src/Microsoft.ML.Data/DataView/CacheDataView.cs +++ b/src/Microsoft.ML.Data/DataView/CacheDataView.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.Data/DataView/CompositeRowToRowMapper.cs b/src/Microsoft.ML.Data/DataView/CompositeRowToRowMapper.cs index d634ac9e85..6e9aa55542 100644 --- a/src/Microsoft.ML.Data/DataView/CompositeRowToRowMapper.cs +++ b/src/Microsoft.ML.Data/DataView/CompositeRowToRowMapper.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.Data/DataView/DataViewConstructionUtils.cs b/src/Microsoft.ML.Data/DataView/DataViewConstructionUtils.cs index 8df5e03481..b05d785ff3 100644 --- a/src/Microsoft.ML.Data/DataView/DataViewConstructionUtils.cs +++ b/src/Microsoft.ML.Data/DataView/DataViewConstructionUtils.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. @@ -84,7 +84,7 @@ internal static SchemaDefinition GetSchemaDefinition(IHostEnvironment env, foreach (var annotation in annotations.Schema) { var info = Utils.MarshalInvoke(_getAnnotationInfoMethodInfo, annotation.Type.RawType, annotation.Name, annotations); - schemaDefinitionCol.AddAnnotation(annotation.Name , info); + schemaDefinitionCol.AddAnnotation(annotation.Name, info); } } } @@ -1017,4 +1017,4 @@ private void GetDirectValue(ref TDst dst) dst = (TDst)(object)Value; } } -} \ No newline at end of file +} diff --git a/src/Microsoft.ML.Data/DataView/DataViewExtensions.cs b/src/Microsoft.ML.Data/DataView/DataViewExtensions.cs index 825a0cef17..0d57312cb9 100644 --- a/src/Microsoft.ML.Data/DataView/DataViewExtensions.cs +++ b/src/Microsoft.ML.Data/DataView/DataViewExtensions.cs @@ -41,13 +41,13 @@ public static DataViewRowCursor GetRowCursor(this IDataView dv, DataViewSchema.C Contracts.Assert(dv.Schema[columnNeeded.Index].Equals(columnNeeded), $"The requested column named: {columnNeeded.Name}, with index: {columnNeeded.Index} and type: {columnNeeded.Type}" + $" is not present in the {nameof(IDataView)} where the {nameof(DataViewRowCursor)} is being requested."); - return dv.GetRowCursor(Enumerable.Repeat(columnNeeded,1)); + return dv.GetRowCursor(Enumerable.Repeat(columnNeeded, 1)); } /// /// Get a row cursor. No colums are needed by this . /// - public static DataViewRowCursor GetRowCursor(this IDataView dv) => dv.GetRowCursor(Enumerable.Empty()); + public static DataViewRowCursor GetRowCursor(this IDataView dv) => dv.GetRowCursor(Enumerable.Empty()); /// /// Get a row cursor including all the columns of the . diff --git a/src/Microsoft.ML.Data/DataView/EmptyDataView.cs b/src/Microsoft.ML.Data/DataView/EmptyDataView.cs index a8de97b963..7432babf06 100644 --- a/src/Microsoft.ML.Data/DataView/EmptyDataView.cs +++ b/src/Microsoft.ML.Data/DataView/EmptyDataView.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. @@ -83,4 +83,4 @@ public override ValueGetter GetGetter(DataViewSchema.Column colu } } } -} \ No newline at end of file +} diff --git a/src/Microsoft.ML.Data/DataView/InternalSchemaDefinition.cs b/src/Microsoft.ML.Data/DataView/InternalSchemaDefinition.cs index d609f20cf7..6c022a2f8e 100644 --- a/src/Microsoft.ML.Data/DataView/InternalSchemaDefinition.cs +++ b/src/Microsoft.ML.Data/DataView/InternalSchemaDefinition.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.Data/DataView/LambdaColumnMapper.cs b/src/Microsoft.ML.Data/DataView/LambdaColumnMapper.cs index f6a3726f13..b6ee0253a4 100644 --- a/src/Microsoft.ML.Data/DataView/LambdaColumnMapper.cs +++ b/src/Microsoft.ML.Data/DataView/LambdaColumnMapper.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.Data/DataView/LambdaFilter.cs b/src/Microsoft.ML.Data/DataView/LambdaFilter.cs index 29824fa2dc..6830ac0b37 100644 --- a/src/Microsoft.ML.Data/DataView/LambdaFilter.cs +++ b/src/Microsoft.ML.Data/DataView/LambdaFilter.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.Data/DataView/OpaqueDataView.cs b/src/Microsoft.ML.Data/DataView/OpaqueDataView.cs index f33e0b6ab8..9c4911daae 100644 --- a/src/Microsoft.ML.Data/DataView/OpaqueDataView.cs +++ b/src/Microsoft.ML.Data/DataView/OpaqueDataView.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. @@ -26,7 +26,7 @@ public OpaqueDataView(IDataView source) public long? GetRowCount() => _source.GetRowCount(); public DataViewRowCursor GetRowCursor(IEnumerable columnsNeeded, Random rand = null) - =>_source.GetRowCursor(columnsNeeded, rand); + => _source.GetRowCursor(columnsNeeded, rand); public DataViewRowCursor[] GetRowCursorSet(IEnumerable columnsNeeded, int n, Random rand = null) => _source.GetRowCursorSet(columnsNeeded, n, rand); diff --git a/src/Microsoft.ML.Data/DataView/RowToRowMapperTransform.cs b/src/Microsoft.ML.Data/DataView/RowToRowMapperTransform.cs index 3747e361ff..e221621c9e 100644 --- a/src/Microsoft.ML.Data/DataView/RowToRowMapperTransform.cs +++ b/src/Microsoft.ML.Data/DataView/RowToRowMapperTransform.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.Data/DataView/SimpleRow.cs b/src/Microsoft.ML.Data/DataView/SimpleRow.cs index 9b17ae155c..76799a533f 100644 --- a/src/Microsoft.ML.Data/DataView/SimpleRow.cs +++ b/src/Microsoft.ML.Data/DataView/SimpleRow.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. @@ -70,4 +70,4 @@ public override bool IsColumnActive(DataViewSchema.Column column) return _getters[column.Index] != null; } } -} \ No newline at end of file +} diff --git a/src/Microsoft.ML.Data/DataView/Transposer.cs b/src/Microsoft.ML.Data/DataView/Transposer.cs index 6a29d75aa6..354135ea50 100644 --- a/src/Microsoft.ML.Data/DataView/Transposer.cs +++ b/src/Microsoft.ML.Data/DataView/Transposer.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. @@ -848,7 +848,7 @@ public DataViewRowCursor[] GetRowCursorSet(IEnumerable co bool[] activeSplitters; var srcPred = CreateInputPredicate(predicate, out activeSplitters); - var srcCols = columnsNeeded.Where( x => srcPred(x.Index)); + var srcCols = columnsNeeded.Where(x => srcPred(x.Index)); var result = _input.GetRowCursorSet(srcCols, n, rand); for (int i = 0; i < result.Length; ++i) result[i] = new Cursor(_host, this, result[i], predicate, activeSplitters); @@ -1575,4 +1575,4 @@ private void GetId(ref DataViewRowId id) protected override bool MoveNextCore() => _slotCursor.MoveNext(); } } -} \ No newline at end of file +} diff --git a/src/Microsoft.ML.Data/DataView/TypedCursor.cs b/src/Microsoft.ML.Data/DataView/TypedCursor.cs index b2489909e2..f37790e5aa 100644 --- a/src/Microsoft.ML.Data/DataView/TypedCursor.cs +++ b/src/Microsoft.ML.Data/DataView/TypedCursor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.Data/Depricated/Instances/HeaderSchema.cs b/src/Microsoft.ML.Data/Depricated/Instances/HeaderSchema.cs index 8a48475252..236c34b4df 100644 --- a/src/Microsoft.ML.Data/Depricated/Instances/HeaderSchema.cs +++ b/src/Microsoft.ML.Data/Depricated/Instances/HeaderSchema.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. @@ -35,7 +35,7 @@ public FeatureNameCollectionBinding(FeatureNameCollection collection) var metadataBuilder = new DataViewSchema.Annotations.Builder(); metadataBuilder.Add(AnnotationUtils.Kinds.SlotNames, _slotNamesType, - (ref VBuffer> slotNames) => { GetSlotNames(0, ref slotNames); } ); + (ref VBuffer> slotNames) => { GetSlotNames(0, ref slotNames); }); var schemaBuilder = new DataViewSchema.Builder(); schemaBuilder.AddColumn(RoleMappedSchema.ColumnRole.Feature.Value, _colType, metadataBuilder.ToAnnotations()); FeatureNameCollectionSchema = schemaBuilder.ToSchema(); diff --git a/src/Microsoft.ML.Data/Depricated/TGUIAttribute.cs b/src/Microsoft.ML.Data/Depricated/TGUIAttribute.cs index ffd75d3275..4e7a0437a3 100644 --- a/src/Microsoft.ML.Data/Depricated/TGUIAttribute.cs +++ b/src/Microsoft.ML.Data/Depricated/TGUIAttribute.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.Data/Depricated/Vector/VBufferMathUtils.cs b/src/Microsoft.ML.Data/Depricated/Vector/VBufferMathUtils.cs index 86bebc5412..a9cee9817f 100644 --- a/src/Microsoft.ML.Data/Depricated/Vector/VBufferMathUtils.cs +++ b/src/Microsoft.ML.Data/Depricated/Vector/VBufferMathUtils.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. @@ -276,7 +276,7 @@ public static void AddMultWithOffset(in VBuffer src, float c, ref VBuffer { gapCount = srcValues.Length; var srcIndices = src.GetIndices(); - for (int iS = 0, iD = dMin; iS < srcIndices.Length && iD < dLim; ) + for (int iS = 0, iD = dMin; iS < srcIndices.Length && iD < dLim;) { var comp = srcIndices[iS] - dstIndices[iD] + offset; if (comp < 0) // dst index is larger. @@ -341,7 +341,7 @@ public static void AddMultWithOffset(in VBuffer src, float c, ref VBuffer int sIndex = iS < 0 ? -1 : srcIndices[iS]; int dIndex = iD < 0 ? -1 : dstIndices[iD] - offset; - for (int iDD = dLim + gapCount; --iDD >= dMin; ) + for (int iDD = dLim + gapCount; --iDD >= dMin;) { Contracts.Assert(iDD >= iD); int comp = sIndex - dIndex; diff --git a/src/Microsoft.ML.Data/Depricated/Vector/VectorUtils.cs b/src/Microsoft.ML.Data/Depricated/Vector/VectorUtils.cs index a84e0a1433..c7ea56df62 100644 --- a/src/Microsoft.ML.Data/Depricated/Vector/VectorUtils.cs +++ b/src/Microsoft.ML.Data/Depricated/Vector/VectorUtils.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. @@ -276,7 +276,7 @@ public static float DotProductWithOffset(in VBuffer a, int offset, in VBu return result; } var bIndices = b.GetIndices(); - for (int iA = aMin, iB = 0; iA < aLim && iB < bIndices.Length; ) + for (int iA = aMin, iB = 0; iA < aLim && iB < bIndices.Length;) { int aIndex = aIndices[iA]; int bIndex = bIndices[iB]; diff --git a/src/Microsoft.ML.Data/Dirty/ChooseColumnsByIndexTransform.cs b/src/Microsoft.ML.Data/Dirty/ChooseColumnsByIndexTransform.cs index 77388581d7..87bd91b8eb 100644 --- a/src/Microsoft.ML.Data/Dirty/ChooseColumnsByIndexTransform.cs +++ b/src/Microsoft.ML.Data/Dirty/ChooseColumnsByIndexTransform.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.Data/Dirty/ILoss.cs b/src/Microsoft.ML.Data/Dirty/ILoss.cs index 871a97ced0..1125cb9183 100644 --- a/src/Microsoft.ML.Data/Dirty/ILoss.cs +++ b/src/Microsoft.ML.Data/Dirty/ILoss.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.Data/Dirty/IniFileUtils.cs b/src/Microsoft.ML.Data/Dirty/IniFileUtils.cs index 702ffdd405..76f0000c52 100644 --- a/src/Microsoft.ML.Data/Dirty/IniFileUtils.cs +++ b/src/Microsoft.ML.Data/Dirty/IniFileUtils.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.Data/Dirty/ModelParametersBase.cs b/src/Microsoft.ML.Data/Dirty/ModelParametersBase.cs index 4a637b5398..70e224c393 100644 --- a/src/Microsoft.ML.Data/Dirty/ModelParametersBase.cs +++ b/src/Microsoft.ML.Data/Dirty/ModelParametersBase.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.Data/Dirty/PredictionUtils.cs b/src/Microsoft.ML.Data/Dirty/PredictionUtils.cs index f3689fced4..4f6275d6bc 100644 --- a/src/Microsoft.ML.Data/Dirty/PredictionUtils.cs +++ b/src/Microsoft.ML.Data/Dirty/PredictionUtils.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. @@ -132,24 +132,24 @@ public static char SepCharFromString(string s) switch (s.ToLower()) { - case "space": - return ' '; - case "tab": - return '\t'; - case "comma": - return ','; - case "colon": - return ':'; - case "semicolon": - return ';'; - case "bar": // VW format - return '|'; - default: - // REVIEW: This is bad - why do we simply ignore unexpected values? - if (s.Length == 1) - return s[0]; - return default(char); + case "space": + return ' '; + case "tab": + return '\t'; + case "comma": + return ','; + case "colon": + return ':'; + case "semicolon": + return ';'; + case "bar": // VW format + return '|'; + default: + // REVIEW: This is bad - why do we simply ignore unexpected values? + if (s.Length == 1) + return s[0]; + return default(char); } } } -} \ No newline at end of file +} diff --git a/src/Microsoft.ML.Data/Dirty/PredictorInterfaces.cs b/src/Microsoft.ML.Data/Dirty/PredictorInterfaces.cs index a02febf8ac..9ff92154cd 100644 --- a/src/Microsoft.ML.Data/Dirty/PredictorInterfaces.cs +++ b/src/Microsoft.ML.Data/Dirty/PredictorInterfaces.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.Data/Dirty/PredictorUtils.cs b/src/Microsoft.ML.Data/Dirty/PredictorUtils.cs index 95a5dfc3e8..56cffd912a 100644 --- a/src/Microsoft.ML.Data/Dirty/PredictorUtils.cs +++ b/src/Microsoft.ML.Data/Dirty/PredictorUtils.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. @@ -131,4 +131,4 @@ public static void SaveCode(IChannel ch, IPredictor predictor, RoleMappedSchema } } } -} \ No newline at end of file +} diff --git a/src/Microsoft.ML.Data/EntryPoints/CommonOutputs.cs b/src/Microsoft.ML.Data/EntryPoints/CommonOutputs.cs index 8e8d9ace81..3248d793d6 100644 --- a/src/Microsoft.ML.Data/EntryPoints/CommonOutputs.cs +++ b/src/Microsoft.ML.Data/EntryPoints/CommonOutputs.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. @@ -204,7 +204,7 @@ public abstract class MacroOutput /// /// The output class of the macro. public sealed class MacroOutput : MacroOutput - {} + { } /// /// The common output class for all evaluators. diff --git a/src/Microsoft.ML.Data/EntryPoints/EntryPointNode.cs b/src/Microsoft.ML.Data/EntryPoints/EntryPointNode.cs index 363a422adf..b871f7ad99 100644 --- a/src/Microsoft.ML.Data/EntryPoints/EntryPointNode.cs +++ b/src/Microsoft.ML.Data/EntryPoints/EntryPointNode.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.Data/EntryPoints/InputBase.cs b/src/Microsoft.ML.Data/EntryPoints/InputBase.cs index 6b10715177..eafcd29297 100644 --- a/src/Microsoft.ML.Data/EntryPoints/InputBase.cs +++ b/src/Microsoft.ML.Data/EntryPoints/InputBase.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.Data/EntryPoints/InputBuilder.cs b/src/Microsoft.ML.Data/EntryPoints/InputBuilder.cs index 9a14583a68..ad5ae7f2b4 100644 --- a/src/Microsoft.ML.Data/EntryPoints/InputBuilder.cs +++ b/src/Microsoft.ML.Data/EntryPoints/InputBuilder.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.Data/EntryPoints/PredictorModelImpl.cs b/src/Microsoft.ML.Data/EntryPoints/PredictorModelImpl.cs index 0b69faabe6..848221fb33 100644 --- a/src/Microsoft.ML.Data/EntryPoints/PredictorModelImpl.cs +++ b/src/Microsoft.ML.Data/EntryPoints/PredictorModelImpl.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.Data/EntryPoints/SchemaManipulation.cs b/src/Microsoft.ML.Data/EntryPoints/SchemaManipulation.cs index c894469152..bedcd78c03 100644 --- a/src/Microsoft.ML.Data/EntryPoints/SchemaManipulation.cs +++ b/src/Microsoft.ML.Data/EntryPoints/SchemaManipulation.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.Data/EntryPoints/SelectRows.cs b/src/Microsoft.ML.Data/EntryPoints/SelectRows.cs index 4df5764307..537be07d85 100644 --- a/src/Microsoft.ML.Data/EntryPoints/SelectRows.cs +++ b/src/Microsoft.ML.Data/EntryPoints/SelectRows.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.Data/EntryPoints/SummarizePredictor.cs b/src/Microsoft.ML.Data/EntryPoints/SummarizePredictor.cs index 6789348229..f699746e6f 100644 --- a/src/Microsoft.ML.Data/EntryPoints/SummarizePredictor.cs +++ b/src/Microsoft.ML.Data/EntryPoints/SummarizePredictor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.Data/EntryPoints/TransformModelImpl.cs b/src/Microsoft.ML.Data/EntryPoints/TransformModelImpl.cs index 78564b06e6..69088aa0e0 100644 --- a/src/Microsoft.ML.Data/EntryPoints/TransformModelImpl.cs +++ b/src/Microsoft.ML.Data/EntryPoints/TransformModelImpl.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.Data/Evaluators/AnomalyDetectionEvaluator.cs b/src/Microsoft.ML.Data/Evaluators/AnomalyDetectionEvaluator.cs index 4263eeefaa..2cc43c4f9d 100644 --- a/src/Microsoft.ML.Data/Evaluators/AnomalyDetectionEvaluator.cs +++ b/src/Microsoft.ML.Data/Evaluators/AnomalyDetectionEvaluator.cs @@ -723,7 +723,7 @@ private protected override void PrintFoldResultsCore(IChannel ch, Dictionary col.Name.Equals(AnomalyDetectionEvaluator.OverallMetrics.NumAnomalies)|| + using (var cursor = overall.GetRowCursor(overall.Schema.Where(col => col.Name.Equals(AnomalyDetectionEvaluator.OverallMetrics.NumAnomalies) || (hasStrat && col.Name.Equals(MetricKinds.ColumnNames.StratCol))))) { var numAnomGetter = cursor.GetGetter(numAnom.Value); diff --git a/src/Microsoft.ML.Data/Evaluators/AucAggregator.cs b/src/Microsoft.ML.Data/Evaluators/AucAggregator.cs index b579d5bd50..89f7e9115f 100644 --- a/src/Microsoft.ML.Data/Evaluators/AucAggregator.cs +++ b/src/Microsoft.ML.Data/Evaluators/AucAggregator.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.Data/Evaluators/BinaryClassifierEvaluator.cs b/src/Microsoft.ML.Data/Evaluators/BinaryClassifierEvaluator.cs index 8a8447a6d7..4221df2d04 100644 --- a/src/Microsoft.ML.Data/Evaluators/BinaryClassifierEvaluator.cs +++ b/src/Microsoft.ML.Data/Evaluators/BinaryClassifierEvaluator.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. @@ -1584,4 +1584,4 @@ private static IDataView ExtractConfusionMatrix(IHost host, Dictionary> GetPredictedLabelNames(in VBuffer> labelNames, int[] labelIndexToConfIndexMap) { - List > result = new List>(); + List> result = new List>(); var values = labelNames.GetValues(); for (int i = 0; i < values.Length; i++) { @@ -1591,7 +1591,7 @@ private static string GetFoldMetricsAsString(IHostEnvironment env, IDataView dat internal static string GetConfusionTableAsString(ConfusionMatrix confusionMatrix, bool isWeighted) { string prefix = isWeighted ? "Weighted " : ""; - int numLabels = confusionMatrix?.Counts == null? 0: confusionMatrix.Counts.Count; + int numLabels = confusionMatrix?.Counts == null ? 0 : confusionMatrix.Counts.Count; int colWidth = numLabels == 2 ? 8 : 5; int maxNameLen = confusionMatrix.PredictedClassesIndicators.Max(name => name.Length); diff --git a/src/Microsoft.ML.Data/Evaluators/MamlEvaluator.cs b/src/Microsoft.ML.Data/Evaluators/MamlEvaluator.cs index 3e269a0737..5377572bfe 100644 --- a/src/Microsoft.ML.Data/Evaluators/MamlEvaluator.cs +++ b/src/Microsoft.ML.Data/Evaluators/MamlEvaluator.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.Data/Evaluators/Metrics/BinaryClassificationMetrics.cs b/src/Microsoft.ML.Data/Evaluators/Metrics/BinaryClassificationMetrics.cs index 25bf956527..3e24c6e07a 100644 --- a/src/Microsoft.ML.Data/Evaluators/Metrics/BinaryClassificationMetrics.cs +++ b/src/Microsoft.ML.Data/Evaluators/Metrics/BinaryClassificationMetrics.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. @@ -130,4 +130,4 @@ internal BinaryClassificationMetrics(double auc, double accuracy, double positiv ConfusionMatrix = confusionMatrix; } } -} \ No newline at end of file +} diff --git a/src/Microsoft.ML.Data/Evaluators/Metrics/CalibratedBinaryClassificationMetrics.cs b/src/Microsoft.ML.Data/Evaluators/Metrics/CalibratedBinaryClassificationMetrics.cs index 0c2b640187..787f718cca 100644 --- a/src/Microsoft.ML.Data/Evaluators/Metrics/CalibratedBinaryClassificationMetrics.cs +++ b/src/Microsoft.ML.Data/Evaluators/Metrics/CalibratedBinaryClassificationMetrics.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.Data/Evaluators/Metrics/ClusteringMetrics.cs b/src/Microsoft.ML.Data/Evaluators/Metrics/ClusteringMetrics.cs index 169ff4f16a..dd640cb9a4 100644 --- a/src/Microsoft.ML.Data/Evaluators/Metrics/ClusteringMetrics.cs +++ b/src/Microsoft.ML.Data/Evaluators/Metrics/ClusteringMetrics.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. @@ -53,4 +53,4 @@ internal ClusteringMetrics(double nmi, double avgMinScore, double dbi) DaviesBouldinIndex = dbi; } } -} \ No newline at end of file +} diff --git a/src/Microsoft.ML.Data/Evaluators/Metrics/ConfusionMatrix.cs b/src/Microsoft.ML.Data/Evaluators/Metrics/ConfusionMatrix.cs index 148a3daf57..eb24397234 100644 --- a/src/Microsoft.ML.Data/Evaluators/Metrics/ConfusionMatrix.cs +++ b/src/Microsoft.ML.Data/Evaluators/Metrics/ConfusionMatrix.cs @@ -62,8 +62,8 @@ public sealed class ConfusionMatrix /// The predicted classes names, or the indexes of the classes, if the names are missing. /// Whether the classes are sampled. /// Whether the confusion table is the result of a binary classification. - internal ConfusionMatrix(IHost host, double[] precision, double[] recall, double[][] confusionTableCounts, - List> labelNames, bool isSampled, bool isBinary) + internal ConfusionMatrix(IHost host, double[] precision, double[] recall, double[][] confusionTableCounts, + List> labelNames, bool isSampled, bool isBinary) { Contracts.AssertValue(host); _host = host; @@ -99,7 +99,7 @@ internal ConfusionMatrix(IHost host, double[] precision, double[] recall, double /// public string GetFormattedConfusionTable() { - if(_formattedConfusionMatrix == null) + if (_formattedConfusionMatrix == null) _formattedConfusionMatrix = MetricWriter.GetConfusionTableAsString(this, false); return _formattedConfusionMatrix; diff --git a/src/Microsoft.ML.Data/Evaluators/Metrics/MulticlassClassificationMetrics.cs b/src/Microsoft.ML.Data/Evaluators/Metrics/MulticlassClassificationMetrics.cs index ec4576b281..65d737afc0 100644 --- a/src/Microsoft.ML.Data/Evaluators/Metrics/MulticlassClassificationMetrics.cs +++ b/src/Microsoft.ML.Data/Evaluators/Metrics/MulticlassClassificationMetrics.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.Data/Evaluators/Metrics/RankingMetrics.cs b/src/Microsoft.ML.Data/Evaluators/Metrics/RankingMetrics.cs index 771a3a3cde..e240e89200 100644 --- a/src/Microsoft.ML.Data/Evaluators/Metrics/RankingMetrics.cs +++ b/src/Microsoft.ML.Data/Evaluators/Metrics/RankingMetrics.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.Data/Evaluators/Metrics/RegressionMetrics.cs b/src/Microsoft.ML.Data/Evaluators/Metrics/RegressionMetrics.cs index 5bc01a1c04..3f59cea25b 100644 --- a/src/Microsoft.ML.Data/Evaluators/Metrics/RegressionMetrics.cs +++ b/src/Microsoft.ML.Data/Evaluators/Metrics/RegressionMetrics.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. @@ -86,4 +86,4 @@ internal RegressionMetrics(double l1, double l2, double rms, double lossFunction RSquared = rSquared; } } -} \ No newline at end of file +} diff --git a/src/Microsoft.ML.Data/Evaluators/MultiOutputRegressionEvaluator.cs b/src/Microsoft.ML.Data/Evaluators/MultiOutputRegressionEvaluator.cs index 42078a0786..847370df0d 100644 --- a/src/Microsoft.ML.Data/Evaluators/MultiOutputRegressionEvaluator.cs +++ b/src/Microsoft.ML.Data/Evaluators/MultiOutputRegressionEvaluator.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.Data/Evaluators/MulticlassClassificationEvaluator.cs b/src/Microsoft.ML.Data/Evaluators/MulticlassClassificationEvaluator.cs index ecdc2509cc..7b048d8833 100644 --- a/src/Microsoft.ML.Data/Evaluators/MulticlassClassificationEvaluator.cs +++ b/src/Microsoft.ML.Data/Evaluators/MulticlassClassificationEvaluator.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. @@ -497,7 +497,7 @@ public override void ProcessRow() // are sequentially first. int rankOfCorrectLabel = 0; int assigned = 0; - for (int i=0; i < _scoresArr.Length; i++) + for (int i = 0; i < _scoresArr.Length; i++) { if (_scoresArr[i] > correctProba || (_scoresArr[i] == correctProba && i < intLabel)) rankOfCorrectLabel++; @@ -622,7 +622,7 @@ public MulticlassPerInstanceEvaluator(IHostEnvironment env, DataViewSchema schem if (schema[ScoreIndex].HasSlotNames(_numClasses)) { var classNames = default(VBuffer>); - schema[(int) ScoreIndex].Annotations.GetValue(AnnotationUtils.Kinds.SlotNames, ref classNames); + schema[(int)ScoreIndex].Annotations.GetValue(AnnotationUtils.Kinds.SlotNames, ref classNames); _classNames = new ReadOnlyMemory[_numClasses]; classNames.CopyTo(_classNames); } diff --git a/src/Microsoft.ML.Data/Evaluators/RankingEvaluator.cs b/src/Microsoft.ML.Data/Evaluators/RankingEvaluator.cs index 876c449b34..f443183953 100644 --- a/src/Microsoft.ML.Data/Evaluators/RankingEvaluator.cs +++ b/src/Microsoft.ML.Data/Evaluators/RankingEvaluator.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. @@ -702,7 +702,7 @@ public Transform(IHostEnvironment env, IDataView input, string labelCol, string int truncationLevel, Double[] labelGains) : base(env, input, labelCol, scoreCol, groupCol, RegistrationName) { - Host.CheckParam(0 < truncationLevel , nameof(truncationLevel), + Host.CheckParam(0 < truncationLevel, nameof(truncationLevel), "Truncation level must be greater than 0"); Host.CheckValue(labelGains, nameof(labelGains)); diff --git a/src/Microsoft.ML.Data/Evaluators/RegressionEvaluatorBase.cs b/src/Microsoft.ML.Data/Evaluators/RegressionEvaluatorBase.cs index 86c53f1d8d..0fba244c75 100644 --- a/src/Microsoft.ML.Data/Evaluators/RegressionEvaluatorBase.cs +++ b/src/Microsoft.ML.Data/Evaluators/RegressionEvaluatorBase.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. @@ -255,4 +255,4 @@ public override void ProcessRow() public abstract void AddColumn(ArrayDataViewBuilder dvBldr, string metricName, params TMetrics[] metric); } } -} \ No newline at end of file +} diff --git a/src/Microsoft.ML.Data/LoggingEventArgs.cs b/src/Microsoft.ML.Data/LoggingEventArgs.cs index 302d7853c2..afd93556bc 100644 --- a/src/Microsoft.ML.Data/LoggingEventArgs.cs +++ b/src/Microsoft.ML.Data/LoggingEventArgs.cs @@ -55,4 +55,4 @@ public LoggingEventArgs(string message, ChannelMessageKind kind, string source) /// public string RawMessage { get; } } -} \ No newline at end of file +} diff --git a/src/Microsoft.ML.Data/Model/Onnx/ICanSaveOnnx.cs b/src/Microsoft.ML.Data/Model/Onnx/ICanSaveOnnx.cs index 2ae62dc479..471430ab85 100644 --- a/src/Microsoft.ML.Data/Model/Onnx/ICanSaveOnnx.cs +++ b/src/Microsoft.ML.Data/Model/Onnx/ICanSaveOnnx.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. @@ -86,4 +86,4 @@ internal interface IDistCanSaveOnnx : ISingleCanSaveOnnx, IValueMapperDist { new bool SaveAsOnnx(OnnxContext ctx, string[] outputNames, string featureColumn); } -} \ No newline at end of file +} diff --git a/src/Microsoft.ML.Data/Model/Onnx/OnnxContext.cs b/src/Microsoft.ML.Data/Model/Onnx/OnnxContext.cs index 36d6ab45dc..a1cff67161 100644 --- a/src/Microsoft.ML.Data/Model/Onnx/OnnxContext.cs +++ b/src/Microsoft.ML.Data/Model/Onnx/OnnxContext.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.Data/Model/Pfa/BoundPfaContext.cs b/src/Microsoft.ML.Data/Model/Pfa/BoundPfaContext.cs index b08174bf43..be3da1728f 100644 --- a/src/Microsoft.ML.Data/Model/Pfa/BoundPfaContext.cs +++ b/src/Microsoft.ML.Data/Model/Pfa/BoundPfaContext.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.Data/Model/Pfa/ICanSavePfa.cs b/src/Microsoft.ML.Data/Model/Pfa/ICanSavePfa.cs index 41abfe45fc..4af1e922fd 100644 --- a/src/Microsoft.ML.Data/Model/Pfa/ICanSavePfa.cs +++ b/src/Microsoft.ML.Data/Model/Pfa/ICanSavePfa.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.Data/Model/Pfa/ModelUtils.cs b/src/Microsoft.ML.Data/Model/Pfa/ModelUtils.cs index 0566a43c12..a7f7ad5cae 100644 --- a/src/Microsoft.ML.Data/Model/Pfa/ModelUtils.cs +++ b/src/Microsoft.ML.Data/Model/Pfa/ModelUtils.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.Data/Model/Pfa/PfaContext.cs b/src/Microsoft.ML.Data/Model/Pfa/PfaContext.cs index c36245a5b4..a390a0dfc1 100644 --- a/src/Microsoft.ML.Data/Model/Pfa/PfaContext.cs +++ b/src/Microsoft.ML.Data/Model/Pfa/PfaContext.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.Data/Model/Pfa/PfaUtils.cs b/src/Microsoft.ML.Data/Model/Pfa/PfaUtils.cs index 42fd826bc8..85a351f076 100644 --- a/src/Microsoft.ML.Data/Model/Pfa/PfaUtils.cs +++ b/src/Microsoft.ML.Data/Model/Pfa/PfaUtils.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. @@ -201,7 +201,7 @@ private static JToken PfaTypeOrNullCore(DataViewType itemType) { return Long; } - else if(rawType == typeof(float) + else if (rawType == typeof(float) // REVIEW: The above should really be float. But, for the // sake of the POC, we use double since all the PFA convenience // libraries operate over doubles. @@ -346,4 +346,4 @@ private static string EnsureOpCore(PfaContext ctx, string funcPrefix, string bin return "u." + name; } } -} \ No newline at end of file +} diff --git a/src/Microsoft.ML.Data/Model/Pfa/SavePfaCommand.cs b/src/Microsoft.ML.Data/Model/Pfa/SavePfaCommand.cs index ca77600cb6..516f961122 100644 --- a/src/Microsoft.ML.Data/Model/Pfa/SavePfaCommand.cs +++ b/src/Microsoft.ML.Data/Model/Pfa/SavePfaCommand.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.Data/Prediction/Calibrator.cs b/src/Microsoft.ML.Data/Prediction/Calibrator.cs index becf8312df..d8874ead71 100644 --- a/src/Microsoft.ML.Data/Prediction/Calibrator.cs +++ b/src/Microsoft.ML.Data/Prediction/Calibrator.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. @@ -521,7 +521,7 @@ private static CalibratedModelParametersBase Create(IHostEnvironment env, ModelL Type genericType = typeof(FeatureWeightsCalibratedModelParameters<,>); var genericInstance = CreateCalibratedModelParameters.Create(env, ctx, predictor, calibrator, genericType); - return (CalibratedModelParametersBase) genericInstance; + return (CalibratedModelParametersBase)genericInstance; } void ICanSaveModel.Save(ModelSaveContext ctx) @@ -542,7 +542,7 @@ public void GetFeatureWeights(ref VBuffer weights) /// Encapsulates a predictor and a calibrator that implement . /// Its implementation of combines both the predictors and the calibrators. /// - [PredictionTransformerLoadType(typeof(CalibratedModelParametersBase <,>))] + [PredictionTransformerLoadType(typeof(CalibratedModelParametersBase<,>))] internal sealed class ParameterMixingCalibratedModelParameters : ValueMapperCalibratedModelParametersBase, IParameterMixer, @@ -598,7 +598,7 @@ private static CalibratedModelParametersBase Create(IHostEnvironment env, ModelL Type genericType = typeof(ParameterMixingCalibratedModelParameters<,>); object genericInstance = CreateCalibratedModelParameters.Create(env, ctx, predictor, calibrator, genericType); - return (CalibratedModelParametersBase) genericInstance; + return (CalibratedModelParametersBase)genericInstance; } void ICanSaveModel.Save(ModelSaveContext ctx) @@ -709,7 +709,7 @@ DataViewRow ISchemaBoundRowMapper.GetRow(DataViewRow input, IEnumerable(DataViewRow input, int col) - =>input.GetGetter(input.Schema[col]); + => input.GetGetter(input.Schema[col]); private Delegate GetProbGetter(DataViewRow input) { @@ -1320,7 +1320,7 @@ bool ISingleCanSaveOnnx.SaveAsOnnx(OnnxContext ctx, string[] outputNames, string opType = "Clip"; var zeroVar = ctx.AddInitializer(0, "Zero"); - var numBinsMinusOneVar = ctx.AddInitializer(_binProbs.Length-1, "NumBinsMinusOne"); + var numBinsMinusOneVar = ctx.AddInitializer(_binProbs.Length - 1, "NumBinsMinusOne"); var binIndexOutput = ctx.AddIntermediateVariable(NumberDataViewType.Int64, "binIndexOutput"); node = ctx.CreateNode(opType, new[] { castOutput, zeroVar, numBinsMinusOneVar }, new[] { binIndexOutput }, ctx.GetNodeName(opType), ""); @@ -2230,4 +2230,4 @@ internal static TOut CalibratePredictor(IHost host, CalibrateInputBase inp } } } -} \ No newline at end of file +} diff --git a/src/Microsoft.ML.Data/Prediction/IPredictionTransformer.cs b/src/Microsoft.ML.Data/Prediction/IPredictionTransformer.cs index fceb68ae07..0503e82c03 100644 --- a/src/Microsoft.ML.Data/Prediction/IPredictionTransformer.cs +++ b/src/Microsoft.ML.Data/Prediction/IPredictionTransformer.cs @@ -46,4 +46,4 @@ internal interface ISingleFeaturePredictionTransformer : ITransformer /// The name of the feature column. string FeatureColumnName { get; } } -} \ No newline at end of file +} diff --git a/src/Microsoft.ML.Data/Prediction/PredictionEngine.cs b/src/Microsoft.ML.Data/Prediction/PredictionEngine.cs index 92ee5575d8..b932369570 100644 --- a/src/Microsoft.ML.Data/Prediction/PredictionEngine.cs +++ b/src/Microsoft.ML.Data/Prediction/PredictionEngine.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. @@ -170,4 +170,4 @@ public TDst Predict(TSrc example) /// is reused. public abstract void Predict(TSrc example, ref TDst prediction); } -} \ No newline at end of file +} diff --git a/src/Microsoft.ML.Data/Properties/AssemblyInfo.cs b/src/Microsoft.ML.Data/Properties/AssemblyInfo.cs index 3dc2df359f..f1860fb795 100644 --- a/src/Microsoft.ML.Data/Properties/AssemblyInfo.cs +++ b/src/Microsoft.ML.Data/Properties/AssemblyInfo.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.Data/Scorers/BinaryClassifierScorer.cs b/src/Microsoft.ML.Data/Scorers/BinaryClassifierScorer.cs index 336d9daa56..95df9979ec 100644 --- a/src/Microsoft.ML.Data/Scorers/BinaryClassifierScorer.cs +++ b/src/Microsoft.ML.Data/Scorers/BinaryClassifierScorer.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.Data/Scorers/ClusteringScorer.cs b/src/Microsoft.ML.Data/Scorers/ClusteringScorer.cs index 460e0a0be9..02ff44fe6e 100644 --- a/src/Microsoft.ML.Data/Scorers/ClusteringScorer.cs +++ b/src/Microsoft.ML.Data/Scorers/ClusteringScorer.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.Data/Scorers/FeatureContributionCalculation.cs b/src/Microsoft.ML.Data/Scorers/FeatureContributionCalculation.cs index 8a98c9bad6..860f4c0774 100644 --- a/src/Microsoft.ML.Data/Scorers/FeatureContributionCalculation.cs +++ b/src/Microsoft.ML.Data/Scorers/FeatureContributionCalculation.cs @@ -58,7 +58,7 @@ private static IDataScorerTransform Create(IHostEnvironment env, Arguments args, Contracts.CheckValue(env, nameof(env)); env.CheckValue(data, nameof(data)); env.CheckValue(mapper, nameof(mapper)); - if (args.Top< 0) + if (args.Top < 0) throw env.Except($"Number of top contribution must be non negative"); if (args.Bottom < 0) throw env.Except($"Number of bottom contribution must be non negative"); diff --git a/src/Microsoft.ML.Data/Scorers/GenericScorer.cs b/src/Microsoft.ML.Data/Scorers/GenericScorer.cs index 1a9061252f..9d818fbeb7 100644 --- a/src/Microsoft.ML.Data/Scorers/GenericScorer.cs +++ b/src/Microsoft.ML.Data/Scorers/GenericScorer.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. @@ -272,4 +272,4 @@ protected override Delegate[] GetGetters(DataViewRow output, Func pre return GetGettersFromRow(output, predicate); } } -} \ No newline at end of file +} diff --git a/src/Microsoft.ML.Data/Scorers/MulticlassClassificationScorer.cs b/src/Microsoft.ML.Data/Scorers/MulticlassClassificationScorer.cs index a82092f430..6492900720 100644 --- a/src/Microsoft.ML.Data/Scorers/MulticlassClassificationScorer.cs +++ b/src/Microsoft.ML.Data/Scorers/MulticlassClassificationScorer.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.Data/Scorers/PredictedLabelScorerBase.cs b/src/Microsoft.ML.Data/Scorers/PredictedLabelScorerBase.cs index d6ee1cea51..383052e145 100644 --- a/src/Microsoft.ML.Data/Scorers/PredictedLabelScorerBase.cs +++ b/src/Microsoft.ML.Data/Scorers/PredictedLabelScorerBase.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. @@ -454,4 +454,4 @@ public void Dispose() } #endregion } -} \ No newline at end of file +} diff --git a/src/Microsoft.ML.Data/Scorers/PredictionTransformer.cs b/src/Microsoft.ML.Data/Scorers/PredictionTransformer.cs index 23c8e6eb2c..03331a1517 100644 --- a/src/Microsoft.ML.Data/Scorers/PredictionTransformer.cs +++ b/src/Microsoft.ML.Data/Scorers/PredictionTransformer.cs @@ -530,7 +530,7 @@ private void InitializationLogic(ModelLoadContext ctx, out string trainLabelColu private void SetScorer() { var schema = new RoleMappedSchema(TrainSchema, _trainLabelColumn, FeatureColumnName); - var args = new MulticlassClassificationScorer.Arguments() { ScoreColumnName = _scoreColumn, PredictedLabelColumnName = _predictedLabelColumn}; + var args = new MulticlassClassificationScorer.Arguments() { ScoreColumnName = _scoreColumn, PredictedLabelColumnName = _predictedLabelColumn }; Scorer = new MulticlassClassificationScorer(Host, args, new EmptyDataView(Host, TrainSchema), BindableMapper.Bind(Host, schema), schema); } @@ -724,7 +724,7 @@ public static ISingleFeaturePredictionTransformer Create(IHostEnvironmen // Returns prediction transformer using the right TModel from the previously loaded model Type predictionTransformerType = typeof(BinaryPredictionTransformer<>); - return (ISingleFeaturePredictionTransformer) CreatePredictionTransformer.Create(env, ctx, host, model, predictionTransformerType); + return (ISingleFeaturePredictionTransformer)CreatePredictionTransformer.Create(env, ctx, host, model, predictionTransformerType); } } @@ -741,7 +741,7 @@ public static ISingleFeaturePredictionTransformer Create(IHostEnvironmen // Returns prediction transformer using the right TModel from the previously loaded model Type predictionTransformerType = typeof(MulticlassPredictionTransformer<>); - return (ISingleFeaturePredictionTransformer) CreatePredictionTransformer.Create(env, ctx, host, model, predictionTransformerType); + return (ISingleFeaturePredictionTransformer)CreatePredictionTransformer.Create(env, ctx, host, model, predictionTransformerType); } } @@ -758,7 +758,7 @@ public static ISingleFeaturePredictionTransformer Create(IHostEnvironmen // Returns prediction transformer using the right TModel from the previously loaded model Type predictionTransformerType = typeof(RegressionPredictionTransformer<>); - return (ISingleFeaturePredictionTransformer) CreatePredictionTransformer.Create(env, ctx, host, model, predictionTransformerType); + return (ISingleFeaturePredictionTransformer)CreatePredictionTransformer.Create(env, ctx, host, model, predictionTransformerType); } } @@ -776,7 +776,7 @@ public static ISingleFeaturePredictionTransformer Create(IHostEnvironmen // Returns prediction transformer using the right TModel from the previously loaded model Type predictionTransformerType = typeof(RankingPredictionTransformer<>); - return (ISingleFeaturePredictionTransformer) CreatePredictionTransformer.Create(env, ctx, host, model, predictionTransformerType); + return (ISingleFeaturePredictionTransformer)CreatePredictionTransformer.Create(env, ctx, host, model, predictionTransformerType); } } diff --git a/src/Microsoft.ML.Data/Scorers/QuantileRegressionScorer.cs b/src/Microsoft.ML.Data/Scorers/QuantileRegressionScorer.cs index 3d4710a1a8..206e7f0f10 100644 --- a/src/Microsoft.ML.Data/Scorers/QuantileRegressionScorer.cs +++ b/src/Microsoft.ML.Data/Scorers/QuantileRegressionScorer.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. @@ -66,4 +66,4 @@ private static Double[] ParseQuantiles(string quantiles) return quantilesArray; } } -} \ No newline at end of file +} diff --git a/src/Microsoft.ML.Data/Scorers/RowToRowScorerBase.cs b/src/Microsoft.ML.Data/Scorers/RowToRowScorerBase.cs index ad3f87441f..8432be7da4 100644 --- a/src/Microsoft.ML.Data/Scorers/RowToRowScorerBase.cs +++ b/src/Microsoft.ML.Data/Scorers/RowToRowScorerBase.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.Data/Scorers/SchemaBindablePredictorWrapper.cs b/src/Microsoft.ML.Data/Scorers/SchemaBindablePredictorWrapper.cs index e18bd087ee..da2f6276ed 100644 --- a/src/Microsoft.ML.Data/Scorers/SchemaBindablePredictorWrapper.cs +++ b/src/Microsoft.ML.Data/Scorers/SchemaBindablePredictorWrapper.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.Data/Scorers/ScoreSchemaFactory.cs b/src/Microsoft.ML.Data/Scorers/ScoreSchemaFactory.cs index 7aaf5a8d87..e71e6a1124 100644 --- a/src/Microsoft.ML.Data/Scorers/ScoreSchemaFactory.cs +++ b/src/Microsoft.ML.Data/Scorers/ScoreSchemaFactory.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. @@ -114,7 +114,7 @@ public static DataViewSchema CreateQuantileRegressionSchema(DataViewType scoreTy /// Sequence predictor usually generates integer outputs. This field tells the tags of all possible output values. /// For example, output integer 0 could be mapped to "Sell" and 0 to "Buy" when predicting stock trend. /// of sequence predictor's output. - public static DataViewSchema CreateSequencePredictionSchema(DataViewType scoreType, string scoreColumnKindValue, VBuffer> keyNames=default) + public static DataViewSchema CreateSequencePredictionSchema(DataViewType scoreType, string scoreColumnKindValue, VBuffer> keyNames = default) { Contracts.CheckValue(scoreType, nameof(scoreType)); Contracts.CheckValue(scoreColumnKindValue, nameof(scoreColumnKindValue)); diff --git a/src/Microsoft.ML.Data/TrainCatalog.cs b/src/Microsoft.ML.Data/TrainCatalog.cs index 75dd0b7a4d..56aed9d0f8 100644 --- a/src/Microsoft.ML.Data/TrainCatalog.cs +++ b/src/Microsoft.ML.Data/TrainCatalog.cs @@ -692,7 +692,7 @@ public RankingMetrics Evaluate(IDataView data, /// Per-fold results: metrics, models, scored datasets. public IReadOnlyList> CrossValidate( IDataView data, IEstimator estimator, int numberOfFolds = 5, string labelColumnName = DefaultColumnNames.Label, - string rowGroupColumnName = DefaultColumnNames.GroupId, int ? seed = null) + string rowGroupColumnName = DefaultColumnNames.GroupId, int? seed = null) { Environment.CheckNonEmpty(labelColumnName, nameof(labelColumnName)); var result = CrossValidateTrain(data, estimator, numberOfFolds, rowGroupColumnName, seed); diff --git a/src/Microsoft.ML.Data/Training/TrainerInputBase.cs b/src/Microsoft.ML.Data/Training/TrainerInputBase.cs index cf80735403..78d46a54e0 100644 --- a/src/Microsoft.ML.Data/Training/TrainerInputBase.cs +++ b/src/Microsoft.ML.Data/Training/TrainerInputBase.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.Data/Training/TrainerUtils.cs b/src/Microsoft.ML.Data/Training/TrainerUtils.cs index 1ac18c0876..76e3bf0eb3 100644 --- a/src/Microsoft.ML.Data/Training/TrainerUtils.cs +++ b/src/Microsoft.ML.Data/Training/TrainerUtils.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.Data/Transforms/BindingsWrappedRowCursor.cs b/src/Microsoft.ML.Data/Transforms/BindingsWrappedRowCursor.cs index 00cc298827..f668723707 100644 --- a/src/Microsoft.ML.Data/Transforms/BindingsWrappedRowCursor.cs +++ b/src/Microsoft.ML.Data/Transforms/BindingsWrappedRowCursor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.Data/Transforms/BootstrapSamplingTransformer.cs b/src/Microsoft.ML.Data/Transforms/BootstrapSamplingTransformer.cs index 61267dffed..f78837629f 100644 --- a/src/Microsoft.ML.Data/Transforms/BootstrapSamplingTransformer.cs +++ b/src/Microsoft.ML.Data/Transforms/BootstrapSamplingTransformer.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.Data/Transforms/CatalogUtils.cs b/src/Microsoft.ML.Data/Transforms/CatalogUtils.cs index 31eec9a28b..4b84dfa5e3 100644 --- a/src/Microsoft.ML.Data/Transforms/CatalogUtils.cs +++ b/src/Microsoft.ML.Data/Transforms/CatalogUtils.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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 Microsoft.ML.Runtime; diff --git a/src/Microsoft.ML.Data/Transforms/ColumnBindingsBase.cs b/src/Microsoft.ML.Data/Transforms/ColumnBindingsBase.cs index dbf2d97eb3..8879a4ed58 100644 --- a/src/Microsoft.ML.Data/Transforms/ColumnBindingsBase.cs +++ b/src/Microsoft.ML.Data/Transforms/ColumnBindingsBase.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. @@ -863,4 +863,4 @@ public static bool TryParse(string str, out string name, out string source, out return true; } } -} \ No newline at end of file +} diff --git a/src/Microsoft.ML.Data/Transforms/ColumnConcatenatingTransformer.cs b/src/Microsoft.ML.Data/Transforms/ColumnConcatenatingTransformer.cs index e4712a97d8..9cf8c576c0 100644 --- a/src/Microsoft.ML.Data/Transforms/ColumnConcatenatingTransformer.cs +++ b/src/Microsoft.ML.Data/Transforms/ColumnConcatenatingTransformer.cs @@ -950,4 +950,4 @@ public void SaveAsOnnx(OnnxContext ctx) } } } -} \ No newline at end of file +} diff --git a/src/Microsoft.ML.Data/Transforms/ColumnCopying.cs b/src/Microsoft.ML.Data/Transforms/ColumnCopying.cs index c79a9b5bbe..564ba93952 100644 --- a/src/Microsoft.ML.Data/Transforms/ColumnCopying.cs +++ b/src/Microsoft.ML.Data/Transforms/ColumnCopying.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.Data/Transforms/ColumnSelecting.cs b/src/Microsoft.ML.Data/Transforms/ColumnSelecting.cs index fbcde6585e..16937e0612 100644 --- a/src/Microsoft.ML.Data/Transforms/ColumnSelecting.cs +++ b/src/Microsoft.ML.Data/Transforms/ColumnSelecting.cs @@ -736,7 +736,7 @@ public void SaveAsOnnx(OnnxContext ctx) ctx.CheckOpSetVersion(minimumOpSetVersion, LoaderSignature); var outputToInputMap = _mapper.OutputToInputMap; - for(int i = 0; i < outputToInputMap.Length; i++) + for (int i = 0; i < outputToInputMap.Length; i++) { var srcCol = InputSchema[outputToInputMap[i]]; var dstCol = OutputSchema[i]; diff --git a/src/Microsoft.ML.Data/Transforms/ConversionsExtensionsCatalog.cs b/src/Microsoft.ML.Data/Transforms/ConversionsExtensionsCatalog.cs index bfb86bf13a..986b2d9964 100644 --- a/src/Microsoft.ML.Data/Transforms/ConversionsExtensionsCatalog.cs +++ b/src/Microsoft.ML.Data/Transforms/ConversionsExtensionsCatalog.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.Data/Transforms/FeatureContributionCalculationTransformer.cs b/src/Microsoft.ML.Data/Transforms/FeatureContributionCalculationTransformer.cs index e4de14b814..77aa9e8d50 100644 --- a/src/Microsoft.ML.Data/Transforms/FeatureContributionCalculationTransformer.cs +++ b/src/Microsoft.ML.Data/Transforms/FeatureContributionCalculationTransformer.cs @@ -377,7 +377,7 @@ public static CommonOutputs.TransformOutput FeatureContributionCalculation(IHost throw host.ExceptUserArg(nameof(predictor), "The provided model parameters do not support feature contribution calculation."); var outData = new FeatureContributionCalculatingTransformer(host, predictor, options.FeatureColumn, options.Top, options.Bottom, options.Normalize).Transform(options.Data); - return new CommonOutputs.TransformOutput { Model = new TransformModelImpl(env, outData, options.Data), OutputData = outData}; + return new CommonOutputs.TransformOutput { Model = new TransformModelImpl(env, outData, options.Data), OutputData = outData }; } } } diff --git a/src/Microsoft.ML.Data/Transforms/GenerateNumberTransform.cs b/src/Microsoft.ML.Data/Transforms/GenerateNumberTransform.cs index 54c332f6f2..e684af902a 100644 --- a/src/Microsoft.ML.Data/Transforms/GenerateNumberTransform.cs +++ b/src/Microsoft.ML.Data/Transforms/GenerateNumberTransform.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.Data/Transforms/Hashing.cs b/src/Microsoft.ML.Data/Transforms/Hashing.cs index 027a7a0854..8e7dd10221 100644 --- a/src/Microsoft.ML.Data/Transforms/Hashing.cs +++ b/src/Microsoft.ML.Data/Transforms/Hashing.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. @@ -1447,7 +1447,7 @@ private bool SaveAsOnnxCore(OnnxContext ctx, int iinfo, string srcVariable, stri } opType = "Cast"; - var input = (_srcTypes[iinfo] is KeyDataViewType) ? mulOutput: addOutput; + var input = (_srcTypes[iinfo] is KeyDataViewType) ? mulOutput : addOutput; var castNodeFinal = ctx.CreateNode(opType, input, dstVariable, ctx.GetNodeName(opType), ""); castNodeFinal.AddAttribute("to", _dstTypes[iinfo].GetItemType().RawType); return true; diff --git a/src/Microsoft.ML.Data/Transforms/InvertHashUtils.cs b/src/Microsoft.ML.Data/Transforms/InvertHashUtils.cs index 1cd1c1a126..169999d314 100644 --- a/src/Microsoft.ML.Data/Transforms/InvertHashUtils.cs +++ b/src/Microsoft.ML.Data/Transforms/InvertHashUtils.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.Data/Transforms/KeyToValue.cs b/src/Microsoft.ML.Data/Transforms/KeyToValue.cs index 47705d021a..5fd23314ab 100644 --- a/src/Microsoft.ML.Data/Transforms/KeyToValue.cs +++ b/src/Microsoft.ML.Data/Transforms/KeyToValue.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.Data/Transforms/KeyToVector.cs b/src/Microsoft.ML.Data/Transforms/KeyToVector.cs index 38b5355393..c773278eaa 100644 --- a/src/Microsoft.ML.Data/Transforms/KeyToVector.cs +++ b/src/Microsoft.ML.Data/Transforms/KeyToVector.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.Data/Transforms/LabelConvertTransform.cs b/src/Microsoft.ML.Data/Transforms/LabelConvertTransform.cs index 4116b4eeff..eb226b17d7 100644 --- a/src/Microsoft.ML.Data/Transforms/LabelConvertTransform.cs +++ b/src/Microsoft.ML.Data/Transforms/LabelConvertTransform.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.Data/Transforms/LabelIndicatorTransform.cs b/src/Microsoft.ML.Data/Transforms/LabelIndicatorTransform.cs index c9d65b227a..a2f0afa5f8 100644 --- a/src/Microsoft.ML.Data/Transforms/LabelIndicatorTransform.cs +++ b/src/Microsoft.ML.Data/Transforms/LabelIndicatorTransform.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.Data/Transforms/MetadataDispatcher.cs b/src/Microsoft.ML.Data/Transforms/MetadataDispatcher.cs index 0b4b78f05b..4bbabd9891 100644 --- a/src/Microsoft.ML.Data/Transforms/MetadataDispatcher.cs +++ b/src/Microsoft.ML.Data/Transforms/MetadataDispatcher.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.Data/Transforms/NAFilter.cs b/src/Microsoft.ML.Data/Transforms/NAFilter.cs index 5d24f7fa93..80c2c46d56 100644 --- a/src/Microsoft.ML.Data/Transforms/NAFilter.cs +++ b/src/Microsoft.ML.Data/Transforms/NAFilter.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.Data/Transforms/NopTransform.cs b/src/Microsoft.ML.Data/Transforms/NopTransform.cs index a7ad864302..dbec791b46 100644 --- a/src/Microsoft.ML.Data/Transforms/NopTransform.cs +++ b/src/Microsoft.ML.Data/Transforms/NopTransform.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. @@ -153,4 +153,4 @@ public static CommonOutputs.TransformOutput Nop(IHostEnvironment env, NopInput i return new CommonOutputs.TransformOutput { Model = new TransformModelImpl(env, xf, input.Data), OutputData = xf }; } } -} \ No newline at end of file +} diff --git a/src/Microsoft.ML.Data/Transforms/NormalizeColumn.cs b/src/Microsoft.ML.Data/Transforms/NormalizeColumn.cs index 4990365912..934adf2910 100644 --- a/src/Microsoft.ML.Data/Transforms/NormalizeColumn.cs +++ b/src/Microsoft.ML.Data/Transforms/NormalizeColumn.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. @@ -73,7 +73,7 @@ private protected override bool TryUnparseCore(StringBuilder sb) public abstract class ControlZeroColumnBase : ColumnBase { // REVIEW: This only allows mapping either zero or min to zero. It might make sense to allow also max, midpoint and mean to be mapped to zero. - [Argument(ArgumentType.AtMostOnce, Name="FixZero", HelpText = "Whether to map zero to zero, preserving sparsity", ShortName = "zero")] + [Argument(ArgumentType.AtMostOnce, Name = "FixZero", HelpText = "Whether to map zero to zero, preserving sparsity", ShortName = "zero")] public bool? EnsureZeroUntouched; private protected override bool TryUnparseCore(StringBuilder sb) diff --git a/src/Microsoft.ML.Data/Transforms/NormalizeColumnDbl.cs b/src/Microsoft.ML.Data/Transforms/NormalizeColumnDbl.cs index 805efdeeaa..a89bc62b09 100644 --- a/src/Microsoft.ML.Data/Transforms/NormalizeColumnDbl.cs +++ b/src/Microsoft.ML.Data/Transforms/NormalizeColumnDbl.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.Data/Transforms/NormalizeColumnSng.cs b/src/Microsoft.ML.Data/Transforms/NormalizeColumnSng.cs index c4094c2876..849bfed257 100644 --- a/src/Microsoft.ML.Data/Transforms/NormalizeColumnSng.cs +++ b/src/Microsoft.ML.Data/Transforms/NormalizeColumnSng.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. @@ -1530,7 +1530,7 @@ public override NormalizingTransformer.NormalizerModelParametersBase GetNormaliz _binUpperBounds.Select(b => ImmutableArray.Create(b)).ToImmutableArray(), ImmutableArray.Create(_den), ImmutableArray.Create(_offset)); - } + } } } @@ -2262,7 +2262,7 @@ private RobustScalerVecFunctionBuilder(IHost host, long lim, int vectorSize, boo _minMaxAggregator = new MinMaxSngAggregator(vectorSize); _medianAggregators = new MedianSngAggregator[vectorSize]; - for(int i = 0; i < vectorSize; i++) + for (int i = 0; i < vectorSize; i++) { _medianAggregators[i] = new MedianSngAggregator(); } @@ -2313,7 +2313,7 @@ public override IColumnFunction CreateColumnFunction() // Divide the range by 100 because we need to make the number, i.e. 75, into a decimal, .75 TFloat quantileRange = (_quantileMax - _quantileMin) / 100f; - scale[i] = 1 / (range * quantileRange); + scale[i] = 1 / (range * quantileRange); } diff --git a/src/Microsoft.ML.Data/Transforms/NormalizeUtils.cs b/src/Microsoft.ML.Data/Transforms/NormalizeUtils.cs index 157966145e..0b151375b5 100644 --- a/src/Microsoft.ML.Data/Transforms/NormalizeUtils.cs +++ b/src/Microsoft.ML.Data/Transforms/NormalizeUtils.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.Data/Transforms/Normalizer.cs b/src/Microsoft.ML.Data/Transforms/Normalizer.cs index ace25ae86a..8594093d0c 100644 --- a/src/Microsoft.ML.Data/Transforms/Normalizer.cs +++ b/src/Microsoft.ML.Data/Transforms/Normalizer.cs @@ -543,7 +543,7 @@ internal static NormalizingTransformer Train(IHostEnvironment env, IDataView dat activeCols.Add(data.Schema[srcCols[i]]); var supervisedBinColumn = info as NormalizingEstimator.SupervisedBinningColumOptions; - if(supervisedBinColumn != null) + if (supervisedBinColumn != null) activeCols.Add(data.Schema[supervisedBinColumn.LabelColumnName]); } diff --git a/src/Microsoft.ML.Data/Transforms/PerGroupTransformBase.cs b/src/Microsoft.ML.Data/Transforms/PerGroupTransformBase.cs index 703b574f90..a5e7d7b80b 100644 --- a/src/Microsoft.ML.Data/Transforms/PerGroupTransformBase.cs +++ b/src/Microsoft.ML.Data/Transforms/PerGroupTransformBase.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.Data/Transforms/RangeFilter.cs b/src/Microsoft.ML.Data/Transforms/RangeFilter.cs index db131a782e..1a4bce897e 100644 --- a/src/Microsoft.ML.Data/Transforms/RangeFilter.cs +++ b/src/Microsoft.ML.Data/Transforms/RangeFilter.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.Data/Transforms/RowShufflingTransformer.cs b/src/Microsoft.ML.Data/Transforms/RowShufflingTransformer.cs index 6f70d4ff0c..6e92c77c0f 100644 --- a/src/Microsoft.ML.Data/Transforms/RowShufflingTransformer.cs +++ b/src/Microsoft.ML.Data/Transforms/RowShufflingTransformer.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.Data/Transforms/SkipTakeFilter.cs b/src/Microsoft.ML.Data/Transforms/SkipTakeFilter.cs index 8a58d7f136..00ab8d3dd5 100644 --- a/src/Microsoft.ML.Data/Transforms/SkipTakeFilter.cs +++ b/src/Microsoft.ML.Data/Transforms/SkipTakeFilter.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. @@ -285,4 +285,4 @@ protected override bool MoveNextCore() } } } -} \ No newline at end of file +} diff --git a/src/Microsoft.ML.Data/Transforms/SlotsDroppingTransformer.cs b/src/Microsoft.ML.Data/Transforms/SlotsDroppingTransformer.cs index 0dbef23e73..3980c508cd 100644 --- a/src/Microsoft.ML.Data/Transforms/SlotsDroppingTransformer.cs +++ b/src/Microsoft.ML.Data/Transforms/SlotsDroppingTransformer.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.Data/Transforms/TrainAndScoreTransformer.cs b/src/Microsoft.ML.Data/Transforms/TrainAndScoreTransformer.cs index afc6a369cd..4173cbe293 100644 --- a/src/Microsoft.ML.Data/Transforms/TrainAndScoreTransformer.cs +++ b/src/Microsoft.ML.Data/Transforms/TrainAndScoreTransformer.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.Data/Transforms/TransformBase.cs b/src/Microsoft.ML.Data/Transforms/TransformBase.cs index 8d21772607..6adc6fafb8 100644 --- a/src/Microsoft.ML.Data/Transforms/TransformBase.cs +++ b/src/Microsoft.ML.Data/Transforms/TransformBase.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.Data/Transforms/TransformInputBase.cs b/src/Microsoft.ML.Data/Transforms/TransformInputBase.cs index a2141cee6c..0e582f7e49 100644 --- a/src/Microsoft.ML.Data/Transforms/TransformInputBase.cs +++ b/src/Microsoft.ML.Data/Transforms/TransformInputBase.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.Data/Transforms/TypeConverting.cs b/src/Microsoft.ML.Data/Transforms/TypeConverting.cs index 4ca7603a67..1859a5b6be 100644 --- a/src/Microsoft.ML.Data/Transforms/TypeConverting.cs +++ b/src/Microsoft.ML.Data/Transforms/TypeConverting.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.Data/Transforms/ValueMapping.cs b/src/Microsoft.ML.Data/Transforms/ValueMapping.cs index 47c6ff8836..b04334f472 100644 --- a/src/Microsoft.ML.Data/Transforms/ValueMapping.cs +++ b/src/Microsoft.ML.Data/Transforms/ValueMapping.cs @@ -1070,9 +1070,9 @@ public void SaveAsOnnx(OnnxContext ctx) var type = _inputSchema[colSrc].Type; DataViewType colType; if (type is VectorDataViewType vectorType) - colType = new VectorDataViewType((PrimitiveDataViewType)_parent.ValueColumnType, vectorType.Dimensions); + colType = new VectorDataViewType((PrimitiveDataViewType)_parent.ValueColumnType, vectorType.Dimensions); else - colType = _parent.ValueColumnType; + colType = _parent.ValueColumnType; string dstVariableName = ctx.AddIntermediateVariable(colType, outputColumnName); if (!ctx.ContainsColumn(inputColumnName)) continue; @@ -1112,7 +1112,7 @@ private bool SaveAsOnnxCore(OnnxContext ctx, string srcVariableName, string dstV 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"); + 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 diff --git a/src/Microsoft.ML.Data/Transforms/ValueToKeyMappingEstimator.cs b/src/Microsoft.ML.Data/Transforms/ValueToKeyMappingEstimator.cs index 2f1f929762..4d78dcaa41 100644 --- a/src/Microsoft.ML.Data/Transforms/ValueToKeyMappingEstimator.cs +++ b/src/Microsoft.ML.Data/Transforms/ValueToKeyMappingEstimator.cs @@ -145,7 +145,7 @@ public ColumnOptions(string outputColumnName, string inputColumnName = null, /// If set to , keys are assigned in the order encountered. /// If set to , values are sorted, and keys are assigned based on the sort order. internal ValueToKeyMappingEstimator(IHostEnvironment env, string outputColumnName, string inputColumnName = null, int maximumNumberOfKeys = Defaults.MaximumNumberOfKeys, KeyOrdinality keyOrdinality = Defaults.Ordinality) : - this(env, new [] { new ColumnOptions(outputColumnName, inputColumnName ?? outputColumnName, maximumNumberOfKeys, keyOrdinality) }) + this(env, new[] { new ColumnOptions(outputColumnName, inputColumnName ?? outputColumnName, maximumNumberOfKeys, keyOrdinality) }) { } diff --git a/src/Microsoft.ML.Data/Transforms/ValueToKeyMappingTransformer.cs b/src/Microsoft.ML.Data/Transforms/ValueToKeyMappingTransformer.cs index 39cd8ff817..69b5a6db59 100644 --- a/src/Microsoft.ML.Data/Transforms/ValueToKeyMappingTransformer.cs +++ b/src/Microsoft.ML.Data/Transforms/ValueToKeyMappingTransformer.cs @@ -846,7 +846,7 @@ private bool SaveAsOnnxCore(OnnxContext ctx, int iinfo, ColInfo info, string src } else if (type.Equals(NumberDataViewType.Int64)) { - CastInputToString(ctx, out node, out termIds ,srcVariableName, iinfo, opType, labelEncoderOutput ); + CastInputToString(ctx, out node, out termIds, srcVariableName, iinfo, opType, labelEncoderOutput); } else if (type.Equals(NumberDataViewType.Int32)) { diff --git a/src/Microsoft.ML.Data/Utilities/ApplyTransformUtils.cs b/src/Microsoft.ML.Data/Utilities/ApplyTransformUtils.cs index 9e732e144b..233fc37793 100644 --- a/src/Microsoft.ML.Data/Utilities/ApplyTransformUtils.cs +++ b/src/Microsoft.ML.Data/Utilities/ApplyTransformUtils.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.Data/Utilities/ComponentCreation.cs b/src/Microsoft.ML.Data/Utilities/ComponentCreation.cs index 33806d5ea4..f164b74089 100644 --- a/src/Microsoft.ML.Data/Utilities/ComponentCreation.cs +++ b/src/Microsoft.ML.Data/Utilities/ComponentCreation.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.Data/Utilities/LocalEnvironment.cs b/src/Microsoft.ML.Data/Utilities/LocalEnvironment.cs index 411c2268bd..9e8adf0ef9 100644 --- a/src/Microsoft.ML.Data/Utilities/LocalEnvironment.cs +++ b/src/Microsoft.ML.Data/Utilities/LocalEnvironment.cs @@ -30,7 +30,7 @@ private void ChannelFinished() protected override void Dispose(bool disposing) { - if(disposing) + if (disposing) { ChannelFinished(); Watch.Stop(); diff --git a/src/Microsoft.ML.Data/Utilities/ModelFileUtils.cs b/src/Microsoft.ML.Data/Utilities/ModelFileUtils.cs index 80bf00a761..7fb50d0220 100644 --- a/src/Microsoft.ML.Data/Utilities/ModelFileUtils.cs +++ b/src/Microsoft.ML.Data/Utilities/ModelFileUtils.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.Data/Utilities/SlotDropper.cs b/src/Microsoft.ML.Data/Utilities/SlotDropper.cs index 7ba3e6564f..80183c45f4 100644 --- a/src/Microsoft.ML.Data/Utilities/SlotDropper.cs +++ b/src/Microsoft.ML.Data/Utilities/SlotDropper.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. @@ -225,7 +225,7 @@ public IEnumerable GetPreservedSlots() { droppedSlots = droppedSlots.Concat(Enumerable.Range(SlotsMin[i], SlotsMax[i] - SlotsMin[i] + 1)); } - return slots.Except(droppedSlots).Select(i=>(long)i); + return slots.Except(droppedSlots).Select(i => (long)i); } } } diff --git a/src/Microsoft.ML.Data/Utilities/StreamUtils.cs b/src/Microsoft.ML.Data/Utilities/StreamUtils.cs index f157d09ea8..06d215b691 100644 --- a/src/Microsoft.ML.Data/Utilities/StreamUtils.cs +++ b/src/Microsoft.ML.Data/Utilities/StreamUtils.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.Data/Utilities/TimerScope.cs b/src/Microsoft.ML.Data/Utilities/TimerScope.cs index beec232ef1..4b83e9c81d 100644 --- a/src/Microsoft.ML.Data/Utilities/TimerScope.cs +++ b/src/Microsoft.ML.Data/Utilities/TimerScope.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.Data/Utilities/TypeParsingUtils.cs b/src/Microsoft.ML.Data/Utilities/TypeParsingUtils.cs index d9f4d5c8b9..d76a388168 100644 --- a/src/Microsoft.ML.Data/Utilities/TypeParsingUtils.cs +++ b/src/Microsoft.ML.Data/Utilities/TypeParsingUtils.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.Data/Utils/ApiUtils.cs b/src/Microsoft.ML.Data/Utils/ApiUtils.cs index baece31a27..02d1893f0d 100644 --- a/src/Microsoft.ML.Data/Utils/ApiUtils.cs +++ b/src/Microsoft.ML.Data/Utils/ApiUtils.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.Data/Utils/LossFunctions.cs b/src/Microsoft.ML.Data/Utils/LossFunctions.cs index eb964431da..5e63a32fc9 100644 --- a/src/Microsoft.ML.Data/Utils/LossFunctions.cs +++ b/src/Microsoft.ML.Data/Utils/LossFunctions.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. @@ -651,4 +651,4 @@ public float Derivative(float output, float label) return (float)(Math.Pow(output, _index2) - label * Math.Pow(output, _index1)); } } -} \ No newline at end of file +} diff --git a/src/Microsoft.ML.Data/Utils/SequencePool.cs b/src/Microsoft.ML.Data/Utils/SequencePool.cs index 4889925d85..614df65188 100644 --- a/src/Microsoft.ML.Data/Utils/SequencePool.cs +++ b/src/Microsoft.ML.Data/Utils/SequencePool.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.DataView/Contracts.cs b/src/Microsoft.ML.DataView/Contracts.cs index 9b7f0fb183..4a73dd99b2 100644 --- a/src/Microsoft.ML.DataView/Contracts.cs +++ b/src/Microsoft.ML.DataView/Contracts.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.DataView/DataViewRowId.cs b/src/Microsoft.ML.DataView/DataViewRowId.cs index 7d7099079b..ccc2ecb63a 100644 --- a/src/Microsoft.ML.DataView/DataViewRowId.cs +++ b/src/Microsoft.ML.DataView/DataViewRowId.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.DataView/DataViewType.cs b/src/Microsoft.ML.DataView/DataViewType.cs index 9a12cfe981..86518da80d 100644 --- a/src/Microsoft.ML.DataView/DataViewType.cs +++ b/src/Microsoft.ML.DataView/DataViewType.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. @@ -486,4 +486,4 @@ public abstract class DataViewTypeAttribute : Attribute, IEquatableAnother to be compared with . public abstract bool Equals(DataViewTypeAttribute other); } -} \ No newline at end of file +} diff --git a/src/Microsoft.ML.DataView/Hashing.cs b/src/Microsoft.ML.DataView/Hashing.cs index 3759bd1396..11d0a69ae4 100644 --- a/src/Microsoft.ML.DataView/Hashing.cs +++ b/src/Microsoft.ML.DataView/Hashing.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. @@ -17,4 +17,4 @@ public static int CombineHash(int n1, int n2) return (int)CombineHash((uint)n1, (uint)n2); } } -} \ No newline at end of file +} diff --git a/src/Microsoft.ML.DataView/IDataView.cs b/src/Microsoft.ML.DataView/IDataView.cs index 49bf90164e..317c7978d9 100644 --- a/src/Microsoft.ML.DataView/IDataView.cs +++ b/src/Microsoft.ML.DataView/IDataView.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. @@ -197,4 +197,4 @@ public abstract class DataViewRowCursor : DataViewRow /// public abstract bool MoveNext(); } -} \ No newline at end of file +} diff --git a/src/Microsoft.ML.DataView/KeyDataViewType.cs b/src/Microsoft.ML.DataView/KeyDataViewType.cs index 82b3faa587..60bb4fceb2 100644 --- a/src/Microsoft.ML.DataView/KeyDataViewType.cs +++ b/src/Microsoft.ML.DataView/KeyDataViewType.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. @@ -175,4 +175,4 @@ public override string ToString() return string.Format("Key<{0}, {1}-{2}>", rawTypeName, 0, Count - 1); } } -} \ No newline at end of file +} diff --git a/src/Microsoft.ML.DataView/VBuffer.cs b/src/Microsoft.ML.DataView/VBuffer.cs index 3f520026a5..6d23726375 100644 --- a/src/Microsoft.ML.DataView/VBuffer.cs +++ b/src/Microsoft.ML.DataView/VBuffer.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. @@ -522,4 +522,4 @@ private static IEnumerable DenseValues(T[] values, int[] indices, int length, } } } -} \ No newline at end of file +} diff --git a/src/Microsoft.ML.DataView/VectorType.cs b/src/Microsoft.ML.DataView/VectorType.cs index 8402b27661..574a473f1e 100644 --- a/src/Microsoft.ML.DataView/VectorType.cs +++ b/src/Microsoft.ML.DataView/VectorType.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. @@ -178,4 +178,4 @@ public override string ToString() return sb.ToString(); } } -} \ No newline at end of file +} diff --git a/src/Microsoft.ML.DnnAnalyzer/Microsoft.ML.DnnAnalyzer/DnnAnalyzer.cs b/src/Microsoft.ML.DnnAnalyzer/Microsoft.ML.DnnAnalyzer/DnnAnalyzer.cs index 42813cca95..7a9fadb0f8 100644 --- a/src/Microsoft.ML.DnnAnalyzer/Microsoft.ML.DnnAnalyzer/DnnAnalyzer.cs +++ b/src/Microsoft.ML.DnnAnalyzer/Microsoft.ML.DnnAnalyzer/DnnAnalyzer.cs @@ -41,7 +41,7 @@ public static void Main(string[] args) ReadOnlyMemory opType = default; schema[i].Annotations.GetValue("TensorflowOperatorType", ref opType); metadataType = schema[i].Annotations.Schema.GetColumnOrNull("TensorflowUpstreamOperators")?.Type; - VBuffer > inputOps = default; + VBuffer> inputOps = default; if (metadataType != null) { schema[i].Annotations.GetValue("TensorflowUpstreamOperators", ref inputOps); diff --git a/src/Microsoft.ML.DnnImageFeaturizer.AlexNet/AlexNetExtension.cs b/src/Microsoft.ML.DnnImageFeaturizer.AlexNet/AlexNetExtension.cs index dbde57cae1..a9cfede114 100644 --- a/src/Microsoft.ML.DnnImageFeaturizer.AlexNet/AlexNetExtension.cs +++ b/src/Microsoft.ML.DnnImageFeaturizer.AlexNet/AlexNetExtension.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. @@ -53,4 +53,4 @@ public static EstimatorChain AlexNet(this DnnImageMode return modelChain; } } -} \ No newline at end of file +} diff --git a/src/Microsoft.ML.DnnImageFeaturizer.ResNet101/ResNet101Extension.cs b/src/Microsoft.ML.DnnImageFeaturizer.ResNet101/ResNet101Extension.cs index b4ac3119a5..527acc83a7 100644 --- a/src/Microsoft.ML.DnnImageFeaturizer.ResNet101/ResNet101Extension.cs +++ b/src/Microsoft.ML.DnnImageFeaturizer.ResNet101/ResNet101Extension.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. @@ -53,4 +53,4 @@ public static EstimatorChain ResNet101(this DnnImageMo return modelChain; } } -} \ No newline at end of file +} diff --git a/src/Microsoft.ML.DnnImageFeaturizer.ResNet18/ResNet18Extension.cs b/src/Microsoft.ML.DnnImageFeaturizer.ResNet18/ResNet18Extension.cs index 9572201cc1..cf1ad39afb 100644 --- a/src/Microsoft.ML.DnnImageFeaturizer.ResNet18/ResNet18Extension.cs +++ b/src/Microsoft.ML.DnnImageFeaturizer.ResNet18/ResNet18Extension.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. @@ -53,4 +53,4 @@ public static EstimatorChain ResNet18(this DnnImageMod return modelChain; } } -} \ No newline at end of file +} diff --git a/src/Microsoft.ML.DnnImageFeaturizer.ResNet50/ResNet50Extension.cs b/src/Microsoft.ML.DnnImageFeaturizer.ResNet50/ResNet50Extension.cs index 26daf2397f..08d3eef9db 100644 --- a/src/Microsoft.ML.DnnImageFeaturizer.ResNet50/ResNet50Extension.cs +++ b/src/Microsoft.ML.DnnImageFeaturizer.ResNet50/ResNet50Extension.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. @@ -53,4 +53,4 @@ public static EstimatorChain ResNet50(this DnnImageMod return modelChain; } } -} \ No newline at end of file +} diff --git a/src/Microsoft.ML.Ensemble/OutputCombiners/BaseStacking.cs b/src/Microsoft.ML.Ensemble/OutputCombiners/BaseStacking.cs index 5416542bc0..c80e9f9903 100644 --- a/src/Microsoft.ML.Ensemble/OutputCombiners/BaseStacking.cs +++ b/src/Microsoft.ML.Ensemble/OutputCombiners/BaseStacking.cs @@ -154,15 +154,15 @@ private IDataView CreateDataView(IHostEnvironment env, IChannel ch, RoleMappedDa { switch (data.Schema.Label.Value.Type.GetRawKind()) { - case InternalDataKind.BL: - return CreateDataView(env, ch, data, maps, models, x => x > 0); - case InternalDataKind.R4: - return CreateDataView(env, ch, data, maps, models, x => x); - case InternalDataKind.U4: - ch.Check(data.Schema.Label.Value.Type is KeyDataViewType); - return CreateDataView(env, ch, data, maps, models, x => float.IsNaN(x) ? 0 : (uint)(x + 1)); - default: - throw ch.Except("Unsupported label type"); + case InternalDataKind.BL: + return CreateDataView(env, ch, data, maps, models, x => x > 0); + case InternalDataKind.R4: + return CreateDataView(env, ch, data, maps, models, x => x); + case InternalDataKind.U4: + ch.Check(data.Schema.Label.Value.Type is KeyDataViewType); + return CreateDataView(env, ch, data, maps, models, x => float.IsNaN(x) ? 0 : (uint)(x + 1)); + default: + throw ch.Except("Unsupported label type"); } } diff --git a/src/Microsoft.ML.Ensemble/OutputCombiners/IOutputCombiner.cs b/src/Microsoft.ML.Ensemble/OutputCombiners/IOutputCombiner.cs index 8f78a02cb1..2712bc324c 100644 --- a/src/Microsoft.ML.Ensemble/OutputCombiners/IOutputCombiner.cs +++ b/src/Microsoft.ML.Ensemble/OutputCombiners/IOutputCombiner.cs @@ -69,4 +69,4 @@ internal interface IWeightedAverager string WeightageMetricName { get; } } -} \ No newline at end of file +} diff --git a/src/Microsoft.ML.Ensemble/Properties/AssemblyInfo.cs b/src/Microsoft.ML.Ensemble/Properties/AssemblyInfo.cs index 871602cece..7f4dd1669a 100644 --- a/src/Microsoft.ML.Ensemble/Properties/AssemblyInfo.cs +++ b/src/Microsoft.ML.Ensemble/Properties/AssemblyInfo.cs @@ -9,4 +9,4 @@ [assembly: InternalsVisibleTo("Microsoft.ML.Core.Tests" + PublicKey.TestValue)] [assembly: InternalsVisibleTo("RunTests" + InternalPublicKey.Value)] [assembly: InternalsVisibleTo("Microsoft.ML.Runtime.Scope" + InternalPublicKey.Value)] -[assembly: InternalsVisibleTo("DotNetBridge" + InternalPublicKey.Value)] \ No newline at end of file +[assembly: InternalsVisibleTo("DotNetBridge" + InternalPublicKey.Value)] diff --git a/src/Microsoft.ML.Ensemble/Subset.cs b/src/Microsoft.ML.Ensemble/Subset.cs index f55f32d336..16212afa89 100644 --- a/src/Microsoft.ML.Ensemble/Subset.cs +++ b/src/Microsoft.ML.Ensemble/Subset.cs @@ -20,4 +20,4 @@ public Subset(RoleMappedData data, BitArray features = null) SelectedFeatures = features; } } -} \ No newline at end of file +} diff --git a/src/Microsoft.ML.Ensemble/Trainer/Binary/EnsembleTrainer.cs b/src/Microsoft.ML.Ensemble/Trainer/Binary/EnsembleTrainer.cs index f1b4e9daa7..257206a165 100644 --- a/src/Microsoft.ML.Ensemble/Trainer/Binary/EnsembleTrainer.cs +++ b/src/Microsoft.ML.Ensemble/Trainer/Binary/EnsembleTrainer.cs @@ -105,4 +105,4 @@ public IPredictor CombineModels(IEnumerable models) models.Select(k => new FeatureSubsetModel((TScalarPredictor)k)).ToArray(), combiner); } } -} \ No newline at end of file +} diff --git a/src/Microsoft.ML.Ensemble/Trainer/EnsembleModelParameters.cs b/src/Microsoft.ML.Ensemble/Trainer/EnsembleModelParameters.cs index 4db10bf000..eafb5c935a 100644 --- a/src/Microsoft.ML.Ensemble/Trainer/EnsembleModelParameters.cs +++ b/src/Microsoft.ML.Ensemble/Trainer/EnsembleModelParameters.cs @@ -164,4 +164,4 @@ ValueMapper IValueMapper.GetMapper() return (ValueMapper)(Delegate)del; } } -} \ No newline at end of file +} diff --git a/src/Microsoft.ML.EntryPoints/CVSplit.cs b/src/Microsoft.ML.EntryPoints/CVSplit.cs index 87d3de3be2..b190e65992 100644 --- a/src/Microsoft.ML.EntryPoints/CVSplit.cs +++ b/src/Microsoft.ML.EntryPoints/CVSplit.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.EntryPoints/CrossValidationMacro.cs b/src/Microsoft.ML.EntryPoints/CrossValidationMacro.cs index 8262dec23f..aae878b02b 100644 --- a/src/Microsoft.ML.EntryPoints/CrossValidationMacro.cs +++ b/src/Microsoft.ML.EntryPoints/CrossValidationMacro.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. @@ -423,22 +423,22 @@ private static IMamlEvaluator GetEvaluator(IHostEnvironment env, MacroUtils.Trai { switch (kind) { - case MacroUtils.TrainerKinds.SignatureBinaryClassifierTrainer: - return new BinaryClassifierMamlEvaluator(env, new BinaryClassifierMamlEvaluator.Arguments()); - case MacroUtils.TrainerKinds.SignatureMulticlassClassificationTrainer: - return new MulticlassClassificationMamlEvaluator(env, new MulticlassClassificationMamlEvaluator.Arguments()); - case MacroUtils.TrainerKinds.SignatureRegressorTrainer: - return new RegressionMamlEvaluator(env, new RegressionMamlEvaluator.Arguments()); - case MacroUtils.TrainerKinds.SignatureRankerTrainer: - return new RankingMamlEvaluator(env, new RankingMamlEvaluator.Arguments()); - case MacroUtils.TrainerKinds.SignatureAnomalyDetectorTrainer: - return new AnomalyDetectionMamlEvaluator(env, new AnomalyDetectionMamlEvaluator.Arguments()); - case MacroUtils.TrainerKinds.SignatureClusteringTrainer: - return new ClusteringMamlEvaluator(env, new ClusteringMamlEvaluator.Arguments()); - case MacroUtils.TrainerKinds.SignatureMultiOutputRegressorTrainer: - return new MultiOutputRegressionMamlEvaluator(env, new MultiOutputRegressionMamlEvaluator.Arguments()); - default: - throw env.ExceptParam(nameof(kind), $"Trainer kind {kind} does not have an evaluator"); + case MacroUtils.TrainerKinds.SignatureBinaryClassifierTrainer: + return new BinaryClassifierMamlEvaluator(env, new BinaryClassifierMamlEvaluator.Arguments()); + case MacroUtils.TrainerKinds.SignatureMulticlassClassificationTrainer: + return new MulticlassClassificationMamlEvaluator(env, new MulticlassClassificationMamlEvaluator.Arguments()); + case MacroUtils.TrainerKinds.SignatureRegressorTrainer: + return new RegressionMamlEvaluator(env, new RegressionMamlEvaluator.Arguments()); + case MacroUtils.TrainerKinds.SignatureRankerTrainer: + return new RankingMamlEvaluator(env, new RankingMamlEvaluator.Arguments()); + case MacroUtils.TrainerKinds.SignatureAnomalyDetectorTrainer: + return new AnomalyDetectionMamlEvaluator(env, new AnomalyDetectionMamlEvaluator.Arguments()); + case MacroUtils.TrainerKinds.SignatureClusteringTrainer: + return new ClusteringMamlEvaluator(env, new ClusteringMamlEvaluator.Arguments()); + case MacroUtils.TrainerKinds.SignatureMultiOutputRegressorTrainer: + return new MultiOutputRegressionMamlEvaluator(env, new MultiOutputRegressionMamlEvaluator.Arguments()); + default: + throw env.ExceptParam(nameof(kind), $"Trainer kind {kind} does not have an evaluator"); } } } diff --git a/src/Microsoft.ML.EntryPoints/FeatureCombiner.cs b/src/Microsoft.ML.EntryPoints/FeatureCombiner.cs index 3a5ba4ccca..00b6025756 100644 --- a/src/Microsoft.ML.EntryPoints/FeatureCombiner.cs +++ b/src/Microsoft.ML.EntryPoints/FeatureCombiner.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.EntryPoints/ImportTextData.cs b/src/Microsoft.ML.EntryPoints/ImportTextData.cs index 3a93b16af1..932427be62 100644 --- a/src/Microsoft.ML.EntryPoints/ImportTextData.cs +++ b/src/Microsoft.ML.EntryPoints/ImportTextData.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.EntryPoints/JsonUtils/ExecuteGraphCommand.cs b/src/Microsoft.ML.EntryPoints/JsonUtils/ExecuteGraphCommand.cs index d03fa096f3..01ba079851 100644 --- a/src/Microsoft.ML.EntryPoints/JsonUtils/ExecuteGraphCommand.cs +++ b/src/Microsoft.ML.EntryPoints/JsonUtils/ExecuteGraphCommand.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.EntryPoints/JsonUtils/GraphRunner.cs b/src/Microsoft.ML.EntryPoints/JsonUtils/GraphRunner.cs index 963b8cb524..ad8789a382 100644 --- a/src/Microsoft.ML.EntryPoints/JsonUtils/GraphRunner.cs +++ b/src/Microsoft.ML.EntryPoints/JsonUtils/GraphRunner.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. @@ -108,7 +108,7 @@ public TOutput GetOutputOrDefault(string name) _host.CheckNonEmpty(name, nameof(name)); if (_graph.TryGetVariable(name, out EntryPointVariable variable)) - if(variable.Value is TOutput) + if (variable.Value is TOutput) return (TOutput)variable.Value; return default; diff --git a/src/Microsoft.ML.EntryPoints/JsonUtils/JsonManifestUtils.cs b/src/Microsoft.ML.EntryPoints/JsonUtils/JsonManifestUtils.cs index 1e37746ee6..09b062b0bc 100644 --- a/src/Microsoft.ML.EntryPoints/JsonUtils/JsonManifestUtils.cs +++ b/src/Microsoft.ML.EntryPoints/JsonUtils/JsonManifestUtils.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.EntryPoints/MacroUtils.cs b/src/Microsoft.ML.EntryPoints/MacroUtils.cs index f9908998e1..b16858ab06 100644 --- a/src/Microsoft.ML.EntryPoints/MacroUtils.cs +++ b/src/Microsoft.ML.EntryPoints/MacroUtils.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. @@ -47,29 +47,29 @@ public static EvaluateInputBase GetEvaluatorArgs(TrainerKinds kind, out string e { switch (kind) { - case TrainerKinds.SignatureBinaryClassifierTrainer: - entryPointName = "Models.BinaryClassificationEvaluator"; - return new BinaryClassifierMamlEvaluator.Arguments() { LabelColumn = settings.LabelColumn, WeightColumn = settings.WeightColumn, NameColumn = settings.NameColumn }; - case TrainerKinds.SignatureMulticlassClassificationTrainer: - entryPointName = "Models.ClassificationEvaluator"; - return new MulticlassClassificationMamlEvaluator.Arguments() { LabelColumn = settings.LabelColumn, WeightColumn = settings.WeightColumn, NameColumn = settings.NameColumn }; - case TrainerKinds.SignatureRankerTrainer: - entryPointName = "Models.RankingEvaluator"; - return new RankingMamlEvaluator.Arguments() { LabelColumn = settings.LabelColumn, WeightColumn = settings.WeightColumn, NameColumn = settings.NameColumn, GroupIdColumn = settings.GroupColumn }; - case TrainerKinds.SignatureRegressorTrainer: - entryPointName = "Models.RegressionEvaluator"; - return new RegressionMamlEvaluator.Arguments() { LabelColumn = settings.LabelColumn, WeightColumn = settings.WeightColumn, NameColumn = settings.NameColumn }; - case TrainerKinds.SignatureMultiOutputRegressorTrainer: - entryPointName = "Models.MultiOutputRegressionEvaluator"; - return new MultiOutputRegressionMamlEvaluator.Arguments() { LabelColumn = settings.LabelColumn, WeightColumn = settings.WeightColumn, NameColumn = settings.NameColumn }; - case TrainerKinds.SignatureAnomalyDetectorTrainer: - entryPointName = "Models.AnomalyDetectionEvaluator"; - return new AnomalyDetectionMamlEvaluator.Arguments() { LabelColumn = settings.LabelColumn, WeightColumn = settings.WeightColumn, NameColumn = settings.NameColumn }; - case TrainerKinds.SignatureClusteringTrainer: - entryPointName = "Models.ClusterEvaluator"; - return new ClusteringMamlEvaluator.Arguments() { LabelColumn = settings.LabelColumn, WeightColumn = settings.WeightColumn, NameColumn = settings.NameColumn }; - default: - throw Contracts.Except("Trainer kind not supported"); + case TrainerKinds.SignatureBinaryClassifierTrainer: + entryPointName = "Models.BinaryClassificationEvaluator"; + return new BinaryClassifierMamlEvaluator.Arguments() { LabelColumn = settings.LabelColumn, WeightColumn = settings.WeightColumn, NameColumn = settings.NameColumn }; + case TrainerKinds.SignatureMulticlassClassificationTrainer: + entryPointName = "Models.ClassificationEvaluator"; + return new MulticlassClassificationMamlEvaluator.Arguments() { LabelColumn = settings.LabelColumn, WeightColumn = settings.WeightColumn, NameColumn = settings.NameColumn }; + case TrainerKinds.SignatureRankerTrainer: + entryPointName = "Models.RankingEvaluator"; + return new RankingMamlEvaluator.Arguments() { LabelColumn = settings.LabelColumn, WeightColumn = settings.WeightColumn, NameColumn = settings.NameColumn, GroupIdColumn = settings.GroupColumn }; + case TrainerKinds.SignatureRegressorTrainer: + entryPointName = "Models.RegressionEvaluator"; + return new RegressionMamlEvaluator.Arguments() { LabelColumn = settings.LabelColumn, WeightColumn = settings.WeightColumn, NameColumn = settings.NameColumn }; + case TrainerKinds.SignatureMultiOutputRegressorTrainer: + entryPointName = "Models.MultiOutputRegressionEvaluator"; + return new MultiOutputRegressionMamlEvaluator.Arguments() { LabelColumn = settings.LabelColumn, WeightColumn = settings.WeightColumn, NameColumn = settings.NameColumn }; + case TrainerKinds.SignatureAnomalyDetectorTrainer: + entryPointName = "Models.AnomalyDetectionEvaluator"; + return new AnomalyDetectionMamlEvaluator.Arguments() { LabelColumn = settings.LabelColumn, WeightColumn = settings.WeightColumn, NameColumn = settings.NameColumn }; + case TrainerKinds.SignatureClusteringTrainer: + entryPointName = "Models.ClusterEvaluator"; + return new ClusteringMamlEvaluator.Arguments() { LabelColumn = settings.LabelColumn, WeightColumn = settings.WeightColumn, NameColumn = settings.NameColumn }; + default: + throw Contracts.Except("Trainer kind not supported"); } } diff --git a/src/Microsoft.ML.EntryPoints/ModelOperations.cs b/src/Microsoft.ML.EntryPoints/ModelOperations.cs index 9cbafbf84a..0c08b30aa6 100644 --- a/src/Microsoft.ML.EntryPoints/ModelOperations.cs +++ b/src/Microsoft.ML.EntryPoints/ModelOperations.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.EntryPoints/OneVersusAllMacro.cs b/src/Microsoft.ML.EntryPoints/OneVersusAllMacro.cs index 8e7f15024c..f328942f31 100644 --- a/src/Microsoft.ML.EntryPoints/OneVersusAllMacro.cs +++ b/src/Microsoft.ML.EntryPoints/OneVersusAllMacro.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.EntryPoints/ScoreColumnSelector.cs b/src/Microsoft.ML.EntryPoints/ScoreColumnSelector.cs index 4219cf7831..7a48ed856a 100644 --- a/src/Microsoft.ML.EntryPoints/ScoreColumnSelector.cs +++ b/src/Microsoft.ML.EntryPoints/ScoreColumnSelector.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.EntryPoints/ScoreModel.cs b/src/Microsoft.ML.EntryPoints/ScoreModel.cs index 267bc5e2da..6cc12a475a 100644 --- a/src/Microsoft.ML.EntryPoints/ScoreModel.cs +++ b/src/Microsoft.ML.EntryPoints/ScoreModel.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.EntryPoints/TrainTestMacro.cs b/src/Microsoft.ML.EntryPoints/TrainTestMacro.cs index 027c6b9836..c0d356c3e5 100644 --- a/src/Microsoft.ML.EntryPoints/TrainTestMacro.cs +++ b/src/Microsoft.ML.EntryPoints/TrainTestMacro.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.EntryPoints/TrainTestSplit.cs b/src/Microsoft.ML.EntryPoints/TrainTestSplit.cs index 42016fd247..dc1779061a 100644 --- a/src/Microsoft.ML.EntryPoints/TrainTestSplit.cs +++ b/src/Microsoft.ML.EntryPoints/TrainTestSplit.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. @@ -64,4 +64,4 @@ public static Output Split(IHostEnvironment env, Input input) } } -} \ No newline at end of file +} diff --git a/src/Microsoft.ML.FastTree/BinFile/BinFinder.cs b/src/Microsoft.ML.FastTree/BinFile/BinFinder.cs index 55b37e92ac..ff52b2eb88 100644 --- a/src/Microsoft.ML.FastTree/BinFile/BinFinder.cs +++ b/src/Microsoft.ML.FastTree/BinFile/BinFinder.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.FastTree/BoostingFastTree.cs b/src/Microsoft.ML.FastTree/BoostingFastTree.cs index ad4cb08b05..16f6900fc3 100644 --- a/src/Microsoft.ML.FastTree/BoostingFastTree.cs +++ b/src/Microsoft.ML.FastTree/BoostingFastTree.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.FastTree/Dataset/Dataset.cs b/src/Microsoft.ML.FastTree/Dataset/Dataset.cs index 8de4618e35..63008267b7 100644 --- a/src/Microsoft.ML.FastTree/Dataset/Dataset.cs +++ b/src/Microsoft.ML.FastTree/Dataset/Dataset.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.FastTree/Dataset/DatasetUtils.cs b/src/Microsoft.ML.FastTree/Dataset/DatasetUtils.cs index 4a1bf2440c..b04d81908a 100644 --- a/src/Microsoft.ML.FastTree/Dataset/DatasetUtils.cs +++ b/src/Microsoft.ML.FastTree/Dataset/DatasetUtils.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. @@ -58,4 +58,4 @@ public static TsvFeature CreateFeatureFromQueryId(Dataset.DatasetSkeleton skel) return new TsvFeature(bins, valueMap, "m:QueryId"); } } -} \ No newline at end of file +} diff --git a/src/Microsoft.ML.FastTree/Dataset/DenseIntArray.cs b/src/Microsoft.ML.FastTree/Dataset/DenseIntArray.cs index ebfc2d6006..7157ac361e 100644 --- a/src/Microsoft.ML.FastTree/Dataset/DenseIntArray.cs +++ b/src/Microsoft.ML.FastTree/Dataset/DenseIntArray.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.FastTree/Dataset/Feature.cs b/src/Microsoft.ML.FastTree/Dataset/Feature.cs index c314f3496d..3f37ab9452 100644 --- a/src/Microsoft.ML.FastTree/Dataset/Feature.cs +++ b/src/Microsoft.ML.FastTree/Dataset/Feature.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.FastTree/Dataset/FeatureFlock.cs b/src/Microsoft.ML.FastTree/Dataset/FeatureFlock.cs index 76326e9c2b..a218b5be41 100644 --- a/src/Microsoft.ML.FastTree/Dataset/FeatureFlock.cs +++ b/src/Microsoft.ML.FastTree/Dataset/FeatureFlock.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.FastTree/Dataset/FeatureHistogram.cs b/src/Microsoft.ML.FastTree/Dataset/FeatureHistogram.cs index eb701b9334..d105e41cfb 100644 --- a/src/Microsoft.ML.FastTree/Dataset/FeatureHistogram.cs +++ b/src/Microsoft.ML.FastTree/Dataset/FeatureHistogram.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.FastTree/Dataset/IntArray.cs b/src/Microsoft.ML.FastTree/Dataset/IntArray.cs index 5401667c5a..25dd56cb48 100644 --- a/src/Microsoft.ML.FastTree/Dataset/IntArray.cs +++ b/src/Microsoft.ML.FastTree/Dataset/IntArray.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.FastTree/Dataset/NHotFeatureFlock.cs b/src/Microsoft.ML.FastTree/Dataset/NHotFeatureFlock.cs index 25f91c5b0f..ac904009fe 100644 --- a/src/Microsoft.ML.FastTree/Dataset/NHotFeatureFlock.cs +++ b/src/Microsoft.ML.FastTree/Dataset/NHotFeatureFlock.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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 Microsoft.ML.Runtime; diff --git a/src/Microsoft.ML.FastTree/Dataset/OneHotFeatureFlock.cs b/src/Microsoft.ML.FastTree/Dataset/OneHotFeatureFlock.cs index 60df87aa83..519507f1d3 100644 --- a/src/Microsoft.ML.FastTree/Dataset/OneHotFeatureFlock.cs +++ b/src/Microsoft.ML.FastTree/Dataset/OneHotFeatureFlock.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.FastTree/Dataset/RepeatIntArray.cs b/src/Microsoft.ML.FastTree/Dataset/RepeatIntArray.cs index e386487fb2..c7f4304e8a 100644 --- a/src/Microsoft.ML.FastTree/Dataset/RepeatIntArray.cs +++ b/src/Microsoft.ML.FastTree/Dataset/RepeatIntArray.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.FastTree/Dataset/SegmentIntArray.cs b/src/Microsoft.ML.FastTree/Dataset/SegmentIntArray.cs index d3589f1e20..eb70897fed 100644 --- a/src/Microsoft.ML.FastTree/Dataset/SegmentIntArray.cs +++ b/src/Microsoft.ML.FastTree/Dataset/SegmentIntArray.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. @@ -49,7 +49,8 @@ public override IntArrayType Type /// Used so we can set either the native or managed SegmentFindOptimalCost method one time and then /// never have to check again. /// - public static Lazy SegmentFindOptimalCost = new(() => { + public static Lazy SegmentFindOptimalCost = new(() => + { if (UseFastTreeNative) return NativeSegmentFindOptimalCost; else @@ -60,7 +61,8 @@ public override IntArrayType Type /// Used so we can set either the native or managed SegmentFindOptimalPath method one time and then /// never have to check again. /// - public static Lazy SegmentFindOptimalPath = new(() => { + public static Lazy SegmentFindOptimalPath = new(() => + { if (UseFastTreeNative) return NativeSegmentFindOptimalPath; else diff --git a/src/Microsoft.ML.FastTree/Dataset/SingletonFeatureFlock.cs b/src/Microsoft.ML.FastTree/Dataset/SingletonFeatureFlock.cs index 424cf50faf..062fb47356 100644 --- a/src/Microsoft.ML.FastTree/Dataset/SingletonFeatureFlock.cs +++ b/src/Microsoft.ML.FastTree/Dataset/SingletonFeatureFlock.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.FastTree/Dataset/SparseIntArray.cs b/src/Microsoft.ML.FastTree/Dataset/SparseIntArray.cs index 165dd2ea8a..d61723d86c 100644 --- a/src/Microsoft.ML.FastTree/Dataset/SparseIntArray.cs +++ b/src/Microsoft.ML.FastTree/Dataset/SparseIntArray.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. @@ -459,7 +459,8 @@ public override void Sumup(SumupInputData input, FeatureHistogram histogram) { using (Timer.Time(TimerEvent.SumupSparse)) { - if (UseFastTreeNative) { + if (UseFastTreeNative) + { var callbackIntArray = _values as DenseDataCallbackIntArray; if (callbackIntArray != null) { diff --git a/src/Microsoft.ML.FastTree/FastTree.cs b/src/Microsoft.ML.FastTree/FastTree.cs index 6e43925e24..65a8b0d68f 100644 --- a/src/Microsoft.ML.FastTree/FastTree.cs +++ b/src/Microsoft.ML.FastTree/FastTree.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. @@ -3118,7 +3118,7 @@ private protected virtual bool SaveAsOnnx(OnnxContext ctx, string[] outputNames, } bool ISingleCanSaveOnnx.SaveAsOnnx(OnnxContext ctx, string[] outputNames, string featureColumn) { - return SaveAsOnnx(ctx,outputNames,featureColumn); + return SaveAsOnnx(ctx, outputNames, featureColumn); } void ICanSaveSummary.SaveSummary(TextWriter writer, RoleMappedSchema schema) diff --git a/src/Microsoft.ML.FastTree/FastTreeArguments.cs b/src/Microsoft.ML.FastTree/FastTreeArguments.cs index a21dcc8448..ea6c302d1c 100644 --- a/src/Microsoft.ML.FastTree/FastTreeArguments.cs +++ b/src/Microsoft.ML.FastTree/FastTreeArguments.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. @@ -75,9 +75,9 @@ public sealed class Options : BoostedTreeOptions, IFastTreeTrainerFactory /// . /// // Disable 649 because Visual Studio can't detect its assignment via property. - #pragma warning disable 649 +#pragma warning disable 649 private EarlyStoppingMetric _earlyStoppingMetric; - #pragma warning restore 649 +#pragma warning restore 649 /// /// Early stopping metrics. @@ -179,9 +179,9 @@ public sealed class Options : BoostedTreeOptions, IFastTreeTrainerFactory /// . /// // Disable 649 because Visual Studio can't detect its assignment via property. - #pragma warning disable 649 +#pragma warning disable 649 private EarlyStoppingMetric _earlyStoppingMetric; - #pragma warning restore 649 +#pragma warning restore 649 /// /// Early stopping metrics. @@ -276,9 +276,9 @@ public sealed class Options : BoostedTreeOptions, IFastTreeTrainerFactory /// . /// // Disable 649 because Visual Studio can't detect its assignment via property. - #pragma warning disable 649 +#pragma warning disable 649 private EarlyStoppingRankingMetric _earlyStoppingMetric; - #pragma warning restore 649 +#pragma warning restore 649 /// /// Early stopping metrics. @@ -700,7 +700,7 @@ public enum OptimizationAlgorithmType { GradientDescent, AcceleratedGradientDesc /// public EarlyStoppingRuleBase EarlyStoppingRule { - get { return _earlyStoppingRuleBase; } + get { return _earlyStoppingRuleBase; } set { _earlyStoppingRuleBase = value; diff --git a/src/Microsoft.ML.FastTree/FastTreeClassification.cs b/src/Microsoft.ML.FastTree/FastTreeClassification.cs index 44777c61f8..66e34327da 100644 --- a/src/Microsoft.ML.FastTree/FastTreeClassification.cs +++ b/src/Microsoft.ML.FastTree/FastTreeClassification.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.FastTree/FastTreeRanking.cs b/src/Microsoft.ML.FastTree/FastTreeRanking.cs index 57b6d2df1d..14a71e34ac 100644 --- a/src/Microsoft.ML.FastTree/FastTreeRanking.cs +++ b/src/Microsoft.ML.FastTree/FastTreeRanking.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.FastTree/FastTreeRegression.cs b/src/Microsoft.ML.FastTree/FastTreeRegression.cs index a37acb6633..9cba3aa5da 100644 --- a/src/Microsoft.ML.FastTree/FastTreeRegression.cs +++ b/src/Microsoft.ML.FastTree/FastTreeRegression.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.FastTree/FastTreeTweedie.cs b/src/Microsoft.ML.FastTree/FastTreeTweedie.cs index 68383d8202..4776ad8aa6 100644 --- a/src/Microsoft.ML.FastTree/FastTreeTweedie.cs +++ b/src/Microsoft.ML.FastTree/FastTreeTweedie.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.FastTree/GamTrainer.cs b/src/Microsoft.ML.FastTree/GamTrainer.cs index d67a684737..c696e7e095 100644 --- a/src/Microsoft.ML.FastTree/GamTrainer.cs +++ b/src/Microsoft.ML.FastTree/GamTrainer.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.FastTree/RandomForest.cs b/src/Microsoft.ML.FastTree/RandomForest.cs index 029f0bf5f9..59245e9ed4 100644 --- a/src/Microsoft.ML.FastTree/RandomForest.cs +++ b/src/Microsoft.ML.FastTree/RandomForest.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.FastTree/RandomForestClassification.cs b/src/Microsoft.ML.FastTree/RandomForestClassification.cs index 4b35a7a60e..ec7846f7dc 100644 --- a/src/Microsoft.ML.FastTree/RandomForestClassification.cs +++ b/src/Microsoft.ML.FastTree/RandomForestClassification.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.FastTree/RandomForestRegression.cs b/src/Microsoft.ML.FastTree/RandomForestRegression.cs index 5186f46813..4410fc7d7c 100644 --- a/src/Microsoft.ML.FastTree/RandomForestRegression.cs +++ b/src/Microsoft.ML.FastTree/RandomForestRegression.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.FastTree/Training/Applications/GradientWrappers.cs b/src/Microsoft.ML.FastTree/Training/Applications/GradientWrappers.cs index e2cf1c53bc..e3309492fe 100644 --- a/src/Microsoft.ML.FastTree/Training/Applications/GradientWrappers.cs +++ b/src/Microsoft.ML.FastTree/Training/Applications/GradientWrappers.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.FastTree/Training/Applications/ObjectiveFunction.cs b/src/Microsoft.ML.FastTree/Training/Applications/ObjectiveFunction.cs index 952ca18a6d..5d57e2659d 100644 --- a/src/Microsoft.ML.FastTree/Training/Applications/ObjectiveFunction.cs +++ b/src/Microsoft.ML.FastTree/Training/Applications/ObjectiveFunction.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.FastTree/Training/BaggingProvider.cs b/src/Microsoft.ML.FastTree/Training/BaggingProvider.cs index 2abda1c6e9..b4bd7b4b09 100644 --- a/src/Microsoft.ML.FastTree/Training/BaggingProvider.cs +++ b/src/Microsoft.ML.FastTree/Training/BaggingProvider.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.FastTree/Training/DcgCalculator.cs b/src/Microsoft.ML.FastTree/Training/DcgCalculator.cs index cf281cd701..d65fc4b46f 100644 --- a/src/Microsoft.ML.FastTree/Training/DcgCalculator.cs +++ b/src/Microsoft.ML.FastTree/Training/DcgCalculator.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.FastTree/Training/DcgPermutationComparer.cs b/src/Microsoft.ML.FastTree/Training/DcgPermutationComparer.cs index 9633fe21b2..5f9e7f90ae 100644 --- a/src/Microsoft.ML.FastTree/Training/DcgPermutationComparer.cs +++ b/src/Microsoft.ML.FastTree/Training/DcgPermutationComparer.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.FastTree/Training/DocumentPartitioning.cs b/src/Microsoft.ML.FastTree/Training/DocumentPartitioning.cs index 055aded3fd..9b20841a16 100644 --- a/src/Microsoft.ML.FastTree/Training/DocumentPartitioning.cs +++ b/src/Microsoft.ML.FastTree/Training/DocumentPartitioning.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.FastTree/Training/EarlyStoppingCriteria.cs b/src/Microsoft.ML.FastTree/Training/EarlyStoppingCriteria.cs index 5f4da6ba7a..93a4b314bf 100644 --- a/src/Microsoft.ML.FastTree/Training/EarlyStoppingCriteria.cs +++ b/src/Microsoft.ML.FastTree/Training/EarlyStoppingCriteria.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. @@ -74,7 +74,8 @@ public abstract class EarlyStoppingRule : EarlyStoppingRuleBase /// private protected bool LowerIsBetter { get; } - private protected float BestScore { + private protected float BestScore + { get { return _bestScore; } set { @@ -339,7 +340,7 @@ public override bool CheckScore(float validationScore, float trainingScore, out } internal override IEarlyStoppingCriterionFactory BuildFactory() => new Options() { Threshold = Threshold }; -} + } /// /// Low Progress (LP). @@ -400,7 +401,7 @@ public override bool CheckScore(float validationScore, float trainingScore, out } internal override IEarlyStoppingCriterionFactory BuildFactory() => new Options() { Threshold = Threshold, WindowSize = WindowSize }; -} + } /// /// Generality to Progress Ratio (PQ). diff --git a/src/Microsoft.ML.FastTree/Training/EnsembleCompression/LassoBasedEnsembleCompressor.cs b/src/Microsoft.ML.FastTree/Training/EnsembleCompression/LassoBasedEnsembleCompressor.cs index eb64e93889..83bba9b02a 100644 --- a/src/Microsoft.ML.FastTree/Training/EnsembleCompression/LassoBasedEnsembleCompressor.cs +++ b/src/Microsoft.ML.FastTree/Training/EnsembleCompression/LassoBasedEnsembleCompressor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.FastTree/Training/EnsembleCompression/LassoFit.cs b/src/Microsoft.ML.FastTree/Training/EnsembleCompression/LassoFit.cs index 82148faeb2..4627d57ddf 100644 --- a/src/Microsoft.ML.FastTree/Training/EnsembleCompression/LassoFit.cs +++ b/src/Microsoft.ML.FastTree/Training/EnsembleCompression/LassoFit.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.FastTree/Training/OptimizationAlgorithms/AcceleratedGradientDescent.cs b/src/Microsoft.ML.FastTree/Training/OptimizationAlgorithms/AcceleratedGradientDescent.cs index 0db70a848b..63441ca5aa 100644 --- a/src/Microsoft.ML.FastTree/Training/OptimizationAlgorithms/AcceleratedGradientDescent.cs +++ b/src/Microsoft.ML.FastTree/Training/OptimizationAlgorithms/AcceleratedGradientDescent.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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 Microsoft.ML.Runtime; diff --git a/src/Microsoft.ML.FastTree/Training/OptimizationAlgorithms/ConjugateGradientDescent.cs b/src/Microsoft.ML.FastTree/Training/OptimizationAlgorithms/ConjugateGradientDescent.cs index eb14e1a116..4ad93d856d 100644 --- a/src/Microsoft.ML.FastTree/Training/OptimizationAlgorithms/ConjugateGradientDescent.cs +++ b/src/Microsoft.ML.FastTree/Training/OptimizationAlgorithms/ConjugateGradientDescent.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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 Microsoft.ML.Runtime; diff --git a/src/Microsoft.ML.FastTree/Training/OptimizationAlgorithms/GradientDescent.cs b/src/Microsoft.ML.FastTree/Training/OptimizationAlgorithms/GradientDescent.cs index e2884dd78e..259106293a 100644 --- a/src/Microsoft.ML.FastTree/Training/OptimizationAlgorithms/GradientDescent.cs +++ b/src/Microsoft.ML.FastTree/Training/OptimizationAlgorithms/GradientDescent.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.FastTree/Training/OptimizationAlgorithms/NoOptimizationAlgorithm.cs b/src/Microsoft.ML.FastTree/Training/OptimizationAlgorithms/NoOptimizationAlgorithm.cs index e19f96dc9a..8a8c361688 100644 --- a/src/Microsoft.ML.FastTree/Training/OptimizationAlgorithms/NoOptimizationAlgorithm.cs +++ b/src/Microsoft.ML.FastTree/Training/OptimizationAlgorithms/NoOptimizationAlgorithm.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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 Microsoft.ML.Runtime; diff --git a/src/Microsoft.ML.FastTree/Training/OptimizationAlgorithms/OptimizationAlgorithm.cs b/src/Microsoft.ML.FastTree/Training/OptimizationAlgorithms/OptimizationAlgorithm.cs index 1c70b97f2c..3227e73b65 100644 --- a/src/Microsoft.ML.FastTree/Training/OptimizationAlgorithms/OptimizationAlgorithm.cs +++ b/src/Microsoft.ML.FastTree/Training/OptimizationAlgorithms/OptimizationAlgorithm.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.FastTree/Training/Parallel/IParallelTraining.cs b/src/Microsoft.ML.FastTree/Training/Parallel/IParallelTraining.cs index 90d4553ab4..bf8d33a085 100644 --- a/src/Microsoft.ML.FastTree/Training/Parallel/IParallelTraining.cs +++ b/src/Microsoft.ML.FastTree/Training/Parallel/IParallelTraining.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.FastTree/Training/Parallel/SingleTrainer.cs b/src/Microsoft.ML.FastTree/Training/Parallel/SingleTrainer.cs index 644452ac6a..e070801a30 100644 --- a/src/Microsoft.ML.FastTree/Training/Parallel/SingleTrainer.cs +++ b/src/Microsoft.ML.FastTree/Training/Parallel/SingleTrainer.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.FastTree/Training/RegressionTreeNodeDocuments.cs b/src/Microsoft.ML.FastTree/Training/RegressionTreeNodeDocuments.cs index 900e94bda2..cb732108c1 100644 --- a/src/Microsoft.ML.FastTree/Training/RegressionTreeNodeDocuments.cs +++ b/src/Microsoft.ML.FastTree/Training/RegressionTreeNodeDocuments.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.FastTree/Training/ScoreTracker.cs b/src/Microsoft.ML.FastTree/Training/ScoreTracker.cs index b415e5c483..c7311a60ad 100644 --- a/src/Microsoft.ML.FastTree/Training/ScoreTracker.cs +++ b/src/Microsoft.ML.FastTree/Training/ScoreTracker.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. @@ -138,7 +138,7 @@ public override void SetScores(double[] scores) //Computes AGD specific mutiplier. Given that we have tree number t in ensemble (we count trees starting from 0) //And we have total k trees in ensemble, what should be the multiplier on the tree when sum the ensemble together based on AGD formula being //X[k+1] = Y[k] + Tree[k] - //Y[k+1] = X[k+1] + C[k] * (X[k+1] X[k]) + //Y[k+1] = X[k+1] + C[k] * (X[k+1] – X[k]) //C[k] = (k-1) / (k+2) private static Dictionary> _treeMultiplierMap = new Dictionary>(); diff --git a/src/Microsoft.ML.FastTree/Training/StepSearch.cs b/src/Microsoft.ML.FastTree/Training/StepSearch.cs index ac2926f2bb..91e8711221 100644 --- a/src/Microsoft.ML.FastTree/Training/StepSearch.cs +++ b/src/Microsoft.ML.FastTree/Training/StepSearch.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. @@ -153,7 +153,7 @@ void IStepSearch.AdjustTreeOutputs(IChannel ch, InternalRegressionTree tree, Doc Swap(ref _left, ref _right); } - FINISHED: +FINISHED: if (_hi.Step < _minStepSize) _left.Step = _minStepSize; else if (_hi.Step == _minStepSize) diff --git a/src/Microsoft.ML.FastTree/Training/Test.cs b/src/Microsoft.ML.FastTree/Training/Test.cs index a67caddf0c..a4ddc0356d 100644 --- a/src/Microsoft.ML.FastTree/Training/Test.cs +++ b/src/Microsoft.ML.FastTree/Training/Test.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.FastTree/Training/TreeLearners/FastForestLeastSquaresTreeLearner.cs b/src/Microsoft.ML.FastTree/Training/TreeLearners/FastForestLeastSquaresTreeLearner.cs index 9c12888f23..7c715ed596 100644 --- a/src/Microsoft.ML.FastTree/Training/TreeLearners/FastForestLeastSquaresTreeLearner.cs +++ b/src/Microsoft.ML.FastTree/Training/TreeLearners/FastForestLeastSquaresTreeLearner.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.FastTree/Training/TreeLearners/LeastSquaresRegressionTreeLearner.cs b/src/Microsoft.ML.FastTree/Training/TreeLearners/LeastSquaresRegressionTreeLearner.cs index b23007ca96..0488cf2b17 100644 --- a/src/Microsoft.ML.FastTree/Training/TreeLearners/LeastSquaresRegressionTreeLearner.cs +++ b/src/Microsoft.ML.FastTree/Training/TreeLearners/LeastSquaresRegressionTreeLearner.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.FastTree/Training/TreeLearners/TreeLearner.cs b/src/Microsoft.ML.FastTree/Training/TreeLearners/TreeLearner.cs index 20cbc714b9..7002e208de 100644 --- a/src/Microsoft.ML.FastTree/Training/TreeLearners/TreeLearner.cs +++ b/src/Microsoft.ML.FastTree/Training/TreeLearners/TreeLearner.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.FastTree/Training/WinLossCalculator.cs b/src/Microsoft.ML.FastTree/Training/WinLossCalculator.cs index 76166c5326..9413f3053a 100644 --- a/src/Microsoft.ML.FastTree/Training/WinLossCalculator.cs +++ b/src/Microsoft.ML.FastTree/Training/WinLossCalculator.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.FastTree/TreeEnsemble/InternalQuantileRegressionTree.cs b/src/Microsoft.ML.FastTree/TreeEnsemble/InternalQuantileRegressionTree.cs index c967098dca..e5ae4776ed 100644 --- a/src/Microsoft.ML.FastTree/TreeEnsemble/InternalQuantileRegressionTree.cs +++ b/src/Microsoft.ML.FastTree/TreeEnsemble/InternalQuantileRegressionTree.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.FastTree/TreeEnsemble/InternalRegressionTree.cs b/src/Microsoft.ML.FastTree/TreeEnsemble/InternalRegressionTree.cs index 28c27af81b..f153d5a197 100644 --- a/src/Microsoft.ML.FastTree/TreeEnsemble/InternalRegressionTree.cs +++ b/src/Microsoft.ML.FastTree/TreeEnsemble/InternalRegressionTree.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.FastTree/TreeEnsemble/InternalTreeEnsemble.cs b/src/Microsoft.ML.FastTree/TreeEnsemble/InternalTreeEnsemble.cs index 4a5d90b951..ce3b9328c4 100644 --- a/src/Microsoft.ML.FastTree/TreeEnsemble/InternalTreeEnsemble.cs +++ b/src/Microsoft.ML.FastTree/TreeEnsemble/InternalTreeEnsemble.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.FastTree/TreeEnsemble/TreeEnsembleCombiner.cs b/src/Microsoft.ML.FastTree/TreeEnsemble/TreeEnsembleCombiner.cs index 93258ea7c7..4c99b7cc87 100644 --- a/src/Microsoft.ML.FastTree/TreeEnsemble/TreeEnsembleCombiner.cs +++ b/src/Microsoft.ML.FastTree/TreeEnsemble/TreeEnsembleCombiner.cs @@ -23,14 +23,14 @@ public TreeEnsembleCombiner(IHostEnvironment env, PredictionKind kind) _host = env.Register("TreeEnsembleCombiner"); switch (kind) { - case PredictionKind.BinaryClassification: - case PredictionKind.Regression: - case PredictionKind.Ranking: - _kind = kind; - break; - default: - throw _host.ExceptUserArg(nameof(kind), $"Tree ensembles can be either of type {nameof(PredictionKind.BinaryClassification)}, " + - $"{nameof(PredictionKind.Regression)} or {nameof(PredictionKind.Ranking)}"); + case PredictionKind.BinaryClassification: + case PredictionKind.Regression: + case PredictionKind.Ranking: + _kind = kind; + break; + default: + throw _host.ExceptUserArg(nameof(kind), $"Tree ensembles can be either of type {nameof(PredictionKind.BinaryClassification)}, " + + $"{nameof(PredictionKind.Regression)} or {nameof(PredictionKind.Ranking)}"); } } @@ -99,20 +99,20 @@ IPredictor IModelCombiner.CombineModels(IEnumerable models) switch (_kind) { - case PredictionKind.BinaryClassification: - if (!binaryClassifier) - return new FastTreeBinaryModelParameters(_host, ensemble, featureCount, null); - - var cali = new PlattCalibrator(_host, -1, 0); - var fastTreeModel = new FastTreeBinaryModelParameters(_host, ensemble, featureCount, null); - return new FeatureWeightsCalibratedModelParameters(_host, fastTreeModel, cali); - case PredictionKind.Regression: - return new FastTreeRegressionModelParameters(_host, ensemble, featureCount, null); - case PredictionKind.Ranking: - return new FastTreeRankingModelParameters(_host, ensemble, featureCount, null); - default: - _host.Assert(false); - throw _host.ExceptNotSupp(); + case PredictionKind.BinaryClassification: + if (!binaryClassifier) + return new FastTreeBinaryModelParameters(_host, ensemble, featureCount, null); + + var cali = new PlattCalibrator(_host, -1, 0); + var fastTreeModel = new FastTreeBinaryModelParameters(_host, ensemble, featureCount, null); + return new FeatureWeightsCalibratedModelParameters(_host, fastTreeModel, cali); + case PredictionKind.Regression: + return new FastTreeRegressionModelParameters(_host, ensemble, featureCount, null); + case PredictionKind.Ranking: + return new FastTreeRankingModelParameters(_host, ensemble, featureCount, null); + default: + _host.Assert(false); + throw _host.ExceptNotSupp(); } } } diff --git a/src/Microsoft.ML.FastTree/TreeEnsembleFeaturizationTransformer.cs b/src/Microsoft.ML.FastTree/TreeEnsembleFeaturizationTransformer.cs index 7d516c35e8..cb67a2b39e 100644 --- a/src/Microsoft.ML.FastTree/TreeEnsembleFeaturizationTransformer.cs +++ b/src/Microsoft.ML.FastTree/TreeEnsembleFeaturizationTransformer.cs @@ -85,8 +85,12 @@ internal TreeEnsembleFeaturizationTransformer(IHostEnvironment env, DataViewSche _pathsColumnName = pathsColumnName; // Create an argument, _scorerArgs, to pass the output column names to the underlying scorer. - _scorerArgs = new TreeEnsembleFeaturizerBindableMapper.Arguments { - TreesColumnName = _treesColumnName, LeavesColumnName = _leavesColumnName, PathsColumnName = _pathsColumnName }; + _scorerArgs = new TreeEnsembleFeaturizerBindableMapper.Arguments + { + TreesColumnName = _treesColumnName, + LeavesColumnName = _leavesColumnName, + PathsColumnName = _pathsColumnName + }; // Create a bindable mapper. It provides the core computation and can be attached to any IDataView and produce // a transformed IDataView. @@ -115,8 +119,12 @@ private TreeEnsembleFeaturizationTransformer(IHostEnvironment host, ModelLoadCon _pathsColumnName = ctx.LoadStringOrNull(); // Create an argument to specify output columns' names of this transformer. - _scorerArgs = new TreeEnsembleFeaturizerBindableMapper.Arguments { - TreesColumnName = _treesColumnName, LeavesColumnName = _leavesColumnName, PathsColumnName = _pathsColumnName }; + _scorerArgs = new TreeEnsembleFeaturizerBindableMapper.Arguments + { + TreesColumnName = _treesColumnName, + LeavesColumnName = _leavesColumnName, + PathsColumnName = _pathsColumnName + }; // Create a bindable mapper. It provides the core computation and can be attached to any IDataView and produce // a transformed IDataView. @@ -181,4 +189,4 @@ private static VersionInfo GetVersionInfo() internal static TreeEnsembleFeaturizationTransformer Create(IHostEnvironment env, ModelLoadContext ctx) => new TreeEnsembleFeaturizationTransformer(env, ctx); } -} \ No newline at end of file +} diff --git a/src/Microsoft.ML.FastTree/TreeEnsembleFeaturizer.cs b/src/Microsoft.ML.FastTree/TreeEnsembleFeaturizer.cs index ca503815a6..310d2f5ea7 100644 --- a/src/Microsoft.ML.FastTree/TreeEnsembleFeaturizer.cs +++ b/src/Microsoft.ML.FastTree/TreeEnsembleFeaturizer.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. @@ -157,7 +157,7 @@ public BoundMapper(IExceptionContext ectx, TreeEnsembleFeaturizerBindableMapper } _pathsColumnName = pathsColumnName; - if (pathsColumnName != null) + if (pathsColumnName != null) { // Metadata of path IDs. var pathIdMetadataBuilder = new DataViewSchema.Annotations.Builder(); @@ -192,14 +192,14 @@ private Delegate[] CreateGetters(DataViewRow input, IEnumerable> fn = state.GetTreeValues; - if(activeIndices.Contains(OutputSchema[_treesColumnName].Index)) + if (activeIndices.Contains(OutputSchema[_treesColumnName].Index)) delegates.Add(fn); else delegates.Add(null); } // Get the leaf indicator getter. - if (_leavesColumnName != null ) + if (_leavesColumnName != null) { ValueGetter> fn = state.GetLeafIds; if (activeIndices.Contains(OutputSchema[_leavesColumnName].Index)) @@ -623,8 +623,13 @@ private static IDataTransform Create(IHostEnvironment env, Arguments args, IData IDataTransform xf; using (var ch = host.Start("Create Tree Ensemble Scorer")) { - var scorerArgs = new TreeEnsembleFeaturizerBindableMapper.Arguments() { - Suffix = args.Suffix, TreesColumnName = "Trees", LeavesColumnName = "Leaves", PathsColumnName = "Paths" }; + var scorerArgs = new TreeEnsembleFeaturizerBindableMapper.Arguments() + { + Suffix = args.Suffix, + TreesColumnName = "Trees", + LeavesColumnName = "Leaves", + PathsColumnName = "Paths" + }; if (!string.IsNullOrWhiteSpace(args.TrainedModelFile)) { if (args.Trainer != null) @@ -696,8 +701,13 @@ public static IDataTransform CreateForEntryPoint(IHostEnvironment env, Arguments using (var ch = host.Start("Create Tree Ensemble Scorer")) { - var scorerArgs = new TreeEnsembleFeaturizerBindableMapper.Arguments() { - Suffix = args.Suffix, TreesColumnName = "Trees", LeavesColumnName = "Leaves", PathsColumnName = "Paths" }; + var scorerArgs = new TreeEnsembleFeaturizerBindableMapper.Arguments() + { + Suffix = args.Suffix, + TreesColumnName = "Trees", + LeavesColumnName = "Leaves", + PathsColumnName = "Paths" + }; var predictor = args.PredictorModel.Predictor; ch.Trace("Prepare data"); RoleMappedData data = null; diff --git a/src/Microsoft.ML.FastTree/TreeTrainersCatalog.cs b/src/Microsoft.ML.FastTree/TreeTrainersCatalog.cs index cdd4f5f87f..8dc17a29c0 100644 --- a/src/Microsoft.ML.FastTree/TreeTrainersCatalog.cs +++ b/src/Microsoft.ML.FastTree/TreeTrainersCatalog.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.FastTree/Utils/Algorithms.cs b/src/Microsoft.ML.FastTree/Utils/Algorithms.cs index ac3576a4d1..0f816a87f8 100644 --- a/src/Microsoft.ML.FastTree/Utils/Algorithms.cs +++ b/src/Microsoft.ML.FastTree/Utils/Algorithms.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.FastTree/Utils/BlockingThreadPool.cs b/src/Microsoft.ML.FastTree/Utils/BlockingThreadPool.cs index 70e05a17a0..9142bc1a1c 100644 --- a/src/Microsoft.ML.FastTree/Utils/BlockingThreadPool.cs +++ b/src/Microsoft.ML.FastTree/Utils/BlockingThreadPool.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.FastTree/Utils/CompressUtils.cs b/src/Microsoft.ML.FastTree/Utils/CompressUtils.cs index 4c87a666a9..584316f5f5 100644 --- a/src/Microsoft.ML.FastTree/Utils/CompressUtils.cs +++ b/src/Microsoft.ML.FastTree/Utils/CompressUtils.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.FastTree/Utils/LinqExtensions.cs b/src/Microsoft.ML.FastTree/Utils/LinqExtensions.cs index ee0724099b..4455722678 100644 --- a/src/Microsoft.ML.FastTree/Utils/LinqExtensions.cs +++ b/src/Microsoft.ML.FastTree/Utils/LinqExtensions.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.FastTree/Utils/MappedObjectPool.cs b/src/Microsoft.ML.FastTree/Utils/MappedObjectPool.cs index a647665804..5eec6ef28c 100644 --- a/src/Microsoft.ML.FastTree/Utils/MappedObjectPool.cs +++ b/src/Microsoft.ML.FastTree/Utils/MappedObjectPool.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.FastTree/Utils/PseudorandomFunction.cs b/src/Microsoft.ML.FastTree/Utils/PseudorandomFunction.cs index e968eabbf2..a6b41ae685 100644 --- a/src/Microsoft.ML.FastTree/Utils/PseudorandomFunction.cs +++ b/src/Microsoft.ML.FastTree/Utils/PseudorandomFunction.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.FastTree/Utils/StreamExtensions.cs b/src/Microsoft.ML.FastTree/Utils/StreamExtensions.cs index 867a4ddb27..784743d65b 100644 --- a/src/Microsoft.ML.FastTree/Utils/StreamExtensions.cs +++ b/src/Microsoft.ML.FastTree/Utils/StreamExtensions.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.FastTree/Utils/ThreadTaskManager.cs b/src/Microsoft.ML.FastTree/Utils/ThreadTaskManager.cs index 4bc1c6c8a5..331f3d6826 100644 --- a/src/Microsoft.ML.FastTree/Utils/ThreadTaskManager.cs +++ b/src/Microsoft.ML.FastTree/Utils/ThreadTaskManager.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.FastTree/Utils/Timer.cs b/src/Microsoft.ML.FastTree/Utils/Timer.cs index d16ddd9179..d3581bcd2e 100644 --- a/src/Microsoft.ML.FastTree/Utils/Timer.cs +++ b/src/Microsoft.ML.FastTree/Utils/Timer.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.FastTree/Utils/ToByteArrayExtensions.cs b/src/Microsoft.ML.FastTree/Utils/ToByteArrayExtensions.cs index 3ab2433da3..3855b3a125 100644 --- a/src/Microsoft.ML.FastTree/Utils/ToByteArrayExtensions.cs +++ b/src/Microsoft.ML.FastTree/Utils/ToByteArrayExtensions.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.FastTree/Utils/VectorUtils.cs b/src/Microsoft.ML.FastTree/Utils/VectorUtils.cs index f831866d27..6685f61f17 100644 --- a/src/Microsoft.ML.FastTree/Utils/VectorUtils.cs +++ b/src/Microsoft.ML.FastTree/Utils/VectorUtils.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.Featurizers/Properties/AssemblyInfo.cs b/src/Microsoft.ML.Featurizers/Properties/AssemblyInfo.cs index f7c9d934e5..017e6fc353 100644 --- a/src/Microsoft.ML.Featurizers/Properties/AssemblyInfo.cs +++ b/src/Microsoft.ML.Featurizers/Properties/AssemblyInfo.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.ImageAnalytics/ImageLoader.cs b/src/Microsoft.ML.ImageAnalytics/ImageLoader.cs index 1182616233..2b4502cb1f 100644 --- a/src/Microsoft.ML.ImageAnalytics/ImageLoader.cs +++ b/src/Microsoft.ML.ImageAnalytics/ImageLoader.cs @@ -89,7 +89,7 @@ internal sealed class Options : TransformInputBase /// Folder where to look for images. /// Names of input and output columns. internal ImageLoadingTransformer(IHostEnvironment env, string imageFolder = null, params (string outputColumnName, string inputColumnName)[] columns) - : this (env, imageFolder, type: true, columns) + : this(env, imageFolder, type: true, columns) { } @@ -141,7 +141,7 @@ private ImageLoadingTransformer(IHost host, ModelLoadContext ctx) // int: id of image folder ImageFolder = ctx.LoadStringOrNull(); - if (ctx.Header.ModelVerWritten >= 0x00010003) // do a version check + if (ctx.Header.ModelVerWritten >= 0x00010003) // do a version check _useImageType = ctx.Reader.ReadBoolean(); else _useImageType = true; // It is an ImageDataViewType @@ -289,7 +289,7 @@ private Delegate MakeGetterVectorDataViewByteType(DataViewRow input, int iinfo, } else { - var editor = VBufferEditor.Create(ref dst, 0 ); + var editor = VBufferEditor.Create(ref dst, 0); dst = editor.Commit(); } @@ -316,7 +316,7 @@ private static bool TryLoadDataIntoBuffer(string path, ref VBuffer imgData imageBuffer = File.ReadAllBytes(path); count = imageBuffer.Length; imgData = new VBuffer(count, imageBuffer); - return (count> 0); + return (count > 0); } count = (int)fileLength; diff --git a/src/Microsoft.ML.ImageAnalytics/ImageType.cs b/src/Microsoft.ML.ImageAnalytics/ImageType.cs index a9ac823b2c..a6024eac49 100644 --- a/src/Microsoft.ML.ImageAnalytics/ImageType.cs +++ b/src/Microsoft.ML.ImageAnalytics/ImageType.cs @@ -64,7 +64,7 @@ public override int GetHashCode() public override void Register() { - DataViewTypeManager.Register(new ImageDataViewType(Height, Width), typeof(Bitmap), this ); + DataViewTypeManager.Register(new ImageDataViewType(Height, Width), typeof(Bitmap), this); } } diff --git a/src/Microsoft.ML.ImageAnalytics/Properties/AssemblyInfo.cs b/src/Microsoft.ML.ImageAnalytics/Properties/AssemblyInfo.cs index 734f2f357d..3f769a0e11 100644 --- a/src/Microsoft.ML.ImageAnalytics/Properties/AssemblyInfo.cs +++ b/src/Microsoft.ML.ImageAnalytics/Properties/AssemblyInfo.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.KMeansClustering/KMeansModelParameters.cs b/src/Microsoft.ML.KMeansClustering/KMeansModelParameters.cs index 849caae820..0533fbdd67 100644 --- a/src/Microsoft.ML.KMeansClustering/KMeansModelParameters.cs +++ b/src/Microsoft.ML.KMeansClustering/KMeansModelParameters.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. @@ -370,4 +370,4 @@ bool ISingleCanSaveOnnx.SaveAsOnnx(OnnxContext ctx, string[] outputNames, string return true; } } -} \ No newline at end of file +} diff --git a/src/Microsoft.ML.KMeansClustering/KMeansPlusPlusTrainer.cs b/src/Microsoft.ML.KMeansClustering/KMeansPlusPlusTrainer.cs index 90ef0d48cb..8cbda5f674 100644 --- a/src/Microsoft.ML.KMeansClustering/KMeansPlusPlusTrainer.cs +++ b/src/Microsoft.ML.KMeansClustering/KMeansPlusPlusTrainer.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.KMeansClustering/Properties/AssemblyInfo.cs b/src/Microsoft.ML.KMeansClustering/Properties/AssemblyInfo.cs index 734f2f357d..3f769a0e11 100644 --- a/src/Microsoft.ML.KMeansClustering/Properties/AssemblyInfo.cs +++ b/src/Microsoft.ML.KMeansClustering/Properties/AssemblyInfo.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.LightGbm/LightGbmArguments.cs b/src/Microsoft.ML.LightGbm/LightGbmArguments.cs index 765b0d297a..ae96ed0661 100644 --- a/src/Microsoft.ML.LightGbm/LightGbmArguments.cs +++ b/src/Microsoft.ML.LightGbm/LightGbmArguments.cs @@ -248,9 +248,9 @@ public sealed class Options : OptionsBase static Options() { // Add additional name mappings - NameMapping.Add(nameof(TreeDropFraction), "drop_rate"); - NameMapping.Add(nameof(MaximumNumberOfDroppedTreesPerRound), "max_drop"); - NameMapping.Add(nameof(SkipDropFraction), "skip_drop"); + NameMapping.Add(nameof(TreeDropFraction), "drop_rate"); + NameMapping.Add(nameof(MaximumNumberOfDroppedTreesPerRound), "max_drop"); + NameMapping.Add(nameof(SkipDropFraction), "skip_drop"); } /// @@ -293,7 +293,7 @@ static Options() } internal DartBooster(Options options) - :base(options) + : base(options) { Contracts.CheckUserArg(options.TreeDropFraction > 0 && options.TreeDropFraction < 1, nameof(options.TreeDropFraction), "must be in (0,1)."); Contracts.CheckUserArg(options.SkipDropFraction >= 0 && options.SkipDropFraction < 1, nameof(options.SkipDropFraction), "must be in [0,1)."); @@ -339,7 +339,7 @@ public sealed class Options : OptionsBase } internal GossBooster(Options options) - :base(options) + : base(options) { Contracts.CheckUserArg(options.TopRate > 0 && options.TopRate < 1, nameof(Options.TopRate), "must be in (0,1)."); Contracts.CheckUserArg(options.OtherRate >= 0 && options.OtherRate < 1, nameof(Options.OtherRate), "must be in [0,1)."); @@ -350,4 +350,4 @@ internal GossBooster(Options options) internal override IBoosterParameterFactory BuildFactory() => BoosterOptions; internal override string BoosterName => Name; } -} \ No newline at end of file +} diff --git a/src/Microsoft.ML.LightGbm/LightGbmBinaryTrainer.cs b/src/Microsoft.ML.LightGbm/LightGbmBinaryTrainer.cs index 795d7845c5..afbd41cb15 100644 --- a/src/Microsoft.ML.LightGbm/LightGbmBinaryTrainer.cs +++ b/src/Microsoft.ML.LightGbm/LightGbmBinaryTrainer.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.LightGbm/LightGbmCatalog.cs b/src/Microsoft.ML.LightGbm/LightGbmCatalog.cs index e6949790c4..49356996f3 100644 --- a/src/Microsoft.ML.LightGbm/LightGbmCatalog.cs +++ b/src/Microsoft.ML.LightGbm/LightGbmCatalog.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.LightGbm/LightGbmMulticlassTrainer.cs b/src/Microsoft.ML.LightGbm/LightGbmMulticlassTrainer.cs index 9ba7490780..3b196e8ae0 100644 --- a/src/Microsoft.ML.LightGbm/LightGbmMulticlassTrainer.cs +++ b/src/Microsoft.ML.LightGbm/LightGbmMulticlassTrainer.cs @@ -159,13 +159,13 @@ internal LightGbmMulticlassTrainer(IHostEnvironment env, : this(env, new Options() { - LabelColumnName = labelColumnName, - FeatureColumnName = featureColumnName, - ExampleWeightColumnName = exampleWeightColumnName, - NumberOfLeaves = numberOfLeaves, - MinimumExampleCountPerLeaf = minimumExampleCountPerLeaf, - LearningRate = learningRate, - NumberOfIterations = numberOfIterations + LabelColumnName = labelColumnName, + FeatureColumnName = featureColumnName, + ExampleWeightColumnName = exampleWeightColumnName, + NumberOfLeaves = numberOfLeaves, + MinimumExampleCountPerLeaf = minimumExampleCountPerLeaf, + LearningRate = learningRate, + NumberOfIterations = numberOfIterations }) { } diff --git a/src/Microsoft.ML.LightGbm/LightGbmRankingTrainer.cs b/src/Microsoft.ML.LightGbm/LightGbmRankingTrainer.cs index 78e9b5a485..84e1637515 100644 --- a/src/Microsoft.ML.LightGbm/LightGbmRankingTrainer.cs +++ b/src/Microsoft.ML.LightGbm/LightGbmRankingTrainer.cs @@ -228,8 +228,8 @@ private protected override void CheckDataValid(IChannel ch, RoleMappedData data) $"Label column '{labelCol.Name}' is of type '{labelType.RawType}', but must be Key or Single."); } // Check group types. - if(!data.Schema.Group.HasValue) - throw ch.ExceptValue(nameof(data.Schema.Group), "Group column is missing.") ; + if (!data.Schema.Group.HasValue) + throw ch.ExceptValue(nameof(data.Schema.Group), "Group column is missing."); var groupCol = data.Schema.Group.Value; var groupType = groupCol.Type; if (!(groupType == NumberDataViewType.UInt32 || groupType is KeyDataViewType)) diff --git a/src/Microsoft.ML.LightGbm/LightGbmRegressionTrainer.cs b/src/Microsoft.ML.LightGbm/LightGbmRegressionTrainer.cs index 8253026645..6a1e71f773 100644 --- a/src/Microsoft.ML.LightGbm/LightGbmRegressionTrainer.cs +++ b/src/Microsoft.ML.LightGbm/LightGbmRegressionTrainer.cs @@ -175,15 +175,15 @@ internal LightGbmRegressionTrainer(IHostEnvironment env, double? learningRate = null, int numberOfIterations = Defaults.NumberOfIterations) : this(env, new Options() - { - LabelColumnName = labelColumnName, - FeatureColumnName = featureColumnName, - ExampleWeightColumnName = exampleWeightColumnName, - NumberOfLeaves = numberOfLeaves, - MinimumExampleCountPerLeaf = minimumExampleCountPerLeaf, - LearningRate = learningRate, - NumberOfIterations = numberOfIterations - }) + { + LabelColumnName = labelColumnName, + FeatureColumnName = featureColumnName, + ExampleWeightColumnName = exampleWeightColumnName, + NumberOfLeaves = numberOfLeaves, + MinimumExampleCountPerLeaf = minimumExampleCountPerLeaf, + LearningRate = learningRate, + NumberOfIterations = numberOfIterations + }) { } diff --git a/src/Microsoft.ML.LightGbm/Parallel/IParallel.cs b/src/Microsoft.ML.LightGbm/Parallel/IParallel.cs index b9ea896246..85c2348596 100644 --- a/src/Microsoft.ML.LightGbm/Parallel/IParallel.cs +++ b/src/Microsoft.ML.LightGbm/Parallel/IParallel.cs @@ -23,17 +23,17 @@ namespace Microsoft.ML.Trainers.LightGbm /// /// Definition of ReduceScatter funtion /// - internal delegate void ReduceScatterFunction([MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 1)]byte[] input, int inputSize, int typeSize, - [MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 5)]int[] blockStart, [MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 5)]int[] blockLen, int numBlock, - [MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 7)]byte[] output, int outputSize, + internal delegate void ReduceScatterFunction([MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 1)] byte[] input, int inputSize, int typeSize, + [MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 5)] int[] blockStart, [MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 5)] int[] blockLen, int numBlock, + [MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 7)] byte[] output, int outputSize, IntPtr reducer); /// /// Definition of Allgather funtion /// - internal delegate void AllgatherFunction([MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 1)]byte[] input, int inputSize, - [MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 4)]int[] blockStart, [MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 4)]int[] blockLen, int numBlock, - [MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 6)]byte[] output, int outputSize); + internal delegate void AllgatherFunction([MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 1)] byte[] input, int inputSize, + [MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 4)] int[] blockStart, [MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 4)] int[] blockLen, int numBlock, + [MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 6)] byte[] output, int outputSize); internal interface IParallel { diff --git a/src/Microsoft.ML.LightGbm/Properties/AssemblyInfo.cs b/src/Microsoft.ML.LightGbm/Properties/AssemblyInfo.cs index ab220d7d14..9d1bb36754 100644 --- a/src/Microsoft.ML.LightGbm/Properties/AssemblyInfo.cs +++ b/src/Microsoft.ML.LightGbm/Properties/AssemblyInfo.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.LightGbm/WrappedLightGbmInterface.cs b/src/Microsoft.ML.LightGbm/WrappedLightGbmInterface.cs index 8fe6513275..6b7403fd80 100644 --- a/src/Microsoft.ML.LightGbm/WrappedLightGbmInterface.cs +++ b/src/Microsoft.ML.LightGbm/WrappedLightGbmInterface.cs @@ -88,7 +88,7 @@ public static extern int DatasetCreateFromSampledColumn(IntPtr sampleValuePerCol int[] sampleNonZeroCntPerColumn, int numSampleRow, int numTotalRow, - [MarshalAs(UnmanagedType.LPStr)]string parameters, + [MarshalAs(UnmanagedType.LPStr)] string parameters, out SafeDataSetHandle ret); [DllImport(DllName, EntryPoint = "LGBM_DatasetCreateByReference", CallingConvention = CallingConvention.StdCall)] @@ -146,7 +146,7 @@ public static int DatasetPushRowsByCsr(SafeDataSetHandle dataset, [DllImport(DllName, EntryPoint = "LGBM_DatasetSetField", CallingConvention = CallingConvention.StdCall)] public static extern int DatasetSetField( SafeDataSetHandle handle, - [MarshalAs(UnmanagedType.LPStr)]string field, + [MarshalAs(UnmanagedType.LPStr)] string field, IntPtr array, int len, CApiDType type); @@ -177,7 +177,7 @@ protected override bool ReleaseHandle() [DllImport(DllName, EntryPoint = "LGBM_BoosterCreate", CallingConvention = CallingConvention.StdCall)] public static extern int BoosterCreate(SafeDataSetHandle trainset, - [MarshalAs(UnmanagedType.LPStr)]string param, + [MarshalAs(UnmanagedType.LPStr)] string param, out SafeBoosterHandle res); [DllImport(DllName, EntryPoint = "LGBM_BoosterFree", CallingConvention = CallingConvention.StdCall)] @@ -213,7 +213,7 @@ public static extern unsafe int BoosterGetEval(SafeBoosterHandle handle, int dat #region API predict [DllImport(DllName, EntryPoint = "LGBM_BoosterPredictForMat", CallingConvention = CallingConvention.StdCall)] public static extern unsafe int BoosterPredictForMat(SafeBoosterHandle handle, IntPtr data, CApiDType dataType, int nRow, int nCol, int isRowMajor, - int predictType, int numIteration, [MarshalAs(UnmanagedType.LPStr)]string parameters, ref int outLen, double* outResult); + int predictType, int numIteration, [MarshalAs(UnmanagedType.LPStr)] string parameters, ref int outLen, double* outResult); #endregion #region API parallel diff --git a/src/Microsoft.ML.Maml/ChainCommand.cs b/src/Microsoft.ML.Maml/ChainCommand.cs index 15a353d356..ff05b74c22 100644 --- a/src/Microsoft.ML.Maml/ChainCommand.cs +++ b/src/Microsoft.ML.Maml/ChainCommand.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.Maml/HelpCommand.cs b/src/Microsoft.ML.Maml/HelpCommand.cs index 8d9f4e8384..3d01b2c119 100644 --- a/src/Microsoft.ML.Maml/HelpCommand.cs +++ b/src/Microsoft.ML.Maml/HelpCommand.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.Maml/MAML.cs b/src/Microsoft.ML.Maml/MAML.cs index 5d071682ad..a2233d8ca9 100644 --- a/src/Microsoft.ML.Maml/MAML.cs +++ b/src/Microsoft.ML.Maml/MAML.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.Maml/Properties/AssemblyInfo.cs b/src/Microsoft.ML.Maml/Properties/AssemblyInfo.cs index bb1e6f1fdc..9303c46cfc 100644 --- a/src/Microsoft.ML.Maml/Properties/AssemblyInfo.cs +++ b/src/Microsoft.ML.Maml/Properties/AssemblyInfo.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.Maml/VersionCommand.cs b/src/Microsoft.ML.Maml/VersionCommand.cs index c69a938f46..249310b7ba 100644 --- a/src/Microsoft.ML.Maml/VersionCommand.cs +++ b/src/Microsoft.ML.Maml/VersionCommand.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.Mkl.Components/MklComponentsCatalog.cs b/src/Microsoft.ML.Mkl.Components/MklComponentsCatalog.cs index b87c1c9e61..036ac3e528 100644 --- a/src/Microsoft.ML.Mkl.Components/MklComponentsCatalog.cs +++ b/src/Microsoft.ML.Mkl.Components/MklComponentsCatalog.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.Mkl.Components/Properties/AssemblyInfo.cs b/src/Microsoft.ML.Mkl.Components/Properties/AssemblyInfo.cs index 1365172209..c790a2e66d 100644 --- a/src/Microsoft.ML.Mkl.Components/Properties/AssemblyInfo.cs +++ b/src/Microsoft.ML.Mkl.Components/Properties/AssemblyInfo.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.Mkl.Components/SymSgdClassificationTrainer.cs b/src/Microsoft.ML.Mkl.Components/SymSgdClassificationTrainer.cs index 1476f4d28c..c5def5b866 100644 --- a/src/Microsoft.ML.Mkl.Components/SymSgdClassificationTrainer.cs +++ b/src/Microsoft.ML.Mkl.Components/SymSgdClassificationTrainer.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.Mkl.Components/VectorWhitening.cs b/src/Microsoft.ML.Mkl.Components/VectorWhitening.cs index fdeffa1a8a..24e96eef2f 100644 --- a/src/Microsoft.ML.Mkl.Components/VectorWhitening.cs +++ b/src/Microsoft.ML.Mkl.Components/VectorWhitening.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.OnnxConverter/OnnxContextImpl.cs b/src/Microsoft.ML.OnnxConverter/OnnxContextImpl.cs index 5e5bbd669d..9a4debd0d5 100644 --- a/src/Microsoft.ML.OnnxConverter/OnnxContextImpl.cs +++ b/src/Microsoft.ML.OnnxConverter/OnnxContextImpl.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.OnnxConverter/OnnxExportExtensions.cs b/src/Microsoft.ML.OnnxConverter/OnnxExportExtensions.cs index a151dd4ff3..df377e46d0 100644 --- a/src/Microsoft.ML.OnnxConverter/OnnxExportExtensions.cs +++ b/src/Microsoft.ML.OnnxConverter/OnnxExportExtensions.cs @@ -47,7 +47,7 @@ private static ModelProto ConvertToOnnxProtobufCore(IHostEnvironment env, OnnxCo /// 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, string[] outputColumns=null) + 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); diff --git a/src/Microsoft.ML.OnnxConverter/OnnxUtils.cs b/src/Microsoft.ML.OnnxConverter/OnnxUtils.cs index af5529c2e0..6d22a0885d 100644 --- a/src/Microsoft.ML.OnnxConverter/OnnxUtils.cs +++ b/src/Microsoft.ML.OnnxConverter/OnnxUtils.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. @@ -530,4 +530,4 @@ public static TensorProto MakeStrings(string name, IEnumerable values, I return tensor; } } -} \ No newline at end of file +} diff --git a/src/Microsoft.ML.OnnxConverter/SaveOnnxCommand.cs b/src/Microsoft.ML.OnnxConverter/SaveOnnxCommand.cs index 7cf0db243b..dde89bd9cf 100644 --- a/src/Microsoft.ML.OnnxConverter/SaveOnnxCommand.cs +++ b/src/Microsoft.ML.OnnxConverter/SaveOnnxCommand.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. @@ -356,7 +356,7 @@ private void Run(IChannel ch) end = scorePipe; transforms.AddLast(scoreOnnx); - if(rawPred.PredictionKind == PredictionKind.BinaryClassification || rawPred.PredictionKind == PredictionKind.MulticlassClassification) + if (rawPred.PredictionKind == PredictionKind.BinaryClassification || rawPred.PredictionKind == PredictionKind.MulticlassClassification) { // Check if the PredictedLabel Column is a KeyDataViewType and has KeyValue Annotations. // If it does, add a KeyToValueMappingTransformer, to enable NimbusML to get the values back diff --git a/src/Microsoft.ML.OnnxTransformer/OnnxTransform.cs b/src/Microsoft.ML.OnnxTransformer/OnnxTransform.cs index 41f573ed3f..bed90e9fec 100644 --- a/src/Microsoft.ML.OnnxTransformer/OnnxTransform.cs +++ b/src/Microsoft.ML.OnnxTransformer/OnnxTransform.cs @@ -230,7 +230,7 @@ private OnnxTransformer(IHostEnvironment env, Options options, byte[] modelBytes // internal functions. If nothing is provided, shapeDictionary is null. var shapeDictionary = new Dictionary(); if (options.CustomShapeInfos != null) - foreach(var customShape in options.CustomShapeInfos) + foreach (var customShape in options.CustomShapeInfos) shapeDictionary[customShape.Name] = customShape.Shape; // Use ONNXRuntime to figure out the right input and output configuration. @@ -255,7 +255,7 @@ private OnnxTransformer(IHostEnvironment env, Options options, byte[] modelBytes } catch (OnnxRuntimeException e) { - throw Host.Except(e, $"Error initializing model :{e.ToString()}"); + throw Host.Except(e, $"Error initializing model :{e.ToString()}"); } var modelInfo = Model.ModelInfo; @@ -430,7 +430,7 @@ public Mapper(OnnxTransformer parent, DataViewSchema inputSchema) : var col = inputSchema.GetColumnOrNull(_parent.Inputs[i]); if (!col.HasValue) - throw Host.ExceptSchemaMismatch(nameof(inputSchema),"input", _parent.Inputs[i]); + throw Host.ExceptSchemaMismatch(nameof(inputSchema), "input", _parent.Inputs[i]); _inputColIndices[i] = col.Value.Index; diff --git a/src/Microsoft.ML.OnnxTransformer/OnnxTypeParser.cs b/src/Microsoft.ML.OnnxTransformer/OnnxTypeParser.cs index 1a2b1420e4..42d2ec396f 100644 --- a/src/Microsoft.ML.OnnxTransformer/OnnxTypeParser.cs +++ b/src/Microsoft.ML.OnnxTransformer/OnnxTypeParser.cs @@ -196,7 +196,7 @@ public static IEnumerable GetTensorDims(Microsoft.ML.Model.OnnxConverter.On return null; List dims = new List(); - foreach(var d in tensorShapeProto.Dim) + foreach (var d in tensorShapeProto.Dim) { var dimValue = GetDimValue(d); dims.Add(dimValue); @@ -263,7 +263,7 @@ public static DataViewType GetDataViewType(OnnxCSharpToProtoWrapper.TypeProto ty /// private class CastHelper { - public static T CastTo(object o) => (T) o; + public static T CastTo(object o) => (T)o; public static IEnumerable CastOnnxSequenceToIEnumerable(IEnumerable o, Func caster) { @@ -303,7 +303,8 @@ public static Func GetDataViewValueCasterAndResultedType var accessSpecialized = accessInfo.MakeGenericMethod(type); // NamedOnnxValue to scalar. - Func caster = (NamedOnnxValue value) => { + Func caster = (NamedOnnxValue value) => + { var scalar = accessSpecialized.Invoke(value, new object[] { 0 }); return scalar; }; diff --git a/src/Microsoft.ML.OnnxTransformer/OnnxUtils.cs b/src/Microsoft.ML.OnnxTransformer/OnnxUtils.cs index 3edc57e798..90705ec2b7 100644 --- a/src/Microsoft.ML.OnnxTransformer/OnnxUtils.cs +++ b/src/Microsoft.ML.OnnxTransformer/OnnxUtils.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. @@ -166,7 +166,7 @@ public OnnxVariableInfo(string name, OnnxShape shape, Type typeInOnnxRuntime, Da /// /// Optional, specifies the Protobuf CodedInputStream recursion limit. Default value is 100. public OnnxModel(string modelFile, int? gpuDeviceId = null, bool fallbackToCpu = false, - bool ownModelFile=false, IDictionary shapeDictionary = null, int recursionLimit = 100) + bool ownModelFile = false, IDictionary shapeDictionary = null, int recursionLimit = 100) { // If we don't own the model file, _disposed should be false to prevent deleting user's file. _disposed = false; @@ -178,7 +178,7 @@ public OnnxModel(string modelFile, int? gpuDeviceId = null, bool fallbackToCpu = _session = new InferenceSession(modelFile, SessionOptions.MakeSessionOptionWithCudaProvider(gpuDeviceId.Value)); } - catch(OnnxRuntimeException) + catch (OnnxRuntimeException) { if (fallbackToCpu) _session = new InferenceSession(modelFile); @@ -311,7 +311,7 @@ private static bool CheckOnnxShapeCompatibility(IEnumerable left, IEnumerab { if (left.Count() != right.Count()) return false; - foreach(var (l, r) in left.Zip(right, (l, r) => (l, r))) + foreach (var (l, r) in left.Zip(right, (l, r) => (l, r))) { // Along a specific axis, if any of left or right have unknown dimension, the overwriting can happen. if (l != r && l > 0 && r > 0) @@ -424,7 +424,7 @@ internal sealed class OnnxUtils typeof(SByte), typeof(Byte) }; - private static Dictionary _typeToKindMap= + private static Dictionary _typeToKindMap = new Dictionary { { typeof(Single) , InternalDataKind.R4}, @@ -496,7 +496,7 @@ public static NamedOnnxValue CreateNamedOnnxValue(string name, ReadOnlySpan IParameterMixer.CombineParameters(IList(kvp.Key, kvp.Value)); } } -} \ No newline at end of file +} diff --git a/src/Microsoft.ML.StandardTrainers/Standard/LogisticRegression/LbfgsPredictorBase.cs b/src/Microsoft.ML.StandardTrainers/Standard/LogisticRegression/LbfgsPredictorBase.cs index 2fcc7d89ec..a5993b9d85 100644 --- a/src/Microsoft.ML.StandardTrainers/Standard/LogisticRegression/LbfgsPredictorBase.cs +++ b/src/Microsoft.ML.StandardTrainers/Standard/LogisticRegression/LbfgsPredictorBase.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. @@ -192,16 +192,16 @@ internal LbfgsTrainerBase(IHostEnvironment env, int memorySize, bool enforceNoNegativity) : this(env, new TOptions - { - FeatureColumnName = featureColumn, - LabelColumnName = labelColumn.Name, - ExampleWeightColumnName = weightColumn, - L1Regularization = l1Weight, - L2Regularization = l2Weight, - OptimizationTolerance = optimizationTolerance, - HistorySize = memorySize, - EnforceNonNegativity = enforceNoNegativity - }, + { + FeatureColumnName = featureColumn, + LabelColumnName = labelColumn.Name, + ExampleWeightColumnName = weightColumn, + L1Regularization = l1Weight, + L2Regularization = l2Weight, + OptimizationTolerance = optimizationTolerance, + HistorySize = memorySize, + EnforceNonNegativity = enforceNoNegativity + }, labelColumn) { } @@ -240,7 +240,7 @@ internal LbfgsTrainerBase(IHostEnvironment env, L2Weight = LbfgsTrainerOptions.L2Regularization; L1Weight = LbfgsTrainerOptions.L1Regularization; OptTol = LbfgsTrainerOptions.OptimizationTolerance; - MemorySize =LbfgsTrainerOptions.HistorySize; + MemorySize = LbfgsTrainerOptions.HistorySize; MaxIterations = LbfgsTrainerOptions.MaximumNumberOfIterations; SgdInitializationTolerance = LbfgsTrainerOptions.StochasticGradientDescentInitilaizationTolerance; Quiet = LbfgsTrainerOptions.Quiet; diff --git a/src/Microsoft.ML.StandardTrainers/Standard/LogisticRegression/LogisticRegression.cs b/src/Microsoft.ML.StandardTrainers/Standard/LogisticRegression/LogisticRegression.cs index 0b1d8360ea..9401e11fe9 100644 --- a/src/Microsoft.ML.StandardTrainers/Standard/LogisticRegression/LogisticRegression.cs +++ b/src/Microsoft.ML.StandardTrainers/Standard/LogisticRegression/LogisticRegression.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.StandardTrainers/Standard/LogisticRegression/MulticlassLogisticRegression.cs b/src/Microsoft.ML.StandardTrainers/Standard/LogisticRegression/MulticlassLogisticRegression.cs index 2cf18dc757..9bf582d3e8 100644 --- a/src/Microsoft.ML.StandardTrainers/Standard/LogisticRegression/MulticlassLogisticRegression.cs +++ b/src/Microsoft.ML.StandardTrainers/Standard/LogisticRegression/MulticlassLogisticRegression.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.StandardTrainers/Standard/ModelStatistics.cs b/src/Microsoft.ML.StandardTrainers/Standard/ModelStatistics.cs index bf7cde38bc..d0cee3c3c0 100644 --- a/src/Microsoft.ML.StandardTrainers/Standard/ModelStatistics.cs +++ b/src/Microsoft.ML.StandardTrainers/Standard/ModelStatistics.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.StandardTrainers/Standard/MulticlassClassification/MetaMulticlassTrainer.cs b/src/Microsoft.ML.StandardTrainers/Standard/MulticlassClassification/MetaMulticlassTrainer.cs index 1ed132921d..87bae119bf 100644 --- a/src/Microsoft.ML.StandardTrainers/Standard/MulticlassClassification/MetaMulticlassTrainer.cs +++ b/src/Microsoft.ML.StandardTrainers/Standard/MulticlassClassification/MetaMulticlassTrainer.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. @@ -190,4 +190,4 @@ private SchemaShape.Column[] GetOutputColumnsCore(SchemaShape inputSchema) /// The transformer. public abstract TTransformer Fit(IDataView input); } -} \ No newline at end of file +} diff --git a/src/Microsoft.ML.StandardTrainers/Standard/MulticlassClassification/MulticlassNaiveBayesTrainer.cs b/src/Microsoft.ML.StandardTrainers/Standard/MulticlassClassification/MulticlassNaiveBayesTrainer.cs index 1dfef5ad5d..103ca39bab 100644 --- a/src/Microsoft.ML.StandardTrainers/Standard/MulticlassClassification/MulticlassNaiveBayesTrainer.cs +++ b/src/Microsoft.ML.StandardTrainers/Standard/MulticlassClassification/MulticlassNaiveBayesTrainer.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. @@ -274,7 +274,7 @@ private static VersionInfo GetVersionInfo() /// [Obsolete("This API is deprecated, please use GetFeatureHistogramLong() which returns _featureHistogram " + "with type IReadOnlyList to avoid overflow errors with large datasets.", true)] - public IReadOnlyList> GetFeatureHistogram() => Array.ConvertAll(_featureHistogram, x => Array.ConvertAll(x, y=> (int)y)); + public IReadOnlyList> GetFeatureHistogram() => Array.ConvertAll(_featureHistogram, x => Array.ConvertAll(x, y => (int)y)); /// /// Get the feature histogram with generic type long. diff --git a/src/Microsoft.ML.StandardTrainers/Standard/MulticlassClassification/OneVersusAllTrainer.cs b/src/Microsoft.ML.StandardTrainers/Standard/MulticlassClassification/OneVersusAllTrainer.cs index bfbcde8086..53307612f8 100644 --- a/src/Microsoft.ML.StandardTrainers/Standard/MulticlassClassification/OneVersusAllTrainer.cs +++ b/src/Microsoft.ML.StandardTrainers/Standard/MulticlassClassification/OneVersusAllTrainer.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. @@ -947,4 +947,4 @@ public override bool SaveAsOnnx(OnnxContext ctx, string[] outputNames, string fe } } } -} \ No newline at end of file +} diff --git a/src/Microsoft.ML.StandardTrainers/Standard/MulticlassClassification/PairwiseCouplingTrainer.cs b/src/Microsoft.ML.StandardTrainers/Standard/MulticlassClassification/PairwiseCouplingTrainer.cs index a9f3fe491c..37ca9ad766 100644 --- a/src/Microsoft.ML.StandardTrainers/Standard/MulticlassClassification/PairwiseCouplingTrainer.cs +++ b/src/Microsoft.ML.StandardTrainers/Standard/MulticlassClassification/PairwiseCouplingTrainer.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.StandardTrainers/Standard/Online/AveragedLinear.cs b/src/Microsoft.ML.StandardTrainers/Standard/Online/AveragedLinear.cs index 8d8ef61f97..6197e0b4c5 100644 --- a/src/Microsoft.ML.StandardTrainers/Standard/Online/AveragedLinear.cs +++ b/src/Microsoft.ML.StandardTrainers/Standard/Online/AveragedLinear.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.StandardTrainers/Standard/Online/AveragedPerceptron.cs b/src/Microsoft.ML.StandardTrainers/Standard/Online/AveragedPerceptron.cs index 80467debd9..ff08d0fb5e 100644 --- a/src/Microsoft.ML.StandardTrainers/Standard/Online/AveragedPerceptron.cs +++ b/src/Microsoft.ML.StandardTrainers/Standard/Online/AveragedPerceptron.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.StandardTrainers/Standard/Online/LinearSvm.cs b/src/Microsoft.ML.StandardTrainers/Standard/Online/LinearSvm.cs index ea6eb5c873..1991df054a 100644 --- a/src/Microsoft.ML.StandardTrainers/Standard/Online/LinearSvm.cs +++ b/src/Microsoft.ML.StandardTrainers/Standard/Online/LinearSvm.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.StandardTrainers/Standard/Online/OnlineGradientDescent.cs b/src/Microsoft.ML.StandardTrainers/Standard/Online/OnlineGradientDescent.cs index f145fc4bfa..c34f23f57a 100644 --- a/src/Microsoft.ML.StandardTrainers/Standard/Online/OnlineGradientDescent.cs +++ b/src/Microsoft.ML.StandardTrainers/Standard/Online/OnlineGradientDescent.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. @@ -148,7 +148,7 @@ internal OnlineGradientDescentTrainer(IHostEnvironment env, { LearningRate = learningRate, DecreaseLearningRate = decreaseLearningRate, - L2Regularization= l2Regularization, + L2Regularization = l2Regularization, NumberOfIterations = numberOfIterations, LabelColumnName = labelColumn, FeatureColumnName = featureColumn, diff --git a/src/Microsoft.ML.StandardTrainers/Standard/Online/OnlineLinear.cs b/src/Microsoft.ML.StandardTrainers/Standard/Online/OnlineLinear.cs index 74b4f65a0a..9efe9d72f8 100644 --- a/src/Microsoft.ML.StandardTrainers/Standard/Online/OnlineLinear.cs +++ b/src/Microsoft.ML.StandardTrainers/Standard/Online/OnlineLinear.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.StandardTrainers/Standard/PoissonRegression/PoissonRegression.cs b/src/Microsoft.ML.StandardTrainers/Standard/PoissonRegression/PoissonRegression.cs index 98ac13458e..62b4e89c62 100644 --- a/src/Microsoft.ML.StandardTrainers/Standard/PoissonRegression/PoissonRegression.cs +++ b/src/Microsoft.ML.StandardTrainers/Standard/PoissonRegression/PoissonRegression.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.StandardTrainers/Standard/SdcaBinary.cs b/src/Microsoft.ML.StandardTrainers/Standard/SdcaBinary.cs index 049745e799..f0dd0b5e7c 100644 --- a/src/Microsoft.ML.StandardTrainers/Standard/SdcaBinary.cs +++ b/src/Microsoft.ML.StandardTrainers/Standard/SdcaBinary.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.StandardTrainers/Standard/SdcaMulticlass.cs b/src/Microsoft.ML.StandardTrainers/Standard/SdcaMulticlass.cs index a68bf1751b..afa4b1974b 100644 --- a/src/Microsoft.ML.StandardTrainers/Standard/SdcaMulticlass.cs +++ b/src/Microsoft.ML.StandardTrainers/Standard/SdcaMulticlass.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.StandardTrainers/Standard/SdcaRegression.cs b/src/Microsoft.ML.StandardTrainers/Standard/SdcaRegression.cs index 6329fabbb8..ff6ad12950 100644 --- a/src/Microsoft.ML.StandardTrainers/Standard/SdcaRegression.cs +++ b/src/Microsoft.ML.StandardTrainers/Standard/SdcaRegression.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.StandardTrainers/Standard/Simple/SimpleTrainers.cs b/src/Microsoft.ML.StandardTrainers/Standard/Simple/SimpleTrainers.cs index d7ab83d94d..bb6d4f3a87 100644 --- a/src/Microsoft.ML.StandardTrainers/Standard/Simple/SimpleTrainers.cs +++ b/src/Microsoft.ML.StandardTrainers/Standard/Simple/SimpleTrainers.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.StandardTrainers/StandardTrainersCatalog.cs b/src/Microsoft.ML.StandardTrainers/StandardTrainersCatalog.cs index 403de09afe..dc7be83e0e 100644 --- a/src/Microsoft.ML.StandardTrainers/StandardTrainersCatalog.cs +++ b/src/Microsoft.ML.StandardTrainers/StandardTrainersCatalog.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.Sweeper/Algorithms/Grid.cs b/src/Microsoft.ML.Sweeper/Algorithms/Grid.cs index 0a8febbfa7..e7b9c8278d 100644 --- a/src/Microsoft.ML.Sweeper/Algorithms/Grid.cs +++ b/src/Microsoft.ML.Sweeper/Algorithms/Grid.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.Sweeper/Algorithms/KdoSweeper.cs b/src/Microsoft.ML.Sweeper/Algorithms/KdoSweeper.cs index 0525b6bfe8..dab8880ec1 100644 --- a/src/Microsoft.ML.Sweeper/Algorithms/KdoSweeper.cs +++ b/src/Microsoft.ML.Sweeper/Algorithms/KdoSweeper.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.Sweeper/Algorithms/NelderMead.cs b/src/Microsoft.ML.Sweeper/Algorithms/NelderMead.cs index f02a50244e..074f704625 100644 --- a/src/Microsoft.ML.Sweeper/Algorithms/NelderMead.cs +++ b/src/Microsoft.ML.Sweeper/Algorithms/NelderMead.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.Sweeper/Algorithms/Random.cs b/src/Microsoft.ML.Sweeper/Algorithms/Random.cs index 08d5e75b38..c0c8aac14d 100644 --- a/src/Microsoft.ML.Sweeper/Algorithms/Random.cs +++ b/src/Microsoft.ML.Sweeper/Algorithms/Random.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.Sweeper/Algorithms/SmacSweeper.cs b/src/Microsoft.ML.Sweeper/Algorithms/SmacSweeper.cs index b181b22473..b45db12677 100644 --- a/src/Microsoft.ML.Sweeper/Algorithms/SmacSweeper.cs +++ b/src/Microsoft.ML.Sweeper/Algorithms/SmacSweeper.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.Sweeper/Algorithms/SweeperProbabilityUtils.cs b/src/Microsoft.ML.Sweeper/Algorithms/SweeperProbabilityUtils.cs index 4e124d318e..d405f66556 100644 --- a/src/Microsoft.ML.Sweeper/Algorithms/SweeperProbabilityUtils.cs +++ b/src/Microsoft.ML.Sweeper/Algorithms/SweeperProbabilityUtils.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.Sweeper/AsyncSweeper.cs b/src/Microsoft.ML.Sweeper/AsyncSweeper.cs index 6e71d13729..5c4468f4be 100644 --- a/src/Microsoft.ML.Sweeper/AsyncSweeper.cs +++ b/src/Microsoft.ML.Sweeper/AsyncSweeper.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.Sweeper/ISweeper.cs b/src/Microsoft.ML.Sweeper/ISweeper.cs index 8db02aa992..2d60539f48 100644 --- a/src/Microsoft.ML.Sweeper/ISweeper.cs +++ b/src/Microsoft.ML.Sweeper/ISweeper.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.Sweeper/Parameters.cs b/src/Microsoft.ML.Sweeper/Parameters.cs index a52a538b25..735cfc4a1a 100644 --- a/src/Microsoft.ML.Sweeper/Parameters.cs +++ b/src/Microsoft.ML.Sweeper/Parameters.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.Sweeper/Properties/AssemblyInfo.cs b/src/Microsoft.ML.Sweeper/Properties/AssemblyInfo.cs index 3bf539c0d5..f1cc49ffbf 100644 --- a/src/Microsoft.ML.Sweeper/Properties/AssemblyInfo.cs +++ b/src/Microsoft.ML.Sweeper/Properties/AssemblyInfo.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.Sweeper/SweepCommand.cs b/src/Microsoft.ML.Sweeper/SweepCommand.cs index 7f31daca23..3b058e903d 100644 --- a/src/Microsoft.ML.Sweeper/SweepCommand.cs +++ b/src/Microsoft.ML.Sweeper/SweepCommand.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.Sweeper/SweepResultEvaluator.cs b/src/Microsoft.ML.Sweeper/SweepResultEvaluator.cs index 139f2eb29e..edc282b184 100644 --- a/src/Microsoft.ML.Sweeper/SweepResultEvaluator.cs +++ b/src/Microsoft.ML.Sweeper/SweepResultEvaluator.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.TensorFlow/TensorFlowModel.cs b/src/Microsoft.ML.TensorFlow/TensorFlowModel.cs index 7bff665ba6..18aa5eb83d 100644 --- a/src/Microsoft.ML.TensorFlow/TensorFlowModel.cs +++ b/src/Microsoft.ML.TensorFlow/TensorFlowModel.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. @@ -103,4 +103,4 @@ public void Dispose() } #endregion } -} \ No newline at end of file +} diff --git a/src/Microsoft.ML.TensorFlow/TensorFlowSessionWrapper.cs b/src/Microsoft.ML.TensorFlow/TensorFlowSessionWrapper.cs index 75473a8806..3a9369a4c6 100644 --- a/src/Microsoft.ML.TensorFlow/TensorFlowSessionWrapper.cs +++ b/src/Microsoft.ML.TensorFlow/TensorFlowSessionWrapper.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.TensorFlow/TensorTypeExtensions.cs b/src/Microsoft.ML.TensorFlow/TensorTypeExtensions.cs index 2dac7a449d..330c398133 100644 --- a/src/Microsoft.ML.TensorFlow/TensorTypeExtensions.cs +++ b/src/Microsoft.ML.TensorFlow/TensorTypeExtensions.cs @@ -35,7 +35,7 @@ public static void ToScalar(this Tensor tensor, ref T dst) where T : unmanage } - public static void CopyTo(this Tensor tensor, Span values) where T: unmanaged + public static void CopyTo(this Tensor tensor, Span values) where T : unmanaged { if (typeof(T).as_dtype() != tensor.dtype) throw new NotSupportedException(); diff --git a/src/Microsoft.ML.TensorFlow/TensorflowTransform.cs b/src/Microsoft.ML.TensorFlow/TensorflowTransform.cs index 7c5aef7328..a149daa1a6 100644 --- a/src/Microsoft.ML.TensorFlow/TensorflowTransform.cs +++ b/src/Microsoft.ML.TensorFlow/TensorflowTransform.cs @@ -462,7 +462,8 @@ private protected override void SaveModel(ModelSaveContext ctx) }); } } - else { + else + { ctx.SaveBinaryStream("TFSavedModel", w => { // only these files need to be saved. @@ -657,7 +658,8 @@ public override Delegate[] CreateGetters(DataViewRow input, Func acti int n = OutputColumns.Value.Length; var result = new Delegate[n]; - for (int i = 0; i < n; i++) { + for (int i = 0; i < n; i++) + { if (!activeOutput(i)) continue; result[i] = CreateGetter(input, i, activeOutput, outputCacher); diff --git a/src/Microsoft.ML.TimeSeries/EigenUtils.cs b/src/Microsoft.ML.TimeSeries/EigenUtils.cs index c4f13f05db..53f070fa09 100644 --- a/src/Microsoft.ML.TimeSeries/EigenUtils.cs +++ b/src/Microsoft.ML.TimeSeries/EigenUtils.cs @@ -554,4 +554,4 @@ public static bool MklSymmetricEigenDecomposition(Single[] input, int size, out } } -} \ No newline at end of file +} diff --git a/src/Microsoft.ML.TimeSeries/PercentileThresholdTransform.cs b/src/Microsoft.ML.TimeSeries/PercentileThresholdTransform.cs index 283d22447d..06f6aa483d 100644 --- a/src/Microsoft.ML.TimeSeries/PercentileThresholdTransform.cs +++ b/src/Microsoft.ML.TimeSeries/PercentileThresholdTransform.cs @@ -155,4 +155,4 @@ private protected override void LearnStateFromDataCore(FixedSizeQueue da } } } -} \ No newline at end of file +} diff --git a/src/Microsoft.ML.TimeSeries/RootCauseAnalyzer.cs b/src/Microsoft.ML.TimeSeries/RootCauseAnalyzer.cs index b6ce81f181..037e6fcfca 100644 --- a/src/Microsoft.ML.TimeSeries/RootCauseAnalyzer.cs +++ b/src/Microsoft.ML.TimeSeries/RootCauseAnalyzer.cs @@ -843,4 +843,4 @@ public override int GetHashCode(Dictionary obj) return code; } } -} \ No newline at end of file +} diff --git a/src/Microsoft.ML.TimeSeries/SequentialAnomalyDetectionTransformBase.cs b/src/Microsoft.ML.TimeSeries/SequentialAnomalyDetectionTransformBase.cs index 5048a38dac..823351d419 100644 --- a/src/Microsoft.ML.TimeSeries/SequentialAnomalyDetectionTransformBase.cs +++ b/src/Microsoft.ML.TimeSeries/SequentialAnomalyDetectionTransformBase.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. @@ -361,12 +361,12 @@ public Delegate[] CreateGetters(DataViewRow input, Func activeOutput, private delegate void ProcessData(ref TInput src, ref VBuffer dst); - private Delegate MakeGetter(DataViewRow input, AnomalyDetectionStateBase state) - { - _host.AssertValue(input); - var srcGetter = input.GetGetter(input.Schema[_inputColumnIndex]); - ProcessData processData = _parent.WindowSize > 0 ? - (ProcessData)state.Process : state.ProcessWithoutBuffer; + private Delegate MakeGetter(DataViewRow input, AnomalyDetectionStateBase state) + { + _host.AssertValue(input); + var srcGetter = input.GetGetter(input.Schema[_inputColumnIndex]); + ProcessData processData = _parent.WindowSize > 0 ? + (ProcessData)state.Process : state.ProcessWithoutBuffer; ValueGetter> valueGetter = (ref VBuffer dst) => { diff --git a/src/Microsoft.ML.TimeSeries/SequentialForecastingTransformBase.cs b/src/Microsoft.ML.TimeSeries/SequentialForecastingTransformBase.cs index d8cc2af235..abb2bad738 100644 --- a/src/Microsoft.ML.TimeSeries/SequentialForecastingTransformBase.cs +++ b/src/Microsoft.ML.TimeSeries/SequentialForecastingTransformBase.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.TimeSeries/SrCnnAnomalyDetectionBase.cs b/src/Microsoft.ML.TimeSeries/SrCnnAnomalyDetectionBase.cs index c18a309539..ebcd914ab4 100644 --- a/src/Microsoft.ML.TimeSeries/SrCnnAnomalyDetectionBase.cs +++ b/src/Microsoft.ML.TimeSeries/SrCnnAnomalyDetectionBase.cs @@ -262,7 +262,7 @@ private Single PredictNext(List data) Single slopeSum = 0.0f; for (int i = 0; i < n - 1; ++i) { - slopeSum += (data[n-1] - data[i]) / (n - 1 - i); + slopeSum += (data[n - 1] - data[i]) / (n - 1 - i); } return (data[1] + slopeSum); } diff --git a/src/Microsoft.ML.TimeSeries/SrCnnEntireAnomalyDetector.cs b/src/Microsoft.ML.TimeSeries/SrCnnEntireAnomalyDetector.cs index 12a3f8c9ed..92c8b7c042 100644 --- a/src/Microsoft.ML.TimeSeries/SrCnnEntireAnomalyDetector.cs +++ b/src/Microsoft.ML.TimeSeries/SrCnnEntireAnomalyDetector.cs @@ -136,7 +136,7 @@ internal sealed class SrCnnEntireAnomalyDetector : BatchDataViewMapperBase> segments = new List>(); int start = -1; int cursor = -1; - for(int i = 0; i < values.Length; ++i) + for (int i = 0; i < values.Length; ++i) { // this is a outlier if (results[i][6] > values[i] || values[i] > results[i][5]) @@ -782,7 +782,7 @@ private void GetMarginPeriod(double[] values, double[][] results, IReadOnlyList< List anomalyIndex = new List(); for (int i = 0; i < values.Length; ++i) { - if(results[i][0] > 0) + if (results[i][0] > 0) { anomalyIndex.Add(i); } @@ -792,16 +792,16 @@ private void GetMarginPeriod(double[] values, double[][] results, IReadOnlyList< if (anomalyIndex.Count > 1) { cursor = 0; - for(int i = 0; i < anomalyIndex.Count - 1; ++i) + for (int i = 0; i < anomalyIndex.Count - 1; ++i) { while (cursor < segments.Count && anomalyIndex[i] >= segments[cursor].Item2) { ++cursor; } - if (cursor < segments.Count && segments[cursor].Item1 <= anomalyIndex[i] && anomalyIndex[i+1] <= segments[cursor].Item2) + if (cursor < segments.Count && segments[cursor].Item1 <= anomalyIndex[i] && anomalyIndex[i + 1] <= segments[cursor].Item2) { - for (int j = anomalyIndex[i]; j < anomalyIndex[i+1]; ++j) + for (int j = anomalyIndex[i]; j < anomalyIndex[i + 1]; ++j) { results[j][0] = 1; } diff --git a/src/Microsoft.ML.TimeSeries/SsaChangePointDetector.cs b/src/Microsoft.ML.TimeSeries/SsaChangePointDetector.cs index 1e3969b6a2..ca5279fc84 100644 --- a/src/Microsoft.ML.TimeSeries/SsaChangePointDetector.cs +++ b/src/Microsoft.ML.TimeSeries/SsaChangePointDetector.cs @@ -256,17 +256,17 @@ internal SsaChangePointEstimator(IHostEnvironment env, string outputColumnName, MartingaleType martingale = MartingaleType.Power, double eps = 0.1) : this(env, new SsaChangePointDetector.Options - { - Name = outputColumnName, - Source = inputColumnName ?? outputColumnName, - Confidence = confidence, - ChangeHistoryLength = changeHistoryLength, - TrainingWindowSize = trainingWindowSize, - SeasonalWindowSize = seasonalityWindowSize, - Martingale = martingale, - PowerMartingaleEpsilon = eps, - ErrorFunction = errorFunction - }) + { + Name = outputColumnName, + Source = inputColumnName ?? outputColumnName, + Confidence = confidence, + ChangeHistoryLength = changeHistoryLength, + TrainingWindowSize = trainingWindowSize, + SeasonalWindowSize = seasonalityWindowSize, + Martingale = martingale, + PowerMartingaleEpsilon = eps, + ErrorFunction = errorFunction + }) { } diff --git a/src/Microsoft.ML.TimeSeries/SsaForecastingBase.cs b/src/Microsoft.ML.TimeSeries/SsaForecastingBase.cs index 1eb942c775..9cef996cc1 100644 --- a/src/Microsoft.ML.TimeSeries/SsaForecastingBase.cs +++ b/src/Microsoft.ML.TimeSeries/SsaForecastingBase.cs @@ -128,7 +128,7 @@ internal sealed class SsaForecastingBase : SequentialForecastingTransformBase(_parentForecaster.Horizon, max); } - public override void Forecast( ref VBuffer dst) + public override void Forecast(ref VBuffer dst) { int horizon = LocalHorizon ?? _parentForecaster.Horizon; dst = new VBuffer(horizon, ((AdaptiveSingularSpectrumSequenceModelerInternal)_model).Forecast(horizon)); diff --git a/src/Microsoft.ML.TimeSeries/SsaSpikeDetector.cs b/src/Microsoft.ML.TimeSeries/SsaSpikeDetector.cs index a0e1fca547..d92a53c40c 100644 --- a/src/Microsoft.ML.TimeSeries/SsaSpikeDetector.cs +++ b/src/Microsoft.ML.TimeSeries/SsaSpikeDetector.cs @@ -236,16 +236,16 @@ internal SsaSpikeEstimator(IHostEnvironment env, AnomalySide side = AnomalySide.TwoSided, ErrorFunction errorFunction = ErrorFunction.SignedDifference) : this(env, new SsaSpikeDetector.Options - { - Source = inputColumnName ?? outputColumnName, - Name = outputColumnName, - Confidence = confidence, - PvalueHistoryLength = pvalueHistoryLength, - TrainingWindowSize = trainingWindowSize, - SeasonalWindowSize = seasonalityWindowSize, - Side = side, - ErrorFunction = errorFunction - }) + { + Source = inputColumnName ?? outputColumnName, + Name = outputColumnName, + Confidence = confidence, + PvalueHistoryLength = pvalueHistoryLength, + TrainingWindowSize = trainingWindowSize, + SeasonalWindowSize = seasonalityWindowSize, + Side = side, + ErrorFunction = errorFunction + }) { } diff --git a/src/Microsoft.ML.Transforms/CategoricalCatalog.cs b/src/Microsoft.ML.Transforms/CategoricalCatalog.cs index b5f67e440c..7bbff58793 100644 --- a/src/Microsoft.ML.Transforms/CategoricalCatalog.cs +++ b/src/Microsoft.ML.Transforms/CategoricalCatalog.cs @@ -197,4 +197,4 @@ internal static OneHotHashEncodingEstimator OneHotHashEncoding(this TransformsCa params OneHotHashEncodingEstimator.ColumnOptions[] columns) => new OneHotHashEncodingEstimator(CatalogUtils.GetEnvironment(catalog), columns); } -} \ No newline at end of file +} diff --git a/src/Microsoft.ML.Transforms/CompositeTransformer.cs b/src/Microsoft.ML.Transforms/CompositeTransformer.cs index e51706dc16..bf50f47b1f 100644 --- a/src/Microsoft.ML.Transforms/CompositeTransformer.cs +++ b/src/Microsoft.ML.Transforms/CompositeTransformer.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.Transforms/CountFeatureSelection.cs b/src/Microsoft.ML.Transforms/CountFeatureSelection.cs index dd210b14cb..9fd0155822 100644 --- a/src/Microsoft.ML.Transforms/CountFeatureSelection.cs +++ b/src/Microsoft.ML.Transforms/CountFeatureSelection.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.Transforms/CustomMappingTransformer.cs b/src/Microsoft.ML.Transforms/CustomMappingTransformer.cs index 03c55c8c58..a84eaa359e 100644 --- a/src/Microsoft.ML.Transforms/CustomMappingTransformer.cs +++ b/src/Microsoft.ML.Transforms/CustomMappingTransformer.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.Transforms/Dracula/CMCountTable.cs b/src/Microsoft.ML.Transforms/Dracula/CMCountTable.cs index 56d1380e84..f02a2143b2 100644 --- a/src/Microsoft.ML.Transforms/Dracula/CMCountTable.cs +++ b/src/Microsoft.ML.Transforms/Dracula/CMCountTable.cs @@ -129,7 +129,7 @@ public override void Save(ModelSaveContext ctx) for (int iLabel = 0; iLabel < LabelCardinality; iLabel++) { - for (int iDepth=0;iDepth[] outputTables, out float[] } } } -} \ No newline at end of file +} diff --git a/src/Microsoft.ML.Transforms/Dracula/Featurizer.cs b/src/Microsoft.ML.Transforms/Dracula/Featurizer.cs index 4f96531087..93e5fad360 100644 --- a/src/Microsoft.ML.Transforms/Dracula/Featurizer.cs +++ b/src/Microsoft.ML.Transforms/Dracula/Featurizer.cs @@ -208,4 +208,4 @@ private void GenerateLogOdds(int iCol, ICountTable countTable, Span count } } } -} \ No newline at end of file +} diff --git a/src/Microsoft.ML.Transforms/Dracula/MultiCountTable.cs b/src/Microsoft.ML.Transforms/Dracula/MultiCountTable.cs index d9e12e517a..50adbe97cb 100644 --- a/src/Microsoft.ML.Transforms/Dracula/MultiCountTable.cs +++ b/src/Microsoft.ML.Transforms/Dracula/MultiCountTable.cs @@ -394,4 +394,4 @@ public void GetCounts(long key, Span counts) } } } -} \ No newline at end of file +} diff --git a/src/Microsoft.ML.Transforms/EntryPoints/SelectFeatures.cs b/src/Microsoft.ML.Transforms/EntryPoints/SelectFeatures.cs index a395c71d5f..ab39c8c7c8 100644 --- a/src/Microsoft.ML.Transforms/EntryPoints/SelectFeatures.cs +++ b/src/Microsoft.ML.Transforms/EntryPoints/SelectFeatures.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.Transforms/Expression/CodeGen.cs b/src/Microsoft.ML.Transforms/Expression/CodeGen.cs index b46dd736b7..c97fb405bd 100644 --- a/src/Microsoft.ML.Transforms/Expression/CodeGen.cs +++ b/src/Microsoft.ML.Transforms/Expression/CodeGen.cs @@ -745,7 +745,7 @@ public override bool PreVisit(ConditionalNode node) _gen.Br(labEnd); _gen.MarkLabel(labEnd); - LDone: +LDone: DoConvert(node); return false; } @@ -1424,4 +1424,4 @@ public override void PostVisit(WithLocalNode node) } } } -} \ No newline at end of file +} diff --git a/src/Microsoft.ML.Transforms/Expression/Error.cs b/src/Microsoft.ML.Transforms/Expression/Error.cs index e6dc80fea5..e664ad796e 100644 --- a/src/Microsoft.ML.Transforms/Expression/Error.cs +++ b/src/Microsoft.ML.Transforms/Expression/Error.cs @@ -43,4 +43,4 @@ public string GetMessage() return msg; } } -} \ No newline at end of file +} diff --git a/src/Microsoft.ML.Transforms/Expression/IlGeneratorExtensions.cs b/src/Microsoft.ML.Transforms/Expression/IlGeneratorExtensions.cs index d765e7f9fb..8c4accfae7 100644 --- a/src/Microsoft.ML.Transforms/Expression/IlGeneratorExtensions.cs +++ b/src/Microsoft.ML.Transforms/Expression/IlGeneratorExtensions.cs @@ -402,4 +402,4 @@ public static ILGenerator Xor(this ILGenerator il) } } } -#pragma warning restore MSML_GeneralName \ No newline at end of file +#pragma warning restore MSML_GeneralName diff --git a/src/Microsoft.ML.Transforms/Expression/KeyWordTable.cs b/src/Microsoft.ML.Transforms/Expression/KeyWordTable.cs index 822dbcd50d..d8eaa016e2 100644 --- a/src/Microsoft.ML.Transforms/Expression/KeyWordTable.cs +++ b/src/Microsoft.ML.Transforms/Expression/KeyWordTable.cs @@ -106,4 +106,4 @@ public IEnumerable> KeyWords get { return _mpnstrtidWord; } } } -} \ No newline at end of file +} diff --git a/src/Microsoft.ML.Transforms/Expression/LambdaBinder.cs b/src/Microsoft.ML.Transforms/Expression/LambdaBinder.cs index bc5b438dd4..b3b7980f5d 100644 --- a/src/Microsoft.ML.Transforms/Expression/LambdaBinder.cs +++ b/src/Microsoft.ML.Transforms/Expression/LambdaBinder.cs @@ -1855,4 +1855,4 @@ private static T Cast(object a) null, }; } -} \ No newline at end of file +} diff --git a/src/Microsoft.ML.Transforms/Expression/Lexer.cs b/src/Microsoft.ML.Transforms/Expression/Lexer.cs index b1c8f87e04..495586158b 100644 --- a/src/Microsoft.ML.Transforms/Expression/Lexer.cs +++ b/src/Microsoft.ML.Transforms/Expression/Lexer.cs @@ -602,13 +602,13 @@ private bool FLexEscChar(bool fUniOnly, out uint u) ChNext(); return true; } - LBad: +LBad: ReportError(ichErr, _cursor.IchCur, ErrId.BadEscape); u = 0; return false; } - LHex: +LHex: bool fRet = true; ChNext(); diff --git a/src/Microsoft.ML.Transforms/Expression/Node.cs b/src/Microsoft.ML.Transforms/Expression/Node.cs index 69342e20c7..b8efb5c3ab 100644 --- a/src/Microsoft.ML.Transforms/Expression/Node.cs +++ b/src/Microsoft.ML.Transforms/Expression/Node.cs @@ -1203,4 +1203,4 @@ public override void Accept(NodeVisitor visitor) } } } -} \ No newline at end of file +} diff --git a/src/Microsoft.ML.Transforms/Expression/Printer.cs b/src/Microsoft.ML.Transforms/Expression/Printer.cs index 42ccd8a5e0..0542639f11 100644 --- a/src/Microsoft.ML.Transforms/Expression/Printer.cs +++ b/src/Microsoft.ML.Transforms/Expression/Printer.cs @@ -568,4 +568,4 @@ public override void Visit(WithLocalNode node) node.Value.Accept(this); } } -} \ No newline at end of file +} diff --git a/src/Microsoft.ML.Transforms/Expression/TokKind.cs b/src/Microsoft.ML.Transforms/Expression/TokKind.cs index d603ade368..a920b69b63 100644 --- a/src/Microsoft.ML.Transforms/Expression/TokKind.cs +++ b/src/Microsoft.ML.Transforms/Expression/TokKind.cs @@ -178,4 +178,4 @@ public static string GetMsg(this ErrId eid, params object[] args) return msg; } } -} \ No newline at end of file +} diff --git a/src/Microsoft.ML.Transforms/Expression/TokenCursor.cs b/src/Microsoft.ML.Transforms/Expression/TokenCursor.cs index bf59310197..0c6916cd46 100644 --- a/src/Microsoft.ML.Transforms/Expression/TokenCursor.cs +++ b/src/Microsoft.ML.Transforms/Expression/TokenCursor.cs @@ -193,4 +193,4 @@ public Token TokPeek(int ditok) return _buffer[_itokCur + ditok]; } } -} \ No newline at end of file +} diff --git a/src/Microsoft.ML.Transforms/Expression/Tokens.cs b/src/Microsoft.ML.Transforms/Expression/Tokens.cs index be428d1823..fdf6293d5c 100644 --- a/src/Microsoft.ML.Transforms/Expression/Tokens.cs +++ b/src/Microsoft.ML.Transforms/Expression/Tokens.cs @@ -289,4 +289,4 @@ public EofToken(TextSpan span) { } } -} \ No newline at end of file +} diff --git a/src/Microsoft.ML.Transforms/ExpressionTransformer.cs b/src/Microsoft.ML.Transforms/ExpressionTransformer.cs index 8b55a30aed..15c6dc3706 100644 --- a/src/Microsoft.ML.Transforms/ExpressionTransformer.cs +++ b/src/Microsoft.ML.Transforms/ExpressionTransformer.cs @@ -172,7 +172,7 @@ public SchemaShape GetOutputSchema(SchemaShape inputSchema) var columnDictionary = inputSchema.ToDictionary(x => x.Name); for (int i = 0; i < _columns.Length; i++) { - for (int j=0;j<_columns[i].InputColumnNames.Length;j++) + for (int j = 0; j < _columns[i].InputColumnNames.Length; j++) { if (!inputSchema.TryFindColumn(_columns[i].InputColumnNames[j], out var inputCol)) throw _host.ExceptSchemaMismatch(nameof(inputSchema), "input", _columns[i].InputColumnNames[j]); diff --git a/src/Microsoft.ML.Transforms/FourierDistributionSampler.cs b/src/Microsoft.ML.Transforms/FourierDistributionSampler.cs index ec6bcf830c..d0f13cc214 100644 --- a/src/Microsoft.ML.Transforms/FourierDistributionSampler.cs +++ b/src/Microsoft.ML.Transforms/FourierDistributionSampler.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.Transforms/GcnTransform.cs b/src/Microsoft.ML.Transforms/GcnTransform.cs index 9d94ba334c..12d8131754 100644 --- a/src/Microsoft.ML.Transforms/GcnTransform.cs +++ b/src/Microsoft.ML.Transforms/GcnTransform.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. @@ -718,7 +718,7 @@ private bool SaveAsOnnxCore(OnnxContext ctx, int iinfo, string srcVariableName, opType = "Div"; string input = _ensureZeroMeans[iinfo] ? inputMinusMean : srcVariableName; - var lStdDevNode = ctx.CreateNode(opType, new[] {input, stdDev }, new[] { dstVariableName }, ctx.GetNodeName(opType), ""); + var lStdDevNode = ctx.CreateNode(opType, new[] { input, stdDev }, new[] { dstVariableName }, ctx.GetNodeName(opType), ""); } else { diff --git a/src/Microsoft.ML.Transforms/GroupTransform.cs b/src/Microsoft.ML.Transforms/GroupTransform.cs index 4ea05ba921..d316584284 100644 --- a/src/Microsoft.ML.Transforms/GroupTransform.cs +++ b/src/Microsoft.ML.Transforms/GroupTransform.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.Transforms/HashJoiningTransform.cs b/src/Microsoft.ML.Transforms/HashJoiningTransform.cs index c977f423ef..854ce9d163 100644 --- a/src/Microsoft.ML.Transforms/HashJoiningTransform.cs +++ b/src/Microsoft.ML.Transforms/HashJoiningTransform.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.Transforms/KeyToVectorMapping.cs b/src/Microsoft.ML.Transforms/KeyToVectorMapping.cs index 57215b660b..d6cf8d2077 100644 --- a/src/Microsoft.ML.Transforms/KeyToVectorMapping.cs +++ b/src/Microsoft.ML.Transforms/KeyToVectorMapping.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.Transforms/LambdaTransform.cs b/src/Microsoft.ML.Transforms/LambdaTransform.cs index f558c4af53..06feb38fd0 100644 --- a/src/Microsoft.ML.Transforms/LambdaTransform.cs +++ b/src/Microsoft.ML.Transforms/LambdaTransform.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.Transforms/LearnerFeatureSelection.cs b/src/Microsoft.ML.Transforms/LearnerFeatureSelection.cs index e43d671cc4..9b3361ea6b 100644 --- a/src/Microsoft.ML.Transforms/LearnerFeatureSelection.cs +++ b/src/Microsoft.ML.Transforms/LearnerFeatureSelection.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.Transforms/LoadTransform.cs b/src/Microsoft.ML.Transforms/LoadTransform.cs index 97405d17bb..3fe211afff 100644 --- a/src/Microsoft.ML.Transforms/LoadTransform.cs +++ b/src/Microsoft.ML.Transforms/LoadTransform.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. @@ -123,4 +123,4 @@ private static IDataTransform Create(IHostEnvironment env, Arguments args, IData return (IDataTransform)currentView; } } -} \ No newline at end of file +} diff --git a/src/Microsoft.ML.Transforms/MissingValueDroppingTransformer.cs b/src/Microsoft.ML.Transforms/MissingValueDroppingTransformer.cs index 7d9c5dc0a1..1421782551 100644 --- a/src/Microsoft.ML.Transforms/MissingValueDroppingTransformer.cs +++ b/src/Microsoft.ML.Transforms/MissingValueDroppingTransformer.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. @@ -359,4 +359,4 @@ private void DropNAs(ref VBuffer src, ref VBuffer dst, InPredi } } } -} \ No newline at end of file +} diff --git a/src/Microsoft.ML.Transforms/MissingValueHandlingTransformer.cs b/src/Microsoft.ML.Transforms/MissingValueHandlingTransformer.cs index 99499410bb..4f9c878cae 100644 --- a/src/Microsoft.ML.Transforms/MissingValueHandlingTransformer.cs +++ b/src/Microsoft.ML.Transforms/MissingValueHandlingTransformer.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.Transforms/MissingValueIndicatorTransform.cs b/src/Microsoft.ML.Transforms/MissingValueIndicatorTransform.cs index c188bef3cf..c7000d4e16 100644 --- a/src/Microsoft.ML.Transforms/MissingValueIndicatorTransform.cs +++ b/src/Microsoft.ML.Transforms/MissingValueIndicatorTransform.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.Transforms/MissingValueIndicatorTransformer.cs b/src/Microsoft.ML.Transforms/MissingValueIndicatorTransformer.cs index a0dc85bc97..dd17f01dcd 100644 --- a/src/Microsoft.ML.Transforms/MissingValueIndicatorTransformer.cs +++ b/src/Microsoft.ML.Transforms/MissingValueIndicatorTransformer.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. @@ -551,4 +551,4 @@ public override SchemaShape GetOutputSchema(SchemaShape inputSchema) return new SchemaShape(result.Values); } } -} \ No newline at end of file +} diff --git a/src/Microsoft.ML.Transforms/MissingValueReplacing.cs b/src/Microsoft.ML.Transforms/MissingValueReplacing.cs index df27d8f3a0..24387274bf 100644 --- a/src/Microsoft.ML.Transforms/MissingValueReplacing.cs +++ b/src/Microsoft.ML.Transforms/MissingValueReplacing.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.Transforms/MissingValueReplacingUtils.cs b/src/Microsoft.ML.Transforms/MissingValueReplacingUtils.cs index d23465405c..55a51bd3ee 100644 --- a/src/Microsoft.ML.Transforms/MissingValueReplacingUtils.cs +++ b/src/Microsoft.ML.Transforms/MissingValueReplacingUtils.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. @@ -693,7 +693,7 @@ public override object GetStat() public sealed class ModeAggregatorOne : StatAggregator> { public ModeAggregatorOne(IChannel ch, DataViewRowCursor cursor, int col) - :base(ch, cursor, col) + : base(ch, cursor, col) { Stat = new ModeStat((in float val) => FloatUtils.IsFinite(val)); } @@ -712,7 +712,7 @@ protected override void ProcessRow(in float val) public sealed class ModeAggregatorAcrossSlots : StatAggregatorAcrossSlots> { public ModeAggregatorAcrossSlots(IChannel ch, DataViewRowCursor cursor, int col) - :base(ch, cursor, col) + : base(ch, cursor, col) { Stat = new ModeStat((in float val) => FloatUtils.IsFinite(val)); } @@ -731,9 +731,9 @@ protected override void ProcessValue(in float val) public sealed class ModeAggregatorBySlot : StatAggregatorBySlot> { public ModeAggregatorBySlot(IChannel ch, VectorDataViewType type, DataViewRowCursor cursor, int col) - :base(ch, type, cursor, col) + : base(ch, type, cursor, col) { - for(int i = 0; i < Stat.Length; i++) + for (int i = 0; i < Stat.Length; i++) { Stat[i] = new ModeStat((in float val) => FloatUtils.IsFinite(val)); } @@ -980,4 +980,4 @@ protected override void ProcessValue(in double val, int slot) } } } -} \ No newline at end of file +} diff --git a/src/Microsoft.ML.Transforms/MutualInformationFeatureSelection.cs b/src/Microsoft.ML.Transforms/MutualInformationFeatureSelection.cs index 45b960935f..2f5248909d 100644 --- a/src/Microsoft.ML.Transforms/MutualInformationFeatureSelection.cs +++ b/src/Microsoft.ML.Transforms/MutualInformationFeatureSelection.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.Transforms/NAHandling.cs b/src/Microsoft.ML.Transforms/NAHandling.cs index eefa2dc23d..76c648fd33 100644 --- a/src/Microsoft.ML.Transforms/NAHandling.cs +++ b/src/Microsoft.ML.Transforms/NAHandling.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.Transforms/NormalizerCatalog.cs b/src/Microsoft.ML.Transforms/NormalizerCatalog.cs index 7e6ca0f847..a93a93b368 100644 --- a/src/Microsoft.ML.Transforms/NormalizerCatalog.cs +++ b/src/Microsoft.ML.Transforms/NormalizerCatalog.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.Transforms/OneHotEncoding.cs b/src/Microsoft.ML.Transforms/OneHotEncoding.cs index 4c55c93b85..bde190a391 100644 --- a/src/Microsoft.ML.Transforms/OneHotEncoding.cs +++ b/src/Microsoft.ML.Transforms/OneHotEncoding.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.Transforms/OneHotHashEncoding.cs b/src/Microsoft.ML.Transforms/OneHotHashEncoding.cs index 0e2399ffbc..d32d9c8e86 100644 --- a/src/Microsoft.ML.Transforms/OneHotHashEncoding.cs +++ b/src/Microsoft.ML.Transforms/OneHotHashEncoding.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.Transforms/OptionalColumnTransform.cs b/src/Microsoft.ML.Transforms/OptionalColumnTransform.cs index e063fe8caa..34cfacffe4 100644 --- a/src/Microsoft.ML.Transforms/OptionalColumnTransform.cs +++ b/src/Microsoft.ML.Transforms/OptionalColumnTransform.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.Transforms/PermutationFeatureImportance.cs b/src/Microsoft.ML.Transforms/PermutationFeatureImportance.cs index 648e49f565..5d1673c348 100644 --- a/src/Microsoft.ML.Transforms/PermutationFeatureImportance.cs +++ b/src/Microsoft.ML.Transforms/PermutationFeatureImportance.cs @@ -292,4 +292,4 @@ private sealed class FeatureName #pragma warning restore 0649 } } -} \ No newline at end of file +} diff --git a/src/Microsoft.ML.Transforms/ProduceIdTransform.cs b/src/Microsoft.ML.Transforms/ProduceIdTransform.cs index f495215e37..6149fd50b9 100644 --- a/src/Microsoft.ML.Transforms/ProduceIdTransform.cs +++ b/src/Microsoft.ML.Transforms/ProduceIdTransform.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.Transforms/Properties/AssemblyInfo.cs b/src/Microsoft.ML.Transforms/Properties/AssemblyInfo.cs index dfcde9dbf4..5468600d22 100644 --- a/src/Microsoft.ML.Transforms/Properties/AssemblyInfo.cs +++ b/src/Microsoft.ML.Transforms/Properties/AssemblyInfo.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.Transforms/StatefulFilterTransform.cs b/src/Microsoft.ML.Transforms/StatefulFilterTransform.cs index 5b4ef2c14b..43a0c8c5a2 100644 --- a/src/Microsoft.ML.Transforms/StatefulFilterTransform.cs +++ b/src/Microsoft.ML.Transforms/StatefulFilterTransform.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.Transforms/SvmLight/SvmLightLoaderSaverCatalog.cs b/src/Microsoft.ML.Transforms/SvmLight/SvmLightLoaderSaverCatalog.cs index 1a1afe0128..48c6c426a8 100644 --- a/src/Microsoft.ML.Transforms/SvmLight/SvmLightLoaderSaverCatalog.cs +++ b/src/Microsoft.ML.Transforms/SvmLight/SvmLightLoaderSaverCatalog.cs @@ -33,8 +33,12 @@ public static SvmLightLoader CreateSvmLightLoader(this DataOperationsCatalog cat bool zeroBased = false, IMultiStreamSource dataSample = null) => new SvmLightLoader(CatalogUtils.GetEnvironment(catalog), new SvmLightLoader.Options() - { InputSize = inputSize, NumberOfRows = numberOfRows, FeatureIndices = zeroBased ? - SvmLightLoader.FeatureIndices.ZeroBased : SvmLightLoader.FeatureIndices.OneBased }, dataSample); + { + InputSize = inputSize, + NumberOfRows = numberOfRows, + FeatureIndices = zeroBased ? + SvmLightLoader.FeatureIndices.ZeroBased : SvmLightLoader.FeatureIndices.OneBased + }, dataSample); /// /// Creates a loader that loads SVM-light like files, where features are specified by their names. diff --git a/src/Microsoft.ML.Transforms/Text/LdaTransform.cs b/src/Microsoft.ML.Transforms/Text/LdaTransform.cs index 330b57a6a6..cb6011c140 100644 --- a/src/Microsoft.ML.Transforms/Text/LdaTransform.cs +++ b/src/Microsoft.ML.Transforms/Text/LdaTransform.cs @@ -768,7 +768,7 @@ private protected override void SaveModel(ModelSaveContext ctx) { _ldas[i].Save(ctx); - if(_columns[i].OutputTopicWordSummary) + if (_columns[i].OutputTopicWordSummary) SaveTopicWordSummary(ctx, i); } } diff --git a/src/Microsoft.ML.Transforms/Text/NgramTransform.cs b/src/Microsoft.ML.Transforms/Text/NgramTransform.cs index 2a42cae127..7b38dc574c 100644 --- a/src/Microsoft.ML.Transforms/Text/NgramTransform.cs +++ b/src/Microsoft.ML.Transforms/Text/NgramTransform.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.Transforms/Text/NgramUtils.cs b/src/Microsoft.ML.Transforms/Text/NgramUtils.cs index 2ff789cbfc..45e2f402ab 100644 --- a/src/Microsoft.ML.Transforms/Text/NgramUtils.cs +++ b/src/Microsoft.ML.Transforms/Text/NgramUtils.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.Transforms/Text/TextCatalog.cs b/src/Microsoft.ML.Transforms/Text/TextCatalog.cs index 9ae8888791..ceca5fea04 100644 --- a/src/Microsoft.ML.Transforms/Text/TextCatalog.cs +++ b/src/Microsoft.ML.Transforms/Text/TextCatalog.cs @@ -63,7 +63,7 @@ public static TextFeaturizingEstimator FeaturizeText(this TransformsCatalog.Text TextFeaturizingEstimator.Options options, params string[] inputColumnNames) => new TextFeaturizingEstimator(Contracts.CheckRef(catalog, nameof(catalog)).GetEnvironment(), - outputColumnName, Utils.Size(inputColumnNames) == 0 ? new[] { outputColumnName } : inputColumnNames, + outputColumnName, Utils.Size(inputColumnNames) == 0 ? new[] { outputColumnName } : inputColumnNames, options); /// diff --git a/src/Microsoft.ML.Transforms/Text/TextFeaturizingEstimator.cs b/src/Microsoft.ML.Transforms/Text/TextFeaturizingEstimator.cs index c601b469a0..a3a90b0673 100644 --- a/src/Microsoft.ML.Transforms/Text/TextFeaturizingEstimator.cs +++ b/src/Microsoft.ML.Transforms/Text/TextFeaturizingEstimator.cs @@ -319,15 +319,15 @@ internal LpNormNormalizingEstimatorBase.NormFunction LpNorm { switch (Norm) { - case NormFunction.L1: - return LpNormNormalizingEstimatorBase.NormFunction.L1; - case NormFunction.L2: - return LpNormNormalizingEstimatorBase.NormFunction.L2; - case NormFunction.Infinity: - return LpNormNormalizingEstimatorBase.NormFunction.Infinity; - default: - Contracts.Assert(false, "Unexpected normalizer type"); - return LpNormNormalizingEstimatorBase.NormFunction.L2; + case NormFunction.L1: + return LpNormNormalizingEstimatorBase.NormFunction.L1; + case NormFunction.L2: + return LpNormNormalizingEstimatorBase.NormFunction.L2; + case NormFunction.Infinity: + return LpNormNormalizingEstimatorBase.NormFunction.Infinity; + default: + Contracts.Assert(false, "Unexpected normalizer type"); + return LpNormNormalizingEstimatorBase.NormFunction.L2; } } } diff --git a/src/Microsoft.ML.Transforms/Text/TokenizingByCharacters.cs b/src/Microsoft.ML.Transforms/Text/TokenizingByCharacters.cs index f323e297f4..3b05e8c33c 100644 --- a/src/Microsoft.ML.Transforms/Text/TokenizingByCharacters.cs +++ b/src/Microsoft.ML.Transforms/Text/TokenizingByCharacters.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.Transforms/Text/WordBagTransform.cs b/src/Microsoft.ML.Transforms/Text/WordBagTransform.cs index 4ba655844d..d45c5edc86 100644 --- a/src/Microsoft.ML.Transforms/Text/WordBagTransform.cs +++ b/src/Microsoft.ML.Transforms/Text/WordBagTransform.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.Transforms/Text/WordEmbeddingsExtractor.cs b/src/Microsoft.ML.Transforms/Text/WordEmbeddingsExtractor.cs index 61dd71f59c..8844e4391c 100644 --- a/src/Microsoft.ML.Transforms/Text/WordEmbeddingsExtractor.cs +++ b/src/Microsoft.ML.Transforms/Text/WordEmbeddingsExtractor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.Transforms/Text/WordHashBagProducingTransform.cs b/src/Microsoft.ML.Transforms/Text/WordHashBagProducingTransform.cs index bf059ebe32..bf6152f945 100644 --- a/src/Microsoft.ML.Transforms/Text/WordHashBagProducingTransform.cs +++ b/src/Microsoft.ML.Transforms/Text/WordHashBagProducingTransform.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.Transforms/Text/WordTokenizing.cs b/src/Microsoft.ML.Transforms/Text/WordTokenizing.cs index 3af7a1e471..dc4abf7fcb 100644 --- a/src/Microsoft.ML.Transforms/Text/WordTokenizing.cs +++ b/src/Microsoft.ML.Transforms/Text/WordTokenizing.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. @@ -543,4 +543,4 @@ public override SchemaShape GetOutputSchema(SchemaShape inputSchema) return new SchemaShape(result.Values); } } -} \ No newline at end of file +} diff --git a/src/Microsoft.ML.Transforms/Text/WrappedTextTransformers.cs b/src/Microsoft.ML.Transforms/Text/WrappedTextTransformers.cs index db07e321da..b9aa7d9649 100644 --- a/src/Microsoft.ML.Transforms/Text/WrappedTextTransformers.cs +++ b/src/Microsoft.ML.Transforms/Text/WrappedTextTransformers.cs @@ -385,4 +385,4 @@ public SchemaShape GetOutputSchema(SchemaShape inputSchema) return SchemaShape.Create(transformer.GetOutputSchema(fakeSchema)); } } -} \ No newline at end of file +} diff --git a/src/Microsoft.ML.Transforms/UngroupTransform.cs b/src/Microsoft.ML.Transforms/UngroupTransform.cs index 03aa8c4c82..6fdfa94bf4 100644 --- a/src/Microsoft.ML.Transforms/UngroupTransform.cs +++ b/src/Microsoft.ML.Transforms/UngroupTransform.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// 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. diff --git a/src/Microsoft.ML.Vision/AssemblyInfo.cs b/src/Microsoft.ML.Vision/AssemblyInfo.cs index 45a77c7bb8..db4c6427b6 100644 --- a/src/Microsoft.ML.Vision/AssemblyInfo.cs +++ b/src/Microsoft.ML.Vision/AssemblyInfo.cs @@ -5,4 +5,4 @@ using System.Runtime.CompilerServices; using Microsoft.ML; -[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.Tests" + PublicKey.TestValue)] \ No newline at end of file +[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.Tests" + PublicKey.TestValue)] diff --git a/src/Microsoft.ML.Vision/ImageClassificationTrainer.cs b/src/Microsoft.ML.Vision/ImageClassificationTrainer.cs index 7824838dea..0e2b2f1e8a 100644 --- a/src/Microsoft.ML.Vision/ImageClassificationTrainer.cs +++ b/src/Microsoft.ML.Vision/ImageClassificationTrainer.cs @@ -702,7 +702,7 @@ private protected override ImageClassificationModelParameters TrainModelCore(Tra generateValidationSet = needValidationSet && !validationSetPresent; } - if(generateValidationSet && _options.ReuseTrainSetBottleneckCachedValues && + if (generateValidationSet && _options.ReuseTrainSetBottleneckCachedValues && !_options.ReuseValidationSetBottleneckCachedValues) { // Not sure if it makes sense to support this scenario. @@ -1079,7 +1079,7 @@ private void TrainAndEvaluateClassificationLayerCore(int epoch, float learningRa Stream trainSetFeatureReader, byte[] labelBufferBytes, byte[] featuresBufferBytes, int labelBufferSizeInBytes, int featureBufferSizeInBytes, int featureFileRecordSize, LearningRateScheduler learningRateScheduler, DnnTrainState trainState, Runner runner, - IntPtr featureBufferPtr, IntPtr labelBufferPtr, Action metricsAggregator) + IntPtr featureBufferPtr, IntPtr labelBufferPtr, Action metricsAggregator) { int labelFileBytesRead; int featuresFileBytesRead; @@ -1135,7 +1135,7 @@ private void CheckAlive() { Host.CheckAlive(); } - catch(OperationCanceledException) + catch (OperationCanceledException) { TryCleanupTemporaryWorkspace(); throw; @@ -1447,8 +1447,8 @@ private protected override void SaveCore(ModelSaveContext ctx) ctx.Writer.Write(_imagePreprocessorTensorOutput); ctx.Writer.Write(_graphInputTensor); ctx.Writer.Write(_graphOutputTensor); - using(var status = new Status()) - using(var buffer = _session.graph.ToGraphDef(status)) + using (var status = new Status()) + using (var buffer = _session.graph.ToGraphDef(status)) { ctx.SaveBinaryStream("TFModel", w => {